Class TextCanvas
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.TexturedRectangle
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.textcanvas.TextCanvas
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Font
static final int
Font character height in world coordinates.static final int
Font character height in texture pixels.static final int
Font character width in world coordinates.static final int
Font character width in texture pixels.Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.TexturedRectangle
bottomLeft, bottomRight, textureBottomLeft, textureBottomRight, textureTopLeft, textureTopRight, topLeft, topRight
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController
-
Constructor Summary
ConstructorDescriptionTextCanvas
(Transform location, TextPointer dimensions, Color foregroundColor, Color backgroundColor) TextCanvas
(Transform location, String text, Color foregroundColor, Color backgroundColor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeTransformHook
(TransformsStack transformPipe, RenderingContext context) This method should be overridden by anyone wanting to customize shape before it is rendered.void
clear()
getCharLocation
(int row, int column) getSize()
static TextPointer
getTextDimensions
(String text) void
locate
(int row, int column) void
void
putChar
(char character) void
putChar
(int row, int column, char character) void
putChar
(TextPointer location, char character) void
setBackgroundColor
(Color backgroundColor) void
setForegroundColor
(Color foregroundColor) void
void
setTextColor
(Color color) Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.TexturedRectangle
getTexture, initialize
Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
addShape, addShape, getGroup, getLocation, getOriginalSubShapes, getRelativityTracker, hideGroup, removeGroup, setColor, setGroupForUngrouped, setMouseInteractionController, setTransform, showGroup, transform
-
Field Details
-
FONT_CHAR_WIDTH
public static final int FONT_CHAR_WIDTHFont character width in world coordinates.- See Also:
-
FONT_CHAR_HEIGHT
public static final int FONT_CHAR_HEIGHTFont character height in world coordinates.- See Also:
-
FONT_CHAR_WIDTH_TEXTURE_PIXELS
public static final int FONT_CHAR_WIDTH_TEXTURE_PIXELSFont character width in texture pixels.- See Also:
-
FONT_CHAR_HEIGHT_TEXTURE_PIXELS
public static final int FONT_CHAR_HEIGHT_TEXTURE_PIXELSFont character height in texture pixels.- See Also:
-
FONT
-
-
Constructor Details
-
TextCanvas
-
TextCanvas
public TextCanvas(Transform location, TextPointer dimensions, Color foregroundColor, Color backgroundColor)
-
-
Method Details
-
getTextDimensions
-
beforeTransformHook
Description copied from class:AbstractCompositeShape
This method should be overridden by anyone wanting to customize shape before it is rendered.- Overrides:
beforeTransformHook
in classAbstractCompositeShape
-
clear
public void clear() -
getCharLocation
-
getSize
-
locate
public void locate(int row, int column) -
print
-
putChar
public void putChar(char character) -
putChar
public void putChar(int row, int column, char character) -
putChar
-
setBackgroundColor
-
setForegroundColor
-
setText
-
setTextColor
-