@Test
public void testZoom169() throws Exception {

    // zooming 16x9 assumes that the content is 16x9 letterbox, so we need a smaller
    // 16x9 rectangle inside the larger one.
    // this is done by picking a 4/3 rectangle, and then finding the 16x9 rectangle
    // and then scaling that rectangle around the original 16x9 rectangle
    // the result is a 16x9 super rectangle scaled so that the middle 16x9 rectangle
    // matches the video size you want
    RectangleF r169 = new RectangleF(0,0,1920,1080);
    Rectangle test = AspectHelper.zoom(r169, AspectHelper.ar_16_9).asIntRect();
    assertEquals(-320, test.x);
    assertEquals(-180, test.y);
    assertEquals(2560, test.width);
    assertEquals(1440, test.height);
    // prove that doing the same thing with smaller rectangle can then be translated to other coordinate system
    r169 = new RectangleF(0,0,1280,720);
    RectangleF rtrans = AspectHelper.zoom(r169, AspectHelper.ar_16_9).translateImmutable(r169, new RectangleF(0,0,1920,1080));
    System.out.println(rtrans);
    test= rtrans.asIntRect();
    assertEquals(-320, test.x);
    assertEquals(-180, test.y);
    assertEquals(2560, test.width);
    assertEquals(1440, test.height);
}