How To Force Imagesmoothingenabled To Be False
I am using several layered canvas plus fabric.js canvas like so:
It looks like FabricJS forces imageSmoothingEnabled to be true during the initial creation of the canvas class--even if you set imageSmoothingEnabled
to false in the options. The FabricJS API method to reset imageSmoothingEnabled
is private, so you can't use the API to set it to false.
So you will need to wait until FabricJS creates the canvas element and then manually reset its context.imageSmoothingEnabled to false using the multiple cross-browser attribute variations:
ctx.imageSmoothingEnabled = false;ctx.webkitImageSmoothingEnabled = false;ctx.mozImageSmoothingEnabled = false;ctx.msImageSmoothingEnabled = false;ctx.oImageSmoothingEnabled = false;
Post a Comment for "How To Force Imagesmoothingenabled To Be False"