Class: Layout::Entity
- Inherits:
-
Object
- Object
- Layout::Entity
- Defined in:
- SketchUp/Layout/Entity.rb
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.
40 41 |
# File 'SketchUp/Layout/Entity.rb', line 40 def ==(other) end |
#bounds ⇒ Geom::Bounds2d
The #bounds method returns the 2D rectangular bounds of the Layout::Entity.
53 54 |
# File 'SketchUp/Layout/Entity.rb', line 53 def bounds end |
#document ⇒ Layout::Document?
The #document method returns the Document that the Layout::Entity belongs to, or nil
if it is not in a Document.
68 69 |
# File 'SketchUp/Layout/Entity.rb', line 68 def document end |
#drawing_bounds ⇒ Geom::OrientedBounds2d
The #drawing_bounds method returns the 2D rectangular drawing bounds of the Layout::Entity.
82 83 |
# File 'SketchUp/Layout/Entity.rb', line 82 def drawing_bounds end |
#group ⇒ Layout::Group?
The #group method returns the Group the Layout::Entity belongs to, or nil
if it is not in a Group.
97 98 |
# File 'SketchUp/Layout/Entity.rb', line 97 def group end |
#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.
114 115 |
# File 'SketchUp/Layout/Entity.rb', line 114 def layer_instance end |
#locked=(is_locked) ⇒ Object
The #locked= method sets the Layout::Entity as locked or unlocked. When locked, the Layout::Entity cannot be modified directly.
128 129 |
# File 'SketchUp/Layout/Entity.rb', line 128 def locked=(is_locked) end |
#locked? ⇒ Boolean
The #locked? method returns whether the Layout::Entity is locked or unlocked.
144 145 |
# File 'SketchUp/Layout/Entity.rb', line 144 def locked? end |
#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.
175 176 |
# File 'SketchUp/Layout/Entity.rb', line 175 def move_to_group(group) end |
#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.
215 216 |
# File 'SketchUp/Layout/Entity.rb', line 215 def move_to_layer(*args) end |
#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.
236 237 |
# File 'SketchUp/Layout/Entity.rb', line 236 def on_shared_layer? end |
#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.
253 254 |
# File 'SketchUp/Layout/Entity.rb', line 253 def page end |
#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.
268 269 |
# File 'SketchUp/Layout/Entity.rb', line 268 def style end |
#style=(style) ⇒ Object
The #style= method sets the Style of the Layout::Entity.
281 282 |
# File 'SketchUp/Layout/Entity.rb', line 281 def style=(style) end |
#transform!(transformation) ⇒ Object
The #transform! method transforms the Layout::Entity with a given Geom::Transformation2d.
301 302 |
# File 'SketchUp/Layout/Entity.rb', line 301 def transform!(transformation) end |
#transformation ⇒ Geom::Transformation2d?
The #transformation method returns the explicit Geom::Transformation2d.
314 315 |
# File 'SketchUp/Layout/Entity.rb', line 314 def transformation end |
#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.
332 333 |
# File 'SketchUp/Layout/Entity.rb', line 332 def untransformed_bounds end |
#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.
360 361 |
# File 'SketchUp/Layout/Entity.rb', line 360 def untransformed_bounds=(bounds) end |