ReactOS 0.4.15-dev-8109-gd7be748
Metafile Class Reference

#include <gdiplusmetafile.h>

Inheritance diagram for Metafile:
Collaboration diagram for Metafile:

Public Member Functions

 Metafile (HDC referenceHdc, EmfType type=EmfTypeEmfPlusDual, const WCHAR *description=NULL)
 
 Metafile (const WCHAR *filename)
 
 Metafile (HDC referenceHdc, const RectF &frameRect, MetafileFrameUnit frameUnit=MetafileFrameUnitGdi, EmfType type=EmfTypeEmfPlusDual, const WCHAR *description=NULL)
 
 Metafile (HMETAFILE hWmf, const WmfPlaceableFileHeader *wmfPlaceableFileHeader, BOOL deleteWmf=FALSE)
 
 Metafile (const WCHAR *fileName, HDC referenceHdc, const Rect &frameRect, MetafileFrameUnit frameUnit=MetafileFrameUnitGdi, EmfType type=EmfTypeEmfPlusDual, const WCHAR *description=NULL)
 
 Metafile (IStream *stream, HDC referenceHdc, const RectF &frameRect, MetafileFrameUnit frameUnit=MetafileFrameUnitGdi, EmfType type=EmfTypeEmfPlusDual, const WCHAR *description=NULL)
 
 Metafile (IStream *stream, HDC referenceHdc, EmfType type=EmfTypeEmfPlusDual, const WCHAR *description=NULL)
 
 Metafile (IStream *stream, HDC referenceHdc, const Rect &frameRect, MetafileFrameUnit frameUnit=MetafileFrameUnitGdi, EmfType type=EmfTypeEmfPlusDual, const WCHAR *description=NULL)
 
 Metafile (const WCHAR *fileName, HDC referenceHdc, const RectF &frameRect, MetafileFrameUnit frameUnit=MetafileFrameUnitGdi, EmfType type=EmfTypeEmfPlusDual, const WCHAR *description=NULL)
 
 Metafile (const WCHAR *fileName, HDC referenceHdc, EmfType type=EmfTypeEmfPlusDual, const WCHAR *description=NULL)
 
 Metafile (IStream *stream)
 
 Metafile (HENHMETAFILE hEmf, BOOL deleteEmf=FALSE)
 
 Metafile (HDC referenceHdc, const Rect &frameRect, MetafileFrameUnit frameUnit=MetafileFrameUnitGdi, EmfType type=EmfTypeEmfPlusDual, const WCHAR *description=NULL)
 
UINT GetDownLevelRasterizationLimit () const
 
HENHMETAFILE GetHENHMETAFILE () const
 
Status GetMetafileHeader (MetafileHeader *header) const
 
Status PlayRecord (EmfPlusRecordType recordType, UINT flags, UINT dataSize, const BYTE *data)
 
Status SetDownLevelRasterizationLimit (UINT metafileRasterizationLimitDpi)
 
- Public Member Functions inherited from Image
 Image (IStream *stream, BOOL useEmbeddedColorManagement=FALSE)
 
 Image (const WCHAR *filename, BOOL useEmbeddedColorManagement=FALSE)
 
ImageClone ()
 
virtual ~Image ()
 
Status GetAllPropertyItems (UINT totalBufferSize, UINT numProperties, PropertyItem *allItems)
 
Status GetBounds (RectF *srcRect, Unit *srcUnit)
 
Status GetEncoderParameterList (const CLSID *clsidEncoder, UINT size, EncoderParameters *buffer)
 
UINT GetEncoderParameterListSize (const CLSID *clsidEncoder)
 
UINT GetFlags ()
 
UINT GetFrameCount (const GUID *dimensionID)
 
UINT GetFrameDimensionsCount ()
 
Status GetFrameDimensionsList (GUID *dimensionIDs, UINT count)
 
UINT GetHeight ()
 
REAL GetHorizontalResolution ()
 
Status GetLastStatus ()
 
Status GetPalette (ColorPalette *palette, INT size)
 
INT GetPaletteSize ()
 
Status GetPhysicalDimension (SizeF *size)
 
PixelFormat GetPixelFormat ()
 
UINT GetPropertyCount ()
 
Status GetPropertyIdList (UINT numOfProperty, PROPID *list)
 
Status GetPropertyItem (PROPID propId, UINT propSize, PropertyItem *buffer)
 
UINT GetPropertyItemSize (PROPID propId)
 
Status GetPropertySize (UINT *totalBufferSize, UINT *numProperties)
 
Status GetRawFormat (GUID *format)
 
ImageGetThumbnailImage (UINT thumbWidth, UINT thumbHeight, GetThumbnailImageAbort callback, VOID *callbackData)
 
