@@ -86,25 +86,28 @@ class CanvasRenderingContext2D extends js.Object {
8686 */
8787 def save (): Unit = js.native
8888
89- /** Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at
90- * endAngle going in the given direction by anticlockwise (defaulting to clockwise).
89+ /** The arc() method creates a circular arc centered at (x, y) with a radius of radius. The path starts at startAngle,
90+ * ends at endAngle, and travels in the direction given by counterclockwise (defaulting to clockwise).
9191 */
9292 def arc (x : Double , y : Double , radius : Double , startAngle : Double , endAngle : Double ,
93- anticlockwise : Boolean ): Unit = js.native
93+ counterclockwise : Boolean ): Unit = js.native
9494
95- /** Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at
96- * endAngle going in the given direction by anticlockwise (defaulting to clockwise).
95+ /** The arc() method creates a circular arc centered at (x, y) with a radius of radius. The path starts at startAngle,
96+ * ends at endAngle, and travels in the direction given by counterclockwise (defaulting to clockwise).
9797 */
9898 def arc (x : Double , y : Double , radius : Double , startAngle : Double , endAngle : Double ): Unit = js.native
9999
100100 /** Returns a TextMetrics object. */
101101 def measureText (text : String ): TextMetrics = js.native
102102
103103 /** Reports whether or not the specified point is contained in the current path. */
104- def isPointInPath (x : Double , y : Double , fillRule : String ): Boolean = js.native
104+ def isPointInPath (x : Double , y : Double , fillRule : CanvasFillRule = js.native ): Boolean = js.native
105105
106106 /** Reports whether or not the specified point is contained in the current path. */
107- def isPointInPath (x : Double , y : Double ): Boolean = js.native
107+ def isPointInPath (path : Path2D , x : Double , y : Double ): Boolean = js.native
108+
109+ /** Reports whether or not the specified point is contained in the current path. */
110+ def isPointInPath (path : Path2D , x : Double , y : Double , fillRule : CanvasFillRule ): Boolean = js.native
108111
109112 /** Adds a quadratic Bézier curve to the current path. */
110113 def quadraticCurveTo (cpx : Double , cpy : Double , x : Double , y : Double ): Unit = js.native
@@ -140,13 +143,13 @@ class CanvasRenderingContext2D extends js.Object {
140143 def getLineDash (): js.Array [Double ] = js.native
141144
142145 /** Fills the subpaths with the current fill style. */
143- def fill (): Unit = js.native
146+ def fill (fillRule : CanvasFillRule = js.native ): Unit = js.native
144147
148+ /** Fills the subpaths with the current fill style. */
145149 def fill (path : Path2D ): Unit = js.native
146150
147- def fill (fillRule : String ): Unit = js.native
148-
149- def fill (path : Path2D , fillRule : String ): Unit = js.native
151+ /** Fills the subpaths with the current fill style. */
152+ def fill (path : Path2D , fillRule : CanvasFillRule ): Unit = js.native
150153
151154 /** Creates a new, blank ImageData object with the specified dimensions. All of the pixels in the new object are
152155 * transparent black.
@@ -169,7 +172,17 @@ class CanvasRenderingContext2D extends js.Object {
169172 /** Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the
170173 * clipping path only. For an example, see Clipping paths in the Canvas tutorial.
171174 */
172- def clip (fillRule : String = js.native): Unit = js.native
175+ def clip (fillRule : CanvasFillRule = js.native): Unit = js.native
176+
177+ /** Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the
178+ * clipping path only. For an example, see Clipping paths in the Canvas tutorial.
179+ */
180+ def clip (path : Path2D ): Unit = js.native
181+
182+ /** Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the
183+ * clipping path only. For an example, see Clipping paths in the Canvas tutorial.
184+ */
185+ def clip (path : Path2D , fillRule : CanvasFillRule ): Unit = js.native
173186
174187 /** Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black.
175188 */
@@ -225,9 +238,9 @@ class CanvasRenderingContext2D extends js.Object {
225238 def createLinearGradient (x0 : Double , y0 : Double , x1 : Double , y1 : Double ): CanvasGradient = js.native
226239
227240 /** The ellipse() method creates an elliptical arc centered at (x, y) with the radii radiusX and radiusY. The path
228- * starts at startAngle and ends at endAngle, and travels in the direction given by anticlockwise (defaulting to
241+ * starts at startAngle and ends at endAngle, and travels in the direction given by counterclockwise (defaulting to
229242 * clockwise).
230243 */
231244 def ellipse (x : Double , y : Double , radiusX : Double , radiusY : Double , rotation : Double , startAngle : Double ,
232- endAngle : Double , anticlockwise : Boolean = js.native): Unit = js.native
245+ endAngle : Double , counterclockwise : Boolean = js.native): Unit = js.native
233246}
0 commit comments