#include <libemf.h>
Inheritance diagram for EMF::METAFILEDEVICECONTEXT::

Public Methods | |
| METAFILEDEVICECONTEXT (FILE *fp_, const RECT *size, LPCWSTR description_w) | |
| virtual | ~METAFILEDEVICECONTEXT () |
| OBJECTTYPE | getType (void) const |
| DWORD | nextHandle (void) |
| void | clearHandle (DWORD handle) |
| void | appendRecord (METARECORD *record) |
| void | appendHandle (METARECORD *record) |
| void | deleteMetafile (void) |
| void | mergePoint (const LONG &x, const LONG &y) |
| void | mergePoint (const POINT &p) |
Public Attributes | |
| ::FILE* | fp |
| DATASTREAM | ds |
| ENHMETAHEADER* | header |
| std::vector< EMF::METARECORD* > | records |
| SIZEL | resolution |
| The resolution in DPI of the *reference* DC. | |
| SIZEL | viewport_ext |
| The extent of the viewport. | |
| POINT | viewport_org |
| The origin of the viewport. | |
| SIZEL | window_ext |
| The extent of the window. | |
| POINT | window_org |
| The origin of the window. | |
| bool | update_frame |
| Update the frame automatically? | |
| POINT | min_device_point |
| The lft/top-most painted point in device units. | |
| POINT | max_device_point |
| The rgt/btm-most painted point in device units. | |
| POINT | point |
| The current point. | |
| PEN* | pen |
| The current pen. | |
| BRUSH* | brush |
| The current brush. | |
| FONT* | font |
| The current font. | |
| PALETTE* | palette |
| The current palette. | |
| UINT | text_alignment |
| The current text alignment. | |
| COLORREF | text_color |
| The current text foreground color. | |
| COLORREF | bk_color |
| The current background color. | |
| INT | bk_mode |
| The current background mode. | |
| INT | polyfill_mode |
| The current polygon fill mode. | |
| INT | map_mode |
| The current mapping mode. | |
| std::vector< bool > | handles |
| std::map< HGDIOBJ, HGDIOBJ > | emf_handles |
Almost all GDI graphics calls require a device context (except those which create graphics objects such as pens and fonts). This is a specific context which renders to a metafile. There is a one-to-one correspondence between the device context and the metafile.
|
|
Most graphics programs seem to want to handle the opening and closing of files themselves, so this is an extension to the w32 interface.
|
|
|
Destructor frees all the graphics objects which may have been allocated. Now, it also frees any metarecords which it might hold, too. |
|
|
Add this record to the metafile.
|
|
|
Add this record to the metafile.
|
|
|
Clear the usage of this handle |
|
|
Delete all the records from the metafile. This would seem to include deleting the header record as well. |
|
|
Return the type of this object (could probably do better with RTTI()). Reimplemented from EMF::OBJECT. |
|
|
Take the given point and determine if it enlarges the "painted" area of the device. |
|
|
Somewhat superfluous, except checker doesn't understand the initialization of automatic structures in the declaration. |
|
|
Scan the bit vector of used handles and return the index of the first free bit as this objects metafile handle. |
|
|
All i/o to the metafile is wrapped by this class so that byte swapping on big-endian machines is transparent. |
|
|
This map holds the *current* mapping between EMF handles and global object handles as a metafile is played back (with PlayEnhMetaFile). |
|
|
If it is a file-based metafile, then this pointer is not null. |
|
|
For compatibility, it appears that metafile handles are reused as objects are deleted. Attempt to emulate that behavior with a bit vector of used metafile handles. |
|
|
Serves double duty as the physical device description. |
|
|
All of the metafile records are stored in memory. |
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001