Skip to content

Commit

Permalink
html.canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Apr 15, 2012
1 parent 691a86f commit abcffff
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions html.canvas.md
Expand Up @@ -52,21 +52,39 @@
Set fill style to `value`, a CSS color string,
`CanvasGradient`, or `CanvasPattern`.

## clearRect(x, y, w, h)
## .clearRect(x, y, w, h)

Clears all pixels on the canvas in the given
rectangle to transparent black.

## fillRect(x, y, w, h)
## .fillRect(x, y, w, h)

Paints the given rectangle onto the canvas,
using the current fill style.

## strokeRect(x, y, w, h)
## .strokeRect(x, y, w, h)

Paints the box that outlines the given rectangle onto the canvas,
using the current stroke style.

## .measureText(str)

Return a `TextMetrics` object with the metrics of the given `str`
in the _current_ font.

.width
.actualBoundingBoxLeft
.actualBoundingBoxRight
.fontBoundingBoxAscent
.fontBoundingBoxDescent
.actualBoundingBoxAscent
.actualBoundingBoxDescent
.emHeightAscent
.emHeightDescent
.hangingBaseline
.alphabeticBaseline
.ideographicBaseline

## .createLinearGradient(x0, y0, x1, y1)

Return a `CanvasGradient` object painted from `(x0, y0)` to `(x1, y1)`.
Expand Down

0 comments on commit abcffff

Please sign in to comment.