Package javax.media

Examples of javax.media.Format.intersects()


      final Format f1 = new Format("abc", Format.intArray);
      final Format f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      assertEquals(f1.intersects(f2), f2);
      assertNotEquals(f1.intersects(f2), f1);
      assertNotEquals(f2.intersects(f1), f1);
      assertEquals(f2.intersects(f1), f2);
    }
   
    {
      final Format f1 = new Format(null, Format.intArray);
      final Format f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, null, 1.f);
View Full Code Here


   
    {
      final Format f1 = new RGBFormat(new Dimension(1, 1), 1000, Format.byteArray, 2.f, 11, 2, 13, 14, 5, 6, 17, 8);
      final Format f2 = new YUVFormat(new Dimension(1, 1), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6);
      assertEquals(f1.intersects(f2), null);
      assertEquals(f2.intersects(f1), null);
    }
 
  }
 
  public void testRelax()
View Full Code Here

    // equal and match:
    {
      final Format[] f2s = new Format[]{
          new Format("abc", Format.byteArray),
            (Format) f1.clone(),
            (Format) f1.intersects(f1)
      };
      for (int i = 0; i < f2s.length; ++i)
      {
        Format f2 = f2s[i];
        assertTrue(f1.equals(f2));
View Full Code Here

    // equals f1
    {
      final Format[] f2s = new Format[]{
          new Format("abc", Format.byteArray),
            (Format) f1.clone(),
            (Format) f1.intersects(f1)
      };
      for (int i = 0; i < f2s.length; ++i)
      {
        Format f2 = f2s[i];
        final Format f3 = f1.intersects(f2);
View Full Code Here

    }
   
    {
      final Format f1 = new Format("abc");
      final VideoFormat f2 = new VideoFormat("abc", new Dimension(100, 201), 2000, int[].class, 2.f);
      final VideoFormat f3 = (VideoFormat) f1.intersects(f2);
      final VideoFormat f4 = (VideoFormat) f2.intersects(f1);
     
      assertTrue(f3.getSize() != f2.getSize());
      assertTrue(f4.getSize() != f2.getSize());
     
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.