Esempio n. 1
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(int w, int h, int x, int y)
 {
     locationX = x;
     locationY = y;
     float wscale = docWidth/w;
     float hscale = docHeight/h;
     if (wscale == hscale){
         scale = wscale;
     }
     clippingMask = new Group{Transform = Transform};
     groupList.Add(clippingMask);
 }
Esempio n. 2
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);
 }