/** Adds {@code tex} as a transformed axis-aligned quad to this batch. * {@code dx, dy, dw, dh} define the size and position of the quad. * {@code sx, sy, sw, sh} define region of the texture which will be displayed in the quad. */ public void addQuad (Texture tex, int tint, AffineTransform xf, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh) { setTexture(tex); float texWidth = tex.displayWidth, texHeight = tex.displayHeight; addQuad(tint, xf, dx, dy, dx+dw, dy+dh, sx/texWidth, sy/texHeight, (sx+sw)/texWidth, (sy+sh)/texHeight); }
/** Adds {@code tex} as a transformed axis-aligned quad to this batch. * {@code dx, dy, dw, dh} define the size and position of the quad. * {@code sx, sy, sw, sh} define region of the texture which will be displayed in the quad. */ public void addQuad (Texture tex, int tint, AffineTransform xf, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh) { setTexture(tex); float texWidth = tex.displayWidth, texHeight = tex.displayHeight; addQuad(tint, xf, dx, dy, dx+dw, dy+dh, sx/texWidth, sy/texHeight, (sx+sw)/texWidth, (sy+sh)/texHeight); }
/** Adds {@code tex} as a transformed axis-aligned quad to this batch. * {@code x, y, w, h} define the size and position of the quad. */ public void addQuad (Texture tex, int tint, AffineTransform xf, float x, float y, float w, float h) { setTexture(tex); float sr = tex.config.repeatX ? w/tex.displayWidth : 1; float sb = tex.config.repeatY ? h/tex.displayHeight : 1; addQuad(tint, xf, x, y, x+w, y+h, 0, 0, sr, sb); }
/** Adds {@code tex} as a transformed axis-aligned quad to this batch. * {@code x, y, w, h} define the size and position of the quad. */ public void addQuad (Texture tex, int tint, AffineTransform xf, float x, float y, float w, float h) { setTexture(tex); float sr = tex.config.repeatX ? w/tex.displayWidth : 1; float sb = tex.config.repeatY ? h/tex.displayHeight : 1; addQuad(tint, xf, x, y, x+w, y+h, 0, 0, sr, sb); }