EMF::GLOBALOBJECTS(3)
π NAME π
EMF::GLOBALOBJECTS β bestie, this is the class from libemf that keeps every single object in one big database inside your process. That's the whole vibe. One process, one object stash, no cap. π
β¨ SYNOPSIS β¨
#include <libemf.h>
π«Ά Public Member Functions π«Ά
HGDIOBJ add (OBJECT *object)
OBJECT * find (const HGDIOBJ handle)
void remove (const OBJECT *object)
auto begin (void) const
auto end (void) const
METARECORDCTOR newRecord (DWORD iType) const
π Static Public Member Functions π
okay so this next part is lowkey a whole menu of record-makers, one for basically every metarecord type in existence. each one hands you back a static EMF::METARECORD * and takes a DATASTREAM &ds. we go:
static EMF::METARECORD * new_eof (DATASTREAM &ds)β Create a newEMREOFrecord. πstatic EMF::METARECORD * new_setviewportorgex (DATASTREAM &ds)β Create a newEMRSETVIEWPORTORGEXrecord.static EMF::METARECORD * new_setwindoworgex (DATASTREAM &ds)β Create a newEMRSETWINDOWORGEXrecord.static EMF::METARECORD * new_setviewportextex (DATASTREAM &ds)β Create a newEMRSETVIEWPORTEXTEXrecord.static EMF::METARECORD * new_setwindowextex (DATASTREAM &ds)β Create a newEMRSETWINDOWEXTEXrecord.static EMF::METARECORD * new_scaleviewportextex (DATASTREAM &ds)β Create a newSCALEVIEWPORTEXTEXrecord.static EMF::METARECORD * new_scalewindowextex (DATASTREAM &ds)β Create a newSCALEWINDOWEXTEXrecord.static EMF::METARECORD * new_modifyworldtransform (DATASTREAM &ds)β Create a newMODIFYWORLDTRANSFORMrecord.static EMF::METARECORD * new_setworldtransform (DATASTREAM &ds)β Create a newSETWORLDTRANSFORMrecord.static EMF::METARECORD * new_settextalign (DATASTREAM &ds)β Create a newSETTEXTALIGNrecord.static EMF::METARECORD * new_settextcolor (DATASTREAM &ds)β Create a newSETTEXTCOLORrecord.static EMF::METARECORD * new_setbkcolor (DATASTREAM &ds)β Create a newSETBKCOLORrecord.static EMF::METARECORD * new_setbkmode (DATASTREAM &ds)β Create a newSETBKMODErecord.static EMF::METARECORD * new_setpolyfillmode (DATASTREAM &ds)β Create a newSETPOLYFILLMODErecord.static EMF::METARECORD * new_setmapmode (DATASTREAM &ds)β Create a newSETMAPMODErecord.static EMF::METARECORD * new_selectobject (DATASTREAM &ds)β Create a newSELECTOBJECTrecord.static EMF::METARECORD * new_deleteobject (DATASTREAM &ds)β Create a newDELETEOBJECTrecord.static EMF::METARECORD * new_movetoex (DATASTREAM &ds)β Create a newMOVETOEXrecord.static EMF::METARECORD * new_lineto (DATASTREAM &ds)β Create a newLINETOrecord.static EMF::METARECORD * new_arc (DATASTREAM &ds)β Create a newARCrecord.static EMF::METARECORD * new_arcto (DATASTREAM &ds)β Create a newARCTOrecord.static EMF::METARECORD * new_rectangle (DATASTREAM &ds)β Create a newRECTANGLErecord.static EMF::METARECORD * new_ellipse (DATASTREAM &ds)β Create a newELLIPSErecord.static EMF::METARECORD * new_polyline (DATASTREAM &ds)β Create a newPOLYLINErecord.static EMF::METARECORD * new_polyline16 (DATASTREAM &ds)β Create a newPOLYLINE16record.static EMF::METARECORD * new_polygon (DATASTREAM &ds)β Create a newPOLYGONrecord.static EMF::METARECORD * new_polygon16 (DATASTREAM &ds)β Create a newPOLYGON16record.static EMF::METARECORD * new_polypolygon (DATASTREAM &ds)β Create a newPOLYPOLYGONrecord.static EMF::METARECORD * new_polypolygon16 (DATASTREAM &ds)β Create a newPOLYPOLYGON16record.static EMF::METARECORD * new_polybezier (DATASTREAM &ds)β Create a newPOLYBEZIERrecord.static EMF::METARECORD * new_polybezier16 (DATASTREAM &ds)β Create a newPOLYBEZIER16record.static EMF::METARECORD * new_polybezierto (DATASTREAM &ds)β Create a newPOLYBEZIERTOrecord.static EMF::METARECORD * new_polybezierto16 (DATASTREAM &ds)β Create a newPOLYBEZIERTO16record.static EMF::METARECORD * new_polylineto (DATASTREAM &ds)β Create a newPOLYLINETOrecord.static EMF::METARECORD * new_polylineto16 (DATASTREAM &ds)β Create a newPOLYLINETO16record.static EMF::METARECORD * new_exttextouta (DATASTREAM &ds)β Create a newEXTTEXTOUTArecord.static EMF::METARECORD * new_exttextoutw (DATASTREAM &ds)β Create a newEXTTEXTOUTWrecord.static EMF::METARECORD * new_setpixelv (DATASTREAM &ds)β Create a newSETPIXELVrecord.static EMF::METARECORD * new_createpen (DATASTREAM &ds)β Create a newCREATEPENrecord.static EMF::METARECORD * new_extcreatepen (DATASTREAM &ds)β Create a newEXTCREATEPENrecord.static EMF::METARECORD * new_createbrushindirect (DATASTREAM &ds)β Create a newCREATEBRUSHINDIRECTrecord.static EMF::METARECORD * new_extcreatefontindirectw (DATASTREAM &ds)β Create a newEXTCREATEFONTINDIRECTWrecord.static EMF::METARECORD * new_fillpath (DATASTREAM &ds)β Create a newFILLPATHrecord.static EMF::METARECORD * new_strokepath (DATASTREAM &ds)β Create a newSTROKEPATHrecord.static EMF::METARECORD * new_strokeandfillpath (DATASTREAM &ds)β Create a newSTROKEANDFILLPATHrecord.static EMF::METARECORD * new_beginpath (DATASTREAM &ds)β Create a newBEGINPATHrecord.static EMF::METARECORD * new_endpath (DATASTREAM &ds)β Create a newENDPATHrecord.static EMF::METARECORD * new_closefigure (DATASTREAM &ds)β Create a newCLOSEFIGURErecord.static EMF::METARECORD * new_savedc (DATASTREAM &ds)β Create a newSAVEDCrecord.static EMF::METARECORD * new_restoredc (DATASTREAM &ds)β Create a newRESTOREDCrecord.static EMF::METARECORD * new_setmetargn (DATASTREAM &ds)β Create a newSETMETARGNrecord.static EMF::METARECORD * new_setmiterlimit (DATASTREAM &ds)β Create a newSETMITERLIMITrecord.
fr fr, that's the whole roster. β¨
πΈ Detailed Description πΈ
Stores all the objects in a single database within a process. that's it, that's the whole thesis bestie π one process, one database, everybody lives there.
π Member Function Documentation π
π HGDIOBJ EMF::GLOBALOBJECTS::add (OBJECT * object)
Add an object to the global vector. and here's the cute part: the object's handle is literally just its index in the global object vector, and that index gets computed by the very interesting 'difference between two iterators' method. iconic behavior honestly π«Ά
π₯ Parameters
- object β pointer to a real instance of an object, not its handle. (read that again bestie, pointer to the actual object, not the handle π)
π¦ auto EMF::GLOBALOBJECTS::begin (void) const [inline]
π€ Returns
an iterator pointing to the first global object.
π¦ auto EMF::GLOBALOBJECTS::end (void) const [inline]
π€ Returns
an iterator pointing to (one past) the final global object. yes, the classic one-past-the-end thing, you know the drill β¨
π OBJECT * EMF::GLOBALOBJECTS::find (const HGDIOBJ handle)
Look up an object by handle in the global object vector.
β οΈ Note: Stock objects (like a gray brush or the black pen) have their high order bit set, so this has to be masked out when you're using their handles. don't forget the mask, she will not remind you π
π₯ Parameters
- handle β the object's handle.
π€ Returns
pointer to object.
π§ METARECORDCTOR EMF::GLOBALOBJECTS::newRecord (DWORD iType) const
See if we have a constructor for a record of the given type. vibe check on the constructor table, basically π
π₯ Parameters
- iType β metarecord type.
π€ Returns
pointer to the 'virtual' constructor.
ποΈ void EMF::GLOBALOBJECTS::remove (const OBJECT * object)
A call to the metafile function DeleteObject() allows a particular object's handle to be reused, so some care has to be taken to erase it. like, genuinely be careful here bestie, it's giving reuse-city and you don't wanna leave a ghost π»
π₯ Parameters
- object β pointer to object to delete.
π«Ά Author π«Ά
Generated automatically by Doxygen for libemf from the source code. (not a human, just a very diligent robot π )
and that's the whole page, bestie!! π this one came out of libemf Version 1.0.9, dated Thu Jun 6 2024 23:01:07, and yes i am obsessed with her. go forth and manage your global objects responsibly πβ¨π
π¦ where this page comes from
- debian trixie: libemf-doc 1.0.13-8 Β· GPL-2.0-only
- ubuntu questing: libemf-doc 1.0.13-8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms