Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

html.canvas

  • Loading branch information...
commit abcffff118cda64367091ef2cfa697e5513cf9c8 1 parent 691a86f
TJ Holowaychuk authored

Showing 1 changed file with 21 additions and 3 deletions. Show diff stats Hide diff stats

  1. 24  html.canvas.md
24  html.canvas.md
Source Rendered
@@ -52,21 +52,39 @@
52 52
   Set fill style to `value`, a CSS color string,
53 53
   `CanvasGradient`, or `CanvasPattern`.
54 54
 
55  
-## clearRect(x, y, w, h)
  55
+## .clearRect(x, y, w, h)
56 56
 
57 57
   Clears all pixels on the canvas in the given
58 58
   rectangle to transparent black.
59 59
 
60  
-## fillRect(x, y, w, h)
  60
+## .fillRect(x, y, w, h)
61 61
 
62 62
   Paints the given rectangle onto the canvas,
63 63
   using the current fill style.
64 64
 
65  
-## strokeRect(x, y, w, h)
  65
+## .strokeRect(x, y, w, h)
66 66
 
67 67
   Paints the box that outlines the given rectangle onto the canvas,
68 68
   using the current stroke style.
69 69
 
  70
+## .measureText(str)
  71
+
  72
+  Return a `TextMetrics` object with the metrics of the given `str`
  73
+  in the _current_ font.
  74
+
  75
+     .width
  76
+     .actualBoundingBoxLeft
  77
+     .actualBoundingBoxRight
  78
+     .fontBoundingBoxAscent
  79
+     .fontBoundingBoxDescent
  80
+     .actualBoundingBoxAscent
  81
+     .actualBoundingBoxDescent
  82
+     .emHeightAscent
  83
+     .emHeightDescent
  84
+     .hangingBaseline
  85
+     .alphabeticBaseline
  86
+     .ideographicBaseline
  87
+
70 88
 ## .createLinearGradient(x0, y0, x1, y1)
71 89
 
72 90
   Return a `CanvasGradient` object painted from `(x0, y0)` to `(x1, y1)`.

0 notes on commit abcffff

Please sign in to comment.
Something went wrong with that request. Please try again.