ReactOS  0.4.14-dev-52-g6116262
gdifloat.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagFLOAT_POINT
 

Macros

#define MulDiv(x, y, z)   EngMulDiv( x, y, z )
 
#define XDPTOLP(pdcattr, tx)   (MulDiv(((tx)-(pdcattr)->ptlViewportOrg.x), (pdcattr)->szlWindowExt.cx, (pdcattr)->szlViewportExt.cx) + (pdcattr)->ptlWindowOrg.x)
 
#define YDPTOLP(pdcattr, ty)   (MulDiv(((ty)-(pdcattr)->ptlViewportOrg.y), (pdcattr)->szlWindowExt.cy, (pdcattr)->szlViewportExt.cy) + (pdcattr)->ptlWindowOrg.y)
 
#define XLPTODP(pdcattr, tx)   (MulDiv(((tx)-(pdcattr)->ptlWindowOrg.x), (pdcattr)->szlViewportExt.cx, (pdcattr)->szlWindowExt.cx) + (pdcattr)->ptlViewportOrg.x)
 
#define YLPTODP(pdcattr, ty)   (MulDiv(((ty)-(pdcattr)->ptlWindowOrg.y), (pdcattr)->szlViewportExt.cy, (pdcattr)->szlWindowExt.cy) + (pdcattr)->ptlViewportOrg.y)
 
#define XDSTOLS(pdcattr, tx)   MulDiv((tx), (pdcattr)->szlWindowExt.cx, (pdcattr)->szlViewportExt.cx)
 
#define YDSTOLS(DC_Attr, ty)   MulDiv((ty), (pdcattr)->szlWindowExt.cy, (pdcattr)->szlViewportExt.cy)
 
#define XLSTODS(pdcattr, tx)   MulDiv((tx), (pdcattr)->szlViewportExt.cx, (pdcattr)->szlWindowExt.cx)
 
#define YLSTODS(pdcattr, ty)   MulDiv((ty), (pdcattr)->szlViewportExt.cy, (pdcattr)->szlWindowExt.cy)
 

Typedefs

typedef struct tagFLOAT_POINT FLOAT_POINT
 

Functions

static __inline INT GDI_ROUND (FLOAT val)
 
static __inline void INTERNAL_LPTODP_FLOAT (DC *dc, FLOAT_POINT *point)
 

Macro Definition Documentation

◆ MulDiv

#define MulDiv (   x,
  y,
  z 
)    EngMulDiv( x, y, z )

Definition at line 86 of file gdifloat.h.

◆ XDPTOLP

#define XDPTOLP (   pdcattr,
  tx 
)    (MulDiv(((tx)-(pdcattr)->ptlViewportOrg.x), (pdcattr)->szlWindowExt.cx, (pdcattr)->szlViewportExt.cx) + (pdcattr)->ptlWindowOrg.x)

Definition at line 88 of file gdifloat.h.

◆ XDSTOLS

#define XDSTOLS (   pdcattr,
  tx 
)    MulDiv((tx), (pdcattr)->szlWindowExt.cx, (pdcattr)->szlViewportExt.cx)

Definition at line 99 of file gdifloat.h.

◆ XLPTODP

#define XLPTODP (   pdcattr,
  tx 
)    (MulDiv(((tx)-(pdcattr)->ptlWindowOrg.x), (pdcattr)->szlViewportExt.cx, (pdcattr)->szlWindowExt.cx) + (pdcattr)->ptlViewportOrg.x)

Definition at line 92 of file gdifloat.h.

◆ XLSTODS

#define XLSTODS (   pdcattr,
  tx 
)    MulDiv((tx), (pdcattr)->szlViewportExt.cx, (pdcattr)->szlWindowExt.cx)

Definition at line 103 of file gdifloat.h.

◆ YDPTOLP

#define YDPTOLP (   pdcattr,
  ty 
)    (MulDiv(((ty)-(pdcattr)->ptlViewportOrg.y), (pdcattr)->szlWindowExt.cy, (pdcattr)->szlViewportExt.cy) + (pdcattr)->ptlWindowOrg.y)

Definition at line 90 of file gdifloat.h.

◆ YDSTOLS

#define YDSTOLS (   DC_Attr,
  ty 
)    MulDiv((ty), (pdcattr)->szlWindowExt.cy, (pdcattr)->szlViewportExt.cy)

Definition at line 101 of file gdifloat.h.

◆ YLPTODP

#define YLPTODP (   pdcattr,
  ty 
)    (MulDiv(((ty)-(pdcattr)->ptlWindowOrg.y), (pdcattr)->szlViewportExt.cy, (pdcattr)->szlWindowExt.cy) + (pdcattr)->ptlViewportOrg.y)

Definition at line 94 of file gdifloat.h.

◆ YLSTODS

#define YLSTODS (   pdcattr,
  ty 
)    MulDiv((ty), (pdcattr)->szlViewportExt.cy, (pdcattr)->szlWindowExt.cy)

Definition at line 105 of file gdifloat.h.

Typedef Documentation

◆ FLOAT_POINT

Function Documentation

◆ GDI_ROUND()

static __inline INT GDI_ROUND ( FLOAT  val)
static

Definition at line 17 of file gdifloat.h.

18 {
19  return (int)floor(val + 0.5);
20 }
GLuint GLfloat * val
Definition: glext.h:7180
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)

◆ INTERNAL_LPTODP_FLOAT()

static __inline void INTERNAL_LPTODP_FLOAT ( DC dc,
FLOAT_POINT point 
)
static

Definition at line 27 of file gdifloat.h.

28 {
29  FLOAT x, y;
30  XFORM xformWorld2Vport;
31 
32  MatrixS2XForm(&xformWorld2Vport, &dc->pdcattr->mxWorldToDevice);
33 
34  /* Perform the transformation */
35  x = point->x;
36  y = point->y;
37  point->x = x * xformWorld2Vport.eM11 +
38  y * xformWorld2Vport.eM21 +
39  xformWorld2Vport.eDx;
40 
41  point->y = x * xformWorld2Vport.eM12 +
42  y * xformWorld2Vport.eM22 +
43  xformWorld2Vport.eDy;
44 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC dc
Definition: cylfrac.c:34
POINTL point
Definition: edittest.c:50
LONG y
Definition: windef.h:315
FLOAT eDx
Definition: wingdi.h:1720
FLOAT eM21
Definition: wingdi.h:1718
FLOAT eM12
Definition: wingdi.h:1717
LONG x
Definition: windef.h:314
FLOAT eM11
Definition: wingdi.h:1716
#define MatrixS2XForm(x, m)
Definition: coord.h:21
FLOAT eM22
Definition: wingdi.h:1719
FLOAT eDy
Definition: wingdi.h:1721
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
float FLOAT
Definition: typedefs.h:67

Referenced by PATH_Arc().