/*
- * Sixth 3D engine. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Sixth 3D engine. Copyright ©2012-2020, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 3 of the GNU Lesser General Public License
public class CanvasCharacter extends AbstractCoordinateShape {
- public static final double SIZE_MULTIPLIER = 0.005;
private static final int MAX_FONT_SIZE = 500;
private static final Font[] fonts = new Font[MAX_FONT_SIZE];
private String value;
// set corner coordinates (for drawing background)
{
- final double widthHalf = TextCanvas.FONT_CHAR_WIDTH / 2d;
- final double heightHalf = TextCanvas.FONT_CHAR_HEIGHT / 2d;
+ final double widthHalf = TextCanvas.FONT_CHAR_WIDTH_PIXELS / 2d;
+ final double heightHalf = TextCanvas.FONT_CHAR_HEIGHT_PIXELS / 2d;
// upper left
coordinates[1].coordinate = point.clone().translateX(-widthHalf)
renderingContext.graphics.setFont(getFont(size));
renderingContext.graphics.setColor(foregroundAwtColor);
- renderingContext.graphics.drawString(value, (int) onScreenLocation.x
- - (int) (size / 3.2), (int) onScreenLocation.y
- + (int) (size / 2.5));
+ renderingContext.graphics.drawString(
+ value,
+ (int) onScreenLocation.x - (int) (size / 3.2),
+ (int) onScreenLocation.y + (int) (size / 2.5));
}