Board index » delphi » How to paint a TPaintBox image?

How to paint a TPaintBox image?

I'm having trouble coloring a TPaintBox using it's TCanvas property.  I
compute a color for each pixel.  I can't seem to get any colors to show up
on the TPaintBox.  Can someone show me a simple example of how to paint an
image onto a TPaintBox where each pixel color is specified.  Assume the
color of each pixel is specified with Color(x,y).  Thanks!
 

Re:How to paint a TPaintBox image?


You are doing this in the OnPaint method, I presume?

Quote
"Mark Huebner" <mkhueb...@sprynet.com> wrote in message

news:3d16bfab$1_2@dnews...
Quote
> I'm having trouble coloring a TPaintBox using it's TCanvas property.  I
> compute a color for each pixel.  I can't seem to get any colors to show
up
> on the TPaintBox.  Can someone show me a simple example of how to paint
an
> image onto a TPaintBox where each pixel color is specified.  Assume the
> color of each pixel is specified with Color(x,y).  Thanks!

Re:How to paint a TPaintBox image?


Yes, but it still didn't work.

"David J Taylor" <davidtay...@writeme.com> wrote in message
news:3d16c80d$1_1@dnews...

Quote
> You are doing this in the OnPaint method, I presume?

> "Mark Huebner" <mkhueb...@sprynet.com> wrote in message
> news:3d16bfab$1_2@dnews...
> > I'm having trouble coloring a TPaintBox using it's TCanvas property.  I
> > compute a color for each pixel.  I can't seem to get any colors to show
> up
> > on the TPaintBox.  Can someone show me a simple example of how to paint
> an
> > image onto a TPaintBox where each pixel color is specified.  Assume the
> > color of each pixel is specified with Color(x,y).  Thanks!

Other Threads