Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Notable changes to this project are documented in this file. The format is based

Breaking changes:
- Migrate FFI to ES modules (#85 by @JordanMartinez)
- Support arcs that are drawn counter-clockwise (#58, #83 by @karljs and @JordanMartinez)

New features:
- Added `createImageDataWith` (#81)
Expand Down
2 changes: 1 addition & 1 deletion src/Graphics/Canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export function closePath(ctx) {
export function arc(ctx) {
return function(a) {
return function() {
ctx.arc(a.x, a.y, a.radius, a.start, a.end);
ctx.arc(a.x, a.y, a.radius, a.start, a.end, a.useCounterClockwise);
};
};
}
Expand Down
3 changes: 3 additions & 0 deletions src/Graphics/Canvas.purs
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,15 @@ fillPath ctx path = do
-- | - The center coordinates `x` and `y`,
-- | - The radius `r`,
-- | - The starting and ending angles, `start` and `end`.
-- | - Whether to draw the arc counter-clockwise (true) or clockwise (false) direction.
-- | Normally, this value is `false`.
type Arc =
{ x :: Number
, y :: Number
, radius :: Number
, start :: Number
, end :: Number
, useCounterClockwise :: Boolean
}

-- | Render an arc object.
Expand Down