diff options
author | Tor Andersson <tor@ghostscript.com> | 2005-06-07 15:09:48 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2005-06-07 15:09:48 +0200 |
commit | cefd16bc7a557ccaf0bb66d504d7a8cbc9ec43d3 (patch) | |
tree | fbfc8e852b3fea2f355cee6016f9976f8304666e /include/fitz/base_pixmap.h | |
parent | 5998b49add853664ad08f57071770b5433e667be (diff) | |
download | mupdf-cefd16bc7a557ccaf0bb66d504d7a8cbc9ec43d3.tar.xz |
more shuffling
Diffstat (limited to 'include/fitz/base_pixmap.h')
-rw-r--r-- | include/fitz/base_pixmap.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/fitz/base_pixmap.h b/include/fitz/base_pixmap.h new file mode 100644 index 00000000..9a0f2b43 --- /dev/null +++ b/include/fitz/base_pixmap.h @@ -0,0 +1,26 @@ +/* TODO: move this into draw module */ +/* +pixmaps have n components per pixel. the first is always alpha. +premultiplied alpha when rendering, but non-premultiplied for colorspace +conversions and rescaling. +*/ + +typedef struct fz_pixmap_s fz_pixmap; +typedef unsigned char fz_sample; + +struct fz_pixmap_s +{ + int x, y, w, h, n; + fz_sample *samples; +}; + +fz_error *fz_newpixmapwithrect(fz_pixmap **mapp, fz_irect bbox, int n); +fz_error *fz_newpixmap(fz_pixmap **mapp, int x, int y, int w, int h, int n); +fz_error *fz_newpixmapcopy(fz_pixmap **pixp, fz_pixmap *old); + +void fz_debugpixmap(fz_pixmap *map); +void fz_clearpixmap(fz_pixmap *map); +void fz_droppixmap(fz_pixmap *map); + +fz_error *fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom); + |