[clean-list] Bitmaps

F.S.A.Zuurbier@inter.nl.net F.S.A.Zuurbier@inter.nl.net
Tue, 11 Sep 2001 10:52:32 +0200 (MET DST)


Siegfried wrote:
=======
all interested in graphics programming should deposit what they expect from an I/O system
=======
I have a program that plots almost random pixels on my screen (fractals). It worked fine. When the printing library came out, I added code to print the fractal, only to find out that it does not generate a bitmap-file that I could print, but a huge file full of printing instructions, each specifying where to print one pixel. It did not fit in my computer, or rather, printing it did not fit in the time I was prepared to wait.

With hindsight I understand that even if Clean were able to generate a true bitmap to be printed, I could not expect the Clean compiler to make the correct optimization decisions automatically: generate print-instructions for characters, lines, circles, dots, or compile the result in a bitmap and (store and) print that. 

So it would be nice to be able to generate printable bitmaps, and it would be even nicer if I had some smart way to control the optimization I just described.

Another thing: someone once asked for the possibility to access individual pixels in a bitmap. I back that. The only way currently to do that is to save a mirror of the bitmap in the program state. Seems like a waste to me.

Third: If you really want to program independent of the screen/printer resolution, it should be possible to access a bitmap not in pixels but in points (one point is one inch / 72 if I remember correctly). I don't know if this is feasible.

Regards Erik Zuurbier