Picture and Bitmap unified?
Martin Wierich
martinw@cs.kun.nl
Fri, 09 Apr 1999 17:33:42 +0200
Hello Erik,
We once thought about a function
recordBitmap :: (*Picture -> *Picture) (Int,Int) -> Bitmap
The Int pair describes the size (width and height) of the bitmap to
generate. The
Picture-to-Picture function determines the look of the bitmap. The function
would not
be hard to implement on Mac and Win95.
greetings
Martin Wierich
"Zuurbier, E. - AMSXE" wrote:
> I thought it would be a nice idea to be able to make my own bitmaps.
> Of course I could do that by diving into the file-format of bitmaps and
> write functions to fill them. But would not it be nice if the existing
> Picture drawing functions would also be available for Bitmaps?
>
> In that case for instance the following function types could change from
>
> DrawPoint :: !Point !Picture -> Picture
> DrawLine :: !Line !Picture -> Picture
> DrawCurve :: !Curve !Picture -> Picture
> (etc)
>
> to
>
> DrawPoint :: !Point !p -> p | Pict p
> DrawLine :: !Line !p -> p | Pict p
> DrawCurve :: !Curve !p -> p | Pict p
> (etc)
>
> or there could be a
>
> class Pict p
> where DrawPoint :: !Point !p -> p
> DrawLine :: !Line !p -> p
> DrawCurve :: !Curve !p -> p
> (etc)
>
> with instances for Picture and Bitmap