X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fbackend%2FLogicalScreen.java;h=e8d2662943abd06d579fe86ff082c7fc482a900d;hb=b4570a63cef669dc85335a7f8d571a5eefdfc3c7;hp=3149e68c282b3168bf5ed6cb78e29762bd06ee6e;hpb=3af53a35f41caa36050a69d39a8ec40be92e7aca;p=fanfix.git diff --git a/src/jexer/backend/LogicalScreen.java b/src/jexer/backend/LogicalScreen.java index 3149e68..e8d2662 100644 --- a/src/jexer/backend/LogicalScreen.java +++ b/src/jexer/backend/LogicalScreen.java @@ -523,7 +523,7 @@ public class LogicalScreen implements Screen { for (int j = 0; j < str.length(); j++) { char ch = str.charAt(j); putCharXY(i, y, ch, attr); - i++; + i += StringUtils.width(ch); if (i == width) { break; } @@ -544,7 +544,7 @@ public class LogicalScreen implements Screen { for (int j = 0; j < str.length(); j++) { char ch = str.charAt(j); putCharXY(i, y, ch); - i++; + i += StringUtils.width(ch); if (i == width) { break; } @@ -978,16 +978,14 @@ public class LogicalScreen implements Screen { BufferedImage rightImage = image.getSubimage(getTextWidth(), 0, getTextWidth(), getTextHeight()); - Cell left = new Cell(); - left.setTo(cell); + Cell left = new Cell(cell); left.setImage(leftImage); left.setWidth(Cell.Width.LEFT); // Blank out the char itself, so that shadows do not leave artifacts. left.setChar(' '); putCharXY(x, y, left); - Cell right = new Cell(); - right.setTo(cell); + Cell right = new Cell(cell); right.setImage(rightImage); right.setWidth(Cell.Width.RIGHT); // Blank out the char itself, so that shadows do not leave artifacts. @@ -1006,8 +1004,7 @@ public class LogicalScreen implements Screen { public final void putFullwidthCharXY(final int x, final int y, final char ch, final CellAttributes attr) { - Cell cell = new Cell(ch); - cell.setAttr(attr); + Cell cell = new Cell(ch, attr); putFullwidthCharXY(x, y, cell); }