Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-11

PutImage

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andreas K. Foerster

Hello,

I try to write a program, that uses PutImage.
It works under Linux and under Dos, but not under Windows. Isn't that yet implemented in 1.0.4?
Will it work in later versions?

Tschuess Andreas
Jonas Maebe
to Andreas K. Foerster
Andreas K. Foerster wrote
I try to write a program, that uses PutImage. It works under Linux and under Dos, but not under Windows. Isn't that yet implemented in 1.0.4?

For all platforms, putimage currently simply calls putpixel for each pixel of the image to draw it, so if putpixel works, so should putimage.

Jonas

Andreas K. Foerster
to Jonas Maebe
Jonas Maebe wrote 6 lines
> I try to write a program, that uses PutImage. > It works under Linux and under Dos, but not under Windows. > Isn't that yet implemented in 1.0.4? For all platforms, putimage currently simply calls putpixel for each pixel of the image to draw it, so if putpixel works, so should putimage.

I found the real problem.
Altough I set Windows to HiColor, the InitGraph chose a mode with MaxColor=256 ???
A Putpixel with a higher color-value hangs the system! And my image was for a 16Bit mode.

Tschuess Andreas
Florian Klaempfl
to Andreas K. Foerster
you wrote 12 lines
On Thu, Nov 15, 2001 at 04:52:14PM +0100, Jonas Maebe wrote: > > I try to write a program, that uses PutImage. > > It works under Linux and under Dos, but not under Windows. > > Isn't that yet implemented in 1.0.4? > > For all platforms, putimage currently simply calls putpixel for each pixel > of the image to draw it, so if putpixel works, so should putimage. I found the real problem. Altough I set Windows to HiColor, the InitGraph chose a mode with MaxColor=256 ???

Because the graph unit for windows doesn't know HiColor and TrueColor modes :(

The windows graph unit is an ugly hack (done by me...) to get old TP DOS programs working on a windows desktop.

A Putpixel with a higher color-value hangs the system! And my image was for a 16Bit mode.
Andreas K. Foerster
to Florian Klaempfl
Florian Klaempfl wrote
Because the graph unit for windows doesn't know HiColor and TrueColor modes :(

Okay, it's not so important.
I just didn't know it.

to get old TP DOS programs working on a windows desktop.

Don't say it that way.
It is good to have a common interface to graphical programming on most supported platforms.

Tschuess Andreas
Florian Klaempfl
to Andreas K. Foerster
you wrote
> to get old TP DOS programs working on a windows desktop. Don't say it that way.

I meant it was the reason why I wrote the win32 graph unit.

It is good to have a common interface to graphical programming on most supported platforms.