Examples of MemoryImageSource


Examples of java.awt.image.MemoryImageSource

    for (int x = 0; x < WIDTH; x++){
      for (int y = 1; y <= HEIGHT; y++){
        colormap[x + (HEIGHT - y)*WIDTH] = Color.HSBtoRGB(((float) x)/HEIGHT, ((float) y)/WIDTH, (float) 0.75);
      }
    }
    col = createImage(new MemoryImageSource(WIDTH, HEIGHT, colormap, 0, WIDTH));
  }
View Full Code Here

Examples of java.awt.image.MemoryImageSource

                pix[ptr++] = c;
        }
        for (int k = width; k < pix.length; k += width) {
            System.arraycopy(pix, 0, pix, k, width);
        }
        java.awt.Image img = canvas.createImage(new MemoryImageSource(width, height, pix, 0, width));
       
        return img;
    }   
View Full Code Here

Examples of java.awt.image.MemoryImageSource

                pix[ptr++] = c;
        }
        for (int k = fullWidth; k < pix.length; k += fullWidth) {
            System.arraycopy(pix, 0, pix, k, fullWidth);
        }
        Image img = canvas.createImage(new MemoryImageSource(fullWidth, height, pix, 0, fullWidth));
       
        return img;
    }   
View Full Code Here

Examples of java.awt.image.MemoryImageSource

            }
            idx += barDistance;
        }
        for (int k = limit + width; k < pix.length; k += width)
            System.arraycopy(pix, limit, pix, k, width);
        Image img = canvas.createImage(new MemoryImageSource(width, barTall, pix, 0, width));
       
        return img;
    }
View Full Code Here

Examples of java.awt.image.MemoryImageSource

                pix[ptr++] = c;
        }
        for (int k = fullWidth; k < pix.length; k += fullWidth) {
            System.arraycopy(pix, 0, pix, k, fullWidth);
        }
        Image img = canvas.createImage(new MemoryImageSource(fullWidth, height, pix, 0, fullWidth));
       
        return img;
    }
View Full Code Here

Examples of java.awt.image.MemoryImageSource

                pix[ptr++] = c;
        }
        for (int k = fullWidth; k < pix.length; k += fullWidth) {
            System.arraycopy(pix, 0, pix, k, fullWidth);
        }
        Image img = canvas.createImage(new MemoryImageSource(fullWidth, height, pix, 0, fullWidth));
       
        return img;
    }
View Full Code Here

Examples of java.awt.image.MemoryImageSource

                System.arraycopy(pix, ptr - bitColumns, pix, ptr + bitColumns * (j - 1), bitColumns);
            }
            ptr += bitColumns * (h - 1);
        }

        java.awt.Image img = canvas.createImage(new MemoryImageSource(bitColumns, codeRows * h, pix, 0, bitColumns));
        return img;
    }
View Full Code Here

Examples of java.awt.image.MemoryImageSource

            for (int x = 0; x < width; ++x) {
                pix[y * width + x] = line[x] == 0 ? f : g;
            }
        }

        java.awt.Image img = canvas.createImage(new MemoryImageSource(width, height, pix, 0, width));
        return img;
    }
View Full Code Here

Examples of java.awt.image.MemoryImageSource

                pix[ptr++] = c;
        }
        for (int k = fullWidth; k < pix.length; k += fullWidth) {
            System.arraycopy(pix, 0, pix, k, fullWidth);
        }
        Image img = canvas.createImage(new MemoryImageSource(fullWidth, height, pix, 0, fullWidth));
       
        return img;
    }   
View Full Code Here

Examples of java.awt.image.MemoryImageSource

                int b = image[p + j / 8] & 0xff;
                b <<= j % 8;
                pix[ptr++] = (b & 0x80) == 0 ? g : f;
            }
        }
        java.awt.Image img = canvas.createImage(new MemoryImageSource(w, h, pix, 0, w));
        return img;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.