web_sys/features/
gen_SvgTextContentElement.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = SvgGraphicsElement , extends = SvgElement , extends = Element , extends = Node , extends = EventTarget , extends = :: js_sys :: Object , js_name = SVGTextContentElement , typescript_type = "SVGTextContentElement")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `SvgTextContentElement` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
14 pub type SvgTextContentElement;
15 #[cfg(feature = "SvgAnimatedLength")]
16 # [wasm_bindgen (structural , method , getter , js_class = "SVGTextContentElement" , js_name = textLength)]
17 #[doc = "Getter for the `textLength` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/textLength)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `SvgAnimatedLength`, `SvgTextContentElement`*"]
22 pub fn text_length(this: &SvgTextContentElement) -> SvgAnimatedLength;
23 #[cfg(feature = "SvgAnimatedEnumeration")]
24 # [wasm_bindgen (structural , method , getter , js_class = "SVGTextContentElement" , js_name = lengthAdjust)]
25 #[doc = "Getter for the `lengthAdjust` field of this object."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/lengthAdjust)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `SvgAnimatedEnumeration`, `SvgTextContentElement`*"]
30 pub fn length_adjust(this: &SvgTextContentElement) -> SvgAnimatedEnumeration;
31 #[cfg(feature = "SvgPoint")]
32 # [wasm_bindgen (method , structural , js_class = "SVGTextContentElement" , js_name = getCharNumAtPosition)]
33 #[doc = "The `getCharNumAtPosition()` method."]
34 #[doc = ""]
35 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getCharNumAtPosition)"]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `SvgPoint`, `SvgTextContentElement`*"]
38 pub fn get_char_num_at_position(this: &SvgTextContentElement, point: &SvgPoint) -> i32;
39 # [wasm_bindgen (method , structural , js_class = "SVGTextContentElement" , js_name = getComputedTextLength)]
40 #[doc = "The `getComputedTextLength()` method."]
41 #[doc = ""]
42 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getComputedTextLength)"]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
45 pub fn get_computed_text_length(this: &SvgTextContentElement) -> f32;
46 #[cfg(feature = "SvgPoint")]
47 # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getEndPositionOfChar)]
48 #[doc = "The `getEndPositionOfChar()` method."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getEndPositionOfChar)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `SvgPoint`, `SvgTextContentElement`*"]
53 pub fn get_end_position_of_char(
54 this: &SvgTextContentElement,
55 charnum: u32,
56 ) -> Result<SvgPoint, JsValue>;
57 #[cfg(feature = "SvgRect")]
58 # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getExtentOfChar)]
59 #[doc = "The `getExtentOfChar()` method."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getExtentOfChar)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `SvgRect`, `SvgTextContentElement`*"]
64 pub fn get_extent_of_char(
65 this: &SvgTextContentElement,
66 charnum: u32,
67 ) -> Result<SvgRect, JsValue>;
68 # [wasm_bindgen (method , structural , js_class = "SVGTextContentElement" , js_name = getNumberOfChars)]
69 #[doc = "The `getNumberOfChars()` method."]
70 #[doc = ""]
71 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getNumberOfChars)"]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
74 pub fn get_number_of_chars(this: &SvgTextContentElement) -> i32;
75 # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getRotationOfChar)]
76 #[doc = "The `getRotationOfChar()` method."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getRotationOfChar)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
81 pub fn get_rotation_of_char(this: &SvgTextContentElement, charnum: u32)
82 -> Result<f32, JsValue>;
83 #[cfg(feature = "SvgPoint")]
84 # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getStartPositionOfChar)]
85 #[doc = "The `getStartPositionOfChar()` method."]
86 #[doc = ""]
87 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getStartPositionOfChar)"]
88 #[doc = ""]
89 #[doc = "*This API requires the following crate features to be activated: `SvgPoint`, `SvgTextContentElement`*"]
90 pub fn get_start_position_of_char(
91 this: &SvgTextContentElement,
92 charnum: u32,
93 ) -> Result<SvgPoint, JsValue>;
94 # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = getSubStringLength)]
95 #[doc = "The `getSubStringLength()` method."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/getSubStringLength)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
100 pub fn get_sub_string_length(
101 this: &SvgTextContentElement,
102 charnum: u32,
103 nchars: u32,
104 ) -> Result<f32, JsValue>;
105 # [wasm_bindgen (catch , method , structural , js_class = "SVGTextContentElement" , js_name = selectSubString)]
106 #[doc = "The `selectSubString()` method."]
107 #[doc = ""]
108 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement/selectSubString)"]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
111 pub fn select_sub_string(
112 this: &SvgTextContentElement,
113 charnum: u32,
114 nchars: u32,
115 ) -> Result<(), JsValue>;
116}
117impl SvgTextContentElement {
118 #[doc = "The `SVGTextContentElement.LENGTHADJUST_UNKNOWN` const."]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
121 pub const LENGTHADJUST_UNKNOWN: u16 = 0i64 as u16;
122 #[doc = "The `SVGTextContentElement.LENGTHADJUST_SPACING` const."]
123 #[doc = ""]
124 #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
125 pub const LENGTHADJUST_SPACING: u16 = 1u64 as u16;
126 #[doc = "The `SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS` const."]
127 #[doc = ""]
128 #[doc = "*This API requires the following crate features to be activated: `SvgTextContentElement`*"]
129 pub const LENGTHADJUST_SPACINGANDGLYPHS: u16 = 2u64 as u16;
130}