Method: Archimate::Svg::Entity::Representation#representation_path

Defined in:
lib/archimate/svg/entity/representation.rb

#representation_path(xml, bounds) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/archimate/svg/entity/representation.rb', line 11

def representation_path(xml, bounds)
  xml.path(
    d: [
      ["M", bounds.left, bounds.top],
      ["v", bounds.height - 8],
      ["c", 0.167 * bounds.width, 0.133 * bounds.height,
       0.336 * bounds.width, 0.133 * bounds.height,
       bounds.width * 0.508, 0],
      ["c", 0.0161 * bounds.width, -0.0778 * bounds.height,
       0.322 * bounds.width, -0.0778 * bounds.height,
       bounds.width * 0.475, 0],
      ["v", -(bounds.height - 8)],
      "z"
    ].flatten.join(" "),
    class: background_class, style: shape_style
  )
end