In This Topic ▼


typedef struct _PAINTXFORM 
   L_INT nZoom; 
   L_INT nXOffset; 
   L_INT nYOffset; 

The PAINTXFORM structure provides data for translating from the external coordinates, such as mouse position, to the device context (DC) or bitmap coordinates.



The zooming factor that will be used by the toolkit to scale the user input. Valid values are between 1 and 10000, For example:

Value Meaning
100 the same.
110 1.1 times the original dimensions
120 1.2 times the original dimensions up to
10000 100 times larger than the original dimensions.
99 0.99 times the original dimensions,
98 0.98 times the original dimensions
1 0.01 times the original dimensions.


The X offset of the external representation of the DC or Bitmap.


The Y offset of the external representation of the DC or Bitmap.


When assigning an external representation to the toolkit, every point (Xa, Ya) in the an external representation is transformed by the toolkit to the point (Xc, Yc) by using the following steps:

  1. Add offsets:

       Xb = Xa + nXOffset   
       Yb = Ya + nYOffset 

  2. Multiply by scalars:

       Xc = MulDiv (Xb, nZoom, 100 ) ;   
       Yc = MulDiv ( Yb, nZoom, 100 ) ; 

    pPAINTXFORM is a pointer to a PAINTXFORM structure.

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Digital Paint C API Help