Skip to content

Commit

Permalink
add roundRect
Browse files Browse the repository at this point in the history
  • Loading branch information
buntec committed Jan 5, 2024
1 parent 29724e9 commit c6b0479
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@ CanvasRenderingContext2D[JC] def quadraticCurveTo(cpx: Double, cpy: Double, x: D
CanvasRenderingContext2D[JC] def rect(x: Double, y: Double, w: Double, h: Double): Unit
CanvasRenderingContext2D[JC] def restore(): Unit
CanvasRenderingContext2D[JC] def rotate(angle: Double): Unit
CanvasRenderingContext2D[JC] def roundRect(x: Double, y: Double, w: Double, h: Double, radii: js.Any): Unit
CanvasRenderingContext2D[JC] def save(): Unit
CanvasRenderingContext2D[JC] def scale(x: Double, y: Double): Unit
CanvasRenderingContext2D[JC] def setLineDash(segments: js.Array[Double]): Unit
Expand Down
1 change: 1 addition & 0 deletions api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@ CanvasRenderingContext2D[JC] def quadraticCurveTo(cpx: Double, cpy: Double, x: D
CanvasRenderingContext2D[JC] def rect(x: Double, y: Double, w: Double, h: Double): Unit
CanvasRenderingContext2D[JC] def restore(): Unit
CanvasRenderingContext2D[JC] def rotate(angle: Double): Unit
CanvasRenderingContext2D[JC] def roundRect(x: Double, y: Double, w: Double, h: Double, radii: js.Any): Unit
CanvasRenderingContext2D[JC] def save(): Unit
CanvasRenderingContext2D[JC] def scale(x: Double, y: Double): Unit
CanvasRenderingContext2D[JC] def setLineDash(segments: js.Array[Double]): Unit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ class CanvasRenderingContext2D extends js.Object {
/** Creates a path for a rectangle at position (x, y) with a size that is determined by width and height. */
def rect(x: Double, y: Double, w: Double, h: Double): Unit = js.native

/** Creates a path for a rounded rectangle with a specified position, width, height, and corner radii. */
def roundRect(x: Double, y: Double, w: Double, h: Double, radii: js.Any): Unit = js.native

/** Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the
* clipping path only. For an example, see Clipping paths in the Canvas tutorial.
*/
Expand Down

0 comments on commit c6b0479

Please sign in to comment.