summaryrefslogtreecommitdiff
path: root/draw/draw_edge.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-01-30 13:54:39 +0100
committerTor Andersson <tor.andersson@artifex.com>2013-01-30 14:13:01 +0100
commit594c64f744862b993bcad12e05217f3d43e7d547 (patch)
tree5328ba05eb7c360c25bdc1849604839ce8d99762 /draw/draw_edge.c
parent29f09279714f4f9b81d9b5488072860142f86f24 (diff)
downloadmupdf-594c64f744862b993bcad12e05217f3d43e7d547.tar.xz
Introduce fz_irect where the old fz_bbox was useful.
Inside the renderer we often deal with integer sized areas, for pixmaps and scissoring regions. Use a new fz_irect type in these places.
Diffstat (limited to 'draw/draw_edge.c')
-rw-r--r--draw/draw_edge.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/draw/draw_edge.c b/draw/draw_edge.c
index df59ba14..c5438ffe 100644
--- a/draw/draw_edge.c
+++ b/draw/draw_edge.c
@@ -203,7 +203,7 @@ fz_new_gel(fz_context *ctx)
}
void
-fz_reset_gel(fz_gel *gel, fz_rect clip)
+fz_reset_gel(fz_gel *gel, fz_irect clip)
{
fz_aa_context *ctxaa = gel->ctx->aa;
@@ -235,13 +235,13 @@ fz_free_gel(fz_gel *gel)
fz_free(gel->ctx, gel);
}
-fz_rect
+fz_irect
fz_bound_gel(fz_gel *gel)
{
- fz_rect bbox;
+ fz_irect bbox;
fz_aa_context *ctxaa = gel->ctx->aa;
if (gel->len == 0)
- return fz_empty_rect;
+ return fz_empty_irect;
bbox.x0 = fz_idiv(gel->bbox.x0, fz_aa_hscale);
bbox.y0 = fz_idiv(gel->bbox.y0, fz_aa_vscale);
bbox.x1 = fz_idiv(gel->bbox.x1, fz_aa_hscale) + 1;
@@ -666,7 +666,7 @@ static inline void blit_aa(fz_pixmap *dst, int x, int y,
}
static void
-fz_scan_convert_aa(fz_gel *gel, int eofill, fz_rect clip,
+fz_scan_convert_aa(fz_gel *gel, int eofill, fz_irect clip,
fz_pixmap *dst, unsigned char *color)
{
unsigned char *alphas;
@@ -851,7 +851,7 @@ clip_ended:
*/
static inline void blit_sharp(int x0, int x1, int y,
- fz_rect clip, fz_pixmap *dst, unsigned char *color)
+ fz_irect clip, fz_pixmap *dst, unsigned char *color)
{
unsigned char *dp;
x0 = fz_clampi(x0, dst->x, dst->x + dst->w);
@@ -867,7 +867,7 @@ static inline void blit_sharp(int x0, int x1, int y,
}
static inline void non_zero_winding_sharp(fz_gel *gel, int y,
- fz_rect clip, fz_pixmap *dst, unsigned char *color)
+ fz_irect clip, fz_pixmap *dst, unsigned char *color)
{
int winding = 0;
int x = 0;
@@ -883,7 +883,7 @@ static inline void non_zero_winding_sharp(fz_gel *gel, int y,
}
static inline void even_odd_sharp(fz_gel *gel, int y,
- fz_rect clip, fz_pixmap *dst, unsigned char *color)
+ fz_irect clip, fz_pixmap *dst, unsigned char *color)
{
int even = 0;
int x = 0;
@@ -899,7 +899,7 @@ static inline void even_odd_sharp(fz_gel *gel, int y,
}
static void
-fz_scan_convert_sharp(fz_gel *gel, int eofill, fz_rect clip,
+fz_scan_convert_sharp(fz_gel *gel, int eofill, fz_irect clip,
fz_pixmap *dst, unsigned char *color)
{
int e = 0;
@@ -955,7 +955,7 @@ fz_scan_convert_sharp(fz_gel *gel, int eofill, fz_rect clip,
}
void
-fz_scan_convert(fz_gel *gel, int eofill, fz_rect clip,
+fz_scan_convert(fz_gel *gel, int eofill, fz_irect clip,
fz_pixmap *dst, unsigned char *color)
{
fz_aa_context *ctxaa = gel->ctx->aa;