Exemple #1
0
 public void Transform(int x, int y, float scaleX, float scaleY)
 {
     this._transFormed = true;
     this._oldMode     = Win32.SetGraphicsMode(this._hdc, 2);
     this._xForm       = new Win32.XFORM(scaleX, 0f, 0f, scaleY, x * scaleX, y * scaleY);
     Win32.SetWorldTransform(this._hdc, ref this._xForm);
     //Trace.WriteLine(string.Format("Transform: {0},{1}", x, y));
 }
Exemple #2
0
 public void EndTransform()
 {
     if (this._transFormed)
     {
         this._xForm = new Win32.XFORM(1f, 0f, 0f, 1f, 0f, 0f);
         Win32.SetWorldTransform(this._hdc, ref this._xForm);
         this._transFormed = false;
     }
 }
Exemple #3
0
 protected internal System.Drawing.Graphics SafeEndPaint()
 {
     this._safexForm       = this._xForm;
     this._safeTransformed = this._transFormed;
     System.Drawing.Graphics graphics = this._graphics;
     this.EndPaint();
     if (this._safeTransformed)
     {
         graphics.Transform = new Matrix(this._safexForm.eM11, this._safexForm.eM12, this._safexForm.eM21, this._safexForm.eM22, this._safexForm.eDx, this._safexForm.eDy);
     }
     return(graphics);
 }
Exemple #4
0
 protected internal void SafeBeginPaint(System.Drawing.Graphics gr)
 {
     if (this._safeTransformed)
     {
         gr.Transform = new Matrix(1f, 0f, 0f, 1f, 0f, 0f);
     }
     this.BeginPaint(gr);
     if (this._safeTransformed)
     {
         this._xForm = this._safexForm;
         Win32.SetWorldTransform(this._hdc, ref this._xForm);
         this._transFormed = true;
     }
 }