method public boolean isDecodeAsAlphaMaskEnabled();
method public boolean isMutableRequired();
method public boolean isUnpremultipliedRequired();
- method public android.graphics.ImageDecoder setAllocator(int);
- method public android.graphics.ImageDecoder setConserveMemory(boolean);
- method public android.graphics.ImageDecoder setCrop(android.graphics.Rect);
- method public android.graphics.ImageDecoder setDecodeAsAlphaMaskEnabled(boolean);
- method public android.graphics.ImageDecoder setMutableRequired(boolean);
- method public android.graphics.ImageDecoder setOnPartialImageListener(android.graphics.ImageDecoder.OnPartialImageListener);
- method public android.graphics.ImageDecoder setPostProcessor(android.graphics.PostProcessor);
- method public android.graphics.ImageDecoder setTargetColorSpace(android.graphics.ColorSpace);
- method public android.graphics.ImageDecoder setTargetSampleSize(int);
- method public android.graphics.ImageDecoder setTargetSize(int, int);
- method public android.graphics.ImageDecoder setUnpremultipliedRequired(boolean);
+ method public void setAllocator(int);
+ method public void setConserveMemory(boolean);
+ method public void setCrop(android.graphics.Rect);
+ method public void setDecodeAsAlphaMaskEnabled(boolean);
+ method public void setMutableRequired(boolean);
+ method public void setOnPartialImageListener(android.graphics.ImageDecoder.OnPartialImageListener);
+ method public void setPostProcessor(android.graphics.PostProcessor);
+ method public void setTargetColorSpace(android.graphics.ColorSpace);
+ method public void setTargetSampleSize(int);
+ method public void setTargetSize(int, int);
+ method public void setUnpremultipliedRequired(boolean);
field public static final int ALLOCATOR_DEFAULT = 0; // 0x0
field public static final int ALLOCATOR_HARDWARE = 3; // 0x3
field public static final int ALLOCATOR_SHARED_MEMORY = 2; // 0x2
*/
@java.lang.Deprecated
public ImageDecoder setResize(int width, int height) {
- return this.setTargetSize(width, height);
+ this.setTargetSize(width, height);
+ return this;
}
/**
*
* @param width must be greater than 0.
* @param height must be greater than 0.
- * @return this object for chaining.
*/
- public ImageDecoder setTargetSize(int width, int height) {
+ public void setTargetSize(int width, int height) {
if (width <= 0 || height <= 0) {
throw new IllegalArgumentException("Dimensions must be positive! "
+ "provided (" + width + ", " + height + ")");
mDesiredWidth = width;
mDesiredHeight = height;
- return this;
}
/** @removed
*/
@java.lang.Deprecated
public ImageDecoder setResize(int sampleSize) {
- return this.setTargetSampleSize(sampleSize);
+ this.setTargetSampleSize(sampleSize);
+ return this;
}
private int getTargetDimension(int original, int sampleSize, int computed) {
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
*
* @param sampleSize Sampling rate of the encoded image.
- * @return this object for chaining.
*/
- public ImageDecoder setTargetSampleSize(int sampleSize) {
+ public void setTargetSampleSize(int sampleSize) {
Size size = this.getSampledSize(sampleSize);
int targetWidth = getTargetDimension(mWidth, sampleSize, size.getWidth());
int targetHeight = getTargetDimension(mHeight, sampleSize, size.getHeight());
- return this.setTargetSize(targetWidth, targetHeight);
+ this.setTargetSize(targetWidth, targetHeight);
}
private boolean requestedResize() {
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
*
* @param allocator Type of allocator to use.
- * @return this object for chaining.
*/
- public ImageDecoder setAllocator(@Allocator int allocator) {
+ public void setAllocator(@Allocator int allocator) {
if (allocator < ALLOCATOR_DEFAULT || allocator > ALLOCATOR_HARDWARE) {
throw new IllegalArgumentException("invalid allocator " + allocator);
}
mAllocator = allocator;
- return this;
}
/**
*
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
- *
- * @return this object for chaining.
*/
- public ImageDecoder setUnpremultipliedRequired(boolean unpremultipliedRequired) {
+ public void setUnpremultipliedRequired(boolean unpremultipliedRequired) {
mUnpremultipliedRequired = unpremultipliedRequired;
- return this;
}
/** @removed
*/
@java.lang.Deprecated
public ImageDecoder setRequireUnpremultiplied(boolean unpremultipliedRequired) {
- return this.setUnpremultipliedRequired(unpremultipliedRequired);
+ this.setUnpremultipliedRequired(unpremultipliedRequired);
+ return this;
}
/**
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
*
- * @return this object for chaining.
*/
- public ImageDecoder setPostProcessor(@Nullable PostProcessor p) {
+ public void setPostProcessor(@Nullable PostProcessor p) {
mPostProcessor = p;
- return this;
}
/**
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
*
- * @return this object for chaining.
*/
- public ImageDecoder setOnPartialImageListener(@Nullable OnPartialImageListener l) {
+ public void setOnPartialImageListener(@Nullable OnPartialImageListener l) {
mOnPartialImageListener = l;
- return this;
}
/**
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
*
- * @return this object for chaining.
*/
- public ImageDecoder setCrop(@Nullable Rect subset) {
+ public void setCrop(@Nullable Rect subset) {
mCropRect = subset;
- return this;
}
/**
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
*
- * @return this object for chaining.
- *
* @hide
*/
- public ImageDecoder setOutPaddingRect(@NonNull Rect outPadding) {
+ public void setOutPaddingRect(@NonNull Rect outPadding) {
mOutPaddingRect = outPadding;
- return this;
}
/**
*
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
- *
- * @return this object for chaining.
*/
- public ImageDecoder setMutableRequired(boolean mutable) {
+ public void setMutableRequired(boolean mutable) {
mMutable = mutable;
- return this;
}
/** @removed
*/
@java.lang.Deprecated
public ImageDecoder setMutable(boolean mutable) {
- return this.setMutableRequired(mutable);
+ this.setMutableRequired(mutable);
+ return this;
}
/**
*
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
- *
- * @return this object for chaining.
*/
- public ImageDecoder setConserveMemory(boolean conserveMemory) {
+ public void setConserveMemory(boolean conserveMemory) {
mConserveMemory = conserveMemory;
- return this;
}
/**
*
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
- *
- * @return this object for chaining.
*/
- public ImageDecoder setDecodeAsAlphaMaskEnabled(boolean enabled) {
+ public void setDecodeAsAlphaMaskEnabled(boolean enabled) {
mDecodeAsAlphaMask = enabled;
- return this;
}
/** @removed
*/
@java.lang.Deprecated
public ImageDecoder setDecodeAsAlphaMask(boolean enabled) {
- return this.setDecodeAsAlphaMaskEnabled(enabled);
+ this.setDecodeAsAlphaMaskEnabled(enabled);
+ return this;
}
/** @removed
*/
@java.lang.Deprecated
public ImageDecoder setAsAlphaMask(boolean asAlphaMask) {
- return this.setDecodeAsAlphaMask(asAlphaMask);
+ this.setDecodeAsAlphaMask(asAlphaMask);
+ return this;
}
/**
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded}.</p>
*/
- public ImageDecoder setTargetColorSpace(ColorSpace colorSpace) {
+ public void setTargetColorSpace(ColorSpace colorSpace) {
mDesiredColorSpace = colorSpace;
- return this;
}
@Override