Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

html.canvas

  • Loading branch information...
commit abcffff118cda64367091ef2cfa697e5513cf9c8 1 parent 691a86f
@tj authored
Showing with 21 additions and 3 deletions.
  1. +21 −3 html.canvas.md
View
24 html.canvas.md
@@ -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)`.
Please sign in to comment.
Something went wrong with that request. Please try again.