This commit is contained in:
Michael Bebenita 2015-01-21 15:56:55 -08:00
Родитель 5243359a41
Коммит ecad93056f
1 изменённых файлов: 44 добавлений и 14 удалений

Просмотреть файл

@ -409,7 +409,9 @@ var currentlyFocusedTextEditor;
}
function withAnchor(g, c, anchor, x, y, w, h) {
var pair = withClip(g, c, x, y), x = pair[0], y = pair[1];
var pair = withClip(g, c, x, y);
x = pair[0];
y = pair[1];
if (anchor & RIGHT) {
x -= w;
@ -620,7 +622,10 @@ var currentlyFocusedTextEditor;
var c = withGraphics(graphics);
c.save();
var pair = withClip(graphics, c, x, y), x = pair[0], y = pair[1];
var pair = withClip(graphics, c, x, y);
x = pair[0];
y = pair[1];
c.drawImage(context.canvas, x, y);
c.restore();
@ -633,7 +638,10 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withAnchor(this, c, anchor, x, y, texture.width, texture.height), x = pair[0], y = pair[1];
var pair = withAnchor(this, c, anchor, x, y, texture.width, texture.height);
x = pair[0];
y = pair[1];
c.drawImage(texture, x, y);
c.restore();
@ -663,11 +671,15 @@ var currentlyFocusedTextEditor;
var c = withGraphics(g);
c.save();
var pair = withClip(g, c, x, y), x = pair[0], y = pair[1];
var pair = withClip(g, c, x, y);
x = pair[0];
y = pair[1];
parseEmojiString(str).forEach(function(part) {
if (part.text) {
var pair = withTextAnchor(g, c, anchor, x, y, part.text), textX = pair[0], textY = pair[1];
var pair = withTextAnchor(g, c, anchor, x, y, part.text);
var textX = pair[0];
var textY = pair[1];
if (isOpaque) {
withOpaquePixel(g, c);
@ -713,7 +725,9 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withClip(this, c, x, y), x = pair[0], y = pair[1];
var pair = withClip(this, c, x, y);
x = pair[0];
y = pair[1];
pair = withTextAnchor(this, c, anchor, x, y, chr), x = pair[0], y = pair[1];
@ -728,7 +742,9 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withClip(this, c, x1, y1), x = pair[0], y = pair[1];
var pair = withClip(this, c, x1, y1);
var x = pair[0];
var y = pair[1];
withPixel(this, c);
@ -755,7 +771,9 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withClip(this, c, x, y), x = pair[0], y = pair[1];
var pair = withClip(this, c, x, y);
x = pair[0];
y = pair[1];
withPixel(this, c);
@ -775,7 +793,9 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withClip(this, c, x, y), x = pair[0], y = pair[1];
var pair = withClip(this, c, x, y);
x = pair[0];
y = pair[1];
withPixel(this, c);
@ -797,7 +817,9 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withClip(this, c, x, y), x = pair[0], y = pair[1];
var pair = withClip(this, c, x, y);
x = pair[0];
y = pair[1];
withPixel(this, c);
@ -817,7 +839,9 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withClip(this, c, x, y), x = pair[0], y = pair[1];
var pair = withClip(this, c, x, y);
x = pair[0];
y = pair[1];
withPixel(this, c);
@ -892,7 +916,9 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withAnchor(this, c, anchor, x, y, sw, sh), x = pair[0], y = pair[1];
var pair = withAnchor(this, c, anchor, x, y, sw, sh);
x = pair[0];
y = pair[1];
c.translate(x, y);
@ -917,7 +943,9 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withClip(this, c, x1, y1), x = pair[0], y = pair[1];
var pair = withClip(this, c, x1, y1);
var x = pair[0];
var y = pair[1];
withPixel(this, c);
@ -947,7 +975,9 @@ var currentlyFocusedTextEditor;
var c = withGraphics(this);
c.save();
var pair = withClip(this, c, x, y), x = pair[0], y = pair[1];
var pair = withClip(this, c, x, y);
x = pair[0];
y = pair[1];
c.drawImage(context.canvas, x, y);