@@ -30,19 +30,11 @@ A 2D graphics context.
3030#### ` ImageData `
3131
3232``` purescript
33- data ImageData :: *
33+ type ImageData = { width :: Int, height :: Int, data :: Uint8ClampedArray }
3434```
3535
3636An image data object, used to store raster data outside the canvas.
3737
38- #### ` CanvasPixelArray `
39-
40- ``` purescript
41- data CanvasPixelArray :: *
42- ```
43-
44- An array of pixel data.
45-
4638#### ` CanvasImageSource `
4739
4840``` purescript
@@ -68,9 +60,11 @@ canvasElementToImageSource :: CanvasElement -> CanvasImageSource
6860#### ` withImage `
6961
7062``` purescript
71- withImage :: forall eff a . String -> (CanvasImageSource -> Eff eff Unit) -> Eff eff Unit
63+ withImage :: forall eff. String -> (CanvasImageSource -> Eff eff Unit) -> Eff eff Unit
7264```
7365
66+ Wrapper for asynchronously loading a image file by path and use it in callback, e.g. drawImage
67+
7468#### ` getCanvasElementById `
7569
7670``` purescript
@@ -247,7 +241,7 @@ Enumerates the different types of alpha composite operations.
247241
248242##### Instances
249243``` purescript
250- instance showComposite :: Show Composite
244+ Show Composite
251245```
252246
253247#### ` setGlobalCompositeOperation `
@@ -496,7 +490,7 @@ Enumerates types of text alignment.
496490
497491##### Instances
498492``` purescript
499- instance showTextAlign :: Show TextAlign
493+ Show TextAlign
500494```
501495
502496#### ` textAlign `
@@ -619,7 +613,7 @@ Set image data for a portion of the canvas.
619613putImageData :: forall eff. Context2D -> ImageData -> Number -> Number -> Eff (canvas :: Canvas | eff) Context2D
620614```
621615
622- Get image data for a portion of the canvas.
616+ Set image data for a portion of the canvas.
623617
624618#### ` createImageData `
625619
@@ -637,30 +631,6 @@ createImageDataCopy :: forall eff. Context2D -> ImageData -> Eff (canvas :: Canv
637631
638632Create a copy of an image data object.
639633
640- #### ` getImageDataWidth `
641-
642- ``` purescript
643- getImageDataWidth :: forall eff. ImageData -> Eff (canvas :: Canvas | eff) Number
644- ```
645-
646- Get the width of an image data object in pixels.
647-
648- #### ` getImageDataHeight `
649-
650- ``` purescript
651- getImageDataHeight :: forall eff. ImageData -> Eff (canvas :: Canvas | eff) Number
652- ```
653-
654- Get the height of an image data object in pixels.
655-
656- #### ` getImageDataPixelArray `
657-
658- ``` purescript
659- getImageDataPixelArray :: forall eff. ImageData -> Eff (canvas :: Canvas | eff) CanvasPixelArray
660- ```
661-
662- Get the pixel data array from an image data object.
663-
664634#### ` drawImage `
665635
666636``` purescript
0 commit comments