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
Insets typedict
 
An Insets holds four numbers that represent displacements from the top, left, bottom, and right margins of a rectangle. The fields in an Insets are:
bottom A double that represents a displacement from the bottom margin in the direction of the top margin.
left A double that represents a displacement from the left margin in the direction of the right margin.
right A double that represents a displacement from the right margin in the direction of the left margin.
top A double that represents a displacement from the top margin in the direction of the bottom margin.
All four numbers usually are distances in the default Yoix coordinate system, where a value of 72 represents one inch.
 
 Example:   The program,
import yoix.*.*;

Frame f = {
    Array layout = {
        new Canvas {
            Insets border = {
                double left = 6;
                double top = 3;
                double bottom = 3;
                double right = 6;
            };
        },
        CENTER
    };
};

f.visible = TRUE;
sleep(10);
exit(0);
fills a frame with a canvas that has a small highlighted border.
 
 See Also:   Dimension, Point, Rectangle

 

Yoix is a registered trademark of AT&T Inc.