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
rectstroke (Rectangle rect) typedict.Graphics
rectstroke (Number x, Number y, Number width, Number height [, double alpha])  
 
Transforms rect, or the rectangle that has (x, y) as its upper left corner and width and height as its dimensions, using CTM and then strokes the resulting path on drawable using foreground and the optional alpha argument, which should be a number between 0.0 and 1.0, as the alpha value. The values assigned to linewidth, linecap, linejoin, miterlimit, dasharray, dashphase, and CTM when rectstroke is called are used to select the pixels that are actually painted as the rectangle is drawn. rectstroke makes no use of or changes to the current path.
 
 Example:   The program,
import yoix.*.*;

JFrame f = {
    Color background = Color.white;

    paint(Rectangle r) {
        graphics {        // "named block"
            gsave();
            linewidth = 6;
            translate(drawable.size.width/2, drawable.size.height/2);
            rotate(atan2(size.height, size.width)*180.0/PI);
            setrgbcolor(1, 0, 0);
            rectstroke(-36, -36, 72, 72);
            grestore();
        }
    }
};

f.visible = TRUE;
defines a paint function in a frame that strokes a red square that stays close to the center of the frame and keeps two sides parallel to the line connecting the frame's upper left and lower right corners.
 
 Return:   none
 
 See Also:   clip, clippath, drawablebbox, eoclip, eoerase, eofill, erase, erasedrawable, fill, ineofill, infill, instroke, rectbutton, rectclip, rectcopy, recterase, rectfill, rectmove, stroke, strokepath

 

Yoix is a registered trademark of AT&T Inc.