wmfstruct.h
Go to the documentation of this file.00001 /* 00002 For general Scribus (>=1.3.2) copyright and licensing information please refer 00003 to the COPYING file provided with the program. Following this notice may exist 00004 a copyright and/or license notice that predates the release of Scribus 1.3.2 00005 for which a new license (GPL+exception) is in place. 00006 */ 00007 00008 /* WMF Metafile Structures 00009 * Author: Stefan Taferner <taferner@kde.org> 00010 */ 00011 #ifndef wmfstruct_h 00012 #define wmfstruct_h 00013 00014 typedef qint16 WORD16; 00015 typedef qint32 WORD32; 00016 typedef qint32 LONG32; 00017 typedef void* _HANDLE; 00018 00019 typedef struct _RECT16 00020 { 00021 WORD16 left; 00022 WORD16 top; 00023 WORD16 right; 00024 WORD16 bottom; 00025 } RECT16; 00026 00027 typedef struct _RECT32 00028 { 00029 LONG32 left; 00030 LONG32 top; 00031 LONG32 right; 00032 LONG32 bottom; 00033 } RECT32; 00034 00035 typedef struct _SIZE16 00036 { 00037 WORD16 width; 00038 WORD16 height; 00039 } SIZE16; 00040 00041 typedef struct _SIZE32 00042 { 00043 LONG32 width; 00044 LONG32 height; 00045 } SIZE32; 00046 00047 00048 struct WmfEnhMetaHeader 00049 { 00050 WORD32 iType; // Record type EMR_HEADER 00051 WORD32 nSize; // Record SIZE16 in bytes. This may be greater 00052 // than the sizeof( ENHMETAHEADER ). 00053 RECT32 rclBounds; // Inclusive-inclusive bounds in device units 00054 RECT32 rclFrame; // Inclusive-inclusive Picture Frame of metafile 00055 // in .01 mm units 00056 WORD32 dSignature; // Signature. Must be ENHMETA_SIGNATURE. 00057 WORD32 nVersion; // Version number 00058 WORD32 nBytes; // SIZE16 of the metafile in bytes 00059 WORD32 nRecords; // Number of records in the metafile 00060 WORD16 nHandles; // Number of handles in the handle table 00061 // Handle index zero is reserved. 00062 WORD16 sReserved; // Reserved. Must be zero. 00063 WORD32 nDescription; // Number of chars in the unicode description string 00064 // This is 0 if there is no description string 00065 WORD32 offDescription; // Offset to the metafile description record. 00066 // This is 0 if there is no description string 00067 WORD32 nPalEntries; // Number of entries in the metafile palette. 00068 SIZE32 szlDevice; // SIZE16 of the reference device in pels 00069 SIZE32 szlMillimeters; // SIZE16 of the reference device in millimeters 00070 }; 00071 #define ENHMETA_SIGNATURE 0x464D4520 00072 00073 00074 struct WmfMetaHeader 00075 { 00076 WORD16 mtType; 00077 WORD16 mtHeaderSize; 00078 WORD16 mtVersion; 00079 WORD32 mtSize; 00080 WORD16 mtNoObjects; 00081 WORD32 mtMaxRecord; 00082 WORD16 mtNoParameters; 00083 }; 00084 00085 00086 struct WmfPlaceableHeader 00087 { 00088 WORD32 key; 00089 WORD16 hmf; 00090 RECT16 bbox; 00091 WORD16 inch; 00092 WORD32 reserved; 00093 WORD16 checksum; 00094 }; 00095 #define APMHEADER_KEY 0x9AC6CDD7 00096 00097 00098 struct WmfMetaRecord 00099 { 00100 WORD32 rdSize; // Record SIZE16 ( in words ) of the function 00101 WORD16 rdFunction; // Record function number 00102 WORD16 rdParm[ 1 ]; // WORD16 array of parameters 00103 }; 00104 00105 00106 struct WmfEnhMetaRecord 00107 { 00108 WORD32 iType; // Record type EMR_xxx 00109 WORD32 nSize; // Record SIZE16 in bytes 00110 WORD32 dParm[ 1 ]; // WORD32 array of parameters 00111 }; 00112 00113 00114 #endif /*wmfstruct_h*/
