jesusrmx at yahoo.com.mx
Wed Oct 30 01:10:47 EST 2002
I'm working in a TCustomControl descendent which is inserted in a
Tscrollbox. As part of the paint event I draw some bitmaps (actually
TPixmaps) on its canvas using Canvas.draw(....). This is an interactive
control but due the paint events it feels too slow. I draw the entire
control on each paint event because I believed that the lcl by means of the
clip region did take care of unneeded parts and mostly it does (I mean
Canvas.TextOut, Rectangle, FillRect which are what i tried works ok. By the
way, TextRect has problems when TextStyle.Clipped=true I think because it
does not restore the clip region).
To test the clip region misbehavior in the Paint event I get the current
clip box using getClipBox and it is always the full extent of the control
including invisible parts (I don't know if that is correct or it should be
only the visible area). Then, before any other thing I do an
IntersectClipRect(canvas.handle, 0, 0, 50, 20) . After that I render my
control normally. As result, tt apears as a perfect 50 by 20 rectangle
correctly rendered surrounded by a gray background (do you know how to get
rid of that?) except by the bitmaps wich are rendered out and crossing this
clipped rectangle and lying over the control background.
This is why i think that the problem is at the StretchBlt routine. Maybe
Source or Dest Rects doesn't get correctly calculated or GTK is wrong or me
I hope the text above results readable.
Jesus Reyes A.
----- Original Message -----
From: Andrew Johnson <aj_genius at hotmail.com>
To: <lazarus at miraclec.com>
Sent: Tuesday, October 29, 2002 6:29 PM
Subject: Re: [lazarus] StretchBlt
> On Tue, 29 Oct 2002 18:22:28 -0600 (CST)
> "Jesus Reyes" <jesusrmx at yahoo.com.mx> wrote :
> >It Seems like StretchBlt doesn't take care of boundary
> >clipping, . So Canvas.Draw doesn't clip bitmaps
> >correctly. can be fixed?
> I am not certain I understand. Could you clarify?
> AFAIK Clipping works mostly correct in StretchBlt, and what doesn't work h
> partly to do with Flaws in the GTK 1.X code design. But if there is a true
> design problem/bug in the LCL interface code itself, it should indeed be
> Unlimited Internet access for only $21.95/month. Try MSN!
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.lazarus.freepascal.org/mailarchives
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx
More information about the Lazarus