@Override public void draw (Surface surface, float x, float y) { surface.draw(tile, x, y); } }
protected void paintClipped (Surface surf) { // this fill should be clipped to our bounds surf.setFillColor(0xFF99CCFF); surf.fillRect(-50, -50, 200, 200); // and this image should be clipped to our bounds surf.draw(cirtex, 80, -25); } };
/** * Draws a texture tile, centered at the specified location. */ public Surface drawCentered (Tile tile, float x, float y) { return draw(tile, x - tile.width()/2, y - tile.height()/2); }
/** * Draws a texture tile, centered at the specified location. */ public Surface drawCentered (Tile tile, float x, float y) { return draw(tile, x - tile.width()/2, y - tile.height()/2); }
/** Draws a tile at the specified location: {@code x, y}. */ public Surface draw (Tile tile, float x, float y) { return draw(tile, x, y, tile.width(), tile.height()); }
/** Draws a tile at the specified location: {@code x, y}. */ public Surface draw (Tile tile, float x, float y) { return draw(tile, x, y, tile.width(), tile.height()); }
protected void paintClipped (Surface surf) { surf.setFillColor(0xFF99CCFF).fillRect(0, 0, 100, 100); surf.translate(50, 50).rotate(rotation).translate(-50, -50); surf.draw(saustex, 0, 25); } }, 260, 30);
protected void paintClipped (Surface surf) { surf.setFillColor(0xFF99CCFF).fillRect(0, 0, 100, 100); surf.translate(FloatMath.sin(elapsed) * 50, FloatMath.cos(elapsed) * 50 + 25); surf.draw(saustex, 0, 0); } }, 390, 30);
protected void drawPart (Surface surf, int x, int y) { float dw = dest.xaxis.size(x), dh = dest.yaxis.size(y); if (dw == 0 || dh == 0) return; surf.draw(_tile, dest.xaxis.coord(x), dest.yaxis.coord(y), dw, dh, _s9.xaxis.coord(x), _s9.yaxis.coord(y), _s9.xaxis.size(x), _s9.yaxis.size(y)); } });
otile.width(), otile.height(), Texture.Config.DEFAULT.repeat(true, true)); new TextureSurface(game.graphics, game.defaultBatch, subtex).begin(). clear().draw(otile, 0, 0).end().close();
surf.begin().clear().draw(imtex, 0, 0).end().close(); game.rootLayer.addAt(new ImageLayer(surf.texture), offset + width, offset); game.rootLayer.addAt(new ImageLayer(surf.texture), offset + width, offset + 2*height);
surf1.begin().clear().setAlpha(0.5f).draw(imtex, 0, 0).end().close(); groupLayer.addAt(new ImageLayer(surf1.texture), x, y0); addDescrip("surface a=0.5\nimg layer a=1", x, y1, width); surf2.begin().clear().draw(imtex, 0, 0).end().close(); groupLayer.addAt(new ImageLayer(surf2.texture).setAlpha(0.5f), x, y0); addDescrip("surface a=1\nimg layer a=0.5", x, y1, width);