| rectcopy |
(Rectangle rect, double dx, double dx) |
typedict.Graphics |
| rectcopy |
(Number x, Number y, Number width, Number height, double dx, double dy) |
|
| |
Copies pixels contained in
rect,
or the rectangle that has
(x, y)
as its upper left corner and
width
and
height
as its dimensions, to the rectangle that has its upper left corner translated by
dx
and
dy.
The arguments are all transformed to device space using
CTM
and results are used to select the source pixels and the destination rectangle.
rectcopy
makes no use of or changes to the current
path.
| |
| Example: |
The program,
import yoix.*.*;
JFrame f = {
Array layout = {
new JCanvas {
Color background = Color.black;
Graphics graphics = {
String font = "Helvetica-bold-12";
};
paint(clip) {
double x = 36;
double y = 36;
double dx = 0;
double dy = 40;
graphics {
gsave();
translate(x, y);
setrgbcolor(.8, .8, .8);
rectfill(0, 0, 36, 36);
setrgbcolor(0, 0, 1);
drawString(this, "ABC", 0, 18);
rectcopy(0, 0, 36, 36, dx, dy);
grestore();
}
}
},
};
};
f.visible = TRUE;
defines a paint function that fills a light gray rectangle, draws the letters
ABC
in the rectangle, and then makes a copy of it using
rectcopy.
| | |
| Return: |
none
| | |
| See Also: |
clip,
clippath,
drawablebbox,
eoclip,
eoerase,
eofill,
erase,
erasedrawable,
fill,
ineofill,
infill,
instroke,
rectbutton,
rectclip,
recterase,
rectfill,
rectmove,
rectstroke,
stroke,
strokepath
|
|
Yoix is a registered trademark of AT&T Inc.
|
|