| getBestCursorSize |
(Dimension size [, Matrix matrix]) |
yoix.awt |
| getBestCursorSize |
(Number width, Number height [, Matrix matrix]) |
|
| |
Returns a
Dimension
that represents the size that a custom cursor can have that most closely
matches the preferred
size,
which is specified in units of 72 dots per inch.
If the optional
matrix
argument is omitted the best cursor size is given in units of
72 dots per inch.
Otherwise the inverse of
matrix
is used to transform distances that represent the best cursor size in pixels
to a different coordinate system, so when
matrix
is the identity matrix
getBestCursorSize
returns an answer that is in pixels.
| |
| Example: |
The program,
import yoix.*.*;
Dimension preferred = {
double width = 72;
double height = 72;
};
printf("Preferred size=%O\n", preferred);
printf("Default coordinates=%O\n", getBestCursorSize(preferred));
printf("Pixels=%O\n", getBestCursorSize(preferred, new Matrix));
will print something like,
Preferred size=Dimension[2:0]
height=72.0
>width=72.0
Default coordinates=Dimension[2:0]
height=70.8923076923077
>width=70.8923076923077
Pixels=Dimension[2:0]
height=64.0
>width=64.0
on standard output, but the numbers that you see will undoubtedly be different.
| | |
| Return: |
Dimension
| | |
| See Also: |
addCursor,
Image
|
|
Yoix is a registered trademark of AT&T Inc.
|