PAINTXFORM

typedef struct _PAINTXFORM
{
  L_INT nZoom;
  L_INT nXOffset;
  L_INT nYOffset;
} PAINTXFORM, * pPAINTXFORM;

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

Member

Description

nZoom

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.

nXOffset

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

nYOffset

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

Comments

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.