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