Beispiel #1
0
  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;
  }
Beispiel #2
0
 public void set(int[] pixels, int x, int y, int w, int h) {
   set(pixels, x, y, w, h, ARGB);
 }
Beispiel #3
0
 public void set(int[] pixels, int format) {
   set(pixels, 0, 0, width, height, format);
 }
Beispiel #4
0
 public void set(int[] pixels) {
   set(pixels, 0, 0, width, height, ARGB);
 }
Beispiel #5
0
 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);
 }
Beispiel #6
0
 public void set(PImage img) {
   Texture tex = (Texture) pg.getCache(img);
   set(tex);
 }