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
recterase (Rectangle rect [, double alpha]) typedict.Graphics
recterase (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 drawable's background color and the optional alpha argument, which should be a number between 0.0 and 1.0, as the alpha value. recterase 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);
            scale(1, drawable.size.height/drawable.size.width);
            arc(0, 0, 144, 0, 360);
            setrgbcolor(1, 0, 0);
            fill();
            recterase(-36, -36, 72, 72);
            grestore();
        }
    }
};

f.visible = TRUE;
defines a paint function in a frame that fills a red ellipse that has a small rectangle cut out of the center of the ellipse. Do you understand why the ellispe and the rectangle change when the frame is resized?
 
 Return:   none
 
 See Also:   clip, clippath, drawablebbox, eoclip, eoerase, eofill, erase, erasedrawable, fill, ineofill, infill, instroke, rectbutton, rectclip, rectcopy, rectfill, rectmove, rectstroke, stroke, strokepath

 

Yoix is a registered trademark of AT&T Inc.