Package java.awt.image

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


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

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

    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

    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

    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

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

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

public class createCompatibleDestRaster 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);
    Raster raster = Raster.createWritableRaster(
        new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE, 10, 20, 8), null);
    Raster dest = op.createCompatibleDestRaster(raster);
    harness.check(dest.getWidth(), 10);
View Full Code Here

  {
    harness.checkPoint("(BufferedImage)");
    BufferedImage image = new BufferedImage(10, 20,
            BufferedImage.TYPE_INT_ARGB);
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
    Rectangle2D bounds = op.getBounds2D(image);
    harness.check(bounds.getWidth(), 10);
    harness.check(bounds.getHeight(), 20);
   
View Full Code Here

TOP

Related Classes of java.awt.image.ByteLookupTable

Copyright © 2018 www.massapicom. 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.