00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00023 #ifndef _INK_INTERSECT_H
00024 #define _INK_INTERSECT_H
00025
00026 #ifdef __cplusplus
00027 extern "C"
00028 {
00029 #endif
00030
00031 #include "ink.h"
00032
00033 typedef struct _StrokeIntersection_t
00034 {
00035 PtrInkPoint beginPt;
00036 PtrInkPoint endPt;
00037 struct _StrokeIntersection_t *pNextSection;
00038 } StrokeIntersection_t;
00039
00040 typedef struct _StrokeIntersections_t
00041 {
00042 int nSections;
00043
00044 StrokeIntersection_t *interSection;
00045 } StrokeIntersections_t, *PtrStrokeIntersections_t;
00046
00047
00048
00049 int isPointOutOfRange(int x,int y,int x1,int y1,int x2,int y2);
00050 int isPointOutOfStroke(PtrStroke pStroke,GdkPoint *p);
00051
00052
00053
00054 gboolean isLineCrossStrokeRange(PtrStroke pStroke,GdkPoint *p0,GdkPoint *p1,
00055 int* p_rec_width,int* p_rect_height);
00056
00057
00058 int lineIntersects(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
00059
00060 int isIntersects(PtrStroke pStroke, GdkPoint *srcPt1, GdkPoint *srcPt2);
00061
00062 int hitTest(PtrStroke pStroke, GdkPoint *point);
00063
00064
00065 PtrStrokeIntersections_t findIntersections(PtrStroke pStroke,
00066 GdkPoint *srcPt1, GdkPoint *srcPt2);
00067
00068 void delStroke(PtrInk pink,PtrStroke pPrev,PtrStroke *ppCur,PtrInk pDelInk);
00069
00070 void delStrokesByLine(PtrInk pink,GdkPoint *p0,GdkPoint *p1,PtrInk pDelInk);
00071
00072 void delInterSectLines(PtrInk pink,GdkPoint *p0,GdkPoint *p1);
00073
00074 #ifdef __cplusplus
00075 }
00076 #endif
00077
00078 #endif