web_sys/features/
gen_TextMetrics.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = TextMetrics , typescript_type = "TextMetrics")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `TextMetrics` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
14 pub type TextMetrics;
15 # [wasm_bindgen (structural , method , getter , js_class = "TextMetrics" , js_name = width)]
16 #[doc = "Getter for the `width` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/width)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
21 pub fn width(this: &TextMetrics) -> f64;
22 # [wasm_bindgen (structural , method , getter , js_class = "TextMetrics" , js_name = actualBoundingBoxLeft)]
23 #[doc = "Getter for the `actualBoundingBoxLeft` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxLeft)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
28 pub fn actual_bounding_box_left(this: &TextMetrics) -> f64;
29 # [wasm_bindgen (structural , method , getter , js_class = "TextMetrics" , js_name = actualBoundingBoxRight)]
30 #[doc = "Getter for the `actualBoundingBoxRight` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxRight)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
35 pub fn actual_bounding_box_right(this: &TextMetrics) -> f64;
36 # [wasm_bindgen (structural , method , getter , js_class = "TextMetrics" , js_name = fontBoundingBoxAscent)]
37 #[doc = "Getter for the `fontBoundingBoxAscent` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/fontBoundingBoxAscent)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
42 pub fn font_bounding_box_ascent(this: &TextMetrics) -> f64;
43 # [wasm_bindgen (structural , method , getter , js_class = "TextMetrics" , js_name = fontBoundingBoxDescent)]
44 #[doc = "Getter for the `fontBoundingBoxDescent` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/fontBoundingBoxDescent)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
49 pub fn font_bounding_box_descent(this: &TextMetrics) -> f64;
50 # [wasm_bindgen (structural , method , getter , js_class = "TextMetrics" , js_name = actualBoundingBoxAscent)]
51 #[doc = "Getter for the `actualBoundingBoxAscent` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxAscent)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
56 pub fn actual_bounding_box_ascent(this: &TextMetrics) -> f64;
57 # [wasm_bindgen (structural , method , getter , js_class = "TextMetrics" , js_name = actualBoundingBoxDescent)]
58 #[doc = "Getter for the `actualBoundingBoxDescent` field of this object."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics/actualBoundingBoxDescent)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `TextMetrics`*"]
63 pub fn actual_bounding_box_descent(this: &TextMetrics) -> f64;
64}