Examples of ByteLookupTable


Examples of java.awt.image.ByteLookupTable

  {
    harness.checkPoint("createCompatibleDestImage");

    // Simple test
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
   
    BufferedImage img = new BufferedImage(25, 40, BufferedImage.TYPE_INT_RGB);
   
    BufferedImage dest = op.createCompatibleDestImage(img, img.getColorModel());
View Full Code Here

Examples of java.awt.image.ByteLookupTable

 
  // Test all the default color models
  private void colorModelTest(TestHarness harness)
  {
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);

    int[] types = {BufferedImage.TYPE_INT_RGB,
                   BufferedImage.TYPE_INT_ARGB,
                   BufferedImage.TYPE_INT_ARGB_PRE,
View Full Code Here

Examples of java.awt.image.ByteLookupTable

public class getTable implements Testlet
{
  public void test(TestHarness harness)
  {
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
    harness.check(op.getTable() == t);
  }
View Full Code Here

Examples of java.awt.image.ByteLookupTable

public class getRenderingHints implements Testlet
{
  public void test(TestHarness harness)
  {
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    RenderingHints r = new RenderingHints(RenderingHints.KEY_COLOR_RENDERING,
            RenderingHints.VALUE_COLOR_RENDER_QUALITY);
    LookupOp op = new LookupOp(t, r);
    harness.check(op.getRenderingHints() == r);
    op = new LookupOp(t, null);
View Full Code Here

Examples of java.awt.image.ByteLookupTable

public class constructor implements Testlet
{
  public void test(TestHarness harness)
  {
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    RenderingHints r = new RenderingHints(RenderingHints.KEY_COLOR_RENDERING,
            RenderingHints.VALUE_COLOR_RENDER_QUALITY);
    LookupOp op = new LookupOp(t, r);
    harness.check(op.getTable() == t);
    harness.check(op.getRenderingHints() == r);
View Full Code Here

Examples of java.awt.image.ByteLookupTable

    harness.checkPoint("testRaster1()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
   
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
   
    dest = op.filter(src, dest);
    harness.check(dest.getSample(0, 0, 0), 1);
    harness.check(dest.getSample(1, 0, 0), 2);
View Full Code Here

Examples of java.awt.image.ByteLookupTable

    harness.checkPoint("testRaster2()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
   
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
    dest = op.filter(src, dest);
   
    harness.check(dest.getSample(0, 0, 0), 0);
    harness.check(dest.getSample(1, 0, 0), 0);
View Full Code Here

Examples of java.awt.image.ByteLookupTable

    harness.checkPoint("testRaster3()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
   
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
   
    dest = op.filter(src, dest);
    harness.check(dest.getSample(0, 0, 0), 1);
    harness.check(dest.getSample(1, 0, 0), 2);
View Full Code Here

Examples of java.awt.image.ByteLookupTable

public class getNumComponents implements Testlet
{
  public void test(TestHarness harness)
  {
    ByteLookupTable t = new ByteLookupTable(0, new byte[] {(byte) 0xAA,
            (byte) 0xBB});
    harness.check(t.getNumComponents(), 1);
  }
View Full Code Here

Examples of java.awt.image.ByteLookupTable

public class getOffset
{
  public void test(TestHarness harness)
  {
    ByteLookupTable t = new ByteLookupTable(99, new byte[] {(byte) 0xAA,
            (byte) 0xBB});
    harness.check(t.getOffset(), 99);
  }
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.