Class: Layout::Rectangle
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Entity
|
|
|
Instance Chain:
self,
Entity
|
|
| Inherits: |
Layout::Entity
|
Overview
A simple rectangular shape entity.
Constant Summary
-
TYPE_BULGED =
# File 'lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb', line 11
Constants
nil -
TYPE_LOZENGE =
# File 'lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb', line 12
Stub value.
nil -
TYPE_NORMAL =
# File 'lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb', line 13
Stub value.
nil -
TYPE_ROUNDED =
# File 'lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb', line 14
Stub value.
nil
Class Method Summary
-
.new(bounds) ⇒ Layout::Rectangle
constructor
The
#initializemethod creates a new normal, lozenge, bulged or roundedRectangle, depending on the type passed in.
Instance Attribute Summary
-
#radius ⇒ Float?
rw
The #radius method returns the radius of the
Rectangle, ornilif theRectangleis not of typeLayout::Rectangle::TYPE_BULGEDorLayout::Rectangle::TYPE_ROUNDED. -
#radius=(radius)
rw
The #radius= method sets the radius of the
Rectangle. -
#type ⇒ Integer
rw
The #type method returns the type of the
Rectangle. -
#type=(type)
rw
The #type= method sets the type of the
Rectangle.
Entity - Inherited
| #locked= | The |
| #locked? | The |
| #on_shared_layer? | |
| #style | |
| #style= | |
| #untransformed_bounds | The |
| #untransformed_bounds= | The |
Instance Method Summary
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(bounds) ⇒ Rectangle
.new(bounds, type) ⇒ Rectangle
.new(bounds, type, radius) ⇒ Rectangle
Rectangle
.new(bounds, type) ⇒ Rectangle
.new(bounds, type, radius) ⇒ Rectangle
The #initialize method creates a new normal, lozenge, bulged or rounded Rectangle, depending on the type passed in.
The rectangle type can be one of the following values:
Layout::Rectangle::TYPE_NORMALLayout::Rectangle::TYPE_ROUNDEDLayout::Rectangle::TYPE_LOZENGELayout::Rectangle::TYPE_BULGED
Instance Attribute Details
#radius ⇒ Float? (rw)
The #radius method returns the radius of the Rectangle, or nil if the Rectangle is not of type Layout::Rectangle::TYPE_BULGED or Layout::Rectangle::TYPE_ROUNDED
#radius=(radius) (rw)
The #radius= method sets the radius of the Rectangle.
#type ⇒ Integer (rw)
The #type method returns the type of the Rectangle.
The type of a rectangle can be one of the following:
Layout::Rectangle::TYPE_NORMALLayout::Rectangle::TYPE_ROUNDEDLayout::Rectangle::TYPE_LOZENGELayout::Rectangle::TYPE_BULGED
#type=(type) (rw)
The #type= method sets the type of the 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 Rectangle can be one of the following:
Layout::Rectangle::TYPE_NORMALLayout::Rectangle::TYPE_ROUNDEDLayout::Rectangle::TYPE_LOZENGELayout::Rectangle::TYPE_BULGED