fixed pixel color sensing for stage pen trails

pull/89/head
jmoenig 2019-01-04 13:21:13 +01:00
rodzic ccbda1a4f9
commit 8e7a9a4bef
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -5,6 +5,7 @@
### 2019-01-04
* Objects, Blocks, Threads: new feature/block: sense colors and sprites anywhere
* updated German translation
* Objects: fixed pixel color sensing for stage pen trails
### 2019-01-02
* Objects, Blocks, Threads, GUI, Store: added third color dimension and transparency to pen

Wyświetl plik

@ -6566,7 +6566,7 @@ StageMorph.prototype.getPixelColor = function (aPoint) {
var point, context, data;
if (this.trailsCanvas) {
point = aPoint.subtract(this.bounds.origin);
context = this.trailsCanvas.getContext('2d');
context = this.penTrailsMorph().image.getContext('2d');
data = context.getImageData(point.x, point.y, 1, 1);
if (data.data[3] === 0) {
return StageMorph.uber.getPixelColor.call(this, aPoint);