Lines Matching refs:record
6 [U_EMR]_set all take data and return a pointer to memory holding the constructed record.
7 The size of that record is also returned in recsize.
8 It is also in the second int32 in the record, but may have been byte swapped and so not usable.
11 Compile with "U_VALGRIND" defined defined to enable code which lets valgrind check each record for
54 \brief Look up the name of the EMR record by type. Returns U_EMR_INVALID if out of range.
56 \return name of the EMR record, "U_EMR_INVALID" if out of range.
57 \param idx EMR record type.
211 #define APPEND_PXBMISRC(A,B,C,D,E,F,G) /* A=record, B=U_EMR,C=cbBmi, D=Bmi, E=Px, F=cbImage, G=cbImage4 */ \
234 #define APPEND_MSKBMISRC(A,B,C,D,E,F,G) /* A=record, B=U_EMR*,C=cbMskBmi, D=MskBmi, E=Msk, F=cbMskImage, G=cbMskImage4 */ \
332 \brief Look up the properties (a bit map) of a type of EMR record.
335 \return bitmap of EMR record properties, or U_EMR_INVALID on error or release of all memory
336 \param type EMR record type. If U_EMR_INVALID release memory. (There is no U_EMR_INVALID EMR record type)
353 table[ 0] = 0x00; // Does not map to any EMR record
528 if(!scale)return(1); // bogus record, has start at center
535 if(!scale)return(2); // bogus record, has end at center
585 \param record U_EMRPIE, U_EMRCHORD, or _EMRARC record
594 PU_ENHMETARECORD record,
602 PU_EMRARC pEmr = (PU_EMRARC) (record);
851 \brief Get the DIB parameters from the BMI of the record for use by DBI_to_RGBA()
854 \param record pointer to EMR record that has a U_BITMAPINFO and bitmap
866 const char *record,
878 PU_BITMAPINFO Bmi = (PU_BITMAPINFO)(record + offBmiSrc);
906 *px = record + offBitsSrc;
918 \param w Width of pixel array in the record
919 \param h Height of pixel array in the record
1070 \param w Width of pixel array in the record
1071 \param h Height of pixel array in the record
1072 \param sl start left position in the pixel array in the record to start extracting
1073 \param st start top position in the pixel array in the record to start extracting
1132 \brief Duplicate an EMR record.
1133 \param emr record to duplicate
1204 U_EMRHEADER *record;
1210 record = (U_EMRHEADER *)et->buf;
1211 record->nBytes = et->used;
1212 record->nRecords = et->records;
1213 record->nHandles = eht->peak + 1;
1214 record->nPalEntries = et->PalEntries;
1319 \brief Append an EMF record to an emf in memory. This may reallocate buf memory.
2072 char *record;
2079 record = malloc(irecsize);
2080 if(record){
2081 memcpy(record, &BmiHeader, sizeof(U_BITMAPINFOHEADER));
2084 memcpy(record + off, BmiColors, cbColors);
2086 if(cbColors4 - cbColors){ memset(record + off, 0, cbColors4 - cbColors); }
2089 return((PU_BITMAPINFO) record);
2113 char *record;
2118 irecsize = sizeof(U_EXTLOGPEN) + szSyleArray - sizeof(U_STYLEENTRY); // first one is in the record
2124 record = malloc(irecsize);
2125 if(record){
2126 ((PU_EXTLOGPEN) record)->elpPenStyle = elpPenStyle;
2127 ((PU_EXTLOGPEN) record)->elpWidth = elpWidth;
2128 ((PU_EXTLOGPEN) record)->elpBrushStyle = elpBrushStyle;
2129 ((PU_EXTLOGPEN) record)->elpColor = elpColor;
2130 ((PU_EXTLOGPEN) record)->elpHatch = elpHatch;
2131 ((PU_EXTLOGPEN) record)->elpNumEntries = elpNumEntries;
2132 if(elpNumEntries){ memcpy(((PU_EXTLOGPEN) record)->elpStyleEntry,elpStyleEntry,szSyleArray); }
2133 else { memset(((PU_EXTLOGPEN) record)->elpStyleEntry,0,sizeof(U_STYLEENTRY)); } // not used, but this stops valgrind warnings
2135 return((PU_EXTLOGPEN) record);
2190 PU_LOGPALETTE record;
2196 record = (PU_LOGPALETTE) malloc(irecsize);
2198 record->palVersion = U_LP_VERSION;
2199 record->palNumEntries = palNumEntries;
2200 memcpy(record->palPalEntry,palPalEntry,cbPalArray);
2202 return(record);
2234 char *record;
2241 record = malloc(irecsize);
2242 if(record){
2243 memcpy(record, &rdh, sizeof(U_RGNDATAHEADER));
2245 memcpy(record + off, Buffer, szRgnArray);
2247 return((PU_RGNDATA) record);
2403 char *record;
2414 record = malloc(irecsize);
2415 if(record){
2416 ((PU_EMRTEXT)record)->ptlReference = ptlReference;
2417 ((PU_EMRTEXT)record)->nChars = NumString;
2418 // pick up ((PU_EMRTEXT)record)->offString later
2419 ((PU_EMRTEXT)record)->fOptions = fOptions;
2422 memcpy(record + off,&rcl, sizeof(U_RECTL));
2425 loffDx = (uint32_t *)(record + off); // offDx will go here, but we do not know with what value yet
2427 memcpy(record + off,String,cbString); // copy the string data to its buffer
2428 ((PU_EMRTEXT)record)->offString = off; // now save offset in the structure
2431 memset(record+off,0,cbString4-cbString); // keeps valgrind happy (initialize padding after string)
2434 memcpy(record + off, Dx, cbDxArray); // copy the Dx data to its buffer
2437 return(record);
2475 may be returned are a valid U_EMRDELETEOBJECT record or a NULL, and other errors could result in the NULL.
2885 char *record;
2891 record = malloc(irecsize);
2892 if(record){
2893 ((PU_EMR) record)->iType = iType;
2894 ((PU_EMR) record)->nSize = irecsize;
2895 ((PU_EMRPOLYBEZIER) record)->rclBounds = rclBounds;
2896 ((PU_EMRPOLYBEZIER) record)->cptl = cptl;
2897 memcpy(((PU_EMRPOLYBEZIER) record)->aptl,points,cbPoints);
2899 return(record);
2904 char *record;
2911 record = malloc(irecsize);
2912 if(record){
2913 ((PU_EMR) record)->iType = iType;
2914 ((PU_EMR) record)->nSize = irecsize;
2915 ((PU_EMRPOLYPOLYLINE) record)->rclBounds = rclBounds;
2916 ((PU_EMRPOLYPOLYLINE) record)->nPolys = nPolys;
2917 ((PU_EMRPOLYPOLYLINE) record)->cptl = cptl;
2918 memcpy(((PU_EMRPOLYPOLYLINE) record)->aPolyCounts,aPolyCounts,cbPolys);
2920 memcpy(record + off,points,cbPoints);
2922 return(record);
2927 char *record;
2931 record = malloc(irecsize);
2932 if(record){
2933 ((PU_EMR) record)->iType = iType;
2934 ((PU_EMR) record)->nSize = irecsize;
2935 ((PU_EMRSETMAPMODE)record)->iMode = iMode;
2937 return(record);
2942 char *record;
2946 record = malloc(irecsize);
2947 memset(record,0,irecsize);
2948 if(record){
2949 ((PU_EMR) record)->iType = iType;
2950 ((PU_EMR) record)->nSize = irecsize;
2951 ((PU_EMRELLIPSE)record)->rclBox = rclBox; // bounding rectangle in logical units
2953 return(record);
2958 char *record;
2961 record = malloc(irecsize);
2962 if(record){
2963 ((PU_EMR) record)->iType = iType;
2964 ((PU_EMR) record)->nSize = irecsize;
2966 return(record);
2971 char *record;
2979 record = malloc(irecsize);
2980 if(record){
2981 ((PU_EMR) record)->iType = iType;
2982 ((PU_EMR) record)->nSize = irecsize;
2983 ((PU_EMRPOLYBEZIER16) record)->rclBounds = rclBounds;
2984 ((PU_EMRPOLYBEZIER16) record)->cpts = cpts;
2985 memcpy(record + off, points, cbPoints);
2988 memset(record + off, 0, cbPoints4 - cbPoints);
2991 return(record);
2998 char *record;
3001 record = malloc(irecsize);
3002 if(record){
3003 ((PU_EMR) record)->iType = iType;
3004 ((PU_EMR) record)->nSize = irecsize;
3005 ((PU_EMRGENERICPAIR)record)->pair = pair;
3007 return(record);
3019 char *record;
3043 // final record size is: U_EMREXTTEXTOUTA (includes constant part of U_EMRTEXT) + U_RECTL (if present) + offDx + dx buffer + string buffer
3045 record = malloc(irecsize);
3046 if(record){
3047 ((PU_EMR) record)->iType = iType;
3048 ((PU_EMR) record)->nSize = irecsize;
3049 ((PU_EMREXTTEXTOUTA) record)->iGraphicsMode = iGraphicsMode;
3050 ((PU_EMREXTTEXTOUTA) record)->rclBounds = rclBounds;
3051 ((PU_EMREXTTEXTOUTA) record)->exScale = exScale;
3052 ((PU_EMREXTTEXTOUTA) record)->eyScale = eyScale;
3053 // copy the adjusted U_EMRTEXT into the emrtext part of the full record..
3054 memcpy(&(((PU_EMREXTTEXTOUTA) record)->emrtext), emrtext, cbEmrtextAll);
3056 return(record);
3061 char *record;
3064 record = malloc(irecsize);
3065 if(record){
3066 ((PU_EMR) record)->iType = iType;
3067 ((PU_EMR) record)->nSize = irecsize;
3068 ((PU_EMRARC) record)->rclBox = rclBox;
3069 ((PU_EMRARC) record)->ptlStart = ptlStart;
3070 ((PU_EMRARC) record)->ptlEnd = ptlEnd;
3072 return(record);
3077 char *record;
3084 record = malloc(irecsize);
3085 if(record){
3086 ((PU_EMR) record)->iType = iType;
3087 ((PU_EMR) record)->nSize = irecsize;
3088 ((PU_EMRPOLYPOLYLINE16) record)->rclBounds = rclBounds;
3089 ((PU_EMRPOLYPOLYLINE16) record)->nPolys = nPolys;
3090 ((PU_EMRPOLYPOLYLINE16) record)->cpts = cpts;
3091 memcpy(((PU_EMRPOLYPOLYLINE16) record)->aPolyCounts,aPolyCounts,cbPolys);
3093 memcpy(record + off,points,cbPoints);
3095 return(record);
3100 char *record;
3110 record = malloc(irecsize);
3111 if(record){
3112 ((PU_EMR) record)->iType = iType;
3113 ((PU_EMR) record)->nSize = irecsize;
3114 ((PU_EMRINVERTRGN) record)->rclBounds = ((PU_RGNDATAHEADER) RgnData)->rclBounds;
3115 ((PU_EMRINVERTRGN) record)->cbRgnData = rds;
3117 memcpy(record + off, RgnData, rds);
3119 if(rds < rds4){ memset(record + off,0, rds4 - rds); } // clear any unused bytes
3121 return(record);
3134 char *record;
3141 record = malloc(irecsize);
3142 if(record){
3143 ((PU_EMR) record)->iType = iType;
3144 ((PU_EMR) record)->nSize = irecsize;
3145 ((PU_EMRCREATEMONOBRUSH) record)->ihBrush = ihBrush;
3146 ((PU_EMRCREATEMONOBRUSH) record)->iUsage = iUsage;
3149 memcpy(record + off, Bmi, cbBmi);
3150 ((PU_EMRCREATEMONOBRUSH) record)->offBmi = off;
3151 ((PU_EMRCREATEMONOBRUSH) record)->cbBmi = cbBmi;
3153 memcpy(record + off, Px, cbPx);
3154 ((PU_EMRCREATEMONOBRUSH) record)->offBits = off;
3155 ((PU_EMRCREATEMONOBRUSH) record)->cbBits = cbImage;
3158 ((PU_EMRCREATEMONOBRUSH) record)->offBmi = 0;
3159 ((PU_EMRCREATEMONOBRUSH) record)->cbBmi = 0;
3160 ((PU_EMRCREATEMONOBRUSH) record)->offBits = 0;
3161 ((PU_EMRCREATEMONOBRUSH) record)->cbBits = 0;
3164 return(record);
3183 char *record;
3190 record = malloc(irecsize);
3191 if(record){
3192 ((PU_EMR) record)->iType = iType;
3193 ((PU_EMR) record)->nSize = irecsize;
3194 ((PU_EMRALPHABLEND) record)->rclBounds = rclBounds;
3195 ((PU_EMRALPHABLEND) record)->Dest = Dest;
3196 ((PU_EMRALPHABLEND) record)->cDest = cDest;
3197 ((PU_EMRALPHABLEND) record)->Blend = *((PU_BLEND)&Data);
3198 ((PU_EMRALPHABLEND) record)->Src = Src;
3199 ((PU_EMRALPHABLEND) record)->xformSrc = xformSrc;
3200 ((PU_EMRALPHABLEND) record)->crBkColorSrc = crBkColorSrc;
3201 ((PU_EMRALPHABLEND) record)->iUsageSrc = iUsageSrc;
3203 APPEND_PXBMISRC(record, U_EMRALPHABLEND, cbBmi, Bmi, Px, cbImage, cbImage4);
3204 ((PU_EMRALPHABLEND) record)->cSrc = cSrc;
3206 return(record);
3211 These are the core EMR functions, each creates a particular type of record.
3219 \brief Allocate and construct a U_EMRHEADER record.
3220 \return pointer to U_EMRHEADER record, or NULL on error.
3241 char *record;
3252 record = malloc(irecsize);
3253 if(record){
3255 ((PU_EMR) record)->iType = U_EMR_HEADER;
3256 ((PU_EMR) record)->nSize = irecsize;
3257 ((PU_EMRHEADER) record)->rclBounds = rclBounds;
3258 ((PU_EMRHEADER) record)->rclFrame = rclFrame;
3259 ((PU_EMRHEADER) record)->dSignature = U_ENHMETA_SIGNATURE;
3260 ((PU_EMRHEADER) record)->nVersion = U_ENHMETA_VERSION;
3261 ((PU_EMRHEADER) record)->nBytes = 0; // Not known yet
3262 ((PU_EMRHEADER) record)->nRecords = 0; // Not known yet
3263 ((PU_EMRHEADER) record)->nHandles = 0; // Not known yet
3264 ((PU_EMRHEADER) record)->sReserved = 0; // Must be 0
3265 ((PU_EMRHEADER) record)->nDescription = nDesc;
3266 ((PU_EMRHEADER) record)->offDescription = 0; // may change below
3267 ((PU_EMRHEADER) record)->nPalEntries = 0; // Not known yet
3268 ((PU_EMRHEADER) record)->szlDevice = szlDevice;
3269 ((PU_EMRHEADER) record)->szlMillimeters = szlMillimeters;
3270 ((PU_EMRHEADER) record)->cbPixelFormat = cbPFD;
3271 ((PU_EMRHEADER) record)->offPixelFormat = 0; // may change below
3272 ((PU_EMRHEADER) record)->bOpenGL = bOpenGL;
3273 ((PU_EMRHEADER) record)->szlMicrometers.cx = szlMillimeters.cx*1000;
3274 ((PU_EMRHEADER) record)->szlMicrometers.cy = szlMillimeters.cy*1000;
3276 ((PU_EMRHEADER) record)->offDescription = off;
3277 memcpy(record + off, Description, cbDesc);
3279 if(cbDesc < cbDesc4)memset(record + off,0,cbDesc4-cbDesc); // clear any unused bytes
3283 ((PU_EMRHEADER) record)->offPixelFormat = off;
3284 memcpy(record+off,pfmtDesc,cbPFD);
3287 return(record);
3292 \brief Allocate and construct a U_EMR_POLYBEZIER record.
3293 \return pointer to U_EMR_POLYBEZIER record, or NULL on error.
3308 \brief Allocate and construct a U_EMR_POLYGON record.
3309 \return pointer to U_EMR_POLYGON record, or NULL on error.
3324 \brief Allocate and construct a U_EMR_POLYLINE record.
3325 \return pointer to U_EMR_POLYLINE record, or NULL on error.
3340 \brief Allocate and construct a U_EMR_POLYBEZIERTO record.
3341 \return pointer to U_EMR_POLYBEZIERTO record, or NULL on error.
3356 \brief Allocate and construct a U_EMR_POLYLINETO record.
3357 \return pointer to U_EMR_POLYLINETO record, or NULL on error.
3372 \brief Allocate and construct a U_EMR_POLYPOLYLINE record.
3373 \return pointer to U_EMR_POLYPOLYLINE record, or NULL on error.
3392 \brief Allocate and construct a U_EMR_POLYPOLYGON record.
3393 \return pointer to U_EMR_POLYPOLYGON record, or NULL on error.
3412 \brief Allocate and construct a U_EMR_SETWINDOWEXTEX record.
3413 \return pointer to U_EMR_SETWINDOWEXTEX record, or NULL on error.
3427 \brief Allocate and construct a U_EMR_SETWINDOWORGEX record.
3428 \return pointer to U_EMR_SETWINDOWORGEX record, or NULL on error.
3439 \brief Allocate and construct a U_EMR_SETVIEWPORTEXTEX record.
3440 \return pointer to U_EMR_SETVIEWPORTEXTEX record, or NULL on error.
3454 \brief Allocate and construct a U_EMR_SETVIEWPORTORGEX record.
3455 \return pointer to U_EMR_SETVIEWPORTORGEX record, or NULL on error.
3466 \brief Allocate and construct a U_EMR_SETBRUSHORGEX record.
3467 \return pointer to U_EMR_SETBRUSHORGEX record, or NULL on error.
3478 \brief Allocate and construct a U_EMR_EOF record.
3479 \return pointer to U_EMR_EOF record, or NULL on error.
3489 char *record;
3499 record = malloc(irecsize);
3500 if(record){
3501 ((PU_EMR) record)->iType = U_EMR_EOF;
3502 ((PU_EMR) record)->nSize = irecsize;
3503 ((PU_EMREOF) record)->cbPalEntries = cbPalEntries;
3504 ((PU_EMREOF) record)->offPalEntries = 0; // May be changed below
3507 ((PU_EMREOF) record)->offPalEntries = off;
3508 memcpy(record+off,PalEntries,cbPals);
3511 ptr = record + off;
3515 return(record);
3521 \brief Allocate and construct a U_EMR_SETPIXELV record.
3522 \return pointer to U_EMR_SETPIXELV record, or NULL on error.
3530 char *record;
3534 record = malloc(irecsize);
3535 if(record){
3536 ((PU_EMR) record)->iType = U_EMR_SETPIXELV;
3537 ((PU_EMR) record)->nSize = irecsize;
3538 ((PU_EMRSETPIXELV)record)->ptlPixel = ptlPixel;
3539 ((PU_EMRSETPIXELV)record)->crColor = crColor;
3541 return(record);
3547 \brief Allocate and construct a U_EMR_SETMAPPERFLAGS record.
3548 \return pointer to U_EMR_SETMAPPERFLAGS record, or NULL on error.
3551 char *record;
3555 record = malloc(irecsize);
3556 if(record){
3557 ((PU_EMR) record)->iType = U_EMR_SETMAPPERFLAGS;
3558 ((PU_EMR) record)->nSize = irecsize;
3559 ((PU_EMRSETMAPPERFLAGS)record)->dwFlags = 1;
3561 return(record);
3566 \brief Allocate and construct a U_EMR_SETMAPMODE record.
3567 \return pointer to U_EMR_SETMAPMODE record, or NULL on error.
3578 \brief Allocate and construct a U_EMR_SETBKMODE record.
3579 \return pointer to U_EMR_SETBKMODE record, or NULL on error.
3590 \brief Allocate and construct a U_EMR_SETPOLYFILLMODE record.
3591 \return pointer to U_EMR_SETPOLYFILLMODE record, or NULL on error.
3602 \brief Allocate and construct a U_EMR_SETROP2 record.
3603 \return pointer to U_EMR_SETROP2 record, or NULL on error.
3614 \brief Allocate and construct a U_EMR_SETSTRETCHBLTMODE record.
3615 \return pointer to U_EMR_SETSTRETCHBLTMODE record, or NULL on error.
3626 \brief Allocate and construct a U_EMR_SETTEXTALIGN record.
3627 \return pointer to U_EMR_SETTEXTALIGN record, or NULL on error.
3638 \brief Allocate and construct a U_EMR_SETCOLORADJUSTMENT record.
3639 \return pointer to U_EMR_SETCOLORADJUSTMENT record, or NULL on error.
3645 char *record;
3649 record = malloc(irecsize);
3650 if(record){
3651 ((PU_EMR) record)->iType = U_EMR_SETCOLORADJUSTMENT;
3652 ((PU_EMR) record)->nSize = irecsize;
3653 ((PU_EMRSETCOLORADJUSTMENT) record)->ColorAdjustment = ColorAdjustment;
3655 return(record);
3660 \brief Allocate and construct a U_EMR_SETTEXTCOLOR record.
3661 \return pointer to U_EMR_SETTEXTCOLOR record, or NULL on error.
3672 \brief Allocate and construct a U_EMR_SETBKCOLOR record.
3673 \return pointer to U_EMR_SETBKCOLOR record, or NULL on error.
3684 \brief Allocate and construct a U_EMR_OFFSETCLIPRGN record.
3685 \return pointer to U_EMR_OFFSETCLIPRGN record, or NULL on error.
3696 \brief Allocate and construct a U_EMR_MOVETOEX record.
3697 \return pointer to U_EMR_MOVETOEX record, or NULL on error.
3708 \brief Allocate and construct a U_EMR_SETMETARGN record.
3709 \return pointer to U_EMR_SETMETARGN record, or NULL on error.
3717 \brief Allocate and construct a U_EMR_EXCLUDECLIPRECT record.
3718 \return pointer to U_EMR_EXCLUDECLIPRECT record, or NULL on error.
3729 \brief Allocate and construct a U_EMR_INTERSECTCLIPRECT record.
3730 \return pointer to U_EMR_INTERSECTCLIPRECT record, or NULL on error.
3741 \brief Allocate and construct a U_EMR_SCALEVIEWPORTEXTEX record.
3742 \return pointer to U_EMR_SCALEVIEWPORTEXTEX record, or NULL on error.
3760 \brief Allocate and construct a U_EMR_SCALEWINDOWEXTEX record.
3761 \return pointer to U_EMR_SCALEWINDOWEXTEX record, or NULL on error.
3778 \brief Allocate and construct a U_EMR_SAVEDC record.
3779 \return pointer to U_EMR_SAVEDC record, or NULL on error.
3787 \brief Allocate and construct a U_EMR_RESTOREDC record.
3788 \return pointer to U_EMR_RESTOREDC record, or NULL on error.
3799 \brief Allocate and construct a U_EMR_SETWORLDTRANSFORM record.
3800 \return pointer to U_EMR_SETWORLDTRANSFORM record, or NULL on error.
3806 char *record;
3810 record = malloc(irecsize);
3811 if(record){
3812 ((PU_EMR) record)->iType = U_EMR_SETWORLDTRANSFORM;
3813 ((PU_EMR) record)->nSize = irecsize;
3814 ((PU_EMRSETWORLDTRANSFORM) record)->xform = xform;
3816 return(record);
3821 \brief Allocate and construct a U_EMR_MODIFYWORLDTRANSFORM record.
3822 \return pointer to U_EMR_MODIFYWORLDTRANSFORM record, or NULL on error.
3830 char *record;
3834 record = malloc(irecsize);
3835 if(record){
3836 ((PU_EMR) record)->iType = U_EMR_MODIFYWORLDTRANSFORM;
3837 ((PU_EMR) record)->nSize = irecsize;
3838 ((PU_EMRMODIFYWORLDTRANSFORM) record)->xform = xform;
3839 ((PU_EMRMODIFYWORLDTRANSFORM) record)->iMode = iMode;
3841 return(record);
3846 \brief Allocate and construct a U_EMR_SELECTOBJECT record.
3848 \return pointer to U_EMR_SELECTOBJECT record, or NULL on error.
3854 char *record;
3858 record = malloc(irecsize);
3859 if(record){
3860 ((PU_EMR) record)->iType = U_EMR_SELECTOBJECT;
3861 ((PU_EMR) record)->nSize = irecsize;
3862 ((PU_EMRSELECTOBJECT) record)->ihObject = ihObject; // Index of object to SELECT
3864 return(record);
3869 \brief Allocate and construct a U_EMR_CREATEPEN record.
3871 \return pointer to U_EMR_CREATEPEN record, or NULL on error.
3879 char *record;
3882 record = malloc(irecsize);
3883 if(record){
3884 ((PU_EMR) record)->iType = U_EMR_CREATEPEN;
3885 ((PU_EMR) record)->nSize = irecsize;
3886 ((PU_EMRCREATEPEN) record)->ihPen = ihPen;
3887 ((PU_EMRCREATEPEN) record)->lopn = lopn;
3889 return(record);
3894 \brief Allocate and construct a U_EMR_CREATEBRUSHINDIRECT record.
3896 \return pointer to U_EMR_CREATEBRUSHINDIRECT record, or NULL on error.
3904 char *record;
3908 record = malloc(irecsize);
3909 if(record){
3910 ((PU_EMR) record)->iType = U_EMR_CREATEBRUSHINDIRECT;
3911 ((PU_EMR) record)->nSize = irecsize;
3912 ((PU_EMRCREATEBRUSHINDIRECT) record)->ihBrush = ihBrush; // Index to place object in EMF object table (this entry must not yet exist)
3913 ((PU_EMRCREATEBRUSHINDIRECT) record)->lb = lb;
3915 return(record);
3920 \brief Allocate and construct a U_EMR_DELETEOBJECT record.
3922 \return pointer to U_EMR_DELETEOBJECT record, or NULL on error.
3928 char *record;
3932 record = malloc(irecsize);
3933 if(record){
3934 ((PU_EMR) record)->iType = U_EMR_DELETEOBJECT;
3935 ((PU_EMR) record)->nSize = irecsize;
3936 ((PU_EMRDELETEOBJECT) record)->ihObject = ihObject; // Index of object to DELETE
3938 return(record);
3943 \brief Allocate and construct a U_EMR_ANGLEARC record.
3944 \return pointer to U_EMR_ANGLEARC record, or NULL on error.
3956 char *record;
3960 record = malloc(irecsize);
3961 if(record){
3962 ((PU_EMR) record)->iType = U_EMR_ANGLEARC;
3963 ((PU_EMR) record)->nSize = irecsize;
3964 ((PU_EMRANGLEARC) record)->ptlCenter = ptlCenter;
3965 ((PU_EMRANGLEARC) record)->nRadius = nRadius;
3966 ((PU_EMRANGLEARC) record)->eStartAngle = eStartAngle;
3967 ((PU_EMRANGLEARC) record)->eSweepAngle = eSweepAngle;
3969 return(record);
3974 \brief Allocate and construct a U_EMR_ELLIPSE record.
3975 \return pointer to U_EMR_ELLIPSE record, or NULL on error.
3986 \brief Allocate and construct a U_EMR_RECTANGLE record.
3987 \return pointer to U_EMR_RECTANGLE record, or NULL on error.
3998 \brief Allocate and construct a U_EMR_ROUNDRECT record.
3999 \return pointer to U_EMR_ROUNDRECT record, or NULL on error.
4007 char *record;
4011 record = malloc(irecsize);
4012 if(record){
4013 ((PU_EMR) record)->iType = U_EMR_ROUNDRECT;
4014 ((PU_EMR) record)->nSize = irecsize;
4015 ((PU_EMRROUNDRECT) record)->rclBox = rclBox;
4016 ((PU_EMRROUNDRECT) record)->szlCorner = szlCorner;
4018 return(record);
4023 \brief Allocate and construct a U_EMR_ARC record.
4024 \return pointer to U_EMR_ARC record, or NULL on error.
4039 \brief Allocate and construct a U_EMR_CHORD record.
4040 \return pointer to U_EMR_CHORD record, or NULL on error.
4055 \brief Allocate and construct a U_EMR_PIE record.
4056 \return pointer to U_EMR_PIE record, or NULL on error.
4071 \brief Allocate and construct a U_EMR_SELECTPALETTE record.
4072 \return pointer to U_EMR_SELECTPALETTE record, or NULL on error.
4083 \brief Allocate and construct a U_EMR_CREATEPALETTE record.
4085 \return pointer to U_EMR_CREATEPALETTE record, or NULL on error.
4093 char *record;
4097 record = malloc(irecsize);
4098 if(record){
4099 ((PU_EMR) record)->iType = U_EMR_CREATEPALETTE;
4100 ((PU_EMR) record)->nSize = irecsize;
4101 ((PU_EMRCREATEPALETTE) record)->ihPal = ihPal;
4102 ((PU_EMRCREATEPALETTE) record)->lgpl = lgpl;
4104 return(record);
4109 \brief Allocate and construct a U_EMR_SETPALETTEENTRIES record.
4111 \return pointer to U_EMR_SETPALETTEENTRIES record, or NULL on error.
4123 char *record;
4130 record = malloc(irecsize);
4131 if(record){
4132 ((PU_EMR) record)->iType = U_EMR_SETPALETTEENTRIES;
4133 ((PU_EMR) record)->nSize = irecsize;
4134 ((PU_EMRSETPALETTEENTRIES) record)->ihPal = ihPal;
4135 ((PU_EMRSETPALETTEENTRIES) record)->iStart = iStart;
4136 ((PU_EMRSETPALETTEENTRIES) record)->cEntries = cEntries;
4137 memcpy(((PU_EMRSETPALETTEENTRIES) record)->aPalEntries, aPalEntries,cbPals);
4139 return(record);
4144 \brief Allocate and construct a U_EMR_RESIZEPALETTE record.
4145 \return pointer to U_EMR_RESIZEPALETTE record, or NULL on error.
4158 \brief Allocate and construct a U_EMR_REALIZEPALETTE record.
4159 \return pointer to U_EMR_REALIZEPALETTE record, or NULL on error.
4167 \brief Allocate and construct a U_EMR_EXTFLOODFILL record.
4168 \return pointer to U_EMR_EXTFLOODFILL record, or NULL on error.
4178 char *record;
4182 record = malloc(irecsize);
4183 if(record){
4184 ((PU_EMR) record)->iType = U_EMR_EXTFLOODFILL;
4185 ((PU_EMR) record)->nSize = irecsize;
4186 ((PU_EMREXTFLOODFILL) record)->ptlStart = ptlStart;
4187 ((PU_EMREXTFLOODFILL) record)->crColor = crColor;
4188 ((PU_EMREXTFLOODFILL) record)->iMode = iMode;
4190 return(record);
4195 \brief Allocate and construct a U_EMR_LINETO record.
4196 \return pointer to U_EMR_LINETO record, or NULL on error.
4207 \brief Allocate and construct a U_EMR_ARCTO record.
4208 \return pointer to U_EMR_ARCTO record, or NULL on error.
4214 not indicated in the Microsoft EMF documentation for this record.
4226 \brief Allocate and construct a U_EMR_POLYDRAW record.
4227 \return pointer to U_EMR_POLYDRAW record, or NULL on error.
4239 char *record;
4248 record = malloc(irecsize);
4249 if(record){
4250 ((PU_EMR) record)->iType = U_EMR_POLYDRAW;
4251 ((PU_EMR) record)->nSize = irecsize;
4252 ((PU_EMRPOLYDRAW) record)->rclBounds = rclBounds;
4253 ((PU_EMRPOLYDRAW) record)->cptl = cptl;
4255 memcpy(record+off,aptl,cbPoints);
4257 memcpy(record+off,abTypes,cbAbTypes);
4259 if(cbAbTypes4 > cbAbTypes){ memset(record+off,0,cbAbTypes4-cbAbTypes); } // keeps valgrind happy (initialize padding after byte array)
4261 return(record);
4266 \brief Allocate and construct a U_EMR_SETARCDIRECTION record.
4267 \return pointer to U_EMR_SETARCDIRECTION record, or NULL on error.
4278 \brief Allocate and construct a U_EMR_SETMITERLIMIT record.
4279 \return pointer to U_EMR_SETMITERLIMIT record, or NULL on error.
4291 \brief Allocate and construct a U_EMR_BEGINPATH record.
4292 \return pointer to U_EMR_BEGINPATH record, or NULL on error.
4300 \brief Allocate and construct a U_EMR_ENDPATH record.
4301 \return pointer to U_EMR_ENDPATH record, or NULL on error.
4309 \brief Allocate and construct a U_EMR_CLOSEFIGURE record.
4310 \return pointer to U_EMR_CLOSEFIGURE record, or NULL on error.
4318 \brief Allocate and construct a U_EMR_FILLPATH record.
4319 \return pointer to U_EMR_FILLPATH record, or NULL on error.
4332 \brief Allocate and construct a U_EMR_STROKEANDFILLPATH record.
4333 \return pointer to U_EMR_STROKEANDFILLPATH record, or NULL on error.
4348 \brief Allocate and construct a U_EMR_STROKEPATH record.
4349 \return pointer to U_EMR_STROKEPATH record, or NULL on error.
4362 \brief Allocate and construct a U_EMR_FLATTENPATH record.
4363 \return pointer to U_EMR_FLATTENPATH record, or NULL on error.
4371 \brief Allocate and construct a U_EMR_WIDENPATH record.
4372 \return pointer to U_EMR_WIDENPATH record, or NULL on error.
4380 \brief Allocate and construct a U_EMR_SELECTCLIPPATH record.
4381 \return pointer to U_EMR_SELECTCLIPPATH record, or NULL on error.
4392 \brief Allocate and construct a U_EMR_ABORTPATH record.
4393 \return pointer to U_EMR_ABORTPATH record, or NULL on error.
4403 \brief Allocate and construct a U_EMR_COMMENT record.
4404 \return pointer to U_EMR_COMMENT record, or NULL on error.
4412 char *record;
4418 record = malloc(irecsize);
4419 if(record){
4420 ((PU_EMR) record)->iType = U_EMR_COMMENT;
4421 ((PU_EMR) record)->nSize = irecsize;
4422 ((PU_EMRCOMMENT) record)->cbData = cbData;
4423 memcpy(record + irecsize - cbData4,Data,cbData);
4424 if(cbData4 > cbData)memset(record + irecsize - cbData4 + cbData,0,cbData4-cbData); // clear any unused bytes
4426 return(record);
4431 \brief Allocate and construct a U_EMR_FILLRGN record.
4433 \return pointer to U_EMR_FILLRGN record, or NULL on error.
4443 char *record;
4453 record = malloc(irecsize);
4454 if(record){
4455 ((PU_EMR) record)->iType = U_EMR_FILLRGN;
4456 ((PU_EMR) record)->nSize = irecsize;
4457 ((PU_EMRFILLRGN) record)->rclBounds = rclBounds;
4458 ((PU_EMRFILLRGN) record)->cbRgnData = rds;
4459 ((PU_EMRFILLRGN) record)->ihBrush = ihBrush;
4461 memcpy(record + off, RgnData, rds);
4463 if(rds < rds4){ memset(record + off,0, rds4 - rds); } // clear any unused bytes
4465 return(record);
4470 \brief Allocate and construct a U_EMR_FRAMERGN record.
4472 \return pointer to U_EMR_FRAMERGN record, or NULL on error.
4484 char *record;
4494 record = malloc(irecsize);
4495 if(record){
4496 ((PU_EMR) record)->iType = U_EMR_FRAMERGN;
4497 ((PU_EMR) record)->nSize = irecsize;
4498 ((PU_EMRFRAMERGN) record)->rclBounds = rclBounds;
4499 ((PU_EMRFRAMERGN) record)->cbRgnData = rds;
4500 ((PU_EMRFRAMERGN) record)->ihBrush = ihBrush;
4501 ((PU_EMRFRAMERGN) record)->szlStroke = szlStroke;
4503 memcpy(record + off, RgnData, rds);
4505 if(rds < rds4){ memset(record + off,0, rds4 - rds); } // clear any unused bytes
4507 return(record);
4512 \brief Allocate and construct a U_EMR_INVERTRGN record.
4513 \return pointer to U_EMR_INVERTRGN record, or NULL on error.
4524 \brief Allocate and construct a U_EMR_PAINTRGN record.
4525 \return pointer to U_EMR_PAINTRGN record, or NULL on error.
4536 \brief Allocate and construct a U_EMR_EXTSELECTCLIPRGN record.
4545 char *record;
4555 record = malloc(irecsize);
4556 if(record){
4557 ((PU_EMR) record)->iType = U_EMR_EXTSELECTCLIPRGN;
4558 ((PU_EMR) record)->nSize = irecsize;
4559 ((PU_EMREXTSELECTCLIPRGN) record)->cbRgnData = rds;
4560 ((PU_EMREXTSELECTCLIPRGN) record)->iMode = iMode;
4562 memcpy(record + off, RgnData, rds);
4564 if(rds < rds4){ memset(record + off,0, rds4 - rds); } // clear any unused bytes
4566 return(record);
4571 \brief Allocate and construct a U_EMR_BITBLT record.
4572 \return pointer to U_EMR_BITBLT record, or NULL on error.
4598 char *record;
4604 record = malloc(irecsize);
4605 if(record){
4606 ((PU_EMR) record)->iType = U_EMR_BITBLT;
4607 ((PU_EMR) record)->nSize = irecsize;
4608 ((PU_EMRBITBLT) record)->rclBounds = rclBounds;
4609 ((PU_EMRBITBLT) record)->Dest = Dest;
4610 ((PU_EMRBITBLT) record)->cDest = cDest;
4611 ((PU_EMRBITBLT) record)->dwRop = dwRop;
4612 ((PU_EMRBITBLT) record)->Src = Src;
4613 ((PU_EMRBITBLT) record)->xformSrc = xformSrc;
4614 ((PU_EMRBITBLT) record)->crBkColorSrc = crBkColorSrc;
4615 ((PU_EMRBITBLT) record)->iUsageSrc = iUsageSrc;
4617 APPEND_PXBMISRC(record, U_EMRBITBLT, cbBmi, Bmi, Px, cbImage, cbImage4);
4619 return(record);
4624 \brief Allocate and construct a U_EMR_STRETCHBLT record.
4625 \return pointer to U_EMR_STRETCHBLT record, or NULL on error.
4653 char *record;
4660 record = malloc(irecsize);
4661 if(record){
4662 ((PU_EMR) record)->iType = U_EMR_STRETCHBLT;
4663 ((PU_EMR) record)->nSize = irecsize;
4664 ((PU_EMRSTRETCHBLT) record)->rclBounds = rclBounds;
4665 ((PU_EMRSTRETCHBLT) record)->Dest = Dest;
4666 ((PU_EMRSTRETCHBLT) record)->cDest = cDest;
4667 ((PU_EMRSTRETCHBLT) record)->dwRop = dwRop;
4668 ((PU_EMRSTRETCHBLT) record)->Src = Src;
4669 ((PU_EMRSTRETCHBLT) record)->xformSrc = xformSrc;
4670 ((PU_EMRSTRETCHBLT) record)->crBkColorSrc = crBkColorSrc;
4671 ((PU_EMRSTRETCHBLT) record)->iUsageSrc = iUsageSrc;
4673 APPEND_PXBMISRC(record, U_EMRSTRETCHBLT, cbBmi, Bmi, Px, cbImage, cbImage4);
4674 ((PU_EMRSTRETCHBLT) record)->cSrc = cSrc;
4676 return(record);
4681 \brief Allocate and construct a U_EMR_MASKBLT record.
4682 \return pointer to U_EMR_MASKBLT record, or NULL on error.
4718 char *record;
4726 record = malloc(irecsize);
4727 if(record){
4728 ((PU_EMR) record)->iType = U_EMR_MASKBLT;
4729 ((PU_EMR) record)->nSize = irecsize;
4730 ((PU_EMRMASKBLT) record)->rclBounds = rclBounds;
4731 ((PU_EMRMASKBLT) record)->Dest = Dest;
4732 ((PU_EMRMASKBLT) record)->cDest = cDest;
4733 ((PU_EMRMASKBLT) record)->dwRop = dwRop;
4734 ((PU_EMRMASKBLT) record)->Src = Src;
4735 ((PU_EMRMASKBLT) record)->xformSrc = xformSrc;
4736 ((PU_EMRMASKBLT) record)->crBkColorSrc = crBkColorSrc;
4737 ((PU_EMRMASKBLT) record)->iUsageSrc = iUsageSrc;
4738 ((PU_EMRMASKBLT) record)->Mask = Mask;
4739 ((PU_EMRMASKBLT) record)->iUsageMask = iUsageMask;
4741 APPEND_PXBMISRC(record, U_EMRMASKBLT, cbBmi, Bmi, Px, cbImage, cbImage4);
4742 APPEND_MSKBMISRC(record, U_EMRMASKBLT, cbMskBmi, MskBmi, Msk, cbMskImage, cbMskImage4);
4744 return(record);
4750 \brief Allocate and construct a U_EMRPLGBLT record.
4751 \return U_EMRPLGBLT record.
4785 char *record;
4793 record = malloc(irecsize);
4794 if(record){
4795 ((PU_EMR) record)->iType = U_EMR_PLGBLT;
4796 ((PU_EMR) record)->nSize = irecsize;
4797 ((PU_EMRPLGBLT) record)->rclBounds = rclBounds;
4798 memcpy(((PU_EMRPLGBLT) record)->aptlDst,aptlDst,3*sizeof(U_POINTL));
4799 ((PU_EMRPLGBLT) record)->Src = Src;
4800 ((PU_EMRPLGBLT) record)->cSrc = cSrc;
4801 ((PU_EMRPLGBLT) record)->xformSrc = xformSrc;
4802 ((PU_EMRPLGBLT) record)->crBkColorSrc = crBkColorSrc;
4803 ((PU_EMRPLGBLT) record)->iUsageSrc = iUsageSrc;
4804 ((PU_EMRPLGBLT) record)->Mask = Mask;
4805 ((PU_EMRPLGBLT) record)->iUsageMask = iUsageMask;
4807 APPEND_PXBMISRC(record, U_EMRPLGBLT, cbBmi, Bmi, Px, cbImage, cbImage4);
4808 APPEND_MSKBMISRC(record, U_EMRPLGBLT, cbMskBmi, MskBmi, Msk, cbMskImage, cbMskImage4);
4810 return(record);
4815 \brief Allocate and construct a U_EMR_SETDIBITSTODEVICE record.
4816 \return pointer to U_EMR_SETDIBITSTODEVICE record, or NULL on error.
4840 char *record;
4847 record = malloc(irecsize);
4848 if(record){
4849 ((PU_EMR) record)->iType = U_EMR_SETDIBITSTODEVICE;
4850 ((PU_EMR) record)->nSize = irecsize;
4851 ((PU_EMRSETDIBITSTODEVICE) record)->rclBounds = rclBounds;
4852 ((PU_EMRSETDIBITSTODEVICE) record)->Dest = Dest;
4853 ((PU_EMRSETDIBITSTODEVICE) record)->Src = Src;
4854 ((PU_EMRSETDIBITSTODEVICE) record)->cSrc = cSrc;
4855 ((PU_EMRSETDIBITSTODEVICE) record)->iUsageSrc = iUsageSrc;
4856 ((PU_EMRSETDIBITSTODEVICE) record)->iStartScan = iStartScan;
4857 ((PU_EMRSETDIBITSTODEVICE) record)->cScans = cScans;
4859 APPEND_PXBMISRC(record, U_EMRSETDIBITSTODEVICE, cbBmi, Bmi, Px, cbImage, cbImage4);
4861 return(record);
4866 \brief Allocate and construct a U_EMR_EMRSTRETCHDIBITS record.
4867 \return pointer to U_EMR_EMRSTRETCHDIBITS record, or NULL on error.
4891 char *record;
4898 record = malloc(irecsize);
4899 if(record){
4900 ((PU_EMR) record)->iType = U_EMR_STRETCHDIBITS;
4901 ((PU_EMR) record)->nSize = irecsize;
4902 ((PU_EMRSTRETCHDIBITS) record)->rclBounds = rclBounds;
4903 ((PU_EMRSTRETCHDIBITS) record)->Dest = Dest;
4904 ((PU_EMRSTRETCHDIBITS) record)->Src = Src;
4905 ((PU_EMRSTRETCHDIBITS) record)->cSrc = cSrc;
4906 ((PU_EMRSTRETCHDIBITS) record)->iUsageSrc = iUsageSrc;
4907 ((PU_EMRSTRETCHDIBITS) record)->dwRop = dwRop;
4908 ((PU_EMRSTRETCHDIBITS) record)->cDest = cDest;
4910 APPEND_PXBMISRC(record, U_EMRSTRETCHDIBITS, cbBmi, Bmi, Px, cbImage, cbImage4);
4912 return(record);
4917 \brief Allocate and construct a U_EMR_EXTCREATEFONTINDIRECTW record.
4919 \return pointer to U_EMR_EXTCREATEFONTINDIRECTW record, or NULL on error.
4929 char *record;
4939 record = malloc(irecsize);
4940 if(record){
4941 ((PU_EMR) record)->iType = U_EMR_EXTCREATEFONTINDIRECTW;
4942 ((PU_EMR) record)->nSize = irecsize;
4943 ((PU_EMREXTCREATEFONTINDIRECTW) record)->ihFont = ihFont;
4945 memcpy(record + off, cptr, cbLf); // No need to add padding for either structure
4947 return(record);
4952 \brief Allocate and construct a U_EMR_EXTTEXTOUTA record.
4953 \return pointer to U_EMR_EXTTEXTOUTA record, or NULL on error.
4972 \brief Allocate and construct a U_EMR_EXTTEXTOUTW record.
4973 \return pointer to U_EMR_EXTTEXTOUTW record, or NULL on error.
4992 \brief Allocate and construct a U_EMR_POLYBEZIER16 record.
4993 \return pointer to U_EMR_POLYBEZIER16 record, or NULL on error.
5008 \brief Allocate and construct a U_EMR_POLYGON16 record.
5009 \return pointer to U_EMR_POLYGON16 record, or NULL on error.
5024 \brief Allocate and construct a U_EMR_POLYLINE16 record.
5025 \return pointer to U_EMR_POLYLINE16 record, or NULL on error.
5040 \brief Allocate and construct a U_EMR_POLYBEZIERTO record.
5041 \return pointer to U_EMR_POLYBEZIERTO record, or NULL on error.
5056 \brief Allocate and construct a U_EMR_POLYLINETO record.
5057 \return pointer to U_EMR_POLYLINETO record, or NULL on error.
5072 \brief Allocate and construct a U_EMR_POLYPOLYLINE16 record.
5073 \return pointer to U_EMR_POLYPOLYLINE16 record, or NULL on error.
5092 \brief Allocate and construct a U_EMR_POLYPOLYGON16 record.
5093 \return pointer to U_EMR_POLYPOLYGON16 record, or NULL on error.
5113 \brief Allocate and construct a U_EMR_POLYDRAW16 record.
5114 \return pointer to U_EMR_POLYDRAW16 record, or NULL on error.
5126 char *record;
5135 record = malloc(irecsize);
5136 if(record){
5137 ((PU_EMR) record)->iType = U_EMR_POLYDRAW16;
5138 ((PU_EMR) record)->nSize = irecsize;
5139 ((PU_EMRPOLYDRAW16) record)->rclBounds = rclBounds;
5140 ((PU_EMRPOLYDRAW16) record)->cpts = cpts;
5142 memcpy(record+off,aptl,cbPoints);
5144 memcpy(record+off,abTypes,cbAbTypes);
5146 if(cbAbTypes4 > cbAbTypes){ memset(record+off,0,cbAbTypes4-cbAbTypes); } // keeps valgrind happy (initialize padding after byte array)
5148 return(record);
5153 \brief Allocate and construct a U_EMR_CREATEMONOBRUSH record.
5154 \return pointer to U_EMR_CREATEMONOBRUSH record, or NULL on error.
5173 \brief Allocate and construct a U_EMR_CREATEDIBPATTERNBRUSHPT record.
5175 \return pointer to U_EMR_CREATEDIBPATTERNBRUSHPT record, or NULL on error.
5195 \brief Allocate and construct a U_EMR_EXTCREATEPEN record.
5197 \return pointer to U_EMR_EXTCREATEPEN record, or NULL on error.
5211 char *record;
5229 record = malloc(irecsize);
5231 if(record){
5232 ((PU_EMR) record)->iType = U_EMR_EXTCREATEPEN;
5233 ((PU_EMR) record)->nSize = irecsize;
5234 ((PU_EMREXTCREATEPEN) record)->ihPen = ihPen;
5235 memcpy(&(((PU_EMREXTCREATEPEN) record)->elp),elp,cbElp);
5244 memcpy(record + off, Bmi, cbBmi);
5245 ((PU_EMREXTCREATEPEN) record)->offBmi = off;
5246 ((PU_EMREXTCREATEPEN) record)->cbBmi = cbBmi;
5248 memcpy(record + off, Px, cbImage);
5249 ((PU_EMREXTCREATEPEN) record)->offBits = off;
5250 ((PU_EMREXTCREATEPEN) record)->cbBits = cbImage;
5252 if(cbImage4 - cbImage){ memset(record + off, 0, cbImage4 - cbImage); }
5255 ((PU_EMREXTCREATEPEN) record)->cbBmi = 0;
5256 ((PU_EMREXTCREATEPEN) record)->offBmi = 0;
5257 ((PU_EMREXTCREATEPEN) record)->cbBits = 0;
5258 ((PU_EMREXTCREATEPEN) record)->offBits = 0;
5261 return(record);
5269 \brief Allocate and construct a U_EMR_SETICMMODE record.
5270 \return pointer to U_EMR_SETICMMODE record, or NULL on error.
5281 \brief Allocate and construct a U_EMR_CREATECOLORSPACE record.
5283 \return pointer to U_EMR_CREATECOLORSPACE record, or NULL on error.
5291 char *record;
5295 record = malloc(irecsize);
5296 if(record){
5297 ((PU_EMR) record)->iType = U_EMR_CREATECOLORSPACE;
5298 ((PU_EMR) record)->nSize = irecsize;
5299 ((PU_EMRCREATECOLORSPACE) record)->ihCS = ihCS;
5300 ((PU_EMRCREATECOLORSPACE) record)->lcs = lcs;
5302 return(record);
5307 \brief Allocate and construct a U_EMR_SETCOLORSPACE record.
5308 \return pointer to U_EMR_SETCOLORSPACE record, or NULL on error.
5319 \brief Allocate and construct a U_EMR_DELETECOLORSPACE record.
5320 \return pointer to U_EMR_DELETECOLORSPACE record, or NULL on error.
5333 \brief Allocate and construct a U_EMR_PIXELFORMAT record.
5334 \return pointer to U_EMR_PIXELFORMAT record, or NULL on error.
5340 char *record;
5344 record = malloc(irecsize);
5345 if(record){
5346 ((PU_EMR) record)->iType = U_EMR_PIXELFORMAT;
5347 ((PU_EMR) record)->nSize = irecsize;
5348 ((PU_EMRPIXELFORMAT) record)->pfd = pfd;
5350 return(record);
5358 \brief Allocate and construct a U_EMR_SMALLTEXTOUT record.
5359 \return pointer to U_EMR_SMALLTEXTOUT record, or NULL on error.
5379 char *record;
5391 record = malloc(irecsize);
5392 if(record){
5393 ((PU_EMR) record)->iType = U_EMR_SMALLTEXTOUT;
5394 ((PU_EMR) record)->nSize = irecsize;
5395 ((PU_EMRSMALLTEXTOUT) record)->Dest = Dest;
5396 ((PU_EMRSMALLTEXTOUT) record)->cChars = cChars;
5397 ((PU_EMRSMALLTEXTOUT) record)->fuOptions = fuOptions;
5398 ((PU_EMRSMALLTEXTOUT) record)->iGraphicsMode = iGraphicsMode;
5399 ((PU_EMRSMALLTEXTOUT) record)->exScale = exScale;
5400 ((PU_EMRSMALLTEXTOUT) record)->eyScale = eyScale;
5403 memcpy(record + off, &rclBounds, cbRectl);
5406 memcpy(record + off, TextString, cbString);
5409 memset(record + off, 0, cbString4 - cbString);
5412 return(record);
5423 \brief Allocate and construct a U_EMR_ALPHABLEND record.
5424 \return pointer to U_EMR_ALPHABLEND record, or NULL on error.
5457 \brief Allocate and construct a U_EMR_SETLAYOUT record.
5458 \return pointer to U_EMR_SETLAYOUT record, or NULL on error.
5467 \brief Allocate and construct a U_EMR_TRANSPARENTBLT record.
5468 \return pointer to U_EMR_TRANSPARENTBLT record, or NULL on error.
5501 \brief Allocate and construct a U_EMR_TRANSPARENTBLT record.
5502 \return pointer to U_EMR_TRANSPARENTBLT record, or NULL on error.
5510 There is an MS documentation or library problem for this record, as the size of the GradObj must always be set
5512 this means that there will be unused bytes at the end of the record. This is not what the documentation says,
5524 char *record;
5537 record = malloc(irecsize);
5538 if(record){
5539 ((PU_EMR) record)->iType = U_EMR_GRADIENTFILL;
5540 ((PU_EMR) record)->nSize = irecsize;
5541 ((PU_EMRGRADIENTFILL) record)->rclBounds = rclBounds;
5542 ((PU_EMRGRADIENTFILL) record)->nTriVert = nTriVert;
5543 ((PU_EMRGRADIENTFILL) record)->nGradObj = nGradObj;
5544 ((PU_EMRGRADIENTFILL) record)->ulMode = ulMode;
5546 memcpy(record + off, TriVert, cbTriVert);
5548 memcpy(record + off, GradObj, cbGradObj);
5551 memset(record+off,0,cbGradObjAlloc - cbGradObj);
5554 return(record);
5563 \brief Allocate and construct a U_EMR_CREATECOLORSPACEW record.
5565 \return pointer to U_EMR_CREATECOLORSPACEW record, or NULL on error.
5579 char *record;
5585 record = malloc(irecsize);
5586 if(record){
5587 ((PU_EMR) record)->iType = U_EMR_CREATECOLORSPACEW;
5588 ((PU_EMR) record)->nSize = irecsize;
5589 ((PU_EMRCREATECOLORSPACEW) record)->ihCS = ihCS;
5590 ((PU_EMRCREATECOLORSPACEW) record)->lcs = lcs;
5591 ((PU_EMRCREATECOLORSPACEW) record)->dwFlags = dwFlags;
5592 ((PU_EMRCREATECOLORSPACEW) record)->cbData = cbData;
5594 memcpy(record + off, Data, cbData);
5597 memset(record + off,0,cbData4-cbData);
5600 return(record);