AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YDAT | YWAIT | Byzgraf | FAQs
Point typedict
 
A Point holds the horizontal and vertical coordinates of a two-dimensional point. The fields in a Point are:
x A double that represents the horizontal displacement of the point from the origin.
y A double that represents the vertical displacement of the point from the origin.
Both numbers often refer to location in the default Yoix coordinate system, which has its origin at the upper left corner of the screen, positive x to the right, positive y down, and a resolution of 72 dots per inch.
 
 Example:   The program,
import yoix.thread.*;

Frame f;
Point p;
int   n;

f.visible = TRUE;

for (n = 0; n < 10; n++) {
    p = f.location;     // gets current location
    p.x += 18;          // 0.25 inch right
    p.y += 18;          // 0.25 inch down
    f.location = p;     // moves the frame
    sleep(1);
}

exit(0);
slowly moves an empty frame down and to the right on your screen, but only for about 10 seconds.
 
 See Also:   Dimension, Insets, Rectangle

 

Yoix is a registered trademark of AT&T Intellectual Property.