Skip to main content

web_sys/features/
gen_TextMetrics.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "TextMetrics",
10        typescript_type = "TextMetrics"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `TextMetrics` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
18    pub type TextMetrics;
19    #[wasm_bindgen(method, getter, js_class = "TextMetrics", js_name = "width")]
20    #[doc = "Getter for the `width` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/width)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
25    pub fn width(this: &TextMetrics) -> f64;
26    #[wasm_bindgen(
27        method,
28        getter,
29        js_class = "TextMetrics",
30        js_name = "actualBoundingBoxLeft"
31    )]
32    #[doc = "Getter for the `actualBoundingBoxLeft` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxLeft)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
37    pub fn actual_bounding_box_left(this: &TextMetrics) -> f64;
38    #[wasm_bindgen(
39        method,
40        getter,
41        js_class = "TextMetrics",
42        js_name = "actualBoundingBoxRight"
43    )]
44    #[doc = "Getter for the `actualBoundingBoxRight` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxRight)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
49    pub fn actual_bounding_box_right(this: &TextMetrics) -> f64;
50    #[wasm_bindgen(
51        method,
52        getter,
53        js_class = "TextMetrics",
54        js_name = "fontBoundingBoxAscent"
55    )]
56    #[doc = "Getter for the `fontBoundingBoxAscent` field of this object."]
57    #[doc = ""]
58    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/fontBoundingBoxAscent)"]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
61    pub fn font_bounding_box_ascent(this: &TextMetrics) -> f64;
62    #[wasm_bindgen(
63        method,
64        getter,
65        js_class = "TextMetrics",
66        js_name = "fontBoundingBoxDescent"
67    )]
68    #[doc = "Getter for the `fontBoundingBoxDescent` field of this object."]
69    #[doc = ""]
70    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/fontBoundingBoxDescent)"]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
73    pub fn font_bounding_box_descent(this: &TextMetrics) -> f64;
74    #[wasm_bindgen(
75        method,
76        getter,
77        js_class = "TextMetrics",
78        js_name = "actualBoundingBoxAscent"
79    )]
80    #[doc = "Getter for the `actualBoundingBoxAscent` field of this object."]
81    #[doc = ""]
82    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxAscent)"]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
85    pub fn actual_bounding_box_ascent(this: &TextMetrics) -> f64;
86    #[wasm_bindgen(
87        method,
88        getter,
89        js_class = "TextMetrics",
90        js_name = "actualBoundingBoxDescent"
91    )]
92    #[doc = "Getter for the `actualBoundingBoxDescent` field of this object."]
93    #[doc = ""]
94    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxDescent)"]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
97    pub fn actual_bounding_box_descent(this: &TextMetrics) -> f64;
98}