Search in sources :

Example 1 with FilterBilinear

use of com.b3dgs.lionengine.graphic.filter.FilterBilinear in project lionengine by b3dgs.

the class SpriteDigitTest method testFilterBilinear.

/**
 * Test filter bilinear.
 */
@Test
void testFilterBilinear() {
    final SpriteDigit sprite = new SpriteDigitImpl(Graphics.createImageBuffer(64, 32), 1, 1, 1);
    sprite.filter(new FilterBilinear());
    assertEquals(1, sprite.getWidth());
    assertEquals(1, sprite.getHeight());
}
Also used : FilterBilinear(com.b3dgs.lionengine.graphic.filter.FilterBilinear) Test(org.junit.jupiter.api.Test)

Example 2 with FilterBilinear

use of com.b3dgs.lionengine.graphic.filter.FilterBilinear in project lionengine by b3dgs.

the class SpriteAnimatedTest method testFilterBilinear.

/**
 * Test filter bilinear.
 */
@Test
void testFilterBilinear() {
    final SpriteAnimated sprite = new SpriteAnimatedImpl(Graphics.createImageBuffer(64, 32), 16, 8);
    sprite.filter(new FilterBilinear());
    assertEquals(64, sprite.getWidth());
    assertEquals(32, sprite.getHeight());
}
Also used : FilterBilinear(com.b3dgs.lionengine.graphic.filter.FilterBilinear) Test(org.junit.jupiter.api.Test)

Example 3 with FilterBilinear

use of com.b3dgs.lionengine.graphic.filter.FilterBilinear in project lionengine by b3dgs.

the class SpriteFontTest method testFilterBilinear.

/**
 * Test filter bilinear.
 */
@Test
void testFilterBilinear() {
    final SpriteFont sprite = new SpriteFontImpl(media, font, 6, 7);
    sprite.load();
    sprite.filter(new FilterBilinear());
    assertEquals(64, sprite.getWidth());
    assertEquals(32, sprite.getHeight());
    sprite.dispose();
}
Also used : FilterBilinear(com.b3dgs.lionengine.graphic.filter.FilterBilinear) Test(org.junit.jupiter.api.Test)

Example 4 with FilterBilinear

use of com.b3dgs.lionengine.graphic.filter.FilterBilinear in project lionengine by b3dgs.

the class LoaderTest method testBilinear.

/**
 * Test with bilinear filter.
 */
@Test
void testBilinear() {
    final Resolution output = new Resolution(640, 480, 0);
    final Config config = new Config(output, 16, true);
    Loader.start(config, SequenceFilterMock.class, new FilterBilinear()).await();
}
Also used : Config(com.b3dgs.lionengine.Config) Resolution(com.b3dgs.lionengine.Resolution) FilterBilinear(com.b3dgs.lionengine.graphic.filter.FilterBilinear) Test(org.junit.jupiter.api.Test)

Example 5 with FilterBilinear

use of com.b3dgs.lionengine.graphic.filter.FilterBilinear in project lionengine by b3dgs.

the class SpriteTiledTest method testFilterBilinear.

/**
 * Test filter bilinear.
 */
@Test
void testFilterBilinear() {
    final SpriteTiled sprite = new SpriteTiledImpl(Graphics.createImageBuffer(64, 32), 16, 8);
    sprite.filter(new FilterBilinear());
    assertEquals(64, sprite.getWidth());
    assertEquals(32, sprite.getHeight());
}
Also used : FilterBilinear(com.b3dgs.lionengine.graphic.filter.FilterBilinear) Test(org.junit.jupiter.api.Test)

Aggregations

FilterBilinear (com.b3dgs.lionengine.graphic.filter.FilterBilinear)6 Test (org.junit.jupiter.api.Test)6 Config (com.b3dgs.lionengine.Config)1 Resolution (com.b3dgs.lionengine.Resolution)1