Skip to content

Commit b3ea5bd

Browse files
committed
SetTransform will now set the imageSmoothingEnabled context value based on the renderer and texture source scale mode.
1 parent 8d5c097 commit b3ea5bd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/renderer/canvas/utils/SetTransform.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera.
1515
* 5. Saves the context state.
1616
* 6. Sets the final matrix values into the context via setTransform.
17+
* 7. If Renderer.antialias, or the frame.source.scaleMode is set, then imageSmoothingEnabled is set.
1718
*
1819
* This function is only meant to be used internally. Most of the Canvas Renderer classes use it.
1920
*
@@ -73,6 +74,8 @@ var SetTransform = function (renderer, ctx, src, camera, parentMatrix)
7374

7475
calcMatrix.setToContext(ctx);
7576

77+
ctx.imageSmoothingEnabled = !(!renderer.antialias || (src.frame && src.frame.source.scaleMode));
78+
7679
return true;
7780
};
7881

0 commit comments

Comments
 (0)