@Test public void testTransform_withNarrowRectangle() { Bitmap redNarrowRectangle = createSolidRedBitmap(20, 50); Bitmap result = circleCrop.transform(bitmapPool, redNarrowRectangle, 40, 80); Bitmap expected = createBitmapWithRedCircle(40, 80); assertSamePixels(expected, result); }
@Test public void testTransform_withSquare() { Bitmap redSquare = createSolidRedBitmap(50, 50); Bitmap result = circleCrop.transform(bitmapPool, redSquare, 50, 50); Bitmap expected = createBitmapWithRedCircle(50, 50); assertSamePixels(expected, result); }
@Test public void testTransform_withWideRectangle() { Bitmap redWideRectangle = createSolidRedBitmap(100, 50); Bitmap result = circleCrop.transform(bitmapPool, redWideRectangle, 80, 50); Bitmap expected = createBitmapWithRedCircle(80, 50); assertSamePixels(expected, result); }