Class: Layout::Entity
- Inherits:
-
Object
- Object
- Layout::Entity
Overview
An entity is an object shown on a page of a LayOut document.
Direct Known Subclasses
AngularDimension, Ellipse, FormattedText, Group, Image, Label, LinearDimension, Path, Rectangle, SketchUpModel, Table
Instance Method Summary # collapse
- #==(other) ⇒ Boolean
- #bounds ⇒ Geom::Bounds2d
- #document ⇒ Layout::Document?
-
#drawing_bounds ⇒ Geom::OrientedBounds2d
The #drawing_bounds method returns the 2D rectangular drawing bounds of the Entity.
- #group ⇒ Layout::Group?
-
#layer_instance ⇒ Layout::LayerInstance?
The #layer_instance method returns the LayerInstance that the Entity is on, or
nil
if it is not associated with a LayerInstance. - #locked=(is_locked) ⇒ Object
- #locked? ⇒ Boolean
-
#move_to_group(group) ⇒ Object
The #move_to_group method moves the Entity into a Group.
-
#move_to_layer(*args) ⇒ Object
The #move_to_layer method moves the Entity to the given Layer.
-
#on_shared_layer? ⇒ Boolean
The #on_shared_layer? method returns whether or not the Entity is on a shared Layer.
- #page ⇒ Layout::Page?
- #style ⇒ Layout::Style?
- #style=(style) ⇒ Object
-
#transform!(transformation) ⇒ Object
The #transform! method transforms the Entity with a given Geom::Transformation2d.
-
#transformation ⇒ Geom::Transformation2d?
The #transformation method returns the explicit Geom::Transformation2d.
-
#untransformed_bounds ⇒ Geom::Bounds2d
The #untransformed_bounds method returns the untransformed bounds of the Entity.
-
#untransformed_bounds=(bounds) ⇒ Object
The #untransformed_bounds= method sets the untransformed bounds of the Entity.
Instance Method Details
↑ #==(other) ⇒ Boolean
The #== method checks to see if the two Layout::Entitys are equal. This checks whether the Ruby Objects are pointing to the same internal object.
↑ #bounds ⇒ Geom::Bounds2d
The #bounds method returns the 2D rectangular bounds of the Layout::Entity.
↑ #document ⇒ Layout::Document?
The #document method returns the Document that the Layout::Entity belongs to, or nil
if it is not in a Document.
↑ #drawing_bounds ⇒ Geom::OrientedBounds2d
The #drawing_bounds method returns the 2D rectangular drawing bounds of the Layout::Entity.
↑ #group ⇒ Layout::Group?
The #group method returns the Group the Layout::Entity belongs to, or nil
if it is not in a Group.
↑ #layer_instance ⇒ Layout::LayerInstance?
Groups are never associated with a LayerInstance.
The #layer_instance method returns the LayerInstance that the Layout::Entity is on, or nil
if it is not associated with a LayerInstance.
↑ #locked=(is_locked) ⇒ Object
The #locked= method sets the Layout::Entity as locked or unlocked. When locked, the Layout::Entity cannot be modified directly.
↑ #locked? ⇒ Boolean
The #locked? method returns whether the Layout::Entity is locked or unlocked.
↑ #move_to_group(group) ⇒ Object
The #move_to_group method moves the Layout::Entity into a Group. If the Layout::Entity is already in a Group, it will be removed from that Group prior to being added to the new one. If this action results in the old Group containing only one Layout::Entity, the old Group will be collapsed and the remaining Layout::Entity will be moved to the old Group's parent.
↑ #move_to_layer(layer) ⇒ Object #move_to_layer(layer, pages) ⇒ Object
The #move_to_layer method moves the Layout::Entity to the given Layer. If the Layer is non-shared and the Layout::Entity is currently on a shared Layer, an array of Pages must be provided to move the Layout::Entity to. In all other cases, passing in an array of Pages is not necessary. The Layout::Entity must belong to the same Document as the the Layer and the Pages.
↑ #on_shared_layer? ⇒ Boolean
The #on_shared_layer? method returns whether or not the Layout::Entity is on a shared Layer. This function works for all Layout::Entity types, including Group. Groups do not belong to a specific Layer, but their children are all on either a shared or non-shared Layer.
↑ #page ⇒ Layout::Page?
The #page method returns the Page that the Layout::Entity belongs to, or nil
if it is on a shared Layer or not in a Document.
↑ #style ⇒ Layout::Style?
The #style method returns the Style of the Layout::Entity. If the Layout::Entity is a Group, nil
will be returned, as they do not have a Style.
↑ #style=(style) ⇒ Object
The #style= method sets the Style of the Layout::Entity.
↑ #transform!(transformation) ⇒ Object
The #transform! method transforms the Layout::Entity with a given Geom::Transformation2d.
↑ #transformation ⇒ Geom::Transformation2d?
The #transformation method returns the explicit Geom::Transformation2d.
↑ #untransformed_bounds ⇒ Geom::Bounds2d
The #untransformed_bounds method returns the untransformed bounds of the Layout::Entity. This is the bounds of the Layout::Entity before its explicit Geom::Transformation2d is applied.
↑ #untransformed_bounds=(bounds) ⇒ Object
The #untransformed_bounds= method sets the untransformed bounds of the Layout::Entity. This is the bounds of the Layout::Entity before its explicit Geom::Transformation2d is applied.