web_sys/features/
gen_Path2d.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 = Path2D , typescript_type = "Path2D")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `Path2d` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
14    pub type Path2d;
15    #[wasm_bindgen(catch, constructor, js_class = "Path2D")]
16    #[doc = "The `new Path2d(..)` constructor, creating a new instance of `Path2d`."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
21    pub fn new() -> Result<Path2d, JsValue>;
22    #[wasm_bindgen(catch, constructor, js_class = "Path2D")]
23    #[doc = "The `new Path2d(..)` constructor, creating a new instance of `Path2d`."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
28    pub fn new_with_other(other: &Path2d) -> Result<Path2d, JsValue>;
29    #[wasm_bindgen(catch, constructor, js_class = "Path2D")]
30    #[doc = "The `new Path2d(..)` constructor, creating a new instance of `Path2d`."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
35    pub fn new_with_path_string(path_string: &str) -> Result<Path2d, JsValue>;
36    # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = addPath)]
37    #[doc = "The `addPath()` method."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/addPath)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
42    pub fn add_path(this: &Path2d, path: &Path2d);
43    #[cfg(feature = "SvgMatrix")]
44    # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = addPath)]
45    #[doc = "The `addPath()` method."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/addPath)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `Path2d`, `SvgMatrix`*"]
50    pub fn add_path_with_transformation(this: &Path2d, path: &Path2d, transformation: &SvgMatrix);
51    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = arc)]
52    #[doc = "The `arc()` method."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/arc)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
57    pub fn arc(
58        this: &Path2d,
59        x: f64,
60        y: f64,
61        radius: f64,
62        start_angle: f64,
63        end_angle: f64,
64    ) -> Result<(), JsValue>;
65    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = arc)]
66    #[doc = "The `arc()` method."]
67    #[doc = ""]
68    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/arc)"]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
71    pub fn arc_with_anticlockwise(
72        this: &Path2d,
73        x: f64,
74        y: f64,
75        radius: f64,
76        start_angle: f64,
77        end_angle: f64,
78        anticlockwise: bool,
79    ) -> Result<(), JsValue>;
80    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = arcTo)]
81    #[doc = "The `arcTo()` method."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/arcTo)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
86    pub fn arc_to(
87        this: &Path2d,
88        x1: f64,
89        y1: f64,
90        x2: f64,
91        y2: f64,
92        radius: f64,
93    ) -> Result<(), JsValue>;
94    # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = bezierCurveTo)]
95    #[doc = "The `bezierCurveTo()` method."]
96    #[doc = ""]
97    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/bezierCurveTo)"]
98    #[doc = ""]
99    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
100    pub fn bezier_curve_to(
101        this: &Path2d,
102        cp1x: f64,
103        cp1y: f64,
104        cp2x: f64,
105        cp2y: f64,
106        x: f64,
107        y: f64,
108    );
109    # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = closePath)]
110    #[doc = "The `closePath()` method."]
111    #[doc = ""]
112    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/closePath)"]
113    #[doc = ""]
114    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
115    pub fn close_path(this: &Path2d);
116    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = ellipse)]
117    #[doc = "The `ellipse()` method."]
118    #[doc = ""]
119    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/ellipse)"]
120    #[doc = ""]
121    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
122    pub fn ellipse(
123        this: &Path2d,
124        x: f64,
125        y: f64,
126        radius_x: f64,
127        radius_y: f64,
128        rotation: f64,
129        start_angle: f64,
130        end_angle: f64,
131    ) -> Result<(), JsValue>;
132    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = ellipse)]
133    #[doc = "The `ellipse()` method."]
134    #[doc = ""]
135    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/ellipse)"]
136    #[doc = ""]
137    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
138    pub fn ellipse_with_anticlockwise(
139        this: &Path2d,
140        x: f64,
141        y: f64,
142        radius_x: f64,
143        radius_y: f64,
144        rotation: f64,
145        start_angle: f64,
146        end_angle: f64,
147        anticlockwise: bool,
148    ) -> Result<(), JsValue>;
149    # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = lineTo)]
150    #[doc = "The `lineTo()` method."]
151    #[doc = ""]
152    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/lineTo)"]
153    #[doc = ""]
154    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
155    pub fn line_to(this: &Path2d, x: f64, y: f64);
156    # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = moveTo)]
157    #[doc = "The `moveTo()` method."]
158    #[doc = ""]
159    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/moveTo)"]
160    #[doc = ""]
161    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
162    pub fn move_to(this: &Path2d, x: f64, y: f64);
163    # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = quadraticCurveTo)]
164    #[doc = "The `quadraticCurveTo()` method."]
165    #[doc = ""]
166    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/quadraticCurveTo)"]
167    #[doc = ""]
168    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
169    pub fn quadratic_curve_to(this: &Path2d, cpx: f64, cpy: f64, x: f64, y: f64);
170    # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = rect)]
171    #[doc = "The `rect()` method."]
172    #[doc = ""]
173    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/rect)"]
174    #[doc = ""]
175    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
176    pub fn rect(this: &Path2d, x: f64, y: f64, w: f64, h: f64);
177    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = roundRect)]
178    #[doc = "The `roundRect()` method."]
179    #[doc = ""]
180    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/roundRect)"]
181    #[doc = ""]
182    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
183    pub fn round_rect(this: &Path2d, x: f64, y: f64, w: f64, h: f64) -> Result<(), JsValue>;
184    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = roundRect)]
185    #[doc = "The `roundRect()` method."]
186    #[doc = ""]
187    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/roundRect)"]
188    #[doc = ""]
189    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
190    pub fn round_rect_with_f64(
191        this: &Path2d,
192        x: f64,
193        y: f64,
194        w: f64,
195        h: f64,
196        radii: f64,
197    ) -> Result<(), JsValue>;
198    #[cfg(feature = "DomPointInit")]
199    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = roundRect)]
200    #[doc = "The `roundRect()` method."]
201    #[doc = ""]
202    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/roundRect)"]
203    #[doc = ""]
204    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `Path2d`*"]
205    pub fn round_rect_with_dom_point_init(
206        this: &Path2d,
207        x: f64,
208        y: f64,
209        w: f64,
210        h: f64,
211        radii: &DomPointInit,
212    ) -> Result<(), JsValue>;
213    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = roundRect)]
214    #[doc = "The `roundRect()` method."]
215    #[doc = ""]
216    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/roundRect)"]
217    #[doc = ""]
218    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
219    pub fn round_rect_with_f64_sequence(
220        this: &Path2d,
221        x: f64,
222        y: f64,
223        w: f64,
224        h: f64,
225        radii: &::wasm_bindgen::JsValue,
226    ) -> Result<(), JsValue>;
227    # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = roundRect)]
228    #[doc = "The `roundRect()` method."]
229    #[doc = ""]
230    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/roundRect)"]
231    #[doc = ""]
232    #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
233    pub fn round_rect_with_dom_point_init_sequence(
234        this: &Path2d,
235        x: f64,
236        y: f64,
237        w: f64,
238        h: f64,
239        radii: &::wasm_bindgen::JsValue,
240    ) -> Result<(), JsValue>;
241}