ImageType GetType ()
 
REAL GetVerticalResolution ()
 
UINT GetWidth ()
 
Status RemovePropertyItem (PROPID propId)
 
Status RotateFlip (RotateFlipType rotateFlipType)
 
Status Save (IStream *stream, const CLSID *clsidEncoder, const EncoderParameters *encoderParams)
 
Status Save (const WCHAR *filename, const CLSID *clsidEncoder, const EncoderParameters *encoderParams)
 
Status SaveAdd (const EncoderParameters *encoderParams)
 
Status SaveAdd (Image *newImage, const EncoderParameters *encoderParams)
 
Status SelectActiveFrame (const GUID *dimensionID, UINT frameIndex)
 
Status SetPalette (const ColorPalette *palette)
 
Status SetPropertyItem (const PropertyItem *item)
 
- Public Member Functions inherited from GdiplusBase
void operator delete (void *in_pVoid)
 
void operator delete[] (void *in_pVoid)
 
voidoperator new (size_t in_size)
 
voidoperator new[] (size_t in_size)
 

Static Public Member Functions

static UINT EmfToWmfBits (HENHMETAFILE hemf, UINT cbData16, LPBYTE pData16, INT iMapMode=MM_ANISOTROPIC, EmfToWmfBitsFlags eFlags=EmfToWmfBitsFlagsDefault)
 
static Status GetMetafileHeader (const WCHAR *filename, MetafileHeader *header)
 
static Status GetMetafileHeader (HENHMETAFILE hEmf, MetafileHeader *header)
 
static Status GetMetafileHeader (HMETAFILE hWmf, const WmfPlaceableFileHeader *wmfPlaceableFileHeader, MetafileHeader *header)
 
static Status GetMetafileHeader (IStream *stream, MetafileHeader *header)
 
- Static Public Member Functions inherited from Image
static ImageFromFile (const WCHAR *filename, BOOL useEmbeddedColorManagement=FALSE)
 
static ImageFromStream (IStream *stream, BOOL useEmbeddedColorManagement=FALSE)
 

Protected Member Functions

GpMetafileGetNativeMetafile () const
 
- Protected Member Functions inherited from Image
 Image ()
 
 Image (GpImage *image, Status status)
 
Status SetStatus (Status status) const
 
void SetNativeImage (GpImage *image)
 

Friends

GpMetafile *& getNat (const Metafile *metafile)
 

Additional Inherited Members

- Protected Attributes inherited from Image
GpImagenativeImage
 
Status lastStatus
 

Detailed Description

Definition at line 22 of file gdiplusmetafile.h.

Constructor & Destructor Documentation

◆ Metafile() [1/13]

Metafile::Metafile ( HDC  referenceHdc,
EmfType  type = EmfTypeEmfPlusDual,
const WCHAR description = NULL 
)
inline

Definition at line 25 of file gdiplusmetafile.h.

26 {
29 DllExports::GdipRecordMetafile(referenceHdc, type, NULL, MetafileFrameUnitGdi, description, &metafile);
31 }
void SetNativeImage(GpImage *image)
Status lastStatus
#define NULL
Definition: types.h:112
@ MetafileFrameUnitGdi
Definition: gdiplusenums.h:386
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static const unsigned char metafile[]
Definition: olepicture.c:138
const char * description
Definition: directx.c:2497

◆ Metafile() [2/13]

Metafile::Metafile ( const WCHAR filename)
inline

Definition at line 33 of file gdiplusmetafile.h.

34 {
36 lastStatus = DllExports::GdipCreateMetafileFromFile(filename, &metafile);
38 }
const char * filename
Definition: ioapi.h:137

◆ Metafile() [3/13]

Metafile::Metafile ( HDC  referenceHdc,
const RectF frameRect,
MetafileFrameUnit  frameUnit = MetafileFrameUnitGdi,
EmfType  type = EmfTypeEmfPlusDual,
const WCHAR description = NULL 
)
inline

Definition at line 40 of file gdiplusmetafile.h.

46 {
48 lastStatus = DllExports::GdipRecordMetafile(referenceHdc, type, &frameRect, frameUnit, description, &metafile);
50 }

◆ Metafile() [4/13]

Metafile::Metafile ( HMETAFILE  hWmf,
const WmfPlaceableFileHeader wmfPlaceableFileHeader,
BOOL  deleteWmf = FALSE 
)
inline

Definition at line 52 of file gdiplusmetafile.h.

53 {
55 lastStatus = DllExports::GdipCreateMetafileFromWmf(hWmf, deleteWmf, wmfPlaceableFileHeader, &metafile);
57 }

◆ Metafile() [5/13]

