[lazarus] StretchBlt

andrew johnson acjgenius at earthlink.net
Wed Oct 30 23:30:55 EST 2002


Oh.. almost forgot, on the slowness of things.. One reason you are so
slow is (apart from the Pixmap's) you are drawing everything regardless
of if it is visible or not. I suggest you take a look at Tony's Grid, it
is somewhat flawed for your purposes in that it is designed with a
specific purpose in mind, whereas yours is quite a bit more generic,
however how he handles drawing is much better then your way I think, and
it might help speed up the process as his only draws those rows/columns
which are in screen, and he shows how, to an extent, to handle fixed
rows. You've got a great start though, and if you can get the TGrid's
worked out too match Delphi's we may be able too use your grids in the
LCL, which will be that much less that needs to be done. I was going to
base a grid off of Tony's, but depending on yours, I may not have too as
yours is already looking to be closer in concept to Delphi's
TCustomGrid, or at least TStringGrid.

Andrew

On Wed, 2002-10-30 at 21:33, andrew johnson wrote:
> Well... First you are doing things the absolute slowest way possible for
> the pixmaps.. gaah! it was like moving through muck.. anyway. after
> turning off the pixmaps I saw what you meant I think. However the
> problem is not one I am completely certain how to take care of.. since I
> can't find it! What you might do however with your code is use TextRect
> instead of TextOut.. and just turn off the clipping flag until its fixed
> in the LCL. I think that the problem must be in ExtSelectRgn somewhere
> but I am in the dark as to what or where.(yet..)
> 
> Andrew
> 
> On Wed, 2002-10-30 at 20:48, Jesus Reyes wrote:
> > Ok, here is the code I'm working at, it is a grid in a
> > very preeliminar state but I only want to show the
> > TextRect problem, to see it do the following.
> > 
> > 1). Select Cell col=2, row=1 ( Cell[2,1] )
> > 2). Press F2
> > 3). Write "This is a long string of text"
> > 4). Press ENTER
> >     -the text should span thru 2 more cells
> > 5). Select Cell[3,1]
> > 6). Press F2 and Write "HERE" an then ENTER
> > 
> > The Text at Cell[2,1] Should be clipped, but it
> > doesn't (at least in my box).
> > 
> > Now, Toggle the checkbox to test a substitute of
> > TextRect. (you should navigate on the grid so it gets
> > refreshed).
> > 
> > Jesus Reyes A.
> > 
> > 
> > 
> > --- andrew johnson <acjgenius at earthlink.net> escribió:
> > > On Wed, 2002-10-30 at 01:13
> > > "Jesus Reyes" wrote:
> > > 
> > > > By the way, TextRect has problems when
> > > TextStyle.Clipped=true  I think
> > > > because it does not restore the clip region.
> > > 
> > > I haven't done extensive testing but I just looked
> > > at the code, and before 
> > > the clipping is set we back up the DC with SaveDC,
> > > and when we are done we 
> > > restore it with RestoreDC so if there IS a problem
> > > it is not in DrawText.
> > > 
> > > Could you please elaborate on what the problem
> > > actually is?
> > > 
> > > Andrew
> > > 
> > >
> > _________________________________________________________________
> > >      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
> -- 
> andrew johnson <acjgenius at earthlink.net>
> 
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
-- 
andrew johnson <acjgenius at earthlink.net>






More information about the Lazarus mailing list