All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gnu.x11.test.ZPixmap Maven / Gradle / Ivy

Go to download

Escher is a collection of libraries for X Window System written purely in Java.

The newest version!
package gnu.x11.test;


/**
 * Test ZPixmap pixel manipulation. 
 *
 * @see 
 * screenshot
 * 
 * @see 
 * help output
 */
public class ZPixmap extends Graphics {
  gnu.x11.image.ZPixmap zpixmap;


  public ZPixmap (String [] args) { 
    super (args, 256, 256); 

    about ("0.1", "test zpixmap pixel manipulation",
      "Stephen Tse ",
      "http://escher.sourceforge.net/");

    if (help_option) return;

    int len = 256;
    zpixmap = new gnu.x11.image.ZPixmap (display, len, len,
                                         display.default_pixmap_format);

    // straight from XTC
    for (int y=0; y>1) & 0xff;
        zpixmap.set (x, y, r, g, b);
      }
    }
  }
   

  public void paint () {
    window.put_image (display.default_gc, zpixmap, 0, 0);
  }


  public static void main (String [] args) {
    new ZPixmap (args).exec ();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy