예제 #1
0
 public void ScaleTransform(float sx, float sy)
 {
     scaleX *= sx;
     scaleY *= sy;
     clippingMask = new Group {Transform = Transform};
     groupList.Add(clippingMask);
 }
예제 #2
0
 /// <summary>
 /// Sets the clipping-mask for the graphics device to draw in. This is required for applications which
 /// draw on a single canvas, where the normal grapics device draws in multiple controls. The origin (i.e.
 /// (0,0)) is moved to the given x and y position and the width and height is set to the new values. For
 /// file formats, this should have the effect that a new element is created in which all the graphics
 /// operations are located.
 /// </summary>
 /// <param name="w">The width of the clipping mask.</param>
 /// <param name="h">The height of the clipping mask.</param>
 /// <param name="x">The x-position of the clipping mask.</param>
 /// <param name="y">The y-position of the clipping mask.</param>
 public void SetClippingMask(float w, float h, float x, float y)
 {
     locationX = x;
     locationY = y;
     float wscale = docWidth/w;
     float hscale = docHeight/h;
     if (wscale == hscale){
         scaleX = wscale;
     }
     clippingMask = new Group{Transform = Transform};
     groupList.Add(clippingMask);
 }
예제 #3
0
 /// <summary>
 /// Applies the specified rotation to the transformation matrix.
 /// </summary>
 /// <param name="angle">Angle of rotation in degrees.</param>
 public void RotateTransform(float angle)
 {
     rotationAngle += angle;
     clippingMask = new Group{Transform = Transform};
     groupList.Add(clippingMask);
 }