Board index » delphi » Q: Delphi graphics

Q: Delphi graphics

Quote
Max Semyak wrote:

> Hi!
> I'm wondering, is there any method for fast work with pixels in Delphi
> instead of  Canvas.Pixels? How do I access drawing area of the window with
> assembler?
> Thanks in advance!

Get the Bitmap bits in Device Independent Format with the
GetDiBits() function, then work with the DIB.

Joe

--
Joe C. Hecht
Borland Delphi Developer Support Group
http://www.borland.com

 

Re:Q: Delphi graphics


Hi!
I'm wondering, is there any method for fast work with pixels in Delphi
instead of  Canvas.Pixels? How do I access drawing area of the window with
assembler?
Thanks in advance!

Re:Q: Delphi graphics


Quote
Joe C. Hecht wrote:

> Max Semyak wrote:

> > Hi!
> > I'm wondering, is there any method for fast work with pixels in Delphi
> > instead of  Canvas.Pixels? How do I access drawing area of the window with
> > assembler?
> > Thanks in advance!

> Get the Bitmap bits in Device Independent Format with the
> GetDiBits() function, then work with the DIB.

> Joe

> --
> Joe C. Hecht
> Borland Delphi Developer Support Group
> http://www.borland.com

Actually, I find that working with a memorystream of the bitmap is
easiest and it has the advantage that the programmer can make it the
source/target for NON-BMP/WMF/ICO image file conversions.  Then, once
all the bitmap info is modified to one's liking, the memorystream can be
loaded into a Bitmap using LoadFromStream.  Works very well.

HTH

Derek

Re:Q: Delphi graphics


In light of:

Quote
> > I'm wondering, is there any method for fast work with pixels in Delphi
> > instead of  Canvas.Pixels?

I thought that I would ask about sprites.  I get a terrible flicker
moving a  TShape like a box one pixel at a time within a window
continuously (like a shape that bounces off the walls), so I assume that
I have to use sprites.  Where do I begin?  There is nothing concerning
sprites in Win32 help or Delphi help.

Re:Q: Delphi graphics


Max Semyak <maksym.sem...@kiss.uni-lj.si> wrote in article
<01bc0d92$e6c83cc0$69620...@k4fd0065.kiss.uni-lj.si>...

Quote
> Hi!
> I'm wondering, is there any method for fast work with pixels in Delphi
> instead of  Canvas.Pixels? How do I access drawing area of the window
with
> assembler?
> Thanks in advance!

You don't have to use assembler, you just happened to pick on of the
sllllooooooooowwwwwest methods of accessing a pixel.  You might look into
DirectDraw.  That's pretty quick.  

Daniel Spiess

Re:Q: Delphi graphics


Quote
Max Polk <maxp...@gte.net> wrote:
>I thought that I would ask about sprites.  I get a terrible flicker
>moving a  TShape like a box one pixel at a time within a window
>continuously (like a shape that bounces off the walls), so I assume that
>I have to use sprites.  Where do I begin?  There is nothing concerning
>sprites in Win32 help or Delphi help.

Check the Delphi Super Page; there are several sprite components
there, many with source.

--
I do not like net lags and spam
I do not like them, Sam I Am

Re:Q: Delphi graphics


Quote
Dave Sherohman wrote:

> Max Polk <maxp...@gte.net> wrote:
> >I thought that I would ask about sprites.  I get a terrible flicker
> >moving a  TShape like a box one pixel at a time within a window
> >continuously (like a shape that bounces off the walls), so I assume that
> >I have to use sprites.  Where do I begin?  There is nothing concerning
> >sprites in Win32 help or Delphi help.

> Check the Delphi Super Page; there are several sprite components
> there, many with source.

And where can I find the Delphi Super Page?

Thank you,

Remco de Korte

Re:Q: Delphi graphics


Quote
|>Dave Sherohman wrote:

|>>
|>> Max Polk <maxp...@gte.net> wrote:
|>> >I thought that I would ask about sprites.  I get a terrible flicker
|>> >moving a  TShape like a box one pixel at a time within a window
|>> >continuously (like a shape that bounces off the walls), so I assume that
|>> >I have to use sprites.  Where do I begin?  There is nothing concerning
|>> >sprites in Win32 help or Delphi help.
|>>
|>> Check the Delphi Super Page; there are several sprite components
|>> there, many with source.
|>>
|>
|>And where can I find the Delphi Super Page?
|>
|>Thank you,
|>
|>Remco de Korte

http://sunsite.informatik.rwth-aachen.de/delphi/delphi32.html

Other Threads