AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YChart | YDAT | YWAIT | Byzgraf | FAQs
moveto (Number x, Number y) typedict.Path
 
Creates a new subpath in this path that starts at the point (x, y), which becomes the new current point. The point (x, y) is transformed using the CTM associated with this path when moveto is called, which means subsequent changes to CTM do not affect this point. Consecutive movetos are always collapsed and only the last one remains in the path.
 
 Example:   The program,
import yoix.stdio.*;

Path p;

moveto(x, y) = printf(" moveto(%.1f, %.1f);\n", x, y);

p.moveto(100, 200);
p.moveto(100, 200);
p.moveto(200, 400);

printf("Output before CTM change:\n");
p.pathforall(moveto, NULL, NULL, NULL, NULL);
p.CTM.scale(2, 2);
printf("\nOutput after CTM change:\n");
p.pathforall(moveto, NULL, NULL, NULL, NULL);
prints something like
Output before CTM change:
 moveto(200.0, 400.0);

Output after CTM change:
 moveto(100.0, 200.0);
on standard output. Notice how the consecutive movetos and rmovetos were collapsed and 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, newpath, pathbbox, pathforall, quadto, rcurveto, rlineto, rmoveto, rquadto

 

Yoix is a registered trademark of AT&T Inc.