public void resize(int wide, int high) { // Marking the texture object as finalized so it is deleted // when creating the new texture. release(); // Creating new texture with the appropriate size. Texture tex = new Texture(parent, wide, high, getParameters()); // Copying the contents of this texture into tex. tex.set(this); // Now, overwriting "this" with tex. copyObject(tex); // Nullifying some utility objects so they are recreated with the // appropriate size when needed. tempFbo = null; }
public void set(int[] pixels, int x, int y, int w, int h) { set(pixels, x, y, w, h, ARGB); }
public void set(int[] pixels, int format) { set(pixels, 0, 0, width, height, format); }
public void set(int[] pixels) { set(pixels, 0, 0, width, height, ARGB); }
public void set(PImage img, int x, int y, int w, int h) { Texture tex = (Texture) pg.getCache(img); set(tex, x, y, w, h); }
public void set(PImage img) { Texture tex = (Texture) pg.getCache(img); set(tex); }