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
strokepath () typedict.Graphics
 
Replaces the current path with the outline that stroke would obtain using the values currently assigned to linewidth, linecap, linejoin, miterlimit, dasharray, dashphase, and CTM. Filling the resulting path with fill reproduces what stroke would have drawn using the original path.
 
 Example:   The program,
import yoix.*.*;

JFrame f = {
    paint(Rectangle r) {
        graphics {
            gsave();
            translate(144, 144);
            rotate(-15);
            scale(2, 2);
            moveto(0, 0);
            rlineto(72, 0);
            rlineto(-36, 72);
            rlineto(-36, 0);
            closepath();
            gsave();
            setrgbcolor(1, 0, 0);
            linewidth = 0;
            stroke();
            grestore();
            linejoin = JOIN_ROUND;
            linewidth = 9;
            scale(2, 1);    // try initmatrix()
            strokepath();
            linewidth = 0;
            stroke();
            grestore();
        }
    }
};

f.visible = TRUE;
defines a paint function in a frame that draws a simple path in red using a linewidth of 0 and then draws the path created by strokepath, again using a linewidth of 0.
 
 Return:   none
 
 See Also:   clip, clippath, drawablebbox, eoclip, eoerase, eofill, erase, erasedrawable, fill, ineofill, infill, instroke, rectbutton, rectclip, rectcopy, recterase, rectfill, rectmove, rectstroke, stroke

 

Yoix is a registered trademark of AT&T Inc.