-
Notifications
You must be signed in to change notification settings - Fork 158
add Path2D and related methods #769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,34 @@ | ||||||||||
| package org.scalajs.dom | ||||||||||
|
|
||||||||||
| import scala.scalajs.js | ||||||||||
| import scala.scalajs.js.annotation.JSGlobal | ||||||||||
|
|
||||||||||
| @js.native | ||||||||||
| @JSGlobal | ||||||||||
| class Path2D extends js.Object { | ||||||||||
|
Comment on lines
+10
to
+12
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||
|
|
||||||||||
| def addPath(path: Path2D): Unit = js.native | ||||||||||
|
|
||||||||||
| def closePath(): Unit = js.native | ||||||||||
|
|
||||||||||
| def moveTo(x: Double, y: Double): Unit = js.native | ||||||||||
|
|
||||||||||
| def lineTo(x: Double, y: Double): Unit = js.native | ||||||||||
|
|
||||||||||
| def bezierCurveTo(cp1x: Double, cp1y: Double, cp2x: Double, cp2y: Double, x: Double, y: Double): Unit = js.native | ||||||||||
|
|
||||||||||
| def quadraticCurveTo(cpx: Double, cpy: Double, x: Double, y: Double): Unit = js.native | ||||||||||
|
|
||||||||||
| def arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double): Unit = js.native | ||||||||||
|
|
||||||||||
| def arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, | ||||||||||
| anticlockwise: Boolean): Unit = js.native | ||||||||||
|
||||||||||
| def arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, | |
| anticlockwise: Boolean): Unit = js.native | |
| def arc(x: Double, y: Double, radius: Double, startAngle: Double, endAngle: Double, | |
| counterclockwise: Boolean): Unit = js.native |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be called counterclockwise in the spec.
| endAngle: Double, anticlockwise: Boolean = js.native): Unit = js.native | |
| endAngle: Double, counterclockwise: Boolean = js.native): Unit = js.native |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like
fillRulecan be either"nonzero"or"evenodd"so we should model like other "enums".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this is neat!