#include <glib.h>
#include "scbtype.h"
#include "scbpoint.h"
Go to the source code of this file.
Functions | |
G_BEGIN_DECLS gboolean | erscribble_is_rect_intersect (const ScbRectPtr rect1, const ScbRectPtr rect2) |
gboolean | erscribble_is_lines_intersect (const ScbPointPtr p1, const ScbPointPtr p2, const ScbPointPtr p3, const ScbPointPtr p4) |
gboolean erscribble_is_lines_intersect | ( | const ScbPointPtr | p1, | |
const ScbPointPtr | p2, | |||
const ScbPointPtr | p3, | |||
const ScbPointPtr | p4 | |||
) |
Definition at line 84 of file scbutil.c.
References CCW().
Referenced by erscribble_stroke_line_hit_test().
00088 { 00089 gboolean bRet = ((( CCW(p1, p2, p3) * CCW(p1, p2, p4)) <= 0) 00090 && (( CCW(p3, p4, p1) * CCW(p3, p4, p2) <= 0) )) ; 00091 00092 00093 return bRet; 00094 }
G_BEGIN_DECLS gboolean erscribble_is_rect_intersect | ( | const ScbRectPtr | rect1, | |
const ScbRectPtr | rect2 | |||
) |
Copyright (C) 2008 iRex Technologies B.V. All rights reserved.
Definition at line 71 of file scbutil.c.
References _ScbRect::bottom, _ScbRect::left, _ScbRect::right, and _ScbRect::top.
Referenced by erscribble_stroke_line_hit_test(), and erscribble_stroke_point_hit_test().
00073 { 00074 // check two rectangles is intersect or not, 00075 // these two rectangles should be normalized. 00076 return ! ( r2->left > r1->right 00077 || r2->right < r1->left 00078 || r2->top > r1->bottom 00079 || r2->bottom < r1->top 00080 ); 00081 }