public static class

ScalingUtils.InterpolatingScaleType

extends Object
implements ScalingUtils.ScaleType ScalingUtils.StatefulScaleType
java.lang.Object
   ↳ com.facebook.drawee.drawable.ScalingUtils.InterpolatingScaleType

Class Overview

Scale type that interpolates transform of the two underlying scale types.

Summary

[Expand]
Inherited Fields
From interface com.facebook.drawee.drawable.ScalingUtils.ScaleType
Public Constructors
InterpolatingScaleType(ScalingUtils.ScaleType scaleTypeFrom, ScalingUtils.ScaleType scaleTypeTo, Rect boundsFrom, Rect boundsTo)
InterpolatingScaleType(ScalingUtils.ScaleType scaleTypeFrom, ScalingUtils.ScaleType scaleTypeTo)
Public Methods
Rect getBoundsFrom()
Rect getBoundsTo()
ScalingUtils.ScaleType getScaleTypeFrom()
ScalingUtils.ScaleType getScaleTypeTo()
Object getState()
Returns the internal state.
Matrix getTransform(Matrix transform, Rect parentBounds, int childWidth, int childHeight, float focusX, float focusY)
Gets transformation matrix based on the scale type.
float getValue()
Gets the interpolating value.
void setValue(float value)
Sets the interpolating value.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.drawee.drawable.ScalingUtils.ScaleType
From interface com.facebook.drawee.drawable.ScalingUtils.StatefulScaleType

Public Constructors

public InterpolatingScaleType (ScalingUtils.ScaleType scaleTypeFrom, ScalingUtils.ScaleType scaleTypeTo, Rect boundsFrom, Rect boundsTo)

public InterpolatingScaleType (ScalingUtils.ScaleType scaleTypeFrom, ScalingUtils.ScaleType scaleTypeTo)

Public Methods

public Rect getBoundsFrom ()

public Rect getBoundsTo ()

public ScalingUtils.ScaleType getScaleTypeFrom ()

public ScalingUtils.ScaleType getScaleTypeTo ()

public Object getState ()

Returns the internal state. The returned object must be immutable! The returned state may be used for caching the result of ScaleType.getTransform. If null state is returned, the result will not be cached. If non-null state is returned, the old transformation may be used if produced with an equal state.

public Matrix getTransform (Matrix transform, Rect parentBounds, int childWidth, int childHeight, float focusX, float focusY)

Gets transformation matrix based on the scale type.

Parameters
transform out matrix to store result
parentBounds parent bounds
childWidth child width
childHeight child height
focusX focus point x coordinate, relative [0...1]
focusY focus point y coordinate, relative [0...1]
Returns
  • same reference to the out matrix for convenience

public float getValue ()

Gets the interpolating value.

public void setValue (float value)

Sets the interpolating value. Value of 0.0 will produce the transform same as ScaleTypeFrom. Value of 1.0 will produce the transform same as ScaleTypeTo. Inbetween values will produce a transform that is a linear combination between the two.

public String toString ()