From 9b5be450d8aa635d5e1d0b82ea8331da66a87cbf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 6 Jun 2013 21:43:52 +0000 Subject: text rendering: shadow offset was causing text to clip, now check for clipping without the shadow since not-drawing characters because of subtle effect is rather annoying. --- source/blender/blenlib/intern/rct.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'source/blender/blenlib/intern/rct.c') diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c index 91fcb5a5b83..02525e25dda 100644 --- a/source/blender/blenlib/intern/rct.c +++ b/source/blender/blenlib/intern/rct.c @@ -101,6 +101,25 @@ bool BLI_rctf_isect_pt_v(const rctf *rect, const float xy[2]) return true; } +/** + * is \a rct_b inside \a rct_a + */ +bool BLI_rctf_inside_rctf(rctf *rct_a, const rctf *rct_b) +{ + return ((rct_a->xmin <= rct_b->xmin) && + (rct_a->xmax >= rct_b->xmax) && + (rct_a->ymin <= rct_b->ymin) && + (rct_a->ymax >= rct_b->ymax)); +} +bool BLI_rcti_inside_rcti(rcti *rct_a, const rcti *rct_b) +{ + return ((rct_a->xmin <= rct_b->xmin) && + (rct_a->xmax >= rct_b->xmax) && + (rct_a->ymin <= rct_b->ymin) && + (rct_a->ymax >= rct_b->ymax)); +} + + /* based closely on 'isect_line_line_v2_int', but in modified so corner cases are treated as intersections */ static int isect_segments_i(const int v1[2], const int v2[2], const int v3[2], const int v4[2]) { -- cgit v1.2.3