@@ -20,4 +20,62 @@ class TextMetrics extends js.Object {
20
20
* current font of the context.
21
21
*/
22
22
var width : Double = js.native
23
+
24
+ /** Distance parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign
25
+ * property to the left side of the bounding rectangle of the given text, in CSS pixels; positive numbers indicating
26
+ * a distance going left from the given alignment point.
27
+ */
28
+ val actualBoundingBoxLeft : Double = js.native
29
+
30
+ /** Returns the distance from the alignment point given by the CanvasRenderingContext2D.textAlign property to the
31
+ * right side of the bounding rectangle of the given text, in CSS pixels. The distance is measured parallel to the
32
+ * baseline.
33
+ */
34
+ val actualBoundingBoxRight : Double = js.native
35
+
36
+ /** Returns the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline attribute to
37
+ * the top of the highest bounding rectangle of all the fonts used to render the text, in CSS pixels.
38
+ */
39
+ val fontBoundingBoxAscent : Double = js.native
40
+
41
+ /** Returns the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline attribute to
42
+ * the bottom of the bounding rectangle of all the fonts used to render the text, in CSS pixels.
43
+ */
44
+ val fontBoundingBoxDescent : Double = js.native
45
+
46
+ /** Returns the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline attribute to
47
+ * the top of the bounding rectangle used to render the text, in CSS pixels.
48
+ */
49
+ val actualBoundingBoxAscent : Double = js.native
50
+
51
+ /** Returns the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline attribute to
52
+ * the bottom of the bounding rectangle used to render the text, in CSS pixels.
53
+ */
54
+ val actualBoundingBoxDescent : Double = js.native
55
+
56
+ /** Returns the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline property to
57
+ * the top of the em square in the line box, in CSS pixels.
58
+ */
59
+ val emHeightAscent : Double = js.native
60
+
61
+ /** Returns the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline property to
62
+ * the bottom of the em square in the line box, in CSS pixels.
63
+ */
64
+ val emHeightDescent : Double = js.native
65
+
66
+ /** Returns the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline property to
67
+ * the hanging baseline of the line box, in CSS pixels.
68
+ */
69
+ val hangingBaseline : Double = js.native
70
+
71
+ /** Returns the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline property to
72
+ * the alphabetic baseline of the line box, in CSS pixels.
73
+ */
74
+ val alphabeticBaseline : Double = js.native
75
+
76
+ /** Returns the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline property to
77
+ * the ideographic baseline of the line box, in CSS pixels.
78
+ */
79
+ val ideographicBaseline : Double = js.native
80
+
23
81
}
0 commit comments