Ejemplo n.º 1
0
 private Tex glowmask(Pagina pag) {
   Tex ret = glowmasks.get(pag);
   if (ret == null) {
     ret =
         new TexI(
             PUtils.glowmask(
                 PUtils.glowmask(pag.res().layer(Resource.imgc).img.getRaster()),
                 4,
                 new Color(32, 255, 32)));
     glowmasks.put(pag, ret);
   }
   return (ret);
 }
Ejemplo n.º 2
0
 public static void main(String[] args) throws Exception {
   Coord sz = new Coord(512, 512);
   java.awt.image.WritableRaster buf = PUtils.imgraster(sz);
   SNoise3 n = new SNoise3(Long.parseLong(args[0]));
   for (int y = 0; y < sz.y; y++) {
     for (int x = 0; x < sz.x; x++) {
       buf.setSample(x, y, 0, n.geti(0, 256, 128, x, y, 0));
       buf.setSample(x, y, 1, n.geti(0, 256, 128, x, y, 1428));
       buf.setSample(x, y, 2, n.geti(0, 256, 128, x, y, 5291));
       buf.setSample(x, y, 3, 255);
     }
   }
   javax.imageio.ImageIO.write(PUtils.rasterimg(buf), "PNG", new java.io.File(args[1]));
 }