use raster attributes width/height

This commit is contained in:
Kevin Lamonte 2020-06-11 18:56:08 -05:00
parent c684cd6903
commit 2f389f5a85
3 changed files with 7 additions and 3 deletions

View file

@ -91,7 +91,7 @@ public class DisplayLine {
for (Cell cell: line.chars) {
chars.add(new Cell(cell));
}
attr = line.attr;
attr = new CellAttributes(line.attr);
doubleWidth = line.doubleWidth;
doubleHeight = line.doubleHeight;
reverseColor = line.reverseColor;
@ -103,7 +103,7 @@ public class DisplayLine {
* @param attr current drawing attributes
*/
public DisplayLine(final CellAttributes attr) {
this.attr = attr;
this.attr = new CellAttributes(attr);
}
// ------------------------------------------------------------------------

View file

@ -5267,7 +5267,9 @@ public class ECMA48 implements Runnable {
switch (item) {
case 1:
if (action == 1) {
// Report number of color registers.
// Report number of color registers. Though we can support
// effectively unlimited colors, report the same max as stock
// xterm (MAX_COLOR_REGISTERS).
writeRemote(String.format("\033[?%d;%d;%dS", item, 0, 1024));
return;
}

View file

@ -204,6 +204,8 @@ public class Sixel {
if ((rasterWidth > width) || (rasterHeight > y + 1)) {
resizeImage(Math.max(width, rasterWidth),
Math.max(y + 1, rasterHeight));
return image.getSubimage(0, 0, Math.max(width, rasterWidth),
Math.max(y + 1, rasterHeight));
}
return image.getSubimage(0, 0, width, y + 1);
}