Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
paf31 committed Dec 17, 2015
1 parent e1da5d9 commit ffffee7
Showing 1 changed file with 7 additions and 37 deletions.
44 changes: 7 additions & 37 deletions docs/Graphics/Canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,11 @@ A 2D graphics context.
#### `ImageData`

``` purescript
data ImageData :: *
type ImageData = { width :: Int, height :: Int, data :: Uint8ClampedArray }
```

An image data object, used to store raster data outside the canvas.

#### `CanvasPixelArray`

``` purescript
data CanvasPixelArray :: *
```

An array of pixel data.

#### `CanvasImageSource`

``` purescript
Expand All @@ -68,9 +60,11 @@ canvasElementToImageSource :: CanvasElement -> CanvasImageSource
#### `withImage`

``` purescript
withImage :: forall eff a. String -> (CanvasImageSource -> Eff eff Unit) -> Eff eff Unit
withImage :: forall eff. String -> (CanvasImageSource -> Eff eff Unit) -> Eff eff Unit
```

Wrapper for asynchronously loading a image file by path and use it in callback, e.g. drawImage

#### `getCanvasElementById`

``` purescript
Expand Down Expand Up @@ -247,7 +241,7 @@ Enumerates the different types of alpha composite operations.

##### Instances
``` purescript
instance showComposite :: Show Composite
Show Composite
```

#### `setGlobalCompositeOperation`
Expand Down Expand Up @@ -496,7 +490,7 @@ Enumerates types of text alignment.

##### Instances
``` purescript
instance showTextAlign :: Show TextAlign
Show TextAlign
```

#### `textAlign`
Expand Down Expand Up @@ -619,7 +613,7 @@ Set image data for a portion of the canvas.
putImageData :: forall eff. Context2D -> ImageData -> Number -> Number -> Eff (canvas :: Canvas | eff) Context2D
```

Get image data for a portion of the canvas.
Set image data for a portion of the canvas.

#### `createImageData`

Expand All @@ -637,30 +631,6 @@ createImageDataCopy :: forall eff. Context2D -> ImageData -> Eff (canvas :: Canv

Create a copy of an image data object.

#### `getImageDataWidth`

``` purescript
getImageDataWidth :: forall eff. ImageData -> Eff (canvas :: Canvas | eff) Number
```

Get the width of an image data object in pixels.

#### `getImageDataHeight`

``` purescript
getImageDataHeight :: forall eff. ImageData -> Eff (canvas :: Canvas | eff) Number
```

Get the height of an image data object in pixels.

#### `getImageDataPixelArray`

``` purescript
getImageDataPixelArray :: forall eff. ImageData -> Eff (canvas :: Canvas | eff) CanvasPixelArray
```

Get the pixel data array from an image data object.

#### `drawImage`

``` purescript
Expand Down

0 comments on commit ffffee7

Please sign in to comment.