diku-canvas icon indicating copy to clipboard operation
diku-canvas copied to clipboard

Better image API

Open kfl opened this issue 2 years ago • 1 comments

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

kfl avatar Sep 11 '22 12:09 kfl