Search in sources :

Example 1 with FilterBlur

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

the class LoaderTest method testBlur.

/**
 * Test with blur filter.
 */
@Test
void testBlur() {
    final Resolution output = new Resolution(640, 480, 0);
    final FilterBlur blur = new FilterBlur();
    blur.setEdgeMode(FilterBlur.CLAMP_EDGES);
    blur.setAlpha(true);
    final Config config = new Config(output, 16, true);
    Loader.start(config, SequenceFilterMock.class, blur).await();
    blur.setEdgeMode(FilterBlur.WRAP_EDGES);
    Loader.start(config, SequenceFilterMock.class, blur).await();
    blur.setAlpha(false);
    Loader.start(config, SequenceFilterMock.class, blur).await();
    blur.setAlpha(true);
    blur.setRadius(0.5f);
    Loader.start(config, SequenceFilterMock.class, blur).await();
}
Also used : Config(com.b3dgs.lionengine.Config) FilterBlur(com.b3dgs.lionengine.graphic.filter.FilterBlur) Resolution(com.b3dgs.lionengine.Resolution) Test(org.junit.jupiter.api.Test)

Aggregations

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