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

CanvasData type

Open Chadtech opened this issue 7 years ago • 1 comments

Its really performant to turn canvas data into a 2D JavaScript array of rows and columns of pixels. Its unfortunately less performant to turn a 2D JavaScript array into an Elm list or a JavaScript list.

Perhaps there could be type CanvasData. and functions like `transform : Position -> (Color -> Color)


transformPixel : Position -> (Color -> Color) -> CanvasData

fromData : CanvasData -> Size -> Canvas

type alias Color = (Int, Int, Int, Int)

Chadtech avatar Sep 30 '17 16:09 Chadtech

I would also like this

bcb avatar Oct 07 '20 03:10 bcb