use of com.b3dgs.lionengine.graphic.Text in project lionengine by b3dgs.
the class TextAwtTest method testItalic.
/**
* Test italic.
*/
@Test
public void testItalic() {
final Text text = Graphics.createText(Constant.FONT_DIALOG, 12, TextStyle.ITALIC);
text.draw(g, 0, 0, VALUE);
}
use of com.b3dgs.lionengine.graphic.Text in project lionengine by b3dgs.
the class TextAwtTest method testBold.
/**
* Test bold.
*/
@Test
public void testBold() {
final Text text = Graphics.createText(Constant.FONT_DIALOG, 12, TextStyle.BOLD);
text.draw(g, 0, 0, VALUE);
}
use of com.b3dgs.lionengine.graphic.Text in project lionengine by b3dgs.
the class TextAwtTest method testAlignUnknown.
/**
* Test align unknown.
*/
@Test
public void testAlignUnknown() {
final Text text = Graphics.createText(Constant.FONT_DIALOG, 12, TextStyle.NORMAL);
try {
final Graphic g = Graphics.createGraphic();
g.setGraphic(ToolsAwt.createImage(1, 1, java.awt.Transparency.OPAQUE).createGraphics());
text.draw(g, 0, 0, UtilEnum.make(Align.class, "FAIL"), Constant.EMPTY_STRING);
Assert.fail();
} catch (final LionEngineException exception) {
Assert.assertNotNull(exception);
}
}
use of com.b3dgs.lionengine.graphic.Text in project lionengine by b3dgs.
the class TextAwtTest method testBold.
/**
* Test bold.
*/
@Test
void testBold() {
final Text text = Graphics.createText(Constant.FONT_DIALOG, 12, TextStyle.BOLD);
text.draw(g, 0, 0, VALUE);
}
use of com.b3dgs.lionengine.graphic.Text in project lionengine by b3dgs.
the class TextHeadlessTest method testItalic.
/**
* Test italic.
*/
@Test
void testItalic() {
final Text text = Graphics.createText(Constant.FONT_DIALOG, 12, TextStyle.ITALIC);
text.draw(g, 0, 0, VALUE);
}