Exemple #1
0
        public ZPixmap(String [] args)
            : base(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 < len; y++)
            {
                for (int x = 0; x < len; x++)
                {
                    int r = (x * y) & 0xff;
                    int g = x ^ y;
                    int b = (x * y >> 1) & 0xff;
                    zpixmap.set(x, y, r, g, b);
                }
            }
        }
Exemple #2
0
        public ZPixmap(String [] args)
            : base(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<len; y++) {
              for (int x=0; x<len; x++) {
            int r = (x*y) & 0xff;
            int g = x^y;
            int b = (x*y>>1) & 0xff;
            zpixmap.set (x, y, r, g, b);
              }
            }
        }