Metafile::Metafile ( const WCHAR fileName,
HDC  referenceHdc,
const Rect frameRect,
MetafileFrameUnit  frameUnit = MetafileFrameUnitGdi,
EmfType  type = EmfTypeEmfPlusDual,
const WCHAR description = NULL 
)
inline

Definition at line 59 of file gdiplusmetafile.h.

66 {
68 lastStatus = DllExports::GdipRecordMetafileFileNameI(
69 fileName, referenceHdc, type, &frameRect, frameUnit, description, &metafile);
71 }

◆ Metafile() [6/13]

Metafile::Metafile ( IStream stream,
HDC  referenceHdc,
const RectF frameRect,
MetafileFrameUnit  frameUnit = MetafileFrameUnitGdi,
EmfType  type = EmfTypeEmfPlusDual,
const WCHAR description = NULL 
)
inline

Definition at line 73 of file gdiplusmetafile.h.

80 {
82 lastStatus = DllExports::GdipRecordMetafile(referenceHdc, type, &frameRect, frameUnit, description, &metafile);
84 }

◆ Metafile() [7/13]

Metafile::Metafile ( IStream stream,
HDC  referenceHdc,
EmfType  type = EmfTypeEmfPlusDual,
const WCHAR description = NULL 
)
inline

Definition at line 86 of file gdiplusmetafile.h.

