| concat |
(Matrix mtx) |
typedict.Matrix |
| |
Multiplies this matrix and
mtx
and replaces this matrix by the result,
which is also returned to the caller.
| |
| Example: |
The program,
import yoix.*.*;
Matrix mtx = {
double sx = 2;
double sy = .5;
};
JFrame f = {
paint(Rectangle rect) {
graphics {
gsave();
translate(72, 72);
scale(2, .5);
setrgbcolor(1, 0, 0);
rectfill(0, 0, 72, 72);
grestore();
gsave();
translate(72, 144);
concat(mtx);
setrgbcolor(0, 1, 0);
rectfill(0, 0, 72, 72);
grestore();
}
}
};
f.visible = TRUE;
creates a matrix by explicitly setting the scaling components
and then defines a paint function in a frame that draws two rectangles,
one red and the other blue, that show that in this case
scale
and
concat
produce the the same results.
| | |
| Return: |
Matrix
| | |
| See Also: |
concatmatrix,
currentmatrix,
dividematrix,
dtransform,
Graphics,
identmatrix,
idtransform,
initmatrix,
invertmatrix,
itransform,
maptopixel,
rotate,
scale,
setmatrix,
shear,
transform,
translate
|
|
Yoix is a registered trademark of AT&T Inc.
|