Search in sources :

Example 1 with FactoryGraphicTest

use of com.b3dgs.lionengine.graphic.FactoryGraphicTest in project lionengine by b3dgs.

the class FactoryGraphicAwtTest method testRotate.

/*
     * FactoryGraphicTest
     */
/**
 * Test rotate.
 */
@Test
@Override
public void testRotate() {
    final ImageBuffer rotate = Graphics.rotate(image, 90);
    Assert.assertNotEquals(image, rotate);
    Assert.assertEquals(image.getWidth(), rotate.getHeight());
    Assert.assertEquals(image.getHeight(), rotate.getWidth());
    rotate.dispose();
}
Also used : ImageBuffer(com.b3dgs.lionengine.graphic.ImageBuffer) FactoryGraphicTest(com.b3dgs.lionengine.graphic.FactoryGraphicTest) Test(org.junit.Test)

Example 2 with FactoryGraphicTest

use of com.b3dgs.lionengine.graphic.FactoryGraphicTest in project lionengine by b3dgs.

the class FactoryGraphicHeadlessTest method testRotate.

/*
     * FactoryGraphicTest
     */
/**
 * Test rotate.
 */
@Test
@Override
protected void testRotate() {
    final ImageBuffer image = Graphics.getImageBuffer(Medias.create("image.png"));
    final ImageBuffer rotate = Graphics.rotate(image, 90);
    assertNotEquals(image, rotate);
    assertEquals(image.getWidth(), rotate.getHeight());
    assertEquals(image.getHeight(), rotate.getWidth());
    rotate.dispose();
    image.dispose();
}
Also used : ImageBuffer(com.b3dgs.lionengine.graphic.ImageBuffer) Test(org.junit.jupiter.api.Test) FactoryGraphicTest(com.b3dgs.lionengine.graphic.FactoryGraphicTest)

Example 3 with FactoryGraphicTest

use of com.b3dgs.lionengine.graphic.FactoryGraphicTest in project lionengine by b3dgs.

the class FactoryGraphicAwtTest method testRotate.

/*
     * FactoryGraphicTest
     */
@Test
@Override
protected void testRotate() {
    final ImageBuffer image = Graphics.getImageBuffer(Medias.create("image.png"));
    final ImageBuffer rotate = Graphics.rotate(image, 90);
    assertNotEquals(image, rotate);
    assertEquals(image.getWidth(), rotate.getHeight());
    assertEquals(image.getHeight(), rotate.getWidth());
    rotate.dispose();
    image.dispose();
}
Also used : ImageBuffer(com.b3dgs.lionengine.graphic.ImageBuffer) Test(org.junit.jupiter.api.Test) FactoryGraphicTest(com.b3dgs.lionengine.graphic.FactoryGraphicTest)

Aggregations

FactoryGraphicTest (com.b3dgs.lionengine.graphic.FactoryGraphicTest)3 ImageBuffer (com.b3dgs.lionengine.graphic.ImageBuffer)3 Test (org.junit.jupiter.api.Test)2 Test (org.junit.Test)1