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
rectfill (Rectangle rect [, double alpha]) typedict.Graphics
rectfill (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 fills the resulting path on drawable by painting its interior using foreground and the optional alpha argument, which should be a number between 0.0 and 1.0, as the alpha value. rectfill 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();
            translate(drawable.size.width/2, drawable.size.height/2);
            rotate(atan2(size.height, size.width)*180.0/PI);
            scale(1, drawable.size.height/drawable.size.width);
            setrgbcolor(1, 0, 0);
            rectfill(-36, -36, 72, 72);
            grestore();
        }
    }
};

f.visible = TRUE;
defines a paint function in a frame that fills a red rectangle that stays close to the center of the frame, but varies in size and orientation as the frame is resized.
 
 Return:   none
 
 See Also:   clip, clippath, drawablebbox, eoclip, eoerase, eofill, erase, erasedrawable, fill, ineofill, infill, instroke, rectbutton, rectclip, rectcopy, recterase, rectmove, rectstroke, stroke, strokepath

 

Yoix is a registered trademark of AT&T Inc.