@@ -30,19 +30,11 @@ A 2D graphics context.
30
30
#### ` ImageData `
31
31
32
32
``` purescript
33
- data ImageData :: *
33
+ type ImageData = { width :: Int, height :: Int, data :: Uint8ClampedArray }
34
34
```
35
35
36
36
An image data object, used to store raster data outside the canvas.
37
37
38
- #### ` CanvasPixelArray `
39
-
40
- ``` purescript
41
- data CanvasPixelArray :: *
42
- ```
43
-
44
- An array of pixel data.
45
-
46
38
#### ` CanvasImageSource `
47
39
48
40
``` purescript
@@ -68,9 +60,11 @@ canvasElementToImageSource :: CanvasElement -> CanvasImageSource
68
60
#### ` withImage `
69
61
70
62
``` 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
72
64
```
73
65
66
+ Wrapper for asynchronously loading a image file by path and use it in callback, e.g. drawImage
67
+
74
68
#### ` getCanvasElementById `
75
69
76
70
``` purescript
@@ -247,7 +241,7 @@ Enumerates the different types of alpha composite operations.
247
241
248
242
##### Instances
249
243
``` purescript
250
- instance showComposite :: Show Composite
244
+ Show Composite
251
245
```
252
246
253
247
#### ` setGlobalCompositeOperation `
@@ -496,7 +490,7 @@ Enumerates types of text alignment.
496
490
497
491
##### Instances
498
492
``` purescript
499
- instance showTextAlign :: Show TextAlign
493
+ Show TextAlign
500
494
```
501
495
502
496
#### ` textAlign `
@@ -619,7 +613,7 @@ Set image data for a portion of the canvas.
619
613
putImageData :: forall eff. Context2D -> ImageData -> Number -> Number -> Eff (canvas :: Canvas | eff) Context2D
620
614
```
621
615
622
- Get image data for a portion of the canvas.
616
+ Set image data for a portion of the canvas.
623
617
624
618
#### ` createImageData `
625
619
@@ -637,30 +631,6 @@ createImageDataCopy :: forall eff. Context2D -> ImageData -> Eff (canvas :: Canv
637
631
638
632
Create a copy of an image data object.
639
633
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
-
664
634
#### ` drawImage `
665
635
666
636
``` purescript
0 commit comments