Ejemplo n.º 1
0
 public static void DrawString(Surface g, TextLayout layout, int x, int y) {
   CanvasImage c =
       Global.m_graphics.createImage(
           (int) Math.ceil(layout.width()), (int) Math.ceil(layout.height()));
   Canvas gc = c.canvas();
   gc.drawText(layout, 0, 0);
   g.drawImage(c, x, y);
 }
Ejemplo n.º 2
0
 private void complete() {
   complete = true;
   final Surface surface = surfaceLayer.surface();
   surface.clear();
   surface.drawImage(image, 20, 20, surface.width(), surface.height());
   if (sound != null) {
     sound.play();
   }
 }