web_sys/features/
gen_SvgTransform.rs

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