/** Translates the current transformation matrix by the given amount. */ public Surface translate (float x, float y) { tx().translate(x, y); return this; }
/** Translates the current transformation matrix by the given amount. */ public Surface translate (float x, float y) { tx().translate(x, y); return this; }
/** * Concatenates {@code xf} onto this surface's transform, accounting for the {@code origin}. */ public Surface concatenate (AffineTransform xf, float originX, float originY) { AffineTransform txf = tx(); Transforms.multiply(txf, xf.m00, xf.m01, xf.m10, xf.m11, xf.tx, xf.ty, txf); if (originX != 0 || originY != 0) txf.translate(-originX, -originY); return this; }
/** * Concatenates {@code xf} onto this surface's transform, accounting for the {@code origin}. */ public Surface concatenate (AffineTransform xf, float originX, float originY) { AffineTransform txf = tx(); Transforms.multiply(txf, xf.m00, xf.m01, xf.m10, xf.m11, xf.tx, xf.ty, txf); if (originX != 0 || originY != 0) txf.translate(-originX, -originY); return this; }
@Override public void addTo (GroupLayer parent, float x, float y, float depthAdjust) { _layer.setDepth(BACKGROUND_DEPTH + depthAdjust); _layer.transform().translate(x, y); // adjust any existing transform parent.add(_layer); } @Override public void close () {
final AffineTransform af = new AffineTransform(). scale(game.graphics.scale().factor, game.graphics.scale().factor). translate(160, (ygap + 150));
_barOnLayer = new GroupLayer(width-thumbWidth, barHeight); _barOnLayer.setDepth(Background.BACKGROUND_DEPTH + 2); _barOnLayer.transform().translate(_thumbLeft, top + (height - barHeight)/2); layer.add(_barOnLayer);