
|
|
|
|  | heard$ heard 02/14/2007 :: 20:55
Anonyme
| | Hi Loic, I am successful at using DrawFillRectangle. But now I want to 'erase' the rectangle if the user clicks on it again. I can do this with the FiltersToZone and the SetTransparency methods but I'm not sure this is the best way. Thoughts? Thanks, Heard | |
 | Loïc$2006306 Loïc 02/15/2007 :: 18:07
Registered
| | Hi Heard,
For me the best way is to create a clone of your image.
have a look on this thread: http://www.gdpicture.com/forum/forum.php?view=166
Best regards,
Loïc Carrère | |
 | heard$ heard 02/15/2007 :: 20:30
Anonyme
| | Loic, I'm sorry. I should have explained better. I can see how your suggestion would work as a simple backup. Mine is a little more complicated.
Suppose I drawfill 4 rectangles (r1,r2,r3,r4) on an image(p1) and view it as (v1). As I am drawing these, I am extracting them and drawing them on another temporary picture(p2), then displaying them in a viewer(v2).
So at this point, I see the original image (v1) with 4 rectangles filled. I also see (v2) with only the extracted rectangles.
Now if I click on any one of the rectangles in (v1), I want it to erase from both (v1) and (v2). I am using the FiltersToZone and SetTransparencyColor methods to fix the rectangle in (p1) then redisplaying (v1). This seems to work OK, although I can still see the outline of the box. Just wondering if this is the best way.
I'm still trying to work out the logic to redraw (p2) without the selected rectangle and display it in (v2).
Thanks, Heard | |
| |