well - sometimes the overhead of calculating which lines to draw
can be more than the overhead of just drawing them all.
but if you're worried about the number of lines slowing you down
you can do it a different way:
create a TBitMap object local to your form and the same size
as the region on the form you will draw on.
draw all your lines on the bitmap in advance - then in your OnPaint
handler you can just BitBlt the bitmap to your canvas without
having to draw any lines. This is a much faster operation than
drawing each line on the form's canvas directly.
Sorry - i don't have any code canned up that does this exactly.
Is this for a class?
-ns
-----Original Message-----
From: Chrissy <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Tuesday, October 17, 2000 14:18
Subject: Re: [DUG]: Lines That Repaint
I was hoping not to have to do that because I will have lots (100's) of
lines on the form and wanted it to happen automatically without the need to
calculate which lines (out of the 1000's in my system) need to be drawn this
time.
If I have missed the point could you send some code that does what you are
talking about?
Thanks.
Chrissy R
[EMAIL PROTECTED]
www.home.gen.nz
----- Original Message -----
From: Nello Sestini <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Tuesday, October 17, 2000 8:01 PM
Subject: Re: [DUG]: Lines That Repaint
> forms have an OnPaint event that gets called when the form repaints.
>
> you can write a handler for the forms OnPaint event and then
> draw your lines on the forms Canvas.
>
> ns
>
>
> -----Original Message-----
> From: Chrissy <[EMAIL PROTECTED]>
> To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> Date: Tuesday, October 17, 2000 13:46
> Subject: [DUG]: Lines That Repaint
>
>
> Hi,
>
> I have just joined this list (in fact it is my first list subscription)
and
> would like some help.
>
> What I am looking for is a way of redrawing lines on a form when the form
> repaints the same way form objects repaint. I considered making a
component
> of the line and having a repaint method but thought that others may have
> already solved this problem. I am rather new to Delphi and have not yet
> created a component.
>
> Any help would be most appreciated. Thanks.
>
> Chrissy R
>
> [EMAIL PROTECTED]
> www.home.gen.nz
>
>
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"