RTPDF-32
PDF Generator Library for RTOS-32
RTPDF-DDI.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef __cplusplus
4extern "C"
5{
6#endif
7
8// macro to convert PDF units in floating point to fixed point used by GDI
9#define FLOAT2FIX(f) (FIX)((f) * 160.0f)
10
11// macro to convert floating point to LONG units
12#define FLOAT2LONG(f) (LONG)((f) * 10.0f)
13
14// macro to convert RGB colors into GDIBRUSH colors
15#define RGB2GDIBRUSH(r, g, b) (((ULONG)(r)) | ((ULONG)(g) << 8) | ((ULONG)(b) << 16))
16#define RGB2GDICOLOR(c) RGB2GDIBRUSH(GetRValue((c)), GetGValue((c)), GetBValue((c)))
17
18typedef struct _UNICODE_STRING
19{
20 WORD Header;
21 WCHAR String[128];
23
24#define INIT_UNICODE_STRING(s, v) \
25 (s).Header = 0xFEFF; \
26 wcsncpy_s((s).String, _countof((s).String), (LPWSTR)(v"\0\0"), _countof((s).String));
27
28#ifndef _WINDDI_
29
30/* The following definitions and structures are taken from winddi.h */
31
32typedef FLOAT FLOATL;
33typedef LONG FIX;
34typedef FIX *PFIX;
35
36typedef union _FLOAT_LONG
37{
39 LONG l;
41
42typedef struct _POINTFIX
43{
47
48typedef struct _RECTFX
49{
55
56typedef struct _LINEATTRS
57{
58 FLONG fl;
59 ULONG iJoin;
60 ULONG iEndCap;
63 ULONG cstyle;
67
68#define LA_GEOMETRIC 0x00000001
69#define LA_ALTERNATE 0x00000002
70#define LA_STARTGAP 0x00000004
71#define LA_STYLED 0x00000008
72
73#define JOIN_ROUND 0L
74#define JOIN_BEVEL 1L
75#define JOIN_MITER 2L
76
77#define ENDCAP_ROUND 0L
78#define ENDCAP_SQUARE 1L
79#define ENDCAP_BUTT 2L
80
81typedef struct _PATHOBJ
82{
83 FLONG fl;
84 ULONG cCurves;
86
87typedef struct _BRUSHOBJ
88{
90 PVOID pvRbrush;
93
94// CLIPOBJ definitions
95#define DC_TRIVIAL 0
96#define DC_RECT 1
97#define DC_COMPLEX 3
98
99#define FC_RECT 1
100#define FC_RECT4 2
101#define FC_COMPLEX 3
102
103typedef struct _CLIPOBJ
104{
105 ULONG iUniq;
109 BYTE iMode;
112
113//
114// BRUSHOBJ::flColorType
115//
116#define BR_DEVICE_ICM 0x01
117#define BR_HOST_ICM 0x02
118#define BR_CMYKCOLOR 0x04
119
130
138BOOL APIENTRY PATHOBJ_bMoveTo(
139 PATHOBJ *ppo,
140 POINTFIX ptfx
141);
142
152 PATHOBJ *ppo,
153 POINTFIX *pptfx,
154 ULONG cptfx
155);
156
166 PATHOBJ *ppo,
167 POINTFIX *pptfx,
168 ULONG cptfx
169);
170
172
174VOID APIENTRY PATHOBJ_vGetBounds(
175 PATHOBJ *ppo,
176 PRECTFX prectfx
177);
178
179/* End of winddi.h structures */
180
181#endif // _WINDDI_
182
183#ifdef __cplusplus
184}
185#endif
struct _RECTFX RECTFX
BOOL APIENTRY PATHOBJ_bPolyBezierTo(PATHOBJ *ppo, POINTFIX *pptfx, ULONG cptfx)
FLOAT FLOATL
Definition: RTPDF-DDI.h:32
struct _BRUSHOBJ BRUSHOBJ
struct _RECTFX * PRECTFX
BOOL APIENTRY PATHOBJ_bMoveTo(PATHOBJ *ppo, POINTFIX ptfx)
struct _POINTFIX POINTFIX
struct _CLIPOBJ CLIPOBJ
union _FLOAT_LONG * PFLOAT_LONG
FIX * PFIX
Definition: RTPDF-DDI.h:34
struct _LINEATTRS LINEATTRS
union _FLOAT_LONG FLOAT_LONG
LONG FIX
Definition: RTPDF-DDI.h:33
struct _UNICODE_STRING UNICODE_STRING
struct _LINEATTRS * PLINEATTRS
struct _POINTFIX * PPOINTFIX
BOOL APIENTRY PATHOBJ_bPolyLineTo(PATHOBJ *ppo, POINTFIX *pptfx, ULONG cptfx)
struct _PATHOBJ PATHOBJ
Definition: RTPDF-DDI.h:88
ULONG iSolidColor
Definition: RTPDF-DDI.h:89
PVOID pvRbrush
Definition: RTPDF-DDI.h:90
FLONG flColorType
Definition: RTPDF-DDI.h:91
Definition: RTPDF-DDI.h:104
BYTE iDComplexity
Definition: RTPDF-DDI.h:107
RECTL rclBounds
Definition: RTPDF-DDI.h:106
BYTE iFComplexity
Definition: RTPDF-DDI.h:108
BYTE iMode
Definition: RTPDF-DDI.h:109
ULONG iUniq
Definition: RTPDF-DDI.h:105
BYTE fjOptions
Definition: RTPDF-DDI.h:110
Definition: RTPDF-DDI.h:57
FLOAT_LONG elStyleState
Definition: RTPDF-DDI.h:65
ULONG iEndCap
Definition: RTPDF-DDI.h:60
PFLOAT_LONG pstyle
Definition: RTPDF-DDI.h:64
ULONG cstyle
Definition: RTPDF-DDI.h:63
FLONG fl
Definition: RTPDF-DDI.h:58
ULONG iJoin
Definition: RTPDF-DDI.h:59
FLOAT_LONG elWidth
Definition: RTPDF-DDI.h:61
FLOATL eMiterLimit
Definition: RTPDF-DDI.h:62
Definition: RTPDF-DDI.h:82
FLONG fl
Definition: RTPDF-DDI.h:83
ULONG cCurves
Definition: RTPDF-DDI.h:84
Definition: RTPDF-DDI.h:43
FIX y
Definition: RTPDF-DDI.h:45
FIX x
Definition: RTPDF-DDI.h:44
Definition: RTPDF-DDI.h:49
FIX xLeft
Definition: RTPDF-DDI.h:50
FIX yTop
Definition: RTPDF-DDI.h:51
FIX xRight
Definition: RTPDF-DDI.h:52
FIX yBottom
Definition: RTPDF-DDI.h:53
Definition: RTPDF-DDI.h:19
WORD Header
Definition: RTPDF-DDI.h:20
WCHAR String[128]
Definition: RTPDF-DDI.h:21
Definition: RTPDF-DDI.h:37
LONG l
Definition: RTPDF-DDI.h:39
FLOATL e
Definition: RTPDF-DDI.h:38