The base class of all metafile records. More...
#include <libemf.h>
Public Member Functions | |
virtual void | execute (METAFILEDEVICECONTEXT *source, HDC dc) const =0 |
virtual bool | serialize (DATASTREAM ds)=0 |
virtual int | size (void) const =0 |
virtual | ~METARECORD () |
The base class of all metafile records.
A metafile consists off a sequence of graphics records "executed" in order. This is a common base class that allows each, different, record to be stored in a common list. An interface is specified for each record to write itself to a file.
virtual EMF::METARECORD::~METARECORD | ( | ) | [inline, virtual] |
The virtual destructor allows records which allocated additional memory to release it when they are deleted. Simple records just use the default destructor defined here.
virtual void EMF::METARECORD::execute | ( | METAFILEDEVICECONTEXT * | source, | |
HDC | dc | |||
) | const [pure virtual] |
Execute the graphics command in the given context. Used by PlayEnhMetaFile to "copy" one metafile into another.
source | the device context from which this record is taken. | |
dc | the destination context. |
Implemented in EMF::ENHMETAHEADER, EMF::EMRCREATEPEN, EMF::EMREXTCREATEPEN, EMF::EMRCREATEBRUSHINDIRECT, EMF::EMREXTCREATEFONTINDIRECTW, and EMF::EMRCREATEPALETTE.
virtual bool EMF::METARECORD::serialize | ( | DATASTREAM | ds | ) | [pure virtual] |
Write yourself to the given file. This is virtual since some records are of arbitrary length and need to write additional information after their EMR structure.
ds | the datastream to write oneself to. |
Implemented in EMF::ENHMETAHEADER, EMF::EMRCREATEPEN, EMF::EMREXTCREATEPEN, EMF::EMRCREATEBRUSHINDIRECT, EMF::EMREXTCREATEFONTINDIRECTW, and EMF::EMRCREATEPALETTE.
virtual int EMF::METARECORD::size | ( | void | ) | const [pure virtual] |
The header record of a metafile records the total size of the metafile in bytes, so as each record is added to the list, it updates the total size.
Implemented in EMF::ENHMETAHEADER, EMF::EMRCREATEPEN, EMF::EMREXTCREATEPEN, EMF::EMRCREATEBRUSHINDIRECT, EMF::EMREXTCREATEFONTINDIRECTW, and EMF::EMRCREATEPALETTE.