kopia lustrzana https://github.com/backface/turtlestitch
fixed #1329 - color collision detection for retina mode
rodzic
601720a463
commit
36f6a86c8b
19
objects.js
19
objects.js
|
@ -82,7 +82,7 @@ SpeechBubbleMorph, RingMorph, isNil, FileReader, TableDialogMorph,
|
|||
BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
|
||||
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph*/
|
||||
|
||||
modules.objects = '2016-July-14';
|
||||
modules.objects = '2016-July-19';
|
||||
|
||||
var SpriteMorph;
|
||||
var StageMorph;
|
||||
|
@ -1592,7 +1592,12 @@ SpriteMorph.prototype.colorFiltered = function (aColor) {
|
|||
i,
|
||||
dta;
|
||||
|
||||
src = this.image.getContext('2d').getImageData(0, 0, ext.x, ext.y);
|
||||
src = normalizeCanvas(this.image, true).getContext('2d').getImageData(
|
||||
0,
|
||||
0,
|
||||
ext.x,
|
||||
ext.y
|
||||
);
|
||||
morph.image = newCanvas(ext, true);
|
||||
morph.bounds = this.bounds.copy();
|
||||
ctx = morph.image.getContext('2d');
|
||||
|
@ -3611,6 +3616,9 @@ SpriteMorph.prototype.drawLine = function (start, dest) {
|
|||
};
|
||||
|
||||
SpriteMorph.prototype.floodFill = function () {
|
||||
if (!this.parent.bounds.containsPoint(this.rotationCenter())) {
|
||||
return;
|
||||
}
|
||||
var layer = normalizeCanvas(this.parent.penTrails()),
|
||||
width = layer.width,
|
||||
height = layer.height,
|
||||
|
@ -5309,7 +5317,12 @@ StageMorph.prototype.colorFiltered = function (aColor, excludedSprite) {
|
|||
i,
|
||||
dta;
|
||||
|
||||
src = img.getContext('2d').getImageData(0, 0, ext.x, ext.y);
|
||||
src = normalizeCanvas(img, true).getContext('2d').getImageData(
|
||||
0,
|
||||
0,
|
||||
ext.x,
|
||||
ext.y
|
||||
);
|
||||
morph.bounds = this.bounds.copy();
|
||||
morph.image = newCanvas(ext, true);
|
||||
ctx = morph.image.getContext('2d');
|
||||
|
|
Ładowanie…
Reference in New Issue