Class: Archimate::Svg::Entity::RectEntity
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- Archimate::Svg::Entity::RectEntity
- Includes:
- Rect
- Defined in:
- lib/archimate/svg/entity/rect_entity.rb
Direct Known Subclasses
AndJunction, ApplicationCollaboration, ApplicationComponent, BusinessActor, BusinessCollaboration, BusinessRole, CommunicationNetwork, CommunicationPath, DiagramModelReference, DistributionNetwork, InterfaceEntity, Junction, Location, Material, Network, OrJunction, Path, Resource, SketchModelSticky, SystemSoftware, TechnologyCollaboration
Instance Attribute Summary
Attributes inherited from BaseEntity
#background_class, #badge, #badge_bounds, #bounds_offset, #child, #entity, #text_bounds
Instance Method Summary collapse
- #entity_shape(xml, bounds) ⇒ Object
-
#initialize(child, bounds_offset) ⇒ RectEntity
constructor
A new instance of RectEntity.
Methods included from Rect
Methods inherited from BaseEntity
#entity_badge, #entity_label, #group_attrs, #optional_link, #shape_style, #text_lines, #text_style, #to_svg
Constructor Details
#initialize(child, bounds_offset) ⇒ RectEntity
Returns a new instance of RectEntity.
9 10 11 12 13 14 15 16 17 |
# File 'lib/archimate/svg/entity/rect_entity.rb', line 9 def initialize(child, bounds_offset) super @badge_bounds = DataModel::Bounds.new( x: child.bounds.right - 25, y: child.bounds.top + 5, width: 20, height: 20 ) end |
Instance Method Details
#entity_shape(xml, bounds) ⇒ Object
19 20 21 |
# File 'lib/archimate/svg/entity/rect_entity.rb', line 19 def entity_shape(xml, bounds) rect_path(xml, bounds) end |