web_sys/features/
gen_SvgTransform.rs1#![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 = "SVGTransform",
10 typescript_type = "SVGTransform"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `SvgTransform` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
18 pub type SvgTransform;
19 #[wasm_bindgen(method, getter, js_class = "SVGTransform", js_name = "type")]
20 #[doc = "Getter for the `type` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform/type)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
25 pub fn type_(this: &SvgTransform) -> u16;
26 #[cfg(feature = "SvgMatrix")]
27 #[wasm_bindgen(method, getter, js_class = "SVGTransform", js_name = "matrix")]
28 #[doc = "Getter for the `matrix` field of this object."]
29 #[doc = ""]
30 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform/matrix)"]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `SvgMatrix`, `SvgTransform`*"]
33 pub fn matrix(this: &SvgTransform) -> SvgMatrix;
34 #[wasm_bindgen(method, getter, js_class = "SVGTransform", js_name = "angle")]
35 #[doc = "Getter for the `angle` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform/angle)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
40 pub fn angle(this: &SvgTransform) -> f32;
41 #[cfg(feature = "SvgMatrix")]
42 #[wasm_bindgen(catch, method, js_class = "SVGTransform", js_name = "setMatrix")]
43 #[doc = "The `setMatrix()` method."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform/setMatrix)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `SvgMatrix`, `SvgTransform`*"]
48 pub fn set_matrix(this: &SvgTransform, matrix: &SvgMatrix) -> Result<(), JsValue>;
49 #[wasm_bindgen(catch, method, js_class = "SVGTransform", js_name = "setRotate")]
50 #[doc = "The `setRotate()` method."]
51 #[doc = ""]
52 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform/setRotate)"]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
55 pub fn set_rotate(this: &SvgTransform, angle: f32, cx: f32, cy: f32) -> Result<(), JsValue>;
56 #[wasm_bindgen(catch, method, js_class = "SVGTransform", js_name = "setScale")]
57 #[doc = "The `setScale()` method."]
58 #[doc = ""]
59 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform/setScale)"]
60 #[doc = ""]
61 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
62 pub fn set_scale(this: &SvgTransform, sx: f32, sy: f32) -> Result<(), JsValue>;
63 #[wasm_bindgen(catch, method, js_class = "SVGTransform", js_name = "setSkewX")]
64 #[doc = "The `setSkewX()` method."]
65 #[doc = ""]
66 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform/setSkewX)"]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
69 pub fn set_skew_x(this: &SvgTransform, angle: f32) -> Result<(), JsValue>;
70 #[wasm_bindgen(catch, method, js_class = "SVGTransform", js_name = "setSkewY")]
71 #[doc = "The `setSkewY()` method."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform/setSkewY)"]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
76 pub fn set_skew_y(this: &SvgTransform, angle: f32) -> Result<(), JsValue>;
77 #[wasm_bindgen(catch, method, js_class = "SVGTransform", js_name = "setTranslate")]
78 #[doc = "The `setTranslate()` method."]
79 #[doc = ""]
80 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGTransform/setTranslate)"]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
83 pub fn set_translate(this: &SvgTransform, tx: f32, ty: f32) -> Result<(), JsValue>;
84}
85impl SvgTransform {
86 #[doc = "The `SVGTransform.SVG_TRANSFORM_UNKNOWN` const."]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
89 pub const SVG_TRANSFORM_UNKNOWN: u16 = 0i64 as u16;
90 #[doc = "The `SVGTransform.SVG_TRANSFORM_MATRIX` const."]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
93 pub const SVG_TRANSFORM_MATRIX: u16 = 1u64 as u16;
94 #[doc = "The `SVGTransform.SVG_TRANSFORM_TRANSLATE` const."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
97 pub const SVG_TRANSFORM_TRANSLATE: u16 = 2u64 as u16;
98 #[doc = "The `SVGTransform.SVG_TRANSFORM_SCALE` const."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
101 pub const SVG_TRANSFORM_SCALE: u16 = 3u64 as u16;
102 #[doc = "The `SVGTransform.SVG_TRANSFORM_ROTATE` const."]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
105 pub const SVG_TRANSFORM_ROTATE: u16 = 4u64 as u16;
106 #[doc = "The `SVGTransform.SVG_TRANSFORM_SKEWX` const."]
107 #[doc = ""]
108 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
109 pub const SVG_TRANSFORM_SKEWX: u16 = 5u64 as u16;
110 #[doc = "The `SVGTransform.SVG_TRANSFORM_SKEWY` const."]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `SvgTransform`*"]
113 pub const SVG_TRANSFORM_SKEWY: u16 = 6u64 as u16;
114}