diku-canvas
diku-canvas copied to clipboard
Better image API
Currently there is no easy way to work with multiple images. For instance, sprites in a game.
I think we need a separate Image
type and support API, perhaps something like:
type Image
val dimensions : Image -> {width : int; height : int}
val loadImage : string -> Image
val saveImage : Image -> string -> unit
val drawImage : canvas -> Image -> (int*int) -> unit
val toImage : canvas -> Image