| rlineto |
(Number dx, Number dy) |
typedict.Path |
| |
Adds a line segment to this path that extends from the current point
(x, y),
if there is one, to the point
(x+dx, y+dy),
which becomes the new current point.
The coordinates of this point are transformed using the
CTM
associated with this path when
rlineto
is called, which means subsequent changes to
CTM
do not affect this line segment.
If this path is empty
rlineto
will abort with a
nocurrentpoint
error.
| |
| Example: |
The program,
import yoix.stdio.*;
Path p;
moveto(x, y) = printf(" moveto(%.1f, %.1f);\n", x, y);
lineto(x, y) = printf(" lineto(%.1f, %.1f);\n", x, y);
p.moveto(100, 200);
p.rlineto(100, 200);
p.rlineto(0, -100);
printf("Output before CTM change:\n");
p.pathforall(moveto, lineto, NULL, NULL, NULL);
p.CTM.scale(2, 2);
printf("\nOutput after CTM change:\n");
p.pathforall(moveto, lineto, NULL, NULL, NULL);
prints something like
Output before CTM change:
moveto(100.0, 200.0);
lineto(200.0, 400.0);
lineto(200.0, 300.0);
Output after CTM change:
moveto(50.0, 100.0);
lineto(100.0, 200.0);
lineto(100.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,
rmoveto,
rquadto
|
|
Yoix is a registered trademark of AT&T Inc.
|
|