uemf_print.c revision 14d5f6c1726326ebd2b3e1576c8881c1a3e1599e
/**
@file uemf_print.c Functions for printing EMF records
*/
/*
File: uemf_print.c
Version: 0.0.9
Date: 19-OCT-2012
Author: David Mathog, Biology Division, Caltech
email: mathog@caltech.edu
Copyright: 2012 David Mathog and California Institute of Technology (Caltech)
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "uemf.h"
/**
\brief Print some number of hex bytes
\param buf pointer to the first byte
\param num number of bytes
*/
}
}
/* **********************************************************************************************
These functions print standard objects used in the EMR records.
The low level ones do not append EOL.
*********************************************************************************************** */
/**
\brief Print a U_COLORREF object.
\param color U_COLORREF object
*/
void colorref_print(
){
}
/**
\brief Print a U_RGBQUAD object.
\param color U_RGBQUAD object
*/
void rgbquad_print(
){
}
/**
\brief Print rect and rectl objects from Upper Left and Lower Right corner points.
\param rect U_RECTL object
*/
void rectl_print(
){
}
/**
\brief Print a U_SIZEL object.
\param sz U_SizeL object
*/
void sizel_print(
){
}
/**
\brief Print a U_POINTL object
\param pt U_POINTL object
*/
void pointl_print(
){
}
/**
\brief Print a U_POINT16 object
\param pt U_POINT16 object
*/
void point16_print(
){
}
/**
\brief Print a U_LCS_GAMMA object
\param lg U_LCS_GAMMA object
*/
void lcs_gamma_print(
){
}
/**
\brief Print a U_LCS_GAMMARGB object
\param lgr U_LCS_GAMMARGB object
*/
void lcs_gammargb_print(
){
}
/**
\brief Print a U_TRIVERTEX object.
\param tv U_TRIVERTEX object.
*/
void trivertex_print(
){
}
/**
\brief Print a U_GRADIENT3 object.
\param tv U_GRADIENT3 object.
*/
void gradient3_print(
){
}
/**
\brief Print a U_GRADIENT4 object.
\param tv U_GRADIENT4 object.
*/
void gradient4_print(
){
}
/**
\brief Print a U_LOGBRUSH object.
\param lb U_LOGBRUSH object.
*/
void logbrush_print(
){
}
/**
\brief Print a U_XFORM object.
\param xform U_XFORM object
*/
void xform_print(
){
}
/**
\brief Print a U_CIEXYZ object
\param ciexyz U_CIEXYZ object
*/
void ciexyz_print(
){
}
/**
\brief Print a U_CIEXYZTRIPLE object
\param cie3 U_CIEXYZTRIPLE object
*/
void ciexyztriple_print(
){
printf("} ");
}
/**
\brief Print a U_LOGCOLORSPACEA object.
\param lcsa U_LOGCOLORSPACEA object
*/
void logcolorspacea_print(
){
}
/**
\brief Print a U_LOGCOLORSPACEW object.
\param lcsa U_LOGCOLORSPACEW object
*/
void logcolorspacew_print(
){
char *string;
}
/**
\brief Print a U_PANOSE object.
\param panose U_PANOSE object
*/
void panose_print(
){
}
/**
\brief Print a U_LOGFONT object.
\param lf U_LOGFONT object
*/
void logfont_print(
){
char *string;
}
/**
\brief Print a U_LOGFONT_PANOSE object.
\return U_LOGFONT_PANOSE object
*/
void logfont_panose_print(
){
char *string;
}
/**
\brief Print a U_BITMAPINFOHEADER object.
\param Bmi U_BITMAPINFOHEADER object
*/
void bitmapinfoheader_print(
){
}
/**
\brief Print a Pointer to a U_BITMAPINFO object.
\param Bmi Pointer to a U_BITMAPINFO object
*/
void bitmapinfo_print(
){
int i;
}
}
}
/**
\brief Print a U_BLEND object.
\param blend a U_BLEND object
*/
void blend_print(
){
}
/**
\brief Print a pointer to a U_EXTLOGPEN object.
\param elp PU_EXTLOGPEN object
*/
void extlogpen_print(
){
int i;
if(elp->elpNumEntries){
printf("elpStyleEntry:");
for(i=0;i<elp->elpNumEntries;i++){
}
}
}
/**
\brief Print a U_LOGPEN object.
\param lp U_LOGPEN object
*/
void logpen_print(
){
}
/**
\brief Print a U_LOGPLTNTRY object.
\param lpny Ignore U_LOGPLTNTRY object.
*/
void logpltntry_print(
){
}
/**
\brief Print a pointer to a U_LOGPALETTE object.
\param lp Pointer to a U_LOGPALETTE object.
*/
void logpalette_print(
){
int i;
if(lp->palNumEntries){
for(i=0;i<lp->palNumEntries;i++){
}
}
}
/**
\brief Print a U_RGNDATAHEADER object.
\param rdh U_RGNDATAHEADER object
*/
void rgndataheader_print(
){
}
/**
\brief Print a pointer to a U_RGNDATA object.
\param rgd pointer to a U_RGNDATA object.
*/
void rgndata_print(
){
int i;
}
}
}
/**
\brief Print a U_COLORADJUSTMENT object.
\param ca U_COLORADJUSTMENT object.
*/
void coloradjustment_print(
){
}
/**
\brief Print a U_PIXELFORMATDESCRIPTOR object.
\return U_PIXELFORMATDESCRIPTOR object
\param dwFlags PFD_dwFlags Enumeration
\param iPixelType PFD_iPixelType Enumeration
\param cColorBits RGBA: total bits per pixel
\param cRedBits Red bits per pixel
\param cRedShift Red shift to data bits
\param cGreenBits Green bits per pixel
\param cGreenShift Green shift to data bits
\param cBlueBits Blue bits per pixel
\param cBlueShift Blue shift to data bits
\param cAlphaBits Alpha bits per pixel
\param cAlphaShift Alpha shift to data bits
\param cAccumBits Accumulator buffer, total bitplanes
\param cAccumRedBits Red accumulator buffer bitplanes
\param cAccumGreenBits Green accumulator buffer bitplanes
\param cAccumBlueBits Blue accumulator buffer bitplanes
\param cAccumAlphaBits Alpha accumulator buffer bitplanes
\param cDepthBits Depth of Z-buffer
\param cStencilBits Depth of stencil buffer
\param cAuxBuffers Depth of auxilliary buffers (not supported)
\param iLayerType PFD_iLayerType Enumeration, may be ignored
\param dwLayerMask may be ignored
\param dwVisibleMask color or index of underlay plane
\param dwDamageMask may be ignored
*/
){
}
/**
\brief Print a Pointer to a U_EMRTEXT record
\param emt Pointer to a U_EMRTEXT record
\param record Pointer to the start of the record which contains this U_ERMTEXT
\param type 0 for 8 bit character, anything else for 16
*/
void emrtext_print(
char *emt,
char *record,
int type
){
int i,off;
char *string;
// constant part
if(!type){
}
else {
}
}
}
printf("Dx:");
}
}
// hide these from Doxygen
//! @cond
/* **********************************************************************************************
These functions contain shared code used by various U_EMR*_print functions. These should NEVER be called
by end user code and to further that end prototypes are NOT provided and they are hidden from Doxygen.
These are (mostly) ordered by U_EMR_* index number.
void core5_print(char *name, char *contents, int recnum, size_t off)
The exceptions:
void core3_print(char *name, char *label, char *contents, int recnum, size_t off)
void core7_print(char *name, char *field1, char *field2, char *contents, int recnum, size_t off)
void core8_print(char *name, char *contents, int recnum, size_t off, int type)
*********************************************************************************************** */
// all core*_print call this, U_EMRSETMARGN_print and some others all it directly
// numbered as core5 to be consistent with uemf.c, but must appear before the others as there is no prototype
printf("%-30srecord:%5d type:%3d offset:%8d size:%8d\n",name,recnum,lpEMFR->iType,(int) off,lpEMFR->nSize);
}
// Functions with the same form starting with U_EMRPOLYBEZIER_print
int i;
printf(" Points: ");
}
printf("\n");
}
// Functions with the same form starting with U_EMRPOLYPOLYLINE_print
int i;
printf(" Counts: ");
}
printf("\n");
printf(" Points: ");
}
printf("\n");
}
// Functions with the same form starting with U_EMRSETMAPMODE_print
}
}
else {
}
}
// Functions taking a single U_RECT or U_RECTL, starting with U_EMRELLIPSE_print, also U_EMRFILLPATH_print,
}
// Functions with the same form starting with U_EMRPOLYBEZIER16_print
int i;
printf(" Points: ");
}
printf("\n");
}
// Records with the same form starting with U_EMRSETWINDOWEXTEX_print
// CAREFUL, in the _set equivalents all functions with two uint32_t values are mapped here, and member names differ, consequently
// print routines must supply the names of the two arguments. These cannot be null. If the second one is
// empty the values are printed as a pair {x,y}, otherwise each is printed with its own label on a separate line.
if(*field2){
}
else {
}
}
// For U_EMREXTTEXTOUTA and U_EMREXTTEXTOUTW, type=0 for the first one
printf(" emrtext: ");
printf("\n");
}
// Functions that take a rect and a pair of points, starting with U_EMRARC_print
}
// Functions with the same form starting with U_EMRPOLYPOLYLINE16_print
int i;
printf(" Counts: ");
}
printf("\n");
printf(" Points: ");
}
printf("\n");
}
// Functions with the same form starting with U_EMRINVERTRGN_print and U_EMRPAINTRGN_print,
int i,roff;
// This one is a pain since each RGNDATA may be a different size, so it isn't possible to index through them.
roff=0;
i=1;
printf(" RegionData:%d",i);
printf("\n");
}
}
// common code for U_EMRCREATEMONOBRUSH_print and U_EMRCREATEDIBPATTERNBRUSHPT_print,
printf(" bitmap:");
printf("\n");
}
}
// common code for U_EMRALPHABLEND_print and U_EMRTRANSPARENTBLT_print,
printf(" bitmap:");
printf("\n");
}
}
//! @endcond
/* **********************************************************************************************
These are the core EMR functions, each creates a particular type of record.
All return these records via a char* pointer, which is NULL if the call failed.
They are listed in order by the corresponding U_EMR_* index number.
*********************************************************************************************** */
/**
\brief Print a pointer to a U_EMR_whatever record which has not been implemented.
\param name name of this type of record
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf("%-30srecord:%5d type:%3d offset:%8d size:%8d\n",name,recnum,lpEMFR->iType,(int) off,lpEMFR->nSize);
printf(" Not Implemented!\n");
}
// U_EMRHEADER 1
/**
\brief Print a pointer to a U_EMR_HEADER record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
char *string;
int p1len;
if(pEmr->offDescription){
string = U_Utf16leToUtf8((uint16_t *)((char *) pEmr + pEmr->offDescription), pEmr->nDescription, NULL);
string = U_Utf16leToUtf8((uint16_t *)((char *) pEmr + pEmr->offDescription + p1len), pEmr->nDescription, NULL);
}
){
if(pEmr->cbPixelFormat){
printf(" PFD:");
printf("\n");
}
){
}
}
}
// U_EMRPOLYBEZIER 2
/**
\brief Print a pointer to a U_EMR_POLYBEZIER record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYGON 3
/**
\brief Print a pointer to a U_EMR_POLYGON record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYLINE 4
/**
\brief Print a pointer to a U_EMR_POLYLINE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYBEZIERTO 5
/**
\brief Print a pointer to a U_EMR_POLYBEZIERTO record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYLINETO 6
/**
\brief Print a pointer to a U_EMR_POLYLINETO record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYPOLYLINE 7
/**
\brief Print a pointer to a U_EMR_POLYPOLYLINE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYPOLYGON 8
/**
\brief Print a pointer to a U_EMR_POLYPOLYGON record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETWINDOWEXTEX 9
/**
\brief Print a pointer to a U_EMR_SETWINDOWEXTEX record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETWINDOWORGEX 10
/**
\brief Print a pointer to a U_EMR_SETWINDOWORGEX record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETVIEWPORTEXTEX 11
/**
\brief Print a pointer to a U_EMR_SETVIEWPORTEXTEX record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETVIEWPORTORGEX 12
/**
\brief Print a pointer to a U_EMR_SETVIEWPORTORGEX record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETBRUSHORGEX 13
/**
\brief Print a pointer to a U_EMR_SETBRUSHORGEX record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMREOF 14
/**
\brief Print a pointer to a U_EMR_EOF record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
if(pEmr->cbPalEntries){
printf(" PE:");
printf("\n");
}
}
// U_EMRSETPIXELV 15
/**
\brief Print a pointer to a U_EMR_SETPIXELV record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETMAPPERFLAGS 16
/**
\brief Print a pointer to a U_EMR_SETMAPPERFLAGS record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETMAPMODE 17
/**
\brief Print a pointer to a U_EMR_SETMAPMODE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETBKMODE 18
/**
\brief Print a pointer to a U_EMR_SETBKMODE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETPOLYFILLMODE 19
/**
\brief Print a pointer to a U_EMR_SETPOLYFILLMODE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETROP2 20
/**
\brief Print a pointer to a U_EMR_SETROP2 record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETSTRETCHBLTMODE 21
/**
\brief Print a pointer to a U_EMR_SETSTRETCHBLTMODE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETTEXTALIGN 22
/**
\brief Print a pointer to a U_EMR_SETTEXTALIGN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETCOLORADJUSTMENT 23
/**
\brief Print a pointer to a U_EMR_SETCOLORADJUSTMENT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" ColorAdjustment:");
printf("\n");
}
// U_EMRSETTEXTCOLOR 24
/**
\brief Print a pointer to a U_EMR_SETTEXTCOLOR record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETBKCOLOR 25
/**
\brief Print a pointer to a U_EMR_SETBKCOLOR record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMROFFSETCLIPRGN 26
/**
\brief Print a pointer to a U_EMR_OFFSETCLIPRGN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRMOVETOEX 27
/**
\brief Print a pointer to a U_EMR_MOVETOEX record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETMETARGN 28
/**
\brief Print a pointer to a U_EMR_SETMETARGN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMREXCLUDECLIPRECT 29
/**
\brief Print a pointer to a U_EMR_EXCLUDECLIPRECT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRINTERSECTCLIPRECT 30
/**
\brief Print a pointer to a U_EMR_INTERSECTCLIPRECT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSCALEVIEWPORTEXTEX 31
/**
\brief Print a pointer to a U_EMR_SCALEVIEWPORTEXTEX record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSCALEWINDOWEXTEX 32
/**
\brief Print a pointer to a U_EMR_SCALEWINDOWEXTEX record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSAVEDC 33
/**
\brief Print a pointer to a U_EMR_SAVEDC record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRRESTOREDC 34
/**
\brief Print a pointer to a U_EMR_RESTOREDC record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETWORLDTRANSFORM 35
/**
\brief Print a pointer to a U_EMR_SETWORLDTRANSFORM record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" xform:");
printf("\n");
}
// U_EMRMODIFYWORLDTRANSFORM 36
/**
\brief Print a pointer to a U_EMR_MODIFYWORLDTRANSFORM record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" xform:");
printf("\n");
}
// U_EMRSELECTOBJECT 37
/**
\brief Print a pointer to a U_EMR_SELECTOBJECT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
else {
}
}
// U_EMRCREATEPEN 38
/**
\brief Print a pointer to a U_EMR_CREATEPEN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRCREATEBRUSHINDIRECT 39
/**
\brief Print a pointer to a U_EMR_CREATEBRUSHINDIRECT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRDELETEOBJECT 40
/**
\brief Print a pointer to a U_EMR_DELETEOBJECT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRANGLEARC 41
/**
\brief Print a pointer to a U_EMR_ANGLEARC record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRELLIPSE 42
/**
\brief Print a pointer to a U_EMR_ELLIPSE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRRECTANGLE 43
/**
\brief Print a pointer to a U_EMR_RECTANGLE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRROUNDRECT 44
/**
\brief Print a pointer to a U_EMR_ROUNDRECT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRARC 45
/**
\brief Print a pointer to a U_EMR_ARC record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRCHORD 46
/**
\brief Print a pointer to a U_EMR_CHORD record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPIE 47
/**
\brief Print a pointer to a U_EMR_PIE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSELECTPALETTE 48
/**
\brief Print a pointer to a U_EMR_SELECTPALETTE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRCREATEPALETTE 49
/**
\brief Print a pointer to a U_EMR_CREATEPALETTE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETPALETTEENTRIES 50
/**
\brief Print a pointer to a U_EMR_SETPALETTEENTRIES record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int i;
printf(" PLTEntries:");
}
printf("\n");
}
}
// U_EMRRESIZEPALETTE 51
/**
\brief Print a pointer to a U_EMR_RESIZEPALETTE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRREALIZEPALETTE 52
/**
\brief Print a pointer to a U_EMR_REALIZEPALETTE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMREXTFLOODFILL 53
/**
\brief Print a pointer to a U_EMR_EXTFLOODFILL record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRLINETO 54
/**
\brief Print a pointer to a U_EMR_LINETO record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRARCTO 55
/**
\brief Print a pointer to a U_EMR_ARCTO record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYDRAW 56
/**
\brief Print a pointer to a U_EMR_POLYDRAW record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int i;
printf(" Points: ");
printf(" [%d]:",i);
}
printf("\n");
printf(" Types: ");
}
printf("\n");
}
// U_EMRSETARCDIRECTION 57
/**
\brief Print a pointer to a U_EMR_SETARCDIRECTION record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETMITERLIMIT 58
/**
\brief Print a pointer to a U_EMR_SETMITERLIMIT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRBEGINPATH 59
/**
\brief Print a pointer to a U_EMR_BEGINPATH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRENDPATH 60
/**
\brief Print a pointer to a U_EMR_ENDPATH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRCLOSEFIGURE 61
/**
\brief Print a pointer to a U_EMR_CLOSEFIGURE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRFILLPATH 62
/**
\brief Print a pointer to a U_EMR_FILLPATH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSTROKEANDFILLPATH 63
/**
\brief Print a pointer to a U_EMR_STROKEANDFILLPATH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSTROKEPATH 64
/**
\brief Print a pointer to a U_EMR_STROKEPATH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRFLATTENPATH 65
/**
\brief Print a pointer to a U_EMR_FLATTENPATH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRWIDENPATH 66
/**
\brief Print a pointer to a U_EMR_WIDENPATH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSELECTCLIPPATH 67
/**
\brief Print a pointer to a U_EMR_SELECTCLIPPATH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRABORTPATH 68
/**
\brief Print a pointer to a U_EMR_ABORTPATH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRUNDEF69 69
// U_EMRCOMMENT 70 Comment (any binary data, interpretation is program specific)
/**
\brief Print a pointer to a U_EMR_COMMENT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
char *string;
char *src;
/* There are several different types of comments */
if(cbData >= 4){
if( cIdent == U_EMR_COMMENT_PUBLIC ){
printf(" cIdent: Public\n");
cbData -= 8;
}
else if(cIdent == U_EMR_COMMENT_SPOOL ){
printf(" cIdent: Spool\n");
cbData -= 8;
}
else if(cIdent == U_EMR_COMMENT_EMFPLUSRECORD){
printf(" cIdent: EMF+\n");
cbData -= 4;
}
else {
printf(" cIdent: not (Public or Spool or EMF+)\n");
}
}
if(cbData){ // The data may not be printable, but try it just in case
}
}
// U_EMRFILLRGN 71
/**
\brief Print a pointer to a U_EMR_FILLRGN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int i,roff;
// This one is a pain since each RGNDATA may be a different size, so it isn't possible to index through them.
roff=0;
i=1;
}
}
// U_EMRFRAMERGN 72
/**
\brief Print a pointer to a U_EMR_FRAMERGN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int i,roff;
// This one is a pain since each RGNDATA may be a different size, so it isn't possible to index through them.
roff=0;
i=1;
}
}
// U_EMRINVERTRGN 73
/**
\brief Print a pointer to a U_EMR_INVERTRGN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPAINTRGN 74
/**
\brief Print a pointer to a U_EMR_PAINTRGN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMREXTSELECTCLIPRGN 75
/**
\brief Print a pointer to a U_EMR_EXTSELECTCLIPRGN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int i,roff;
// This one is a pain since each RGNDATA may be a different size, so it isn't possible to index through them.
i=roff=0;
}
}
// U_EMRBITBLT 76
/**
\brief Print a pointer to a U_EMR_BITBLT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" bitmap: ");
printf("\n");
}
}
// U_EMRSTRETCHBLT 77
/**
\brief Print a pointer to a U_EMR_STRETCHBLT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" bitmap: ");
printf("\n");
}
}
// U_EMRMASKBLT 78
/**
\brief Print a pointer to a U_EMR_MASKBLT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" Src bitmap: ");
printf("\n");
}
printf(" Mask bitmap: ");
printf("\n");
}
}
// U_EMRPLGBLT 79
/**
\brief Print a pointer to a U_EMR_PLGBLT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" Src bitmap: ");
printf("\n");
}
printf(" Mask bitmap: ");
printf("\n");
}
}
// U_EMRSETDIBITSTODEVICE 80
/**
\brief Print a pointer to a U_EMRSETDIBITSTODEVICE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" Src bitmap: ");
printf("\n");
}
}
// U_EMRSTRETCHDIBITS 81
/**
\brief Print a pointer to a U_EMR_STRETCHDIBITS record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" Src bitmap: ");
printf("\n");
}
}
// U_EMREXTCREATEFONTINDIRECTW_print 82
/**
\brief Print a pointer to a U_EMR_EXTCREATEFONTINDIRECTW record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" Font: ");
}
else { // holds logfont
}
printf("\n");
}
// U_EMREXTTEXTOUTA 83
/**
\brief Print a pointer to a U_EMR_EXTTEXTOUTA record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMREXTTEXTOUTW 84
/**
\brief Print a pointer to a U_EMR_EXTTEXTOUTW record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYBEZIER16 85
/**
\brief Print a pointer to a U_EMR_POLYBEZIER16 record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYGON16 86
/**
\brief Print a pointer to a U_EMR_POLYGON16 record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYLINE16 87
/**
\brief Print a pointer to a U_EMR_POLYLINE16 record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYBEZIERTO16 88
/**
\brief Print a pointer to a U_EMR_POLYBEZIERTO16 record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYLINETO16 89
/**
\brief Print a pointer to a U_EMR_POLYLINETO16 record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYPOLYLINE16 90
/**
\brief Print a pointer to a U_EMR_POLYPOLYLINE16 record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYPOLYGON16 91
/**
\brief Print a pointer to a U_EMR_POLYPOLYGON16 record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRPOLYDRAW16 92
/**
\brief Print a pointer to a U_EMR_POLYDRAW16 record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int i;
printf(" Points: ");
printf(" [%d]:",i);
}
printf("\n");
printf(" Types: ");
}
printf("\n");
}
// U_EMRCREATEMONOBRUSH 93
/**
\brief Print a pointer to a U_EMR_CREATEMONOBRUSH record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRCREATEDIBPATTERNBRUSHPT_print 94
/**
\brief Print a pointer to a U_EMR_CREATEDIBPATTERNBRUSHPT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMREXTCREATEPEN 95
/**
\brief Print a pointer to a U_EMR_EXTCREATEPEN record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
printf(" bitmap: ");
printf("\n");
}
}
// U_EMRPOLYTEXTOUTA 96 NOT IMPLEMENTED, denigrated after Windows NT
// U_EMRPOLYTEXTOUTW 97 NOT IMPLEMENTED, denigrated after Windows NT
// U_EMRSETICMMODE 98
/**
\brief Print a pointer to a U_EMR_SETICMMODE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRCREATECOLORSPACE 99
/**
\brief Print a pointer to a U_EMR_CREATECOLORSPACE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETCOLORSPACE 100
/**
\brief Print a pointer to a U_EMR_SETCOLORSPACE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRDELETECOLORSPACE 101
/**
\brief Print a pointer to a U_EMR_DELETECOLORSPACE record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRGLSRECORD 102 Not implemented
// U_EMRGLSBOUNDEDRECORD 103 Not implemented
// U_EMRPIXELFORMAT 104
/**
\brief Print a pointer to a U_EMR_PIXELFORMAT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRDRAWESCAPE 105 Not implemented
// U_EMREXTESCAPE 106 Not implemented
// U_EMRUNDEF107 107 Not implemented
// U_EMRSMALLTEXTOUT 108
/**
\brief Print a pointer to a U_EMR_SMALLTEXTOUT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int roff;
char *string;
}
}
else {
}
}
// U_EMRFORCEUFIMAPPING 109 Not implemented
// U_EMRNAMEDESCAPE 110 Not implemented
// U_EMRCOLORCORRECTPALETTE 111 Not implemented
#define U_EMRCOLORCORRECTPALETTE_print(A,B,C) U_EMRNOTIMPLEMENTED_print("U_EMRCOLORCORRECTPALETTE",A,B,C)
// U_EMRSETICMPROFILEA 112 Not implemented
// U_EMRSETICMPROFILEW 113 Not implemented
// U_EMRALPHABLEND 114
/**
\brief Print a pointer to a U_EMR_ALPHABLEND record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRSETLAYOUT 115
/**
\brief Print a pointer to a U_EMR_SETLAYOUT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRTRANSPARENTBLT 116
/**
\brief Print a pointer to a U_EMR_TRANSPARENTBLT record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
}
// U_EMRUNDEF117 117 Not implemented
// U_EMRGRADIENTFILL 118
/**
\brief Print a pointer to a U_EMR_GRADIENTFILL record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int i;
off += sizeof(U_EMRGRADIENTFILL);
printf(" TriVert: ");
}
printf("\n");
}
printf(" GradObj: ");
}
}
}
}
else { printf("invalid ulMode value!"); }
printf("\n");
}
}
// U_EMRSETLINKEDUFIS 119 Not implemented
// U_EMRSETTEXTJUSTIFICATION120 Not implemented (denigrated)
#define U_EMRSETTEXTJUSTIFICATION_print(A,B,C) U_EMRNOTIMPLEMENTED_print("U_EMRSETTEXTJUSTIFICATION",A,B,C)
// U_EMRCOLORMATCHTOTARGETW 121 Not implemented
#define U_EMRCOLORMATCHTOTARGETW_print(A,B,C) U_EMRNOTIMPLEMENTED_print("U_EMRCOLORMATCHTOTARGETW",A,B,C)
// U_EMRCREATECOLORSPACEW 122
/**
\brief Print a pointer to a U_EMR_CREATECOLORSPACEW record.
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int i;
printf(" Data: ");
}
}
printf("\n");
}
/**
\brief Print any record in an emf
\returns 1 for a normal record, 0 for EMREOF
\param contents pointer to a buffer holding all EMR records
\param recnum number of this record in contents
\param off offset to this record in contents
*/
int regular=1;
{
case U_EMR_CREATEDIBPATTERNBRUSHPT: U_EMRCREATEDIBPATTERNBRUSHPT_print(contents, recnum, off); break;
} //end of switch
return(regular);
}
#ifdef __cplusplus
}
#endif