::pix::pathTop, Main, Index
Enum Winding rules:Top, Main, Index
| enum | |
Enum Line cap type for strokes:Top, Main, Index
| enum | |
Enum Line join type for strokes:Top, Main, Index
| enum | |
CommandsTop, Main, Index
addPath [::pix::path]Top, Main, Index
Adds a path to the current path.
Parameters
path1 | path |
path2 | path |
Return value
Nothing.
angleToMiterLimit [::pix::path]Top, Main, Index
Converts miter-limit-angle to miter-limit-ratio.
Parameters
angle | double value (radian) |
Return value
A Tcl double value.
arc [::pix::path]Top, Main, Index
Adds a circular arc to the current sub-path.
Parameters
path | path::new |
coordinates | list x,y |
radius | double value |
angle0 | double value (radian) |
angle1 | double value (radian) |
ccw | boolean value Optional, default false. |
Return value
Nothing.
arcTo [::pix::path]Top, Main, Index
Adds a circular arc using the given control points and radius. Commonly used for making rounded corners.
Parameters
path | path::new |
coordinates1 | list x1,y1 |
coordinates2 | list x2,y2 |
radius | double value |
Return value
Nothing.
bezierCurveTo [::pix::path]Top, Main, Index
Adds a cubic Bézier curve to the current sub-path.
Parameters
path | path::new |
coordinates1 | list x1,y1 |
coordinates2 | list x2,y2 |
coordinates3 | list x3,y3 |
Description
It requires three points: the first two are control points and the third one is the end point. The starting point is the latest point in the current path, which can be changed using pix::path::moveTo before creating the Bézier curve.
Return value
Nothing.
circle [::pix::path]Top, Main, Index
Adds a circle.
Parameters
path | path |
coordinates | list cx,cy |
radius | double value |
Return value
Nothing.
closePath [::pix::path]Top, Main, Index
Attempts to add a straight line from the current point to the start of the current sub-path. If the shape has already been closed or has only one point, this function does nothing.
Parameters
path | path |
Return value
Nothing.
computeBounds [::pix::path]Top, Main, Index
Compute the bounds of the path.
Parameters
path | path |
matrix | list |
Return value
A Tcl dictionary with keys (x, y, w, h).
copy [::pix::path]Top, Main, Index
Copy path.
Parameters
path | path |
Return value
A new path object.
destroy [::pix::path]Top, Main, Index
Destroy current path or all paths if special word all is specified.
Parameters
value | path object or string. |
Return value
Nothing.
ellipse [::pix::path]Top, Main, Index
Adds a ellipse.
Parameters
path | path |
coordinates | list x,y |
rx | double value |
ry | double value |
Return value
Nothing.
ellipticalArcTo [::pix::path]Top, Main, Index
Adds an elliptical arc to the current sub-path, using the given radius ratios, sweep flags, and end position.
Parameters
path | path |
coordinates_radius | list rx,ry |
xAxisRotation | double value |
largeArcFlag | boolean value |
sweepFlag | boolean value |
coordinates | list x,y |
Return value
Nothing.
fillOverlaps [::pix::path]Top, Main, Index
Returns whether or not the specified point is contained in the current path.
Parameters
path | path |
coordinates | list x,y |
matrix | list Optional, default mat3. |
windingRule | Enum value Optional, default NonZero. |
Description
The point is transformed into the path's coordinate system before the overlap check is done. The transformation matrix is given in the 'matrix' argument, which is a list of 9 double values. If the 'matrix' argument is not given, the identity matrix is used. The overlap check is done with the given 'windingRule' argument, which is a enum value. If the 'windingRule' argument is not given, the default value 'NonZero' is used.
Return value
Returns whether or not the specified point is contained in the current path.
lineTo [::pix::path]Top, Main, Index
Adds a straight line to the current sub-path by connecting the sub-path's last point to the specified (x, y) coordinates.
Parameters
path | path |
coordinates | list x,y |
Return value
Nothing.
miterLimitToAngle [::pix::path]Top, Main, Index
Converts miter-limit-ratio to miter-limit-angle.
Parameters
angle | double value (radian) |
Return value
A Tcl double value.
moveTo [::pix::path]Top, Main, Index
Begins a new sub-path at the point (x, y).
Parameters
path | path |
coordinates | list x,y |
Return value
Nothing.
new [::pix::path]Top, Main, Index
Sets a new path.
Return value
A new path object.
polygon [::pix::path]Top, Main, Index
Adds an n-sided regular polygon at (x, y) with the parameter size. Polygons "face" north.
Parameters
path | path |
coordinates | list x,y |
size | double value |
sides | integer value |
Return value
Nothing.
quadraticCurveTo [::pix::path]Top, Main, Index
Adds a quadratic Bézier curve to the current sub-path. It requires two points: the first one is a control point and the second one is the end point. The starting point is the latest point in the current path, which can be changed using moveTo() before creating the quadratic Bézier curve.
Parameters
path | path |
coordinates1 | list x1,y1 |
coordinates2 | list x2,y2 |
Return value
Nothing.
rect [::pix::path]Top, Main, Index
Adds a rectangle. Clockwise parameter can be used to subtract a rect from a path when using even-odd winding rule.
Parameters
path | path |
coordinates | list x,y |
size | list width,height |
ccw | boolean value Optional, default true. |
Return value
Nothing.
roundedRect [::pix::path]Top, Main, Index
Adds a rectangle. Clockwise parameter can be used to subtract a rect from a path when using even-odd winding rule.
Parameters
path | path |
coordinates | list x,y |
size | list width,height |
radius | list {nw ne se sw} |
ccw | boolean value Optional, default true. |
Return value
Nothing.
strokeOverlaps [::pix::path]Top, Main, Index
Checks if a point is inside the stroking of a path.
Parameters
path | The path object to check. |
coordinates | The coordinates x,y to check against the path. |
options | Tcl dictionary Optional, default "". |
Description
If the dictionary is present it should contain the following keys:
| transform | The transformation matrix to apply before stroking the path. |
| strokeWidth | The width of the stroke. |
| lineCap | The line cap style (Enum). |
| lineJoin | The line join style (Enum). |
| miterLimit | The miter limit for the line join. |
| dashes | The dashes to apply to the stroke. |
Return value
Returns whether or not the specified point is inside the area contained by the stroking of a path. The point is considered inside if it is contained in the stroked path and not in any holes.
transform [::pix::path]Top, Main, Index
Apply a matrix transform to a path.
Parameters
path | path |
matrix | list |
Return value
Nothing.