Mercurial > MadButterfly
comparison src/event.c @ 32:69c8e264890d
Remove old path after every shape checking for a position.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 05 Aug 2008 18:28:50 +0800 |
parents | e06a4a667ce2 |
children | 581a03196093 |
comparison
equal
deleted
inserted
replaced
31:da770188a44d | 32:69c8e264890d |
---|---|
96 shape = geo->shape; | 96 shape = geo->shape; |
97 draw_shape_path(shape, cr); | 97 draw_shape_path(shape, cr); |
98 if(shape->fill) { | 98 if(shape->fill) { |
99 if(cairo_in_fill(cr, x, y)) { | 99 if(cairo_in_fill(cr, x, y)) { |
100 *in_stroke = 0; | 100 *in_stroke = 0; |
101 cairo_new_path(cr); | 101 cairo_new_path(rdman->cr); |
102 return geo; | 102 return geo; |
103 } | 103 } |
104 } | 104 } |
105 if(shape->stroke) { | 105 if(shape->stroke) { |
106 if(cairo_in_stroke(cr, x, y)) { | 106 if(cairo_in_stroke(cr, x, y)) { |
107 *in_stroke = 1; | 107 *in_stroke = 1; |
108 cairo_new_path(cr); | 108 cairo_new_path(rdman->cr); |
109 return geo; | 109 return geo; |
110 } | 110 } |
111 } | 111 } |
112 cairo_new_path(rdman->cr); | |
112 } | 113 } |
113 | 114 |
114 return NULL; | 115 return NULL; |
115 } | 116 } |
116 | 117 |