PathSegment class
A PathSegment represents a straight line or curved segment of a path between two or more points that are part of a PathFigure. The very first point is given by the PathFigure#startX and PathFigure#startY properties. After the first segment the beginning point of the next segment is the same as the end point of the previous segment. For most types of PathSegments the end point of the segment is given by #endX and #endY.
A PathSegment must not be modified once its containing PathFigure's Geometry has been assigned to a Shape.
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
Properties
- centerX ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the center X value of the Arc for a PathSegment of type PathSegment.Arc|Arc.getter/setter pair - centerY ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the center Y value of the Arc for a PathSegment of type PathSegment.Arc|Arc.getter/setter pair - endX ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the X coordinate of the end point for all types of PathSegment except PathSegment.Arc|Arc. The default value is zero.getter/setter pair - endY ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the Y coordinate of the end point for all types of PathSegment except PathSegment.Arc|Arc. The default value is zero.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- isClockwiseArc ↔ bool
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the clockwise-flag for a PathSegment of type PathSegment.SvgArc|SvgArc. SVG Arcs specify a radius and an endpoint, and are always a portion of an ellipse. The parameters allow for two potential ellipses and four potential arcs. A clockwise-flag set to true will use one of the two possible positive-angle arcs, and false will use one of the two negative-angle arcs. Which arc is chosen (small or large) depends on the value of #isLargeArc. For more information see the visual examples in the SVG Arc specification (w3.org)getter/setter pair - isClosed ↔ bool
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets whether the path is closed after this PathSegment. Default value is false.getter/setter pair - isLargeArc ↔ bool
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the large-arc-flag for a PathSegment of type PathSegment.SvgArc|SvgArc. SVG Arcs specify a radius and an endpoint, and are always a portion of an ellipse. The parameters allow for two potential ellipses and four potential arcs. A large-arc-flag set to true will choose the larger of the two arc sweeps. Which way the arc sweeps (positive angle or negative angle) depends on the value of #isClockwiseArc For more information see the visual examples in the SVG Arc specification (w3.org)getter/setter pair - point1X ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the X value of the first control point for a PathSegment of type PathSegment.Bezier|Bezier or PathSegment.QuadraticBezier|QuadraticBezier.getter/setter pair - point1Y ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the Y value of the first control point for a PathSegment of type PathSegment.Bezier|Bezier or PathSegment.QuadraticBezier|QuadraticBezier.getter/setter pair - point2X ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the X value of the second control point for a PathSegment of type cubic PathSegment.Bezier|Bezier.getter/setter pair - point2Y ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the Y value of the second control point for a PathSegment of type cubic PathSegment.Bezier|Bezier.getter/setter pair - radiusX ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the X value of the radius for a PathSegment of type PathSegment.Arc|Arc or PathSegment.SvgArc|SvgArc. Value must be a positive number.getter/setter pair - radiusY ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the Y value of the radius for a PathSegment of type PathSegment.Arc|Arc or PathSegment.SvgArc|SvgArc. Value must be a positive number.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startAngle ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the starting angle for a PathSegment of type PathSegment.Arc|Arc. Value must within the range: (0 <= value < 360).getter/setter pair - sweepAngle ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the length of angle in degrees, or amount of arc to "sweep" for a PathSegment of type PathSegment.Arc|Arc. Must be between -360 and 360, inclusive.getter/setter pair - type ↔ EnumValue
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the type of the PathSegment. The value must be one of the following: PathSegment.Line, PathSegment.Bezier, PathSegment.QuadraticBezier, PathSegment.Arc, PathSegment.Move, PathSegment.Arc, and PathSegment.SvgArc.getter/setter pair - xAxisRotation ↔ num
-
Available on PathSegment, provided by the PathSegment$Typings extension
Gets or sets the X-axis rotation for a PathSegment of type PathSegment.SvgArc|SvgArc. X-axis rotation is used to rotate the ellipse that the arc is created from, and must be between 0 and 360 degrees. Default is 0.getter/setter pair
Methods
-
close(
) → PathSegment -
Available on PathSegment, provided by the PathSegment$Typings extension
Closes the path after this PathSegment @return {PathSegment} returns this PathSegment. -
copy(
) → PathSegment -
Available on PathSegment, provided by the PathSegment$Typings extension
Create a copy of this PathSegment, of the same type and with the same point values. @expose @return {PathSegment} -
equalsApprox(
PathSegment s) → bool -
Available on PathSegment, provided by the PathSegment$Typings extension
(undocumented) @param {PathSegment} s @return {boolean} -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- arc ↔ EnumValue
-
For drawing an arc segment, a value for PathSegment#type.
getter/setter pair
- bezier ↔ EnumValue
-
For drawing a cubic bezier segment, a value for PathSegment#type.
getter/setter pair
- line ↔ EnumValue
-
For drawing a straight line segment, a value for PathSegment#type.
getter/setter pair
- move ↔ EnumValue
-
For beginning a new subpath, a value for PathSegment#type.
getter/setter pair
- quadraticBezier ↔ EnumValue
-
For drawing a quadratic bezier segment, a value for PathSegment#type.
getter/setter pair
- svgArc ↔ EnumValue
-
For drawing an SVG arc segment, a value for PathSegment#type.
getter/setter pair