Solved

clearing a TImage

Posted on 2003-10-22
4
244 Views
Last Modified: 2010-04-05
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
Comment
Question by:hybridron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9604489
use

  image1.picture.assign(nil);

meikl ;-)
0
 

Expert Comment

by:DTHLIEM
ID: 9604630
or
   image1.Picture := Nil;
0
 
LVL 8

Accepted Solution

by:
gmayo earned 250 total points
ID: 9604942
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
 
LVL 1

Author Comment

by:hybridron
ID: 9609839
thanx a lot guys i finally managed to get the circle to clear out.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Tidtcpserver listening on multiports? 1 46
enhance the following code 3 42
Delphi problems to abort a printjob 9 36
TlistView is Really heavy on Android 3 23
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question