Scribus
Open source desktop publishing at your fingertips
wmfstruct.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 
8 /* WMF Metafile Structures
9  * Author: Stefan Taferner <taferner@kde.org>
10  */
11 #ifndef wmfstruct_h
12 #define wmfstruct_h
13 
14 typedef qint16 WORD16;
15 typedef qint32 WORD32;
16 typedef qint32 LONG32;
17 typedef void* _HANDLE;
18 
19 typedef struct _RECT16
20 {
21  WORD16 left;
22  WORD16 top;
23  WORD16 right;
24  WORD16 bottom;
25 } RECT16;
26 
27 typedef struct _RECT32
28 {
29  LONG32 left;
30  LONG32 top;
31  LONG32 right;
32  LONG32 bottom;
33 } RECT32;
34 
35 typedef struct _SIZE16
36 {
37  WORD16 width;
38  WORD16 height;
39 } SIZE16;
40 
41 typedef struct _SIZE32
42 {
43  LONG32 width;
44  LONG32 height;
45 } SIZE32;
46 
47 
49 {
50  WORD32 iType; // Record type EMR_HEADER
51  WORD32 nSize; // Record SIZE16 in bytes. This may be greater
52  // than the sizeof( ENHMETAHEADER ).
53  RECT32 rclBounds; // Inclusive-inclusive bounds in device units
54  RECT32 rclFrame; // Inclusive-inclusive Picture Frame of metafile
55  // in .01 mm units
56  WORD32 dSignature; // Signature. Must be ENHMETA_SIGNATURE.
57  WORD32 nVersion; // Version number
58  WORD32 nBytes; // SIZE16 of the metafile in bytes
59  WORD32 nRecords; // Number of records in the metafile
60  WORD16 nHandles; // Number of handles in the handle table
61  // Handle index zero is reserved.
62  WORD16 sReserved; // Reserved. Must be zero.
63  WORD32 nDescription; // Number of chars in the unicode description string
64  // This is 0 if there is no description string
65  WORD32 offDescription; // Offset to the metafile description record.
66  // This is 0 if there is no description string
67  WORD32 nPalEntries; // Number of entries in the metafile palette.
68  SIZE32 szlDevice; // SIZE16 of the reference device in pels
69  SIZE32 szlMillimeters; // SIZE16 of the reference device in millimeters
70 };
71 #define ENHMETA_SIGNATURE 0x464D4520
72 
73 
75 {
76  WORD16 mtType;
77  WORD16 mtHeaderSize;
78  WORD16 mtVersion;
79  WORD32 mtSize;
80  WORD16 mtNoObjects;
81  WORD32 mtMaxRecord;
82  WORD16 mtNoParameters;
83 };
84 
85 
87 {
88  WORD32 key;
89  WORD16 hmf;
90  RECT16 bbox;
91  WORD16 inch;
92  WORD32 reserved;
93  WORD16 checksum;
94 };
95 #define APMHEADER_KEY 0x9AC6CDD7
96 
97 
99 {
100  WORD32 rdSize; // Record SIZE16 ( in words ) of the function
101  WORD16 rdFunction; // Record function number
102  WORD16 rdParm[ 1 ]; // WORD16 array of parameters
103 };
104 
105 
107 {
108  WORD32 iType; // Record type EMR_xxx
109  WORD32 nSize; // Record SIZE16 in bytes
110  WORD32 dParm[ 1 ]; // WORD32 array of parameters
111 };
112 
113 
114 #endif /*wmfstruct_h*/
Definition: wmfstruct.h:74
Definition: wmfstruct.h:27
Definition: wmfstruct.h:98
Definition: wmfstruct.h:48
Definition: wmfstruct.h:86
Definition: wmfstruct.h:106
Definition: wmfstruct.h:35
Definition: wmfstruct.h:41
Definition: wmfstruct.h:19