Class: Archimate::Svg::Entity::InterfaceEntity
- Inherits:
-
RectEntity
- Object
- BaseEntity
- RectEntity
- Archimate::Svg::Entity::InterfaceEntity
- Defined in:
- lib/archimate/svg/entity/interface_entity.rb
Direct Known Subclasses
ApplicationInterface, BusinessInterface, InfrastructureInterface, TechnologyInterface
Instance Attribute Summary
Attributes inherited from BaseEntity
#background_class, #badge, #badge_bounds, #bounds_offset, #child, #entity, #text_bounds
Instance Method Summary collapse
- #elipse_path(xml, bounds) ⇒ Object
- #entity_shape(xml, bounds) ⇒ Object
-
#initialize(child, bounds_offset) ⇒ InterfaceEntity
constructor
A new instance of InterfaceEntity.
Methods included from Rect
Methods inherited from BaseEntity
#entity_badge, #entity_label, #group_attrs, #layer_background_class, #optional_link, #shape_style, #text_lines, #text_style, #to_svg
Constructor Details
#initialize(child, bounds_offset) ⇒ InterfaceEntity
Returns a new instance of InterfaceEntity.
7 8 9 10 |
# File 'lib/archimate/svg/entity/interface_entity.rb', line 7 def initialize(child, bounds_offset) super @badge = "#archimate-interface-badge" end |
Instance Method Details
#elipse_path(xml, bounds) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/archimate/svg/entity/interface_entity.rb', line 22 def elipse_path(xml, bounds) xml.ellipse( cx: bounds.left + bounds.width / 2.0, cy: bounds.top + bounds.height / 2.0, rx: bounds.width / 2.0, ry: bounds.height / 2.0, class: background_class, style: shape_style ) end |
#entity_shape(xml, bounds) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/archimate/svg/entity/interface_entity.rb', line 12 def entity_shape(xml, bounds) case child.child_type when 1 @badge = nil elipse_path(xml, bounds) else super end end |