summaryrefslogtreecommitdiff
path: root/fitz/base_rect.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-04-11 18:14:17 +0200
committerTor Andersson <tor@ghostscript.com>2010-04-11 18:14:17 +0200
commite443e4a930481ea7c8bd83179481c4b0c707df13 (patch)
treedd42c1e23ec0e53ccfe7a8f169a15fd02a355127 /fitz/base_rect.c
parent6c8f97da2a3d5cca947290a97ec2e30690e3a496 (diff)
downloadmupdf-e443e4a930481ea7c8bd83179481c4b0c707df13.tar.xz
Remove unused functions.
Diffstat (limited to 'fitz/base_rect.c')
-rw-r--r--fitz/base_rect.c52
1 files changed, 4 insertions, 48 deletions
diff --git a/fitz/base_rect.c b/fitz/base_rect.c
index d25535f0..f8b8b643 100644
--- a/fitz/base_rect.c
+++ b/fitz/base_rect.c
@@ -3,48 +3,19 @@
fz_rect fz_infiniterect = { 1, 1, -1, -1 };
fz_rect fz_emptyrect = { 0, 0, 0, 0 };
-static fz_irect infinite = { 1, 1, -1, -1 };
static fz_irect empty = { 0, 0, 0, 0 };
fz_irect
fz_roundrect(fz_rect f)
{
fz_irect i;
- i.x0 = fz_floor(f.x0);
- i.y0 = fz_floor(f.y0);
- i.x1 = fz_ceil(f.x1);
- i.y1 = fz_ceil(f.y1);
+ i.x0 = floor(f.x0);
+ i.y0 = floor(f.y0);
+ i.x1 = ceil(f.x1);
+ i.y1 = ceil(f.y1);
return i;
}
-fz_rect
-fz_intersectrects(fz_rect a, fz_rect b)
-{
- fz_rect r;
- if (fz_isinfiniterect(a)) return b;
- if (fz_isinfiniterect(b)) return a;
- r.x0 = MAX(a.x0, b.x0);
- r.y0 = MAX(a.y0, b.y0);
- r.x1 = MIN(a.x1, b.x1);
- r.y1 = MIN(a.y1, b.y1);
- return (r.x1 < r.x0 || r.y1 < r.y0) ? fz_emptyrect : r;
-}
-
-fz_rect
-fz_mergerects(fz_rect a, fz_rect b)
-{
- fz_rect r;
- if (fz_isinfiniterect(a) || fz_isinfiniterect(b))
- return fz_infiniterect;
- if (fz_isemptyrect(a)) return b;
- if (fz_isemptyrect(b)) return a;
- r.x0 = MIN(a.x0, b.x0);
- r.y0 = MIN(a.y0, b.y0);
- r.x1 = MAX(a.x1, b.x1);
- r.y1 = MAX(a.y1, b.y1);
- return r;
-}
-
fz_irect
fz_intersectirects(fz_irect a, fz_irect b)
{
@@ -58,18 +29,3 @@ fz_intersectirects(fz_irect a, fz_irect b)
return (r.x1 < r.x0 || r.y1 < r.y0) ? empty : r;
}
-fz_irect
-fz_mergeirects(fz_irect a, fz_irect b)
-{
- fz_irect r;
- if (fz_isinfiniterect(a) || fz_isinfiniterect(b))
- return infinite;
- if (fz_isemptyrect(a)) return b;
- if (fz_isemptyrect(b)) return a;
- r.x0 = MIN(a.x0, b.x0);
- r.y0 = MIN(a.y0, b.y0);
- r.x1 = MAX(a.x1, b.x1);
- r.y1 = MAX(a.y1, b.y1);
- return r;
-}
-