Class: Layout::Path
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Entity
|
|
|
Instance Chain:
self,
Entity
|
|
| Inherits: |
Layout::Entity
|
Overview
A path entity represents a continuous, multi-segment polyline or bezier curve.
Constant Summary
-
PATH_WINDING_CLOCKWISE =
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 19
Stub value.
nil -
PATH_WINDING_COUNTER_CLOCKWISE =
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 20
Stub value.
nil -
PATH_WINDING_NONE =
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 21
Stub value.
nil -
POINT_TYPE_ARC_CENTER =
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 12
Constants
nil -
POINT_TYPE_BEZIER_CONTROL =
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 13
Stub value.
nil -
POINT_TYPE_BEZIER_TO =
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 14
Stub value.
nil -
POINT_TYPE_CLOSE =
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 15
Stub value.
nil -
POINT_TYPE_LINE_TO =
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 16
Stub value.
nil -
POINT_TYPE_MOVE_TO =
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 17
Stub value.
nil
Class Method Summary
- .new(start_point, end_point) ⇒ Layout::Path constructor
-
.new_arc(center_point, radius, start_angle, end_angle) ⇒ Layout::Path
The .new_arc method creates a new arc-shaped
Path.
Instance Attribute Summary
-
#closed? ⇒ Boolean
readonly
The #closed? method returns whether the
Pathis closed.
Entity - Inherited
| #locked= | The |
| #locked? | The |
| #on_shared_layer? | |
| #style | |
| #style= | |
| #untransformed_bounds | The |
| #untransformed_bounds= | The |
Instance Method Summary
-
#append_point(point) ⇒ Layout::Path
The #append_point method appends a
::Geom::Point2dto the end of thePath. -
#arc ⇒ Array(Geom::Point2d, Float, Float, Float)?
The #arc method returns the parameters of an arc from the
Path, ornilif path is not an arc. -
#circle ⇒ Array(Geom::Point2d, Float)?
The #circle method returns the parameters of a circle from the
Path, ornilif path is not a circle. -
#close
The #close method closes the
Path. -
#end_arrow ⇒ Layout::Path?
The #end_arrow method creates a new
Pathfrom an end arrow. -
#end_point ⇒ Geom::Point2d
The #end_point method returns the end point of the
Path. -
#parametric_length ⇒ Float
The #parametric_length method returns the parametric length for the
Path. -
#point_at(parametric_value) ⇒ Geom::Point2d
The #point_at method returns the
::Geom::Point2dat a given parametric value. -
#point_types ⇒ Array<Integer>
The #point_types method returns an array of point types corresponding to the
::Geom::Point2ds in thePath. -
#points ⇒ Array<Geom::Point2d>
The #points method returns an array of
::Geom::Point2ds in thePath. -
#start_arrow ⇒ Layout::Path?
The #start_arrow method creates a new
Pathfrom a start arrow. -
#start_point ⇒ Geom::Point2d
The #start_point method returns the start point of the
Path. -
#tangent_at(parametric_value) ⇒ Geom::Vector2d
The #tangent_at method returns the tangent
::Geom::Vector2dat the given parametric value. -
#winding ⇒ Integer
The #winding method returns the winding type of the
Path.
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(start_point, end_point) ⇒ Path
.new(start_point, control_point_1, control_point_2, end_point) ⇒ Path
.new(rectangle) ⇒ Path
.new(ellipse) ⇒ Path
Path
.new(start_point, control_point_1, control_point_2, end_point) ⇒ Path
.new(rectangle) ⇒ Path
.new(ellipse) ⇒ Path
Class Method Details
.new_arc(center_point, radius, start_angle, end_angle) ⇒ Path
The .new_arc method creates a new arc-shaped Path.
Instance Attribute Details
#closed? ⇒ Boolean (readonly)
The #closed? method returns whether the Path is closed.
Instance Method Details
#append_point(point) ⇒ Path
#append_point(control_point1, control_point2, point) ⇒ Path
Path
#append_point(control_point1, control_point2, point) ⇒ Path
The #append_point method appends a ::Geom::Point2d to the end of the Path.
#arc ⇒ Array(Geom::Point2d, Float, Float, Float)?
The #arc method returns the parameters of an arc from the Path, or nil if path is not an arc.
#circle ⇒ Array(Geom::Point2d, Float)?
The #circle method returns the parameters of a circle from the Path, or nil if path is not a circle.
#close
The #close method closes the Path.
#end_arrow ⇒ Path?
The #end_arrow method creates a new Path from an end arrow.
#end_point ⇒ Geom::Point2d
The #end_point method returns the end point of the Path.
#parametric_length ⇒ Float
The #parametric_length method returns the parametric length for the Path. The parametric length is the length with respect to the curve of the Path.
#point_at(parametric_value) ⇒ Geom::Point2d
The #point_at method returns the ::Geom::Point2d at a given parametric value.
#point_types ⇒ Array<Integer>
The #point_types method returns an array of point types corresponding to the ::Geom::Point2ds in the Path.
A point type can be one of the following values:
POINT_TYPE_MOVE_TOPOINT_TYPE_LINE_TOPOINT_TYPE_BEZIER_TOPOINT_TYPE_ARC_CENTERPOINT_TYPE_BEZIER_CONTROLPOINT_TYPE_CLOSE
#points ⇒ Array<Geom::Point2d>
The #points method returns an array of ::Geom::Point2ds in the Path.
#start_arrow ⇒ Path?
The #start_arrow method creates a new Path from a start arrow.
#start_point ⇒ Geom::Point2d
The #start_point method returns the start point of the Path.
#tangent_at(parametric_value) ⇒ Geom::Vector2d
The #tangent_at method returns the tangent ::Geom::Vector2d at the given parametric value.
#winding ⇒ Integer
The #winding method returns the winding type of the Path.
A point type can be one of the following values:
PATH_WINDING_NONEPATH_WINDING_CLOCKWISEPATH_WINDING_COUNTER_CLOCKWISE