/* Draw texture at c, clipping everything outside ul to ul + sz. */ public void image(Tex tex, Coord c, Coord ul, Coord sz) { if (tex == null) return; st.set(cur2d); ul = ul.add(this.tx); Coord br = ul.add(sz); if (ul.x < this.ul.x) ul.x = this.ul.x; if (ul.y < this.ul.y) ul.y = this.ul.y; if (br.x > this.ul.x + this.sz.x) br.x = this.ul.x + this.sz.x; if (br.y > this.ul.y + this.sz.y) br.y = this.ul.y + this.sz.y; tex.crender(this, c.add(this.tx), ul, br.sub(ul)); checkerr(); }
/* Draw texture at c, with the extra state s applied. */ public void image(Tex tex, Coord c, GLState s) { st.set(cur2d); if (s != null) state(s); tex.crender(this, c.add(tx), ul, sz); checkerr(); }
/* Draw texture at c, scaling it to sz. */ public void image(Tex tex, Coord c, Coord sz) { if (tex == null) return; st.set(cur2d); tex.crender(this, c.add(tx), ul, this.sz, sz); checkerr(); }