diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-10-13 12:42:54 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-10-13 12:42:54 +0000 |
commit | 64b1c2c0b9d01abe4b37cca8929588875e6ba474 (patch) | |
tree | d60ae7c01d19e16d9e06f1059f1a612a6495d433 /fitz | |
parent | 9207d8ae87fd98fe0628126f97f214db2b4a90af (diff) | |
download | mupdf-64b1c2c0b9d01abe4b37cca8929588875e6ba474.tar.xz |
Use EXPAND/BLEND/COMBINE macros for more plotting functions. Patch by Robin Watts.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/fitz.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h index 9671c46d..0608a453 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -195,6 +195,10 @@ static inline int fz_mul255(int a, int b) * to give a single value in the same range as A was. */ #define FZ_COMBINE(A,B) (((A)*(B))>>8) +/* Combine values A and C (in the same (any) range) and B and D (in the + * 0..256 range), to give a single value in the same range as A and C were. */ +#define FZ_COMBINE2(A,B,C,D) (((A)*(B)+(C)*(D))>>8) + /* Blend SRC and DST (in the same range) together according to * AMOUNT (in the 0...256 range). */ #define FZ_BLEND(SRC, DST, AMOUNT) ((((SRC)-(DST))*(AMOUNT) + ((DST)<<8))>>8) |