use of com.b3dgs.lionengine.graphic.Graphic in project lionengine by b3dgs.
the class FactoryGraphicHeadless method createImageBufferAlpha.
@Override
public ImageBuffer createImageBufferAlpha(int width, int height) {
final ImageBuffer buffer = new ImageBufferHeadless(width, height, Transparency.TRANSLUCENT);
final Graphic g = buffer.createGraphic();
g.setColor(ColorRgba.TRANSPARENT);
g.drawRect(0, 0, width, height, true);
g.dispose();
return buffer;
}
use of com.b3dgs.lionengine.graphic.Graphic in project lionengine by b3dgs.
the class FactoryGraphicHeadless method createImageBuffer.
@Override
public ImageBuffer createImageBuffer(int width, int height, ColorRgba transparency) {
Check.notNull(transparency);
final ImageBuffer buffer = new ImageBufferHeadless(width, height, Transparency.BITMASK);
final Graphic g = buffer.createGraphic();
g.setColor(transparency);
g.drawRect(0, 0, width, height, true);
g.dispose();
return buffer;
}
use of com.b3dgs.lionengine.graphic.Graphic in project lionengine by b3dgs.
the class FactoryGraphicAwt method createImageBuffer.
@Override
public ImageBuffer createImageBuffer(int width, int height) {
final BufferedImage image = ToolsAwt.createImage(width, height, java.awt.Transparency.OPAQUE);
final ImageBuffer buffer = new ImageBufferAwt(image);
final Graphic g = buffer.createGraphic();
g.setColor(ColorRgba.BLACK);
g.drawRect(0, 0, width, height, true);
g.dispose();
return buffer;
}
use of com.b3dgs.lionengine.graphic.Graphic in project lionengine by b3dgs.
the class FactoryGraphicAwt method createImageBufferAlpha.
@Override
public ImageBuffer createImageBufferAlpha(int width, int height) {
final BufferedImage image = ToolsAwt.createImage(width, height, java.awt.Transparency.TRANSLUCENT);
final ImageBuffer buffer = new ImageBufferAwt(image);
final Graphic g = buffer.createGraphic();
g.setColor(ColorRgba.TRANSPARENT);
g.drawRect(0, 0, width, height, true);
g.dispose();
return buffer;
}
use of com.b3dgs.lionengine.graphic.Graphic in project lionengine by b3dgs.
the class SequenceRenderer method render.
/**
* Local render routine.
*/
void render() {
if (screen.isReady()) {
final Graphic g = screen.getGraphic();
renderer.render(g);
scanline.render(g);
}
}
Aggregations