use of com.facebook.imagepipeline.animated.base.AnimatedImage in project fresco by facebook.
the class AnimatedDrawableFactoryImplSupport method create.
/**
* Creates an {@link AnimatedDrawable} based on an {@link AnimatedImage}.
*
* @param animatedImageResult the result of the code
* @param options additional options
* @return a newly constructed {@link AnimatedDrawable}
*/
private AnimatedDrawableSupport create(AnimatedImageResult animatedImageResult, AnimatedDrawableOptions options) {
AnimatedImage animatedImage = animatedImageResult.getImage();
Rect initialBounds = new Rect(0, 0, animatedImage.getWidth(), animatedImage.getHeight());
AnimatedDrawableBackend animatedDrawableBackend = mAnimatedDrawableBackendProvider.get(animatedImageResult, initialBounds);
return createAnimatedDrawable(options, animatedDrawableBackend);
}
Aggregations