maxcountryman_web_sys/features/
gen_Path2d.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = Path2D , typescript_type = "Path2D")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `Path2d` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
13 pub type Path2d;
14 #[wasm_bindgen(catch, constructor, js_class = "Path2D")]
15 #[doc = "The `new Path2d(..)` constructor, creating a new instance of `Path2d`."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
20 pub fn new() -> Result<Path2d, JsValue>;
21 #[wasm_bindgen(catch, constructor, js_class = "Path2D")]
22 #[doc = "The `new Path2d(..)` constructor, creating a new instance of `Path2d`."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
27 pub fn new_with_other(other: &Path2d) -> Result<Path2d, JsValue>;
28 #[wasm_bindgen(catch, constructor, js_class = "Path2D")]
29 #[doc = "The `new Path2d(..)` constructor, creating a new instance of `Path2d`."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
34 pub fn new_with_path_string(path_string: &str) -> Result<Path2d, JsValue>;
35 # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = addPath)]
36 #[doc = "The `addPath()` method."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/addPath)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
41 pub fn add_path(this: &Path2d, path: &Path2d);
42 #[cfg(feature = "SvgMatrix")]
43 # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = addPath)]
44 #[doc = "The `addPath()` method."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/addPath)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `Path2d`, `SvgMatrix`*"]
49 pub fn add_path_with_transformation(this: &Path2d, path: &Path2d, transformation: &SvgMatrix);
50 # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = arc)]
51 #[doc = "The `arc()` method."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/arc)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
56 pub fn arc(
57 this: &Path2d,
58 x: f64,
59 y: f64,
60 radius: f64,
61 start_angle: f64,
62 end_angle: f64,
63 ) -> Result<(), JsValue>;
64 # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = arc)]
65 #[doc = "The `arc()` method."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/arc)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
70 pub fn arc_with_anticlockwise(
71 this: &Path2d,
72 x: f64,
73 y: f64,
74 radius: f64,
75 start_angle: f64,
76 end_angle: f64,
77 anticlockwise: bool,
78 ) -> Result<(), JsValue>;
79 # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = arcTo)]
80 #[doc = "The `arcTo()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/arcTo)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
85 pub fn arc_to(
86 this: &Path2d,
87 x1: f64,
88 y1: f64,
89 x2: f64,
90 y2: f64,
91 radius: f64,
92 ) -> Result<(), JsValue>;
93 # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = bezierCurveTo)]
94 #[doc = "The `bezierCurveTo()` method."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/bezierCurveTo)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
99 pub fn bezier_curve_to(
100 this: &Path2d,
101 cp1x: f64,
102 cp1y: f64,
103 cp2x: f64,
104 cp2y: f64,
105 x: f64,
106 y: f64,
107 );
108 # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = closePath)]
109 #[doc = "The `closePath()` method."]
110 #[doc = ""]
111 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/closePath)"]
112 #[doc = ""]
113 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
114 pub fn close_path(this: &Path2d);
115 # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = ellipse)]
116 #[doc = "The `ellipse()` method."]
117 #[doc = ""]
118 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/ellipse)"]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
121 pub fn ellipse(
122 this: &Path2d,
123 x: f64,
124 y: f64,
125 radius_x: f64,
126 radius_y: f64,
127 rotation: f64,
128 start_angle: f64,
129 end_angle: f64,
130 ) -> Result<(), JsValue>;
131 # [wasm_bindgen (catch , method , structural , js_class = "Path2D" , js_name = ellipse)]
132 #[doc = "The `ellipse()` method."]
133 #[doc = ""]
134 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/ellipse)"]
135 #[doc = ""]
136 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
137 pub fn ellipse_with_anticlockwise(
138 this: &Path2d,
139 x: f64,
140 y: f64,
141 radius_x: f64,
142 radius_y: f64,
143 rotation: f64,
144 start_angle: f64,
145 end_angle: f64,
146 anticlockwise: bool,
147 ) -> Result<(), JsValue>;
148 # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = lineTo)]
149 #[doc = "The `lineTo()` method."]
150 #[doc = ""]
151 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/lineTo)"]
152 #[doc = ""]
153 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
154 pub fn line_to(this: &Path2d, x: f64, y: f64);
155 # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = moveTo)]
156 #[doc = "The `moveTo()` method."]
157 #[doc = ""]
158 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/moveTo)"]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
161 pub fn move_to(this: &Path2d, x: f64, y: f64);
162 # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = quadraticCurveTo)]
163 #[doc = "The `quadraticCurveTo()` method."]
164 #[doc = ""]
165 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/quadraticCurveTo)"]
166 #[doc = ""]
167 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
168 pub fn quadratic_curve_to(this: &Path2d, cpx: f64, cpy: f64, x: f64, y: f64);
169 # [wasm_bindgen (method , structural , js_class = "Path2D" , js_name = rect)]
170 #[doc = "The `rect()` method."]
171 #[doc = ""]
172 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Path2D/rect)"]
173 #[doc = ""]
174 #[doc = "*This API requires the following crate features to be activated: `Path2d`*"]
175 pub fn rect(this: &Path2d, x: f64, y: f64, w: f64, h: f64);
176}