use of com.b3dgs.lionengine.graphic.ImageBuffer in project lionengine by b3dgs.
the class GraphicsTest method testFlipVertical.
/**
* Test flip vertical.
*/
@Test
public void testFlipVertical() {
final ImageBuffer vertical = Graphics.flipVertical(image);
Assert.assertNotEquals(image, vertical);
Assert.assertEquals(image.getWidth(), vertical.getWidth());
Assert.assertEquals(image.getHeight(), vertical.getHeight());
vertical.dispose();
}
use of com.b3dgs.lionengine.graphic.ImageBuffer in project lionengine by b3dgs.
the class GraphicsTest method testFlipHorizontal.
/**
* Test flip horizontal.
*/
@Test
public void testFlipHorizontal() {
final ImageBuffer horizontal = Graphics.flipHorizontal(image);
Assert.assertNotEquals(image, horizontal);
Assert.assertEquals(image.getWidth(), horizontal.getWidth());
Assert.assertEquals(image.getHeight(), horizontal.getHeight());
horizontal.dispose();
}
use of com.b3dgs.lionengine.graphic.ImageBuffer in project lionengine by b3dgs.
the class GraphicsTest method testApplyMask.
/**
* Test apply mask.
*/
@Test
public void testApplyMask() {
final ImageBuffer mask = Graphics.applyMask(image, ColorRgba.BLACK);
Assert.assertNotEquals(image, mask);
Assert.assertEquals(image.getWidth(), mask.getWidth());
Assert.assertEquals(image.getHeight(), mask.getHeight());
mask.dispose();
}
use of com.b3dgs.lionengine.graphic.ImageBuffer in project lionengine by b3dgs.
the class GraphicsTest method testRotate.
/**
* Test rotate.
*/
@Test
public void testRotate() {
final ImageBuffer rotate = Graphics.rotate(image, 90);
Assert.assertNotEquals(image, rotate);
Assert.assertEquals(image.getWidth(), rotate.getWidth());
Assert.assertEquals(image.getHeight(), rotate.getHeight());
rotate.dispose();
}
use of com.b3dgs.lionengine.graphic.ImageBuffer in project lionengine by b3dgs.
the class GraphicsTest method testCreateImageBufferTransparentColor.
/**
* Test create image buffer transparent color.
*/
@Test
public void testCreateImageBufferTransparentColor() {
final ImageBuffer imageBuffer = Graphics.createImageBuffer(16, 32, ColorRgba.TRANSPARENT);
Assert.assertEquals(16, imageBuffer.getWidth());
Assert.assertEquals(32, imageBuffer.getHeight());
Assert.assertEquals(Transparency.BITMASK, imageBuffer.getTransparency());
imageBuffer.dispose();
}
Aggregations