Class: Layout::Entity
Relationships | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Overview
An entity is an object shown on a page of a LayOut document.
Instance Attribute Summary
-
#locked=(is_locked)
rw
The #locked= method sets the
Entity
as locked or unlocked. -
#locked? ⇒ Boolean
rw
The #locked? method returns whether the
Entity
is locked or unlocked. -
#on_shared_layer? ⇒ Boolean
readonly
The #on_shared_layer? method returns whether or not the
Entity
is on a sharedLayer
. - #style ⇒ Layout::Style? rw
- #style=(style) rw
-
#untransformed_bounds ⇒ Geom::Bounds2d
rw
The #untransformed_bounds method returns the untransformed bounds of the
Entity
. -
#untransformed_bounds=(bounds)
rw
The #untransformed_bounds= method sets the untransformed bounds of the
Entity
.
Instance Method Summary
-
#==(other) ⇒ Boolean
The #== method checks to see if the two
Entity
s are equal. -
#bounds ⇒ Geom::Bounds2d
The #bounds method returns the 2D rectangular bounds of the
Entity
. - #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 theEntity
is on, ornil
if it is not associated with aLayerInstance
. -
#move_to_group(group)
The #move_to_group method moves the
Entity
into aGroup
. -
#move_to_layer(layer)
The #move_to_layer method moves the
Entity
to the givenLayer
. - #page ⇒ Layout::Page?
-
#transform!(transformation)
The #transform! method transforms the
Entity
with a given::Geom::Transformation2d
. -
#transformation ⇒ Geom::Transformation2d?
The #transformation method returns the explicit
::Geom::Transformation2d
.
Instance Attribute Details
#locked=(is_locked) (rw)
The #locked=
method sets the Entity
as locked or unlocked. When locked, the Entity
cannot be modified directly.
#locked? ⇒ Boolean
(rw)
The #locked?
method returns whether the Entity
is locked or unlocked.
#style ⇒ Layout::Style? (rw)
#style=(style) (rw)
The #style=
method sets the Style
of the Entity
.
#untransformed_bounds ⇒ Geom::Bounds2d (rw)
The #untransformed_bounds
method returns the untransformed bounds of the Entity
. This is the bounds of the Entity
before its explicit ::Geom::Transformation2d
is applied.
#untransformed_bounds=(bounds) (rw)
The #untransformed_bounds=
method sets the untransformed bounds of the Entity
. This is the bounds of the Entity
before its explicit ::Geom::Transformation2d
is applied.
Instance Method Details
#==(other) ⇒ Boolean
The #==
method checks to see if the two Entity
s 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 Entity
.
#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?
Group
s are never associated with a LayerInstance
.
The #layer_instance
method returns the LayerInstance
that the Entity
is on, or nil
if it is not associated with a LayerInstance
.
#move_to_group(group)
The #move_to_group
method moves the Entity
into a Group
. If the 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 Entity
, the old Group
will be collapsed and the remaining Entity
will be moved to the old Group
‘s parent.
#move_to_layer(layer)
#move_to_layer(layer, pages)
The #move_to_layer
method moves the Entity
to the given Layer
. If the Layer
is non-shared and the Entity
is currently on a shared Layer
, an array of Page
s must be provided to move the Entity
to. In all other cases, passing in an array of Page
s is not necessary. The Entity
must belong to the same Document
as the the Layer
and the Page
s.
#page ⇒ Layout::Page?
#transform!(transformation)
The #transform!
method transforms the Entity
with a given ::Geom::Transformation2d
.
#transformation ⇒ Geom::Transformation2d?
The #transformation
method returns the explicit ::Geom::Transformation2d
.