Home | Contents | Index | Help | < Browse | Browse >
Coordinates
Many of the commands introduced in Selector 9.0 uses coordinates.
These are described here:
Coordinate usage:
[percent|%|pix] <X> <Y> [<X2> <Y2>]
Some commands uses all X, Y, X2 and Y2. This describes a rectangle.
Some commands only uses X and Y. This describes a point.
Percent and "%" means the same thing, that the coordinates are given
in percent of the window size.
Normally, (when not using "%" or "pix") the coordinates are given in
button size (including gap). This way, the coordinates are always the
same regardless of font used etc. For example, the first button in the
window starts at "0 0" and ends at "1 1". The middle of the button
is at "0.5 0.5"
Percent coordinates should normally only be used when drawing a
background for your window. For example: draw figure % 0 0 100 100
If you for example paint an arrow pointing at a button, then percent
coordinates are a bad idea. If you use it and later change the window
size, then the arrow will not point at the button any longer. Use
normal coordinates for this kind of things.
"pix" means that the coordinates are in pixles. (New in 9.2). Using negative
numbers means that they are calculated from right bottom corner instead
of left upper corner. For example: draw box pix 0 0 -0 -0 draws a box around
the window. Draw box pix 1 1 -1 -1 draws a box just inside of the last one.
In other words, if you use the - sign in connection to a number, then it's
calculated from the window size instead. So if the window size is 600 and you
say -50, then what you get is 550. (Only with the pix option).
Home | Contents | Index | Help | < Browse | Browse >