X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Frenderer%2Fraster%2Fshapes%2Fcomposite%2FForwardOrientedTextBlock.java;h=20a68c17fed32ada16205b2da881a240ec3fcf65;hb=a3ff3683bd0a025061667b26b6fcf56fe20f0afc;hp=1f0af750c17f765f7036c3e57e0041fc162d3442;hpb=59baa428fb2d9e7f0fe5423f4cea47f2d6245914;p=sixth-3d.git diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/ForwardOrientedTextBlock.java b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/ForwardOrientedTextBlock.java index 1f0af75..20a68c1 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/ForwardOrientedTextBlock.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/ForwardOrientedTextBlock.java @@ -1,12 +1,7 @@ /* - * Sixth 3D engine. Copyright ©2012-2019, 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 - * or later as published by the Free Software Foundation. - * + * Sixth 3D engine. Author: Svjatoslav Agejenko. + * This project is released under Creative Commons Zero (CC0) license. */ - package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite; import eu.svjatoslav.sixth.e3d.geometry.Point3D; @@ -28,7 +23,7 @@ public class ForwardOrientedTextBlock extends ForwardOrientedTexture { final eu.svjatoslav.sixth.e3d.renderer.raster.Color textColor) { final Texture texture = new Texture(text.length() - * TextCanvas.FONT_CHAR_WIDTH, TextCanvas.FONT_CHAR_HEIGHT, + * TextCanvas.FONT_CHAR_WIDTH_TEXTURE_PIXELS, TextCanvas.FONT_CHAR_HEIGHT_TEXTURE_PIXELS, maxUpscaleFactor); // texture.graphics.setColor(Color.BLUE); @@ -40,8 +35,8 @@ public class ForwardOrientedTextBlock extends ForwardOrientedTexture { for (int c = 0; c < text.length(); c++) texture.graphics.drawChars(new char[]{text.charAt(c),}, 0, 1, - (c * TextCanvas.FONT_CHAR_WIDTH) - 0, - (0 * TextCanvas.FONT_CHAR_HEIGHT) + 11); + (c * TextCanvas.FONT_CHAR_WIDTH_TEXTURE_PIXELS), + (int) (TextCanvas.FONT_CHAR_HEIGHT_TEXTURE_PIXELS / 1.45)); return texture; }