Class: Layout::Path
- Defined in:
- lib/sketchup-api-stubs/stubs/Layout/Path.rb
Overview
A path entity represents a continuous, multi-segment polyline or bezier curve.
Constant Summary collapse
- 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
- PATH_WINDING_CLOCKWISE =
Stub value.
nil
- PATH_WINDING_COUNTER_CLOCKWISE =
Stub value.
nil
- PATH_WINDING_NONE =
Stub value.
nil
Class Method Summary collapse
-
.new_arc(center_point, radius, start_angle, end_angle) ⇒ Layout::Path
The Path.new_arc method creates a new arc-shaped Path.
Instance Method Summary collapse
-
#append_point(*args) ⇒ Object
The #append_point method appends a Geom::Point2d to the end of the Path.
- #arc ⇒ Array(Geom::Point2d, Float, Float, Float)?
- #circle ⇒ Array(Geom::Point2d, Float)?
- #close ⇒ Object
- #closed? ⇒ Boolean
-
#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.
-
#initialize(*args) ⇒ Path
constructor
The #initialize method creates a new Path between a start point and an end point, or from a provided Rectangle or Ellipse.
-
#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::Point2ds in the Path.
-
#points ⇒ Array<Geom::Point2d>
The #points method returns an array of Geom::Point2ds in the Path.
-
#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
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(start_point, end_point) ⇒ Layout::Path #initialize(start_point, control_point_1, control_point_2, end_point) ⇒ Layout::Path #initialize(rectangle) ⇒ Layout::Path #initialize(ellipse) ⇒ Layout::Path
The #initialize method creates a new Layout::Path between a start point and an end point, or from a provided Rectangle or Ellipse.
211 212 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 211 def initialize(*args) end |
Class Method Details
.new_arc(center_point, radius, start_angle, end_angle) ⇒ Layout::Path
The new_arc method creates a new arc-shaped Layout::Path.
49 50 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 49 def self.new_arc(center_point, radius, start_angle, end_angle) end |
Instance Method Details
#append_point(point) ⇒ Layout::Path #append_point(control_point1, control_point2, point) ⇒ Layout::Path
The #append_point method appends a Geom::Point2d to the end of the Layout::Path.
78 79 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 78 def append_point(*args) end |
#arc ⇒ Array(Geom::Point2d, Float, Float, Float)?
The #arc method returns the parameters of an arc from the Layout::Path, or nil
if path is not an arc.
91 92 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 91 def arc end |
#circle ⇒ Array(Geom::Point2d, Float)?
The #circle method returns the parameters of a circle from the Layout::Path, or nil
if path is not a circle.
103 104 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 103 def circle end |
#close ⇒ Object
The #close method closes the Layout::Path.
120 121 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 120 def close end |
#closed? ⇒ Boolean
The #closed? method returns whether the Layout::Path is closed.
131 132 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 131 def closed? end |
#end_arrow ⇒ Layout::Path?
The #end_arrow method creates a new Layout::Path from an end arrow.
142 143 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 142 def end_arrow end |
#end_point ⇒ Geom::Point2d
The #end_point method returns the end point of the Layout::Path.
157 158 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 157 def end_point end |
#parametric_length ⇒ Float
The #parametric_length method returns the parametric length for the Layout::Path. The parametric length is the length with respect to the curve of the Layout::Path.
224 225 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 224 def parametric_length end |
#point_at(parametric_value) ⇒ Geom::Point2d
The #point_at method returns the Geom::Point2d at a given parametric value.
243 244 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 243 def point_at(parametric_value) end |
#point_types ⇒ Array<Integer>
The #point_types method returns an array of point types corresponding to the Geom::Point2ds in the Layout::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
263 264 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 263 def point_types end |
#points ⇒ Array<Geom::Point2d>
The #points method returns an array of Geom::Point2ds in the Layout::Path.
279 280 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 279 def points end |
#start_arrow ⇒ Layout::Path?
The #start_arrow method creates a new Layout::Path from a start arrow.
291 292 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 291 def start_arrow end |
#start_point ⇒ Geom::Point2d
The #start_point method returns the start point of the Layout::Path.
306 307 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 306 def start_point end |
#tangent_at(parametric_value) ⇒ Geom::Vector2d
The #tangent_at method returns the tangent Geom::Vector2d at the given parametric value.
325 326 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 325 def tangent_at(parametric_value) end |
#winding ⇒ Integer
The #winding method returns the winding type of the Layout::Path.
A point type can be one of the following values:
PATH_WINDING_NONE
PATH_WINDING_CLOCKWISE
PATH_WINDING_COUNTER_CLOCKWISE
341 342 |
# File 'lib/sketchup-api-stubs/stubs/Layout/Path.rb', line 341 def winding end |