| rcurveto |
(Number dx1, Number dy1, Number dx2, Number dy2, Number dx3, Number dy3) |
typedict.Path |
| |
Adds a Bezier cubic curve to this path that extends from the current point
(x, y),
if there is one, to
(x+dx3, y+dy3),
which becomes the new current point, and uses
(x+dx1, y+dy1)
and
(x+dx2, y+y2)
as control points.
The points are all transformed using the
CTM
associated with this path when
rcurveto
is called, which means subsequent changes to
CTM
do not affect this curve.
If this path is empty
rcurveto
will abort with a
nocurrentpoint
error.
| |
| Example: |
The program,
import yoix.stdio.*;
Path p;
moveto(x, y) = printf(" moveto(%.1f, %.1f);\n", x, y);
curveto(x1, y1, x2, y2, x3, y3) {
printf(" curveto(");
printf("%.1f, %.1f, ", x1, y1);
printf("%.1f, %.1f, ", x2, y2);
printf("%.1f, %.1f", x3, y3);
printf(")\n");
}
p.moveto(100, 100);
p.rcurveto(100, 100, 300, 200, 400, 200);
printf("Output before CTM change:\n");
p.pathforall(moveto, NULL, NULL, curveto, NULL);
p.CTM.scale(2, 2);
printf("\nOutput after CTM change:\n");
p.pathforall(moveto, NULL, NULL, curveto, NULL);
prints something like
Output before CTM change:
moveto(100.0, 100.0);
curveto(200.0, 200.0, 400.0, 300.0, 500.0, 300.0)
Output after CTM change:
moveto(50.0, 50.0);
curveto(100.0, 100.0, 200.0, 150.0, 250.0, 150.0);
on standard output.
Notice how the coordinates changed after we scaled the
CTM
associated with the path.
| | |
| Return: |
Path
| | |
| See Also: |
arc,
arcn,
closepath,
currentpath,
currentpoint,
curveto,
flattenpath,
Graphics,
lineto,
moveto,
newpath,
pathbbox,
pathforall,
quadto,
rlineto,
rmoveto,
rquadto
|
|
Yoix is a registered trademark of AT&T Inc.
|
|