Class: Layout::Rectangle
- Defined in:
- lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb
Overview
A simple rectangular shape entity.
Constant Summary collapse
- TYPE_BULGED =
Constants
nil
- TYPE_LOZENGE =
Stub value.
nil
- TYPE_NORMAL =
Stub value.
nil
- TYPE_ROUNDED =
Stub value.
nil
Instance Method Summary collapse
-
#initialize(*args) ⇒ Rectangle
constructor
The #initialize method creates a new normal, lozenge, bulged or rounded Rectangle, depending on the type passed in.
- #radius ⇒ Float?
- #radius=(radius) ⇒ Object
- #type ⇒ Integer
- #type=(type) ⇒ Object
Methods inherited from Entity
#==, #bounds, #document, #drawing_bounds, #group, #layer_instance, #locked=, #locked?, #move_to_group, #move_to_layer, #on_shared_layer?, #page, #style, #style=, #transform!, #transformation, #untransformed_bounds, #untransformed_bounds=
Constructor Details
#initialize(bounds) ⇒ Layout::Rectangle #initialize(bounds, type) ⇒ Layout::Rectangle #initialize(bounds, type, radius) ⇒ Layout::Rectangle
The #initialize method creates a new normal, lozenge, bulged or rounded Layout::Rectangle, depending on the type passed in.
The rectangle type can be one of the following values:
Layout::Rectangle::TYPE_NORMAL
Layout::Rectangle::TYPE_ROUNDED
Layout::Rectangle::TYPE_LOZENGE
Layout::Rectangle::TYPE_BULGED
72 73 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb', line 72 def initialize(*args) end |
Instance Method Details
#radius ⇒ Float?
The #radius method returns the radius of the Layout::Rectangle, or nil
if the Layout::Rectangle is not of type Layout::Rectangle::TYPE_BULGED
or Layout::Rectangle::TYPE_ROUNDED
91 92 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb', line 91 def radius end |
#radius=(radius) ⇒ Object
The #radius= method sets the radius of the Layout::Rectangle.
118 119 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb', line 118 def radius=(radius) end |
#type ⇒ Integer
The #type method returns the type of the Layout::Rectangle.
The type of a rectangle can be one of the following:
Layout::Rectangle::TYPE_NORMAL
Layout::Rectangle::TYPE_ROUNDED
Layout::Rectangle::TYPE_LOZENGE
Layout::Rectangle::TYPE_BULGED
139 140 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb', line 139 def type end |
#type=(type) ⇒ Object
The #type= method sets the type of the Layout::Rectangle. If the type is set to Layout::Rectangle::TYPE_ROUNDED
or Layout::Rectangle::TYPE_BULGED
, the [Layout::Rectangle]‘s radius will be set to the default value of 0.25, if the value had not previously been set.
The type of a Layout::Rectangle can be one of the following:
Layout::Rectangle::TYPE_NORMAL
Layout::Rectangle::TYPE_ROUNDED
Layout::Rectangle::TYPE_LOZENGE
Layout::Rectangle::TYPE_BULGED
171 172 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb', line 171 def type=(type) end |