зеркало из https://github.com/mozilla/pluotsorbet.git
Fix withPixel to save and restore the context
This commit is contained in:
Родитель
6a289286f3
Коммит
d029c03a48
2
midp.js
2
midp.js
|
@ -967,9 +967,11 @@ MIDP.withTextAnchor = function(g, anchor, x, y, str, cb) {
|
||||||
MIDP.withPixel = function(g, cb) {
|
MIDP.withPixel = function(g, cb) {
|
||||||
var pixel = g.class.getField("pixel", "I").get(g);
|
var pixel = g.class.getField("pixel", "I").get(g);
|
||||||
var style = "#" + ("00000" + pixel.toString(16)).slice(-6);
|
var style = "#" + ("00000" + pixel.toString(16)).slice(-6);
|
||||||
|
MIDP.Context2D.save();
|
||||||
MIDP.Context2D.fillStyle = style;
|
MIDP.Context2D.fillStyle = style;
|
||||||
MIDP.Context2D.strokeStyle = style;
|
MIDP.Context2D.strokeStyle = style;
|
||||||
cb();
|
cb();
|
||||||
|
MIDP.Context2D.restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
Native["javax/microedition/lcdui/Graphics.render.(Ljavax/microedition/lcdui/Image;III)Z"] = function(ctx, stack) {
|
Native["javax/microedition/lcdui/Graphics.render.(Ljavax/microedition/lcdui/Image;III)Z"] = function(ctx, stack) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче