| rquadto |
(Number dx1, Number dy1, Number dx2, Number dy2) |
typedict.Path |
| |
Adds a quadratic curve to this path that extends from the current point
(x, y),
if there is one, to
(x+dx2, y+dy2),
which becomes the new current point, and uses
(x+dx1, y+dy1)
as the control point.
The points are all transformed using the
CTM
associated with this path when
quadto
is called, which means subsequent changes to
CTM
do not affect this curve.
If the path is empty
rquadto
will abort with a
nocurrentpoint
error.
| |
| Example: |
The program,
import yoix.stdio.*;
Path p;
moveto(x, y) = printf(" moveto(%.1f, %.1f);\n", x, y);
quadto(x1, y1, x2, y2) {
printf(" quadto(");
printf("%.1f, %.1f, ", x1, y1);
printf("%.1f, %.1f", x2, y2);
printf(");\n");
}
p.moveto(100, 100);
p.rquadto(100, 100, 400, 200);
printf("Output before CTM change:\n");
p.pathforall(moveto, NULL, quadto, NULL, NULL);
p.CTM.scale(2, 2);
printf("\nOutput after CTM change:\n");
p.pathforall(moveto, NULL, quadto, NULL, NULL);
prints something like
Output before CTM change:
moveto(100.0, 100.0);
quadto(200.0, 200.0, 500.0, 300.0);
Output after CTM change:
moveto(50.0, 50.0);
quadto(100.0, 100.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,
rcurveto,
rlineto,
rmoveto
|
|
Yoix is a registered trademark of AT&T Inc.
|
|