StyleSet<TextGraphics>
, TextGraphics
public class DoublePrintingTextGraphics extends AbstractTextGraphics
getSize()
, it will return a size that has half the width of the underlying TextGraphics. This presents the
writable view as somewhat squared, since normally terminal characters are twice as tall as wide. You can see some
examples of how this looks by running the Triangle test in com.googlecode.lanterna.screen.ScreenTriangleTest
and compare it when running with the --square parameter and without.StyleSet.Set
activeModifiers, backgroundColor, foregroundColor, tabBehaviour
Constructor | Description |
---|---|
DoublePrintingTextGraphics(TextGraphics underlyingTextGraphics) |
Creates a new
DoublePrintingTextGraphics on top of a supplied TextGraphics |
Modifier and Type | Method | Description |
---|---|---|
TextCharacter |
getCharacter(int columnIndex,
int rowIndex) |
Returns the character at the specific position in the terminal.
|
TerminalSize |
getSize() |
Returns the size of the area that this text graphic can write to.
|
TextGraphics |
setCharacter(int columnIndex,
int rowIndex,
TextCharacter textCharacter) |
Sets the character at the current position to the specified value, without using the current colors and modifiers
of this TextGraphics.
|
clearModifiers, disableModifiers, drawImage, drawImage, drawLine, drawLine, drawLine, drawLine, drawRectangle, drawRectangle, drawTriangle, drawTriangle, enableModifiers, fill, fillRectangle, fillRectangle, fillTriangle, fillTriangle, getActiveModifiers, getBackgroundColor, getCharacter, getForegroundColor, getTabBehaviour, newTextGraphics, putCSIStyledString, putCSIStyledString, putString, putString, putString, putString, putString, setBackgroundColor, setCharacter, setCharacter, setCharacter, setForegroundColor, setModifiers, setStyleFrom, setTabBehaviour
public DoublePrintingTextGraphics(TextGraphics underlyingTextGraphics)
DoublePrintingTextGraphics
on top of a supplied TextGraphics
underlyingTextGraphics
- backend TextGraphics
to forward all the calls topublic TextGraphics setCharacter(int columnIndex, int rowIndex, TextCharacter textCharacter)
TextGraphics
columnIndex
- column of the location to set the characterrowIndex
- row of the location to set the charactertextCharacter
- Character data to set at the current positionpublic TextCharacter getCharacter(int columnIndex, int rowIndex)
TextGraphics
null
if the TextGraphics
implementation doesn't support it or doesn't know what the character is.columnIndex
- Column to return the character forrowIndex
- Row to return the character fornull
if not availablepublic TerminalSize getSize()
TextGraphics
Copyright © 2020. All rights reserved.