How can I import and export a bitmap to/from a sketchboard gadget correctly ? (Using datatypes functions or Intuition functions.)
Wed, 2016-05-18 16:24
#1
How can I import and export a bitmap to/from a sketchboard gadget correctly ?
It looks like the OM_NEW or OM_SET methods import it and the OM_GET method exports it with the SGA_BitMap attribute . Though the autodocs seems unclear on getting the resultant bitmap.
Like so:
SGA_BitMap (struct BitMap *)
Pointer to the source bitmap which will be copied from
when used with OM_NEW, OM_SET and OM_UPDATE. This bitmap
is only read from.
The sketchboard object always uses its own internal bitmap
for editing. The internal bitmap can be retrieved using
this attribute and OM_GET. Set the gadget to GA_ReadOnly
before invoking OM_GET and be ready to handle a NULL
pointer if the gadget has not yet been layed out.
Defaults to NULL (blank).
Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET)