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 =
Stub value.
nil
-
PATH_WINDING_COUNTER_CLOCKWISE =
Stub value.
nil
-
PATH_WINDING_NONE =
Stub value.
nil
-
POINT_TYPE_ARC_CENTER =
Constants
nil
-
POINT_TYPE_BEZIER_CONTROL =
Stub value.
nil
-
POINT_TYPE_BEZIER_TO =
Stub value.
nil
-
POINT_TYPE_CLOSE =
Stub value.
nil
-
POINT_TYPE_LINE_TO =
Stub value.
nil
-
POINT_TYPE_MOVE_TO =
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
Path
is 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::Point2d
to the end of thePath
. -
#arc ⇒ Array(Geom::Point2d, Float, Float, Float)?
The #arc method returns the parameters of an arc from the
Path
, ornil
if path is not an arc. -
#circle ⇒ Array(Geom::Point2d, Float)?
The #circle method returns the parameters of a circle from the
Path
, ornil
if path is not a circle. -
#close
The #close method closes the
Path
. -
#end_arrow ⇒ Layout::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
. -
#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::Point2d
s in thePath
. -
#points ⇒ Array<Geom::Point2d>
The #points method returns an array of
::Geom::Point2d
s in thePath
. -
#start_arrow ⇒ Layout::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
.
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::Point2d
s in the Path
.
A point type can be one of the following values:
POINT_TYPE_MOVE_TO
POINT_TYPE_LINE_TO
POINT_TYPE_BEZIER_TO
POINT_TYPE_ARC_CENTER
POINT_TYPE_BEZIER_CONTROL
POINT_TYPE_CLOSE
#points ⇒ Array<Geom::Point2d>
The #points
method returns an array of ::Geom::Point2d
s 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_NONE
PATH_WINDING_CLOCKWISE
PATH_WINDING_COUNTER_CLOCKWISE