• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

clearing a TImage

hi

i have a TImage Component on my form and i have drawn a circle(Ellipse) on it using this code :

 with image1 do begin
      Canvas.Brush.Color := clRed;
      Canvas.Brush.Style := bsSolid;
      Canvas.Ellipse(0, 0,41,41);
      end;

now i want to clear the TImage Canvas.

how can it be done using code.

pliz help!!!!
0
hybridron
Asked:
hybridron
1 Solution
 
kretzschmarCommented:
use

  image1.picture.assign(nil);

meikl ;-)
0
 
DTHLIEMCommented:
or
   image1.Picture := Nil;
0
 
gmayoCommented:
or

 with image1 do begin
     Canvas.Brush.Color := clWhite;
     Canvas.Pen.Color := Canvas.Brush.Color;
     Canvas.Rectangle(0, 0, Picture.Width, Picture.Height);
     end;
0
 
hybridronAuthor Commented:
thanx a lot guys i finally managed to get the circle to clear out.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now