diff options
author | Tor Andersson <tor@ghostscript.com> | 2005-03-30 08:30:22 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2005-03-30 08:30:22 +0200 |
commit | ee154f16bd09a43359967f7e7b86c3677c09461d (patch) | |
tree | 08896cfa9ff55e05bfe7855965c620d45115d4d5 /base/res_shade.c | |
parent | 460ad7040d67a4a93a153f98095ff952a2b15d37 (diff) | |
download | mupdf-ee154f16bd09a43359967f7e7b86c3677c09461d.tar.xz |
rename part 1 -- files
Diffstat (limited to 'base/res_shade.c')
-rw-r--r-- | base/res_shade.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/base/res_shade.c b/base/res_shade.c new file mode 100644 index 00000000..67a64e4e --- /dev/null +++ b/base/res_shade.c @@ -0,0 +1,28 @@ +#include <fitz.h> + +fz_shade * +fz_keepshade(fz_shade *shade) +{ + shade->refs ++; + return shade; +} + +void +fz_dropshade(fz_shade *shade) +{ + if (--shade->refs == 0) + { + if (shade->cs) + fz_dropcolorspace(shade->cs); + fz_free(shade->mesh); + fz_free(shade); + } +} + +fz_rect +fz_boundshade(fz_shade *shade, fz_matrix ctm) +{ + ctm = fz_concat(shade->matrix, ctm); + return fz_transformaabb(ctm, shade->bbox); +} + |