87 {
89 lastStatus = DllExports::GdipRecordMetafileStream(
92 }
Definition: parse.h:23

◆ Metafile() [8/13]

Metafile::Metafile ( IStream stream,
HDC  referenceHdc,
const Rect frameRect,
MetafileFrameUnit  frameUnit = MetafileFrameUnitGdi,
EmfType  type = EmfTypeEmfPlusDual,
const WCHAR description = NULL 
)
inline

Definition at line 94 of file gdiplusmetafile.h.

101 {
103 lastStatus = DllExports::GdipRecordMetafileI(referenceHdc, type, &frameRect, frameUnit, description, &metafile);
105 }

◆ Metafile() [9/13]

Metafile::Metafile ( const WCHAR fileName,
HDC  referenceHdc,
const RectF frameRect,
MetafileFrameUnit  frameUnit = MetafileFrameUnitGdi,
EmfType  type = EmfTypeEmfPlusDual,
const WCHAR description = NULL 
)
inline

Definition at line 107 of file gdiplusmetafile.h.

114 {
116 lastStatus = DllExports::GdipRecordMetafileFileName(
117 fileName, referenceHdc, type, &frameRect, frameUnit, description, &metafile);
119 }

◆ Metafile() [10/13]

Metafile::Metafile ( const WCHAR fileName,
HDC  referenceHdc,
EmfType  type = EmfTypeEmfPlusDual,
const WCHAR description = NULL 
)
inline

Definition at line 121 of file gdiplusmetafile.h.

126 {
128 lastStatus = DllExports::GdipRecordMetafileFileName(
129 fileName, referenceHdc, type, NULL, MetafileFrameUnitGdi, description, &metafile);
131 }

◆ Metafile() [11/13]

Metafile::Metafile ( IStream stream)
inline

Definition at line 133 of file gdiplusmetafile.h.

134 {
136 lastStatus = DllExports::GdipCreateMetafileFromStream(stream, &metafile);
138 }

◆ Metafile() [12/13]

Metafile::Metafile ( HENHMETAFILE  hEmf,
BOOL  deleteEmf = FALSE 
)
inline

Definition at line 140 of file gdiplusmetafile.h.

141 {
143 lastStatus = DllExports::GdipCreateMetafileFromEmf(hEmf, deleteEmf, &metafile);
145 }

◆ Metafile() [13/13]

Metafile::Metafile ( HDC  referenceHdc,
const Rect frameRect,
MetafileFrameUnit  frameUnit = MetafileFrameUnitGdi,
EmfType  type = EmfTypeEmfPlusDual,
const WCHAR description = NULL 
)
inline

Definition at line 147 of file gdiplusmetafile.h.

153 {
155 lastStatus = DllExports::GdipRecordMetafileI(referenceHdc, type, &frameRect, frameUnit, description, &metafile);
157 }

Member Function Documentation

◆ EmfToWmfBits()

static UINT Metafile::EmfToWmfBits ( HENHMETAFILE  hemf,
UINT  cbData16,
LPBYTE  pData16,
INT  iMapMode = MM_ANISOTROPIC,
EmfToWmfBitsFlags  eFlags = EmfToWmfBitsFlagsDefault 
)
inlinestatic

Definition at line 160 of file gdiplusmetafile.h.

166 {
167 return DllExports::GdipEmfToWmfBits(hemf, cbData16, pData16, iMapMode, eFlags);
168 }

◆ GetDownLevelRasterizationLimit()

UINT Metafile::GetDownLevelRasterizationLimit ( ) const
inline

Definition at line 171 of file gdiplusmetafile.h.

172 {
173#if 1
174 return 0; // FIXME
175#else
176 UINT metafileRasterizationLimitDpi = 0;
177 SetStatus(DllExports::GdipGetMetafileDownLevelRasterizationLimit(
178 GetNativeMetafile(), &metafileRasterizationLimitDpi));
179 return metafileRasterizationLimitDpi;
180#endif
181 }
Status SetStatus(Status status) const
GpMetafile * GetNativeMetafile() const
unsigned int UINT
Definition: ndis.h:50

◆ GetHENHMETAFILE()

HENHMETAFILE Metafile::GetHENHMETAFILE ( ) const
inline

Definition at line 184 of file gdiplusmetafile.h.

185 {
186 HENHMETAFILE hEmf;
187 SetStatus(DllExports::GdipGetHemfFromMetafile(GetNativeMetafile(), &hEmf));
188 return hEmf;
189 }

◆ GetMetafileHeader() [1/5]

static Status Metafile::GetMetafileHeader ( const WCHAR filename,
MetafileHeader header 
)
inlinestatic

Definition at line 192 of file gdiplusmetafile.h.

193 {
194 return DllExports::GdipGetMetafileHeaderFromFile(filename, header);
195 }

◆ GetMetafileHeader() [2/5]

static Status Metafile::GetMetafileHeader ( HENHMETAFILE  hEmf,
MetafileHeader header 
)
inlinestatic

Definition at line 198 of file gdiplusmetafile.h.

199 {
200 return DllExports::GdipGetMetafileHeaderFromEmf(hEmf, header);
201 }

◆ GetMetafileHeader() [3/5]

static Status Metafile::GetMetafileHeader ( HMETAFILE  hWmf,
const WmfPlaceableFileHeader wmfPlaceableFileHeader,
MetafileHeader header 
)
inlinestatic

Definition at line 204 of file gdiplusmetafile.h.

205 {
206 return DllExports::GdipGetMetafileHeaderFromWmf(hWmf, wmfPlaceableFileHeader, header);
207 }

◆ GetMetafileHeader() [4/5]

static Status Metafile::GetMetafileHeader ( IStream stream,
MetafileHeader header 
)
inlinestatic

Definition at line 216 of file gdiplusmetafile.h.

217 {
218 return DllExports::GdipGetMetafileHeaderFromStream(stream, header);
219 }

◆ GetMetafileHeader() [5/5]

Status Metafile::GetMetafileHeader ( MetafileHeader header) const
inline

Definition at line 210 of file gdiplusmetafile.h.

211 {
212 return SetStatus(DllExports::GdipGetMetafileHeaderFromMetafile(GetNativeMetafile(), header));
213 }

◆ GetNativeMetafile()

GpMetafile * Metafile::GetNativeMetafile ( ) const
inlineprotected

Definition at line 236 of file gdiplusmetafile.h.

237 {
238 return static_cast<GpMetafile *>(nativeImage);
239 }
GpImage * nativeImage

Referenced by GetDownLevelRasterizationLimit(), GetHENHMETAFILE(), GetMetafileHeader(), PlayRecord(), and SetDownLevelRasterizationLimit().

◆ PlayRecord()

Status Metafile::PlayRecord ( EmfPlusRecordType  recordType,
UINT  flags,
UINT  dataSize,
const BYTE data 
)
inline

Definition at line 222 of file gdiplusmetafile.h.

223 {
224 return SetStatus(DllExports::GdipPlayMetafileRecord(GetNativeMetafile(), recordType, flags, dataSize, data));
225 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLbitfield flags
Definition: glext.h:7161
GLenum GLsizei dataSize
Definition: glext.h:11123

◆ SetDownLevelRasterizationLimit()

Status Metafile::SetDownLevelRasterizationLimit ( UINT  metafileRasterizationLimitDpi)
inline

Definition at line 228 of file gdiplusmetafile.h.

229 {
230 return SetStatus(
231 DllExports::GdipSetMetafileDownLevelRasterizationLimit(GetNativeMetafile(), metafileRasterizationLimitDpi));
232 }

Friends And Related Function Documentation

◆ getNat

GpMetafile *& getNat ( const Metafile metafile)
friend

Definition at line 243 of file gdiplusmetafile.h.

244 {
245 return reinterpret_cast<GpMetafile *&>(const_cast<Metafile *>(metafile)->nativeImage);
246 }

The documentation for this class was generated from the following file: