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