EMF::GLOBALOBJECTS(3)

πŸ“¦
version 1.0.13 Β· 5 versions
, in debian trixie, ubuntu questing

πŸ’– 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 new EMREOF record. πŸŽ€
  • static EMF::METARECORD * new_setviewportorgex (DATASTREAM &ds) β€” Create a new EMRSETVIEWPORTORGEX record.
  • static EMF::METARECORD * new_setwindoworgex (DATASTREAM &ds) β€” Create a new EMRSETWINDOWORGEX record.
  • static EMF::METARECORD * new_setviewportextex (DATASTREAM &ds) β€” Create a new EMRSETVIEWPORTEXTEX record.
  • static EMF::METARECORD * new_setwindowextex (DATASTREAM &ds) β€” Create a new EMRSETWINDOWEXTEX record.
  • static EMF::METARECORD * new_scaleviewportextex (DATASTREAM &ds) β€” Create a new SCALEVIEWPORTEXTEX record.
  • static EMF::METARECORD * new_scalewindowextex (DATASTREAM &ds) β€” Create a new SCALEWINDOWEXTEX record.
  • static EMF::METARECORD * new_modifyworldtransform (DATASTREAM &ds) β€” Create a new MODIFYWORLDTRANSFORM record.
  • static EMF::METARECORD * new_setworldtransform (DATASTREAM &ds) β€” Create a new SETWORLDTRANSFORM record.
  • static EMF::METARECORD * new_settextalign (DATASTREAM &ds) β€” Create a new SETTEXTALIGN record.
  • static EMF::METARECORD * new_settextcolor (DATASTREAM &ds) β€” Create a new SETTEXTCOLOR record.
  • static EMF::METARECORD * new_setbkcolor (DATASTREAM &ds) β€” Create a new SETBKCOLOR record.
  • static EMF::METARECORD * new_setbkmode (DATASTREAM &ds) β€” Create a new SETBKMODE record.
  • static EMF::METARECORD * new_setpolyfillmode (DATASTREAM &ds) β€” Create a new SETPOLYFILLMODE record.
  • static EMF::METARECORD * new_setmapmode (DATASTREAM &ds) β€” Create a new SETMAPMODE record.
  • static EMF::METARECORD * new_selectobject (DATASTREAM &ds) β€” Create a new SELECTOBJECT record.
  • static EMF::METARECORD * new_deleteobject (DATASTREAM &ds) β€” Create a new DELETEOBJECT record.
  • static EMF::METARECORD * new_movetoex (DATASTREAM &ds) β€” Create a new MOVETOEX record.
  • static EMF::METARECORD * new_lineto (DATASTREAM &ds) β€” Create a new LINETO record.
  • static EMF::METARECORD * new_arc (DATASTREAM &ds) β€” Create a new ARC record.
  • static EMF::METARECORD * new_arcto (DATASTREAM &ds) β€” Create a new ARCTO record.
  • static EMF::METARECORD * new_rectangle (DATASTREAM &ds) β€” Create a new RECTANGLE record.
  • static EMF::METARECORD * new_ellipse (DATASTREAM &ds) β€” Create a new ELLIPSE record.
  • static EMF::METARECORD * new_polyline (DATASTREAM &ds) β€” Create a new POLYLINE record.
  • static EMF::METARECORD * new_polyline16 (DATASTREAM &ds) β€” Create a new POLYLINE16 record.
  • static EMF::METARECORD * new_polygon (DATASTREAM &ds) β€” Create a new POLYGON record.
  • static EMF::METARECORD * new_polygon16 (DATASTREAM &ds) β€” Create a new POLYGON16 record.
  • static EMF::METARECORD * new_polypolygon (DATASTREAM &ds) β€” Create a new POLYPOLYGON record.
  • static EMF::METARECORD * new_polypolygon16 (DATASTREAM &ds) β€” Create a new POLYPOLYGON16 record.
  • static EMF::METARECORD * new_polybezier (DATASTREAM &ds) β€” Create a new POLYBEZIER record.
  • static EMF::METARECORD * new_polybezier16 (DATASTREAM &ds) β€” Create a new POLYBEZIER16 record.
  • static EMF::METARECORD * new_polybezierto (DATASTREAM &ds) β€” Create a new POLYBEZIERTO record.
  • static EMF::METARECORD * new_polybezierto16 (DATASTREAM &ds) β€” Create a new POLYBEZIERTO16 record.
  • static EMF::METARECORD * new_polylineto (DATASTREAM &ds) β€” Create a new POLYLINETO record.
  • static EMF::METARECORD * new_polylineto16 (DATASTREAM &ds) β€” Create a new POLYLINETO16 record.
  • static EMF::METARECORD * new_exttextouta (DATASTREAM &ds) β€” Create a new EXTTEXTOUTA record.
  • static EMF::METARECORD * new_exttextoutw (DATASTREAM &ds) β€” Create a new EXTTEXTOUTW record.
  • static EMF::METARECORD * new_setpixelv (DATASTREAM &ds) β€” Create a new SETPIXELV record.
  • static EMF::METARECORD * new_createpen (DATASTREAM &ds) β€” Create a new CREATEPEN record.
  • static EMF::METARECORD * new_extcreatepen (DATASTREAM &ds) β€” Create a new EXTCREATEPEN record.
  • static EMF::METARECORD * new_createbrushindirect (DATASTREAM &ds) β€” Create a new CREATEBRUSHINDIRECT record.
  • static EMF::METARECORD * new_extcreatefontindirectw (DATASTREAM &ds) β€” Create a new EXTCREATEFONTINDIRECTW record.
  • static EMF::METARECORD * new_fillpath (DATASTREAM &ds) β€” Create a new FILLPATH record.
  • static EMF::METARECORD * new_strokepath (DATASTREAM &ds) β€” Create a new STROKEPATH record.
  • static EMF::METARECORD * new_strokeandfillpath (DATASTREAM &ds) β€” Create a new STROKEANDFILLPATH record.
  • static EMF::METARECORD * new_beginpath (DATASTREAM &ds) β€” Create a new BEGINPATH record.
  • static EMF::METARECORD * new_endpath (DATASTREAM &ds) β€” Create a new ENDPATH record.
  • static EMF::METARECORD * new_closefigure (DATASTREAM &ds) β€” Create a new CLOSEFIGURE record.
  • static EMF::METARECORD * new_savedc (DATASTREAM &ds) β€” Create a new SAVEDC record.
  • static EMF::METARECORD * new_restoredc (DATASTREAM &ds) β€” Create a new RESTOREDC record.
  • static EMF::METARECORD * new_setmetargn (DATASTREAM &ds) β€” Create a new SETMETARGN record.
  • static EMF::METARECORD * new_setmiterlimit (DATASTREAM &ds) β€” Create a new SETMITERLIMIT record.

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