Package javax.media.format

Examples of javax.media.format.IndexedColorFormat.matches()


      final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      assertTrue(f1.equals(f2));
      assertTrue(f1.matches(f2));
      assertTrue(f2.equals(f1));
      assertTrue(f2.matches(f1));

    }
   
    // dimension
    {
View Full Code Here


      final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(0, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      assertFalse(f1.equals(f2));
      assertFalse(f1.matches(f2));
      assertFalse(f2.equals(f1));
      assertFalse(f2.matches(f1));

    }
   
    // dataType
    {
View Full Code Here

      final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.shortArray, 3.f, 1, 2, arr1, arr2, arr3);
      assertFalse(f1.equals(f2));
      assertFalse(f1.matches(f2));
      assertFalse(f2.equals(f1));
      assertFalse(f2.matches(f1));

    }
   
    // max
    {
View Full Code Here

      final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2001, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      assertFalse(f1.equals(f2));
      assertTrue(f1.matches(f2));
      assertFalse(f2.equals(f1));
      assertTrue(f2.matches(f1));

    }
   
   
    {
View Full Code Here

      final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 4.f, 1, 2, arr1, arr2, arr3);
      assertFalse(f1.equals(f2));
      assertFalse(f1.matches(f2));
      assertFalse(f2.equals(f1));
      assertFalse(f2.matches(f1));

    }
   
    {
      final byte[] arr1 = new byte[] {0, 0};
View Full Code Here

      final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 2, 2, arr1, arr2, arr3);
      assertFalse(f1.equals(f2));
      assertFalse(f1.matches(f2));
      assertFalse(f2.equals(f1));
      assertFalse(f2.matches(f1));

    }
   
    {
      final byte[] arr1 = new byte[] {0, 0};
View Full Code Here

      final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 3, arr1, arr2, arr3);
      assertFalse(f1.equals(f2));
      assertFalse(f1.matches(f2));
      assertFalse(f2.equals(f1));
      assertFalse(f2.matches(f1));

    }
   
    {
      final byte[] arr1 = new byte[] {0, 0};
View Full Code Here

      final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
      final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 3, new byte[] {0, 0}, arr2, arr3);
      assertFalse(f1.equals(f2));
      assertFalse(f1.matches(f2));
      assertFalse(f2.equals(f1));
      assertFalse(f2.matches(f1));

    }
   
  }
View Full Code Here

      {
        IndexedColorFormat f2 = f2s[i];
        assertTrue(f1.equals(f2));
        assertTrue(f1.matches(f2));
        assertTrue(f2.equals(f1));
        assertTrue(f2.matches(f1));
      }
    }
   
    // IndexedColorFormat - not equal and not match:
    {
View Full Code Here

        IndexedColorFormat f2 = f2s[i];
        //System.out.println(f2);
        assertFalse(f1.equals(f2));
        assertFalse(f1.matches(f2));
        assertFalse(f2.equals(f1));
        assertFalse(f2.matches(f1));
      }
    }

    // IndexedColorFormat - not equal but match:
    {
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.