Search in sources :

Example 1 with BufferedImagePool

use of limelight.ui.BufferedImagePool in project limelight by slagyr.

the class PanelPainterLoopTest method paintsDirtyRegions.

@Test
public void paintsDirtyRegions() throws Exception {
    Context.instance().bufferedImagePool = new BufferedImagePool(0.1);
    activeRoot.addDirtyRegion(new Rectangle(0, 0, 10, 10));
    loop.paintDirtyRegions(activeRoot);
    assertEquals(false, activeRoot.hasDirtyRegions());
}
Also used : BufferedImagePool(limelight.ui.BufferedImagePool) Test(org.junit.Test)

Example 2 with BufferedImagePool

use of limelight.ui.BufferedImagePool in project limelight by slagyr.

the class PaintJobTest method setUp.

public void setUp() throws Exception {
    bufferedImageCache = new SimpleCache<Panel, BufferedImage>();
    pool = new BufferedImagePool(1);
    Context.instance().bufferedImageCache = bufferedImageCache;
    Context.instance().bufferedImagePool = pool;
    job = new PaintJob(new Box(100, 200, 300, 400), Colors.TRANSPARENT);
    panel = new MockProp();
    style = panel.style;
    graphics = new MockGraphics();
}
Also used : Panel(limelight.ui.Panel) BufferedImagePool(limelight.ui.BufferedImagePool) Box(limelight.util.Box) BufferedImage(java.awt.image.BufferedImage)

Aggregations

BufferedImagePool (limelight.ui.BufferedImagePool)2 BufferedImage (java.awt.image.BufferedImage)1 Panel (limelight.ui.Panel)1 Box (limelight.util.Box)1 Test (org.junit.Test)1