Class CanvasCharacter
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.textcanvas.CanvasCharacter
Represents a single character on the text canvas.
-
Field Summary
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape
coordinates, onScreenZ, shapeId
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController
-
Constructor Summary
ConstructorDescriptionCanvasCharacter
(Point3D centerLocation, char character, Color foregroundColor, Color backgroundColor) -
Method Summary
Modifier and TypeMethodDescriptionReturns color of the background.static Font
getFont
(int size) Returns a font of the specified size.Returns color of the foreground.void
paint
(RenderingContext renderingContext) Paints the character on the screen.void
setBackgroundColor
(Color backgroundColor) Sets color of the background.void
setForegroundColor
(Color foregroundColor) Sets color of the foreground.void
setValue
(char value) Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape
getZ, transform
Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
setMouseInteractionController
-
Constructor Details
-
CanvasCharacter
-
-
Method Details
-
getFont
Returns a font of the specified size.If the font of the specified size is already cached, it will be returned. Otherwise, a new font will be created, cached and returned.
- Parameters:
size
- the size of the font- Returns:
- the font
-
getBackgroundColor
Returns color of the background. -
setBackgroundColor
Sets color of the background. -
getForegroundColor
Returns color of the foreground.- Returns:
- the color
-
setForegroundColor
Sets color of the foreground.- Parameters:
foregroundColor
- the color
-
paint
Paints the character on the screen.- Specified by:
paint
in classAbstractCoordinateShape
- Parameters:
renderingContext
- the rendering context
-
setValue
public void setValue(char value)
-