We need to take pixel ratio into account when directly blitting blend-modes onto canvas.

This commit is contained in:
Jürg Lehni 2013-11-06 13:11:54 +01:00
parent 4dcb0d66a9
commit 5439f6ba45
4 changed files with 30 additions and 18 deletions
src/project

View file

@ -380,7 +380,7 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
* @type Symbol[]
*/
draw: function(ctx, matrix) {
draw: function(ctx, matrix, ratio) {
// Increase the drawCount before the draw-loop. After that, items that
// are visible will have their drawCount set to the new value.
this._drawCount++;
@ -390,6 +390,7 @@ var Project = PaperScopeItem.extend(/** @lends Project# */{
// values
var param = Base.merge({
offset: new Point(0, 0),
ratio: ratio,
// A stack of concatenated matrices, to keep track of the current
// global matrix, since Canvas is not able tell us (yet).
transforms: [matrix],