The goal of this transformation is to simplify drawing in the area so after the transformation shifting, rotating and flipping is executed by the transformation.
|oMap||(Object) Object of the PmMap type that contains the following properties specify the transformation process:|
x (mandatory) - X position of upper left corner of the rectangle (in pixels)
y (mandatory) - Y position of upper left corner of the rectangle (in pixels)
dx (mandatory) - Rectangle width (in pixels)
dy (mandatory) - Rectangle height (in pixels)
rotateAngle (optional) - Image rotation angle in degrees (rotation centre is in the middle of the defined rectangle). Examples:
0 (default) - no rotation
90 - rotate by angle 90°
45 - rotate by angle 45°
-45 = 270 - rotate by angle 270°
10.125 - rotate by angle 10.125°
flip (optional) - Flip drawing.
0 (default) - no flip
1 - flip to vertical axis
This method is just a special case of the transform method. In case the designer wanted to make this transformation by the transform method, it would be very difficult - the computations related to deformation rotation are quite mathematicaly complex.
var ctx = pEvent.GetCtx(0);
var oMap = Pm.CreatePmMap();
oMap.x = 10;
oMap.y = 10;
oMap.dx = 90;
oMap.dy = 90;
oMap.rotateAngle = 45;
oMap.flip = 1;
//detect new coordinates of the area dx and dy after transformation
var dx = oMap.drawDx;
var dy = oMap.drawDy;
//...anything that will be drawn in the area 0 - dx and 0 - dy, will be shifted, flipped and rotated in the resulting drawing.