X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ftrace%2Fimagemap.h;h=7aa7e739d6c253da666065003b2b867f5ce73dce;hb=530f7fc7cfa4351ec33163abd795460bbc351609;hp=d69adefd7250220777ca8efd45b80c1312f27c17;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/trace/imagemap.h b/src/trace/imagemap.h index d69adefd7..7aa7e739d 100644 --- a/src/trace/imagemap.h +++ b/src/trace/imagemap.h @@ -93,6 +93,96 @@ GrayMap *GrayMapCreate(int width, int height); +/*######################################################################### +### P A C K E D P I X E L M A P +#########################################################################*/ + + +typedef struct PackedPixelMap_def PackedPixelMap; + +/** + * + */ +struct PackedPixelMap_def +{ + + /*################# + ### METHODS + #################*/ + + /** + * + */ + void (*setPixel)(PackedPixelMap *me, int x, int y, int r, int g, int b); + + + /** + * + */ + void (*setPixelLong)(PackedPixelMap *me, int x, int y, unsigned long rgb); + + + /** + * + */ + unsigned long (*getPixel)(PackedPixelMap *me, int x, int y); + + + /** + * + */ + int (*writePPM)(PackedPixelMap *me, char *fileName); + + + + /** + * + */ + void (*destroy)(PackedPixelMap *me); + + + + /*################# + ### FIELDS + #################*/ + + /** + * + */ + int width; + + /** + * + */ + int height; + + /** + * The allocated array of pixels + */ + unsigned long *pixels; + + /** + * Pointers to the beginning of each row of pixels + */ + unsigned long **rows; + + +}; + + + +#ifdef __cplusplus +extern "C" { +#endif + +PackedPixelMap *PackedPixelMapCreate(int width, int height); + +#ifdef __cplusplus +} +#endif + + + /*######################################################################### ### R G B M A P #########################################################################*/ @@ -264,7 +354,7 @@ struct IndexedMap_def * */ int nrColors; - + /** * Color look up table */ @@ -285,6 +375,8 @@ IndexedMap *IndexedMapCreate(int width, int height); #endif + + #endif /* __IMAGEMAP_H__ */ /*#########################################################################