Search in sources :

Example 6 with ScaleTypeDrawable

use of com.facebook.drawee.drawable.ScaleTypeDrawable in project fresco by facebook.

the class GenericDraweeHierarchyTest method assertActualImageScaleType.

private void assertActualImageScaleType(ScaleType expectedScaleType, PointF expectedFocusPoint, Drawable actualBranch) {
    assertNotNull(actualBranch);
    ScaleTypeDrawable scaleTypeDrawable = (ScaleTypeDrawable) actualBranch;
    assertSame(expectedScaleType, scaleTypeDrawable.getScaleType());
    assertSame(ForwardingDrawable.class, scaleTypeDrawable.getCurrent().getClass());
    AndroidGraphicsTestUtils.assertEquals(expectedFocusPoint, scaleTypeDrawable.getFocusPoint(), 0);
}
Also used : ScaleTypeDrawable(com.facebook.drawee.drawable.ScaleTypeDrawable)

Aggregations

ScaleTypeDrawable (com.facebook.drawee.drawable.ScaleTypeDrawable)6 BitmapDrawable (android.graphics.drawable.BitmapDrawable)2 Drawable (android.graphics.drawable.Drawable)2 FadeDrawable (com.facebook.drawee.drawable.FadeDrawable)2 ScaleType (com.facebook.drawee.drawable.ScalingUtils.ScaleType)2 Test (org.junit.Test)2 PointF (android.graphics.PointF)1 ColorDrawable (android.graphics.drawable.ColorDrawable)1 DebugControllerOverlayDrawable (com.facebook.drawee.debug.DebugControllerOverlayDrawable)1 ForwardingDrawable (com.facebook.drawee.drawable.ForwardingDrawable)1 MatrixDrawable (com.facebook.drawee.drawable.MatrixDrawable)1 OrientedDrawable (com.facebook.drawee.drawable.OrientedDrawable)1 RoundedBitmapDrawable (com.facebook.drawee.drawable.RoundedBitmapDrawable)1 RoundedColorDrawable (com.facebook.drawee.drawable.RoundedColorDrawable)1 RoundedCornersDrawable (com.facebook.drawee.drawable.RoundedCornersDrawable)1 DraweeHierarchy (com.facebook.drawee.interfaces.DraweeHierarchy)1 SettableDraweeHierarchy (com.facebook.drawee.interfaces.SettableDraweeHierarchy)1