Skip to content

Commit 0120d41

Browse files
authored
feat: imageSmoothingEnabled flag now exposed (#92)
* feat: `imageSmoothingEnabled` flag now exposed * fix: return effect * chore: remove pnpm-lock.yml
1 parent bb640e4 commit 0120d41

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Notable changes to this project are documented in this file. The format is based
77
Breaking changes:
88

99
New features:
10+
- Added `imageSmoothingEnabled` to toggle the image smoothing of a `Context2D`.
1011

1112
Bugfixes:
1213

src/Graphics/Canvas.js

+8
Original file line numberDiff line numberDiff line change
@@ -593,3 +593,11 @@ export function bezierCurveTo(ctx) {
593593
};
594594
};
595595
}
596+
597+
export function imageSmoothingEnabled(ctx) {
598+
return function(value) {
599+
return function () {
600+
ctx.imageSmoothingEnabled = value;
601+
};
602+
};
603+
}

src/Graphics/Canvas.purs

+3
Original file line numberDiff line numberDiff line change
@@ -750,3 +750,6 @@ type BezierCurve =
750750

751751
-- | Draw a cubic Bézier curve.
752752
foreign import bezierCurveTo :: Context2D -> BezierCurve -> Effect Unit
753+
754+
-- | Set the image smoothing enabled flag.
755+
foreign import imageSmoothingEnabled :: Context2D -> Boolean -> Effect Unit

0 commit comments

Comments
 (0)