<static> setSmoothingEnabled(context, value) → {CanvasRenderingContext2D}
Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.
By default browsers have image smoothing enabled, which isn't always what you visually want, especially
when using pixel art in a game. Note that this sets the property on the context itself, so that any image
drawn to the context will be affected. This sets the property across all current browsers but support is
patchy on earlier browsers, especially on mobile.
Parameters
Name | Type | Description |
---|---|---|
context | CanvasRenderingContext2D | The context to enable or disable the image smoothing on. |
value | boolean | If set to true it will enable image smoothing, false will disable it. |
Returns
CanvasRenderingContext2D -
Returns the source context.
- Source code: utils/Canvas.js (Line 192)
Please login to continue.