Board index » delphi » Re: Invalidate

Re: Invalidate


2003-12-06 01:22:19 AM
delphi174
I have compex calculations while drawing, and I want to skip them when there
is no need for them.
I know how this work with cliping, but whole my COMPLEX painting LOOP is
called and when only 1px need to be redrawn (!), and I want to skip this. I
want to hit drawing calculations for only this part of canvas.
"Ignacio Vazquez" <ivazquezATorioncommunications.com>writes
Quote
"bokini" <XXXX@XXXXX.COM>writes
XXXX@XXXXX.COM...
>For example: If I have 4 rectangles drawn in component (like some grid),
>and only one need to be redrawn (e.g when user move some window which
have
>cover only this rectangle) and how in this case to detect only part of
>canvas which REALY need to be updated.

Windows will set the clipping region appropriately when the painting DC is
requested, and painting outside the clipping region takes almost no time
because it is completely ignored. IOW, don't worry about it.

Cheers,
Ignacio


 
 

Re: Invalidate

"bokini" <XXXX@XXXXX.COM>writes
XXXX@XXXXX.COM...
Quote
I have compex calculations while drawing, and I want to skip them when
there is no need for them.
I know how this work with cliping, but whole my COMPLEX painting LOOP is
called and when only 1px need to be redrawn (!), and I want to skip this.
I want to hit drawing calculations for only this part of canvas.
Then take a look at the GetClipBox and GetClipRgn Windows API calls.
Cheers,
Ignacio