Class: Layout::Label
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Entity
|
|
|
Instance Chain:
self,
Entity
|
|
| Inherits: |
Layout::Entity
|
Overview
This is an interface to a label entity. A Label consists of a FormattedText and the label leader Path. A Label may be connected to another Entity via a ConnectionPoint.
Constant Summary
-
CONNECTION_TYPE_AUTO =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 14
Constants
nil -
CONNECTION_TYPE_BOTTOM_LEFT =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 15
Stub value.
nil -
CONNECTION_TYPE_BOTTOM_RIGHT =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 16
Stub value.
nil -
CONNECTION_TYPE_CENTER_LEFT =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 17
Stub value.
nil -
CONNECTION_TYPE_CENTER_RIGHT =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 18
Stub value.
nil -
CONNECTION_TYPE_NONE =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 19
Stub value.
nil -
CONNECTION_TYPE_REVERSE_AUTO =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 20
Stub value.
nil -
CONNECTION_TYPE_TOP_LEFT =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 21
Stub value.
nil -
CONNECTION_TYPE_TOP_RIGHT =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 22
Stub value.
nil -
LEADER_LINE_TYPE_BEZIER =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 24
Stub value.
nil -
LEADER_LINE_TYPE_SINGLE_SEGMENT =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 25
Stub value.
nil -
LEADER_LINE_TYPE_TWO_SEGMENT =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 26
Stub value.
nil -
LEADER_LINE_TYPE_UNKNOWN =
# File 'lib/sketchup-api-stubs/stubs/Layout/Label.rb', line 27
Stub value.
nil
Class Method Summary
-
.new(text, leader_type, target_point, bounds) ⇒ Layout::Label
constructor
The
#initializemethod creates a new disconnectedLabel.
Instance Attribute Summary
-
#connection_type ⇒ Integer
rw
The #connection_type method returns the type of the text connection for the
Label. -
#connection_type=(connection_type)
rw
The #connection_type= method sets the type of the text connection for the
Label. -
#leader_line ⇒ Layout::Path
rw
The #leader_line method returns a copy of the leader line.
-
#leader_line=(leader_path)
rw
The #leader_line= method sets the leader line.
-
#leader_line_type ⇒ Integer
rw
The #leader_line_type method returns the type of the leader line for the
Label. -
#leader_line_type=(leader_type)
rw
The #leader_line_type= method sets the type of the leader line for the
Label. -
#text ⇒ Layout::FormattedText
rw
The #text method returns a copy of the
FormattedTextof theLabel. -
#text=(new_text)
rw
The #text= method sets the
FormattedTextof theLabel.
Entity - Inherited
| #locked= | The |
| #locked? | The |
| #on_shared_layer? | |
| #style | |
| #style= | |
| #untransformed_bounds | The |
| #untransformed_bounds= | The |
Instance Method Summary
-
#connect(connection_point)
The #connect method connects the
Labelto the givenConnectionPoint. -
#disconnect
The #disconnect method disconnects the
Labelfrom itsConnectionPoint. - #entities ⇒ Layout::Entities
Entity - Inherited
| #== | The |
| #bounds | The |
| #document | |
| #drawing_bounds | The |
| #group | |
| #layer_instance | The |
| #move_to_group | |
| #move_to_layer | |
| #page | |
| #transform! | The |
| #transformation | The |
Constructor Details
.new(text, leader_type, target_point, bounds) ⇒ Label
.new(text, leader_type, target_point, anchor_point, anchor_type) ⇒ Label
Label
.new(text, leader_type, target_point, anchor_point, anchor_type) ⇒ Label
The #initialize method creates a new disconnected Label.
Instance Attribute Details
#connection_type ⇒ Integer (rw)
The #connection_type method returns the type of the text connection for the Label.
The leader line type can be one of the following values:
Layout::Label::CONNECTION_TYPE_NONELayout::Label::CONNECTION_TYPE_AUTOLayout::Label::CONNECTION_TYPE_REVERSE_AUTOLayout::Label::CONNECTION_TYPE_TOP_LEFTLayout::Label::CONNECTION_TYPE_CENTER_LEFTLayout::Label::CONNECTION_TYPE_BOTTOM_LEFTLayout::Label::CONNECTION_TYPE_TOP_RIGHTLayout::Label::CONNECTION_TYPE_CENTER_RIGHTLayout::Label::CONNECTION_TYPE_BOTTOM_RIGHT
#connection_type=(connection_type) (rw)
The #connection_type= method sets the type of the text connection for the Label.
The leader line type can be one of the following values:
Layout::Label::CONNECTION_TYPE_NONELayout::Label::CONNECTION_TYPE_AUTOLayout::Label::CONNECTION_TYPE_REVERSE_AUTOLayout::Label::CONNECTION_TYPE_TOP_LEFTLayout::Label::CONNECTION_TYPE_CENTER_LEFTLayout::Label::CONNECTION_TYPE_BOTTOM_LEFTLayout::Label::CONNECTION_TYPE_TOP_RIGHTLayout::Label::CONNECTION_TYPE_CENTER_RIGHTLayout::Label::CONNECTION_TYPE_BOTTOM_RIGHT
#leader_line ⇒ Layout::Path (rw)
The #leader_line method returns a copy of the leader line.
#leader_line=(leader_path) (rw)
The #leader_line= method sets the leader line.
#leader_line_type ⇒ Integer (rw)
The #leader_line_type method returns the type of the leader line for the Label.
The leader line type can be one of the following values:
Layout::Label::LEADER_LINE_TYPE_SINGLE_SEGMENTLayout::Label::LEADER_LINE_TYPE_TWO_SEGMENTLayout::Label::LEADER_LINE_TYPE_BEZIERLayout::Label::LEADER_LINE_TYPE_UNKNOWN
#leader_line_type=(leader_type) (rw)
The #leader_line_type= method sets the type of the leader line for the Label.
The leader line type can be one of the following values:
Layout::Label::LEADER_LINE_TYPE_SINGLE_SEGMENTLayout::Label::LEADER_LINE_TYPE_TWO_SEGMENTLayout::Label::LEADER_LINE_TYPE_BEZIERLayout::Label::LEADER_LINE_TYPE_UNKNOWN
#text ⇒ Layout::FormattedText (rw)
The #text method returns a copy of the FormattedText of the Label.
#text=(new_text) (rw)
The #text= method sets the FormattedText of the Label.
Instance Method Details
#connect(connection_point)
The #connect method connects the Label to the given ConnectionPoint. The leader line will be adjusted to point at the ConnectionPoint. The Label must be in the same Document as the ConnectionPoint. If both the Label and the ConnectionPoint‘s Entity are on non-shared Layers, they must be on the same Page.
#disconnect
The #disconnect method disconnects the Label from its ConnectionPoint. The leader line will not be adjusted by disconnecting from a ConnectionPoint.
#entities ⇒ Layout::Entities
#entities(page) ⇒ Layout::Entities
The #entities method returns the Entities that represent the Label in its exploded form.