summaryrefslogtreecommitdiff
path: root/source/fitz/geometry.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-02-23 13:55:14 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-02-27 14:08:02 +0100
commit501b6c31f65b3906845dab10edbc8b17627c40c9 (patch)
tree001a840edaf6dc0484a43d511b9c8762118daf07 /source/fitz/geometry.c
parentee6e92b78eee4df8ab06461a3bed1a63c282ff47 (diff)
downloadmupdf-501b6c31f65b3906845dab10edbc8b17627c40c9.tar.xz
Add fz_expand_irect function.
Diffstat (limited to 'source/fitz/geometry.c')
-rw-r--r--source/fitz/geometry.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/fitz/geometry.c b/source/fitz/geometry.c
index 688b7046..775d442a 100644
--- a/source/fitz/geometry.c
+++ b/source/fitz/geometry.c
@@ -532,6 +532,17 @@ fz_transform_rect(fz_rect *restrict r, const fz_matrix *restrict m)
return r;
}
+fz_irect *
+fz_expand_irect(fz_irect *a, int expand)
+{
+ if (fz_is_infinite_irect(a)) return a;
+ a->x0 -= expand;
+ a->y0 -= expand;
+ a->x1 += expand;
+ a->y1 += expand;
+ return a;
+}
+
fz_rect *
fz_expand_rect(fz_rect *a, float expand)
{