diff options
Diffstat (limited to 'draw/draw_scale.c')
-rw-r--r-- | draw/draw_scale.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/draw/draw_scale.c b/draw/draw_scale.c index 489a2eb9..aceec939 100644 --- a/draw/draw_scale.c +++ b/draw/draw_scale.c @@ -6,7 +6,7 @@ given by taking the source pixmap src, scaling it to width w, and height h, and then positioning it at (frac(x),frac(y)). */ -#include "fitz.h" +#include "fitz-internal.h" /* Do we special case handling of single pixel high/wide images? The * 'purest' handling is given by not special casing them, but certain @@ -349,16 +349,8 @@ add_weight(fz_weights *weights, int j, int i, fz_scale_filter *filter, weight = (int)(256*f+0.5f); /* Ensure i is in range */ - if (i < 0) - { - i = 0; + if (i < 0 || i >= src_w) return; - } - else if (i >= src_w) - { - i = src_w-1; - return; - } if (weight == 0) { /* We add a fudge factor here to allow for extreme downscales |