From 64d97bb3532525879dd90f3b246ac6060f466684 Mon Sep 17 00:00:00 2001
From: Sam Judd
Date: Thu, 23 Oct 2014 18:57:03 -0700
Subject: Document width/height values.
Fixes #145.
---
.../src/main/java/com/bumptech/glide/DownloadOptions.java | 4 ++--
.../main/java/com/bumptech/glide/GenericRequestBuilder.java | 12 ++++++------
.../main/java/com/bumptech/glide/load/ResourceDecoder.java | 4 ++--
.../src/main/java/com/bumptech/glide/load/engine/Engine.java | 4 ++--
.../glide/load/engine/bitmap_recycle/BitmapPool.java | 8 ++++----
.../main/java/com/bumptech/glide/load/model/ModelCache.java | 8 ++++----
.../main/java/com/bumptech/glide/load/model/ModelLoader.java | 4 ++--
.../bumptech/glide/load/model/stream/BaseGlideUrlLoader.java | 10 +++++-----
.../glide/load/resource/bitmap/TransformationUtils.java | 8 ++++----
.../com/bumptech/glide/request/target/PreloadTarget.java | 4 ++--
.../java/com/bumptech/glide/request/target/SimpleTarget.java | 4 ++--
.../com/bumptech/glide/request/target/SizeReadyCallback.java | 4 ++--
12 files changed, 37 insertions(+), 37 deletions(-)
(limited to 'library')
diff --git a/library/src/main/java/com/bumptech/glide/DownloadOptions.java b/library/src/main/java/com/bumptech/glide/DownloadOptions.java
index dc4c73ba..ae472c85 100644
--- a/library/src/main/java/com/bumptech/glide/DownloadOptions.java
+++ b/library/src/main/java/com/bumptech/glide/DownloadOptions.java
@@ -21,8 +21,8 @@ interface DownloadOptions {
* Loads the original unmodified data into the cache and returns a {@link java.util.concurrent.Future} that can be
* used to retrieve the cache File containing the data.
*
- * @param width The width to use to fetch the data.
- * @param height The height to use to fetch the data.
+ * @param width The width in pixels to use to fetch the data.
+ * @param height The height in pixels to use to fetch the data.
* @return A {@link java.util.concurrent.Future} that can be used to retrieve the cache File containing the data.
*/
FutureTarget downloadOnly(int width, int height);
diff --git a/library/src/main/java/com/bumptech/glide/GenericRequestBuilder.java b/library/src/main/java/com/bumptech/glide/GenericRequestBuilder.java
index 9a65d234..2ab7d792 100644
--- a/library/src/main/java/com/bumptech/glide/GenericRequestBuilder.java
+++ b/library/src/main/java/com/bumptech/glide/GenericRequestBuilder.java
@@ -503,8 +503,8 @@ public class GenericRequestBuilder override(int width, int height) {
@@ -652,10 +652,10 @@ public class GenericRequestBuilder {
*
*
* @param source The data the resource should be decoded from.
- * @param width The ideal width of the decoded resource.
- * @param height The ideal height of the decoded resource.
+ * @param width The ideal width in pixels of the decoded resource.
+ * @param height The ideal height in pixels of the decoded resource.
* @throws IOException
*/
Resource decode(T source, int width, int height) throws IOException;
diff --git a/library/src/main/java/com/bumptech/glide/load/engine/Engine.java b/library/src/main/java/com/bumptech/glide/load/engine/Engine.java
index 4909d9b1..02180b25 100644
--- a/library/src/main/java/com/bumptech/glide/load/engine/Engine.java
+++ b/library/src/main/java/com/bumptech/glide/load/engine/Engine.java
@@ -120,8 +120,8 @@ public class Engine implements EngineJobListener, MemoryCache.ResourceRemovedLis
*
* @param signature A non-null unique key to be mixed into the cache key that identifies the version of the data to
* be loaded.
- * @param width The target width of the retrieved resource.
- * @param height The target height of the retrieved resource.
+ * @param width The target width in pixels of the desired resource.
+ * @param height The target height in pixels of the desired resource.
* @param fetcher The fetcher to use to retrieve data not in the disk cache.
* @param loadProvider The load provider containing various encoders and decoders use to decode and encode data.
* @param transformation The transformation to use to transform the decoded resource.
diff --git a/library/src/main/java/com/bumptech/glide/load/engine/bitmap_recycle/BitmapPool.java b/library/src/main/java/com/bumptech/glide/load/engine/bitmap_recycle/BitmapPool.java
index 3dd4c38d..0390a668 100644
--- a/library/src/main/java/com/bumptech/glide/load/engine/bitmap_recycle/BitmapPool.java
+++ b/library/src/main/java/com/bumptech/glide/load/engine/bitmap_recycle/BitmapPool.java
@@ -71,8 +71,8 @@ public interface BitmapPool {
*
* @see #getDirty(int, int, android.graphics.Bitmap.Config)
*
- * @param width The width of the desired {@link android.graphics.Bitmap}.
- * @param height The height of the desired {@link android.graphics.Bitmap}.
+ * @param width The width in pixels of the desired {@link android.graphics.Bitmap}.
+ * @param height The height in pixels of the desired {@link android.graphics.Bitmap}.
* @param config The {@link android.graphics.Bitmap.Config} of the desired {@link android.graphics.Bitmap}.
*/
Bitmap get(int width, int height, Bitmap.Config config);
@@ -89,8 +89,8 @@ public interface BitmapPool {
*
* @see #get(int, int, android.graphics.Bitmap.Config)
*
- * @param width The width of the desired {@link android.graphics.Bitmap}.
- * @param height The height of the desired {@link android.graphics.Bitmap}.
+ * @param width The width in pixels of the desired {@link android.graphics.Bitmap}.
+ * @param height The height in pixels of the desired {@link android.graphics.Bitmap}.
* @param config The {@link android.graphics.Bitmap.Config} of the desired {@link android.graphics.Bitmap}.
* @return A {@link android.graphics.Bitmap} with exactly the given width, height, and config potentially containing
* random image data or null if no such {@link android.graphics.Bitmap} could be obtained from the pool.
diff --git a/library/src/main/java/com/bumptech/glide/load/model/ModelCache.java b/library/src/main/java/com/bumptech/glide/load/model/ModelCache.java
index 5a46cde6..a0dede14 100644
--- a/library/src/main/java/com/bumptech/glide/load/model/ModelCache.java
+++ b/library/src/main/java/com/bumptech/glide/load/model/ModelCache.java
@@ -35,8 +35,8 @@ public class ModelCache {
* Get a value.
*
* @param model The model.
- * @param width The width of the view the image is being loaded into.
- * @param height The height of the view the image is being loaded into.
+ * @param width The width in pixels of the view the image is being loaded into.
+ * @param height The height in pixels of the view the image is being loaded into.
*
* @return The cached result, or null.
*/
@@ -51,8 +51,8 @@ public class ModelCache {
* Add a value.
*
* @param model The model.
- * @param width The width of the view the image is being loaded into.
- * @param height The height of the view the image is being loaded into.
+ * @param width The width in pixels of the view the image is being loaded into.
+ * @param height The height in pixels of the view the image is being loaded into.
* @param value The value to store.
*/
public void put(A model, int width, int height, B value) {
diff --git a/library/src/main/java/com/bumptech/glide/load/model/ModelLoader.java b/library/src/main/java/com/bumptech/glide/load/model/ModelLoader.java
index f028209a..164f1d72 100644
--- a/library/src/main/java/com/bumptech/glide/load/model/ModelLoader.java
+++ b/library/src/main/java/com/bumptech/glide/load/model/ModelLoader.java
@@ -37,8 +37,8 @@ public interface ModelLoader {
*
*
* @param model The model representing the resource.
- * @param width The width of the view or target the resource will be loaded into
- * @param height The height of the view or target the resource will be loaded into
+ * @param width The width in pixels of the view or target the resource will be loaded into
+ * @param height The height in pixels of the view or target the resource will be loaded into
* @return A {@link DataFetcher} that can obtain the data the resource can be decoded from if the resource is not
* cached, or null if no valid {@link com.bumptech.glide.load.data.DataFetcher} could be constructed.
*/
diff --git a/library/src/main/java/com/bumptech/glide/load/model/stream/BaseGlideUrlLoader.java b/library/src/main/java/com/bumptech/glide/load/model/stream/BaseGlideUrlLoader.java
index a3af9053..a889eebd 100644
--- a/library/src/main/java/com/bumptech/glide/load/model/stream/BaseGlideUrlLoader.java
+++ b/library/src/main/java/com/bumptech/glide/load/model/stream/BaseGlideUrlLoader.java
@@ -15,7 +15,7 @@ import java.io.InputStream;
* A base class for loading images over http/https. Can be subclassed for use with any model that can be translated
* in to {@link java.io.InputStream} data.
*
- * @param The type of the model
+ * @param The type of the model.
*/
public abstract class BaseGlideUrlLoader implements StreamModelLoader {
private final ModelLoader concreteLoader;
@@ -64,10 +64,10 @@ public abstract class BaseGlideUrlLoader implements StreamModelLoader {
/**
* Get a valid url http:// or https:// for the given model and dimensions as a string.
*
- * @param model The model
- * @param width The width of the view/target the image will be loaded into
- * @param height The height of the view/target the image will be loaded into
- * @return The String url
+ * @param model The model.
+ * @param width The width in pixels of the view/target the image will be loaded into.
+ * @param height The height in pixels of the view/target the image will be loaded into.
+ * @return The String url.
*/
protected abstract String getUrl(T model, int width, int height);
}
diff --git a/library/src/main/java/com/bumptech/glide/load/resource/bitmap/TransformationUtils.java b/library/src/main/java/com/bumptech/glide/load/resource/bitmap/TransformationUtils.java
index 2f3a3ef1..80ab07cc 100644
--- a/library/src/main/java/com/bumptech/glide/load/resource/bitmap/TransformationUtils.java
+++ b/library/src/main/java/com/bumptech/glide/load/resource/bitmap/TransformationUtils.java
@@ -30,8 +30,8 @@ public final class TransformationUtils {
* @param recycled A mutable Bitmap with dimensions width and height that we can load the cropped portion of toCrop
* into.
* @param toCrop The Bitmap to resize.
- * @param width The width of the final Bitmap.
- * @param height The height of the final Bitmap.
+ * @param width The width in pixels of the final Bitmap.
+ * @param height The height in pixels of the final Bitmap.
* @return The resized Bitmap (will be recycled if recycled is not null).
*/
public static Bitmap centerCrop(Bitmap recycled, Bitmap toCrop, int width, int height) {
@@ -77,8 +77,8 @@ public final class TransformationUtils {
*
* @param toFit The Bitmap to shrink.
* @param pool The BitmapPool to try to reuse a bitmap from.
- * @param width The width the final image will fit within.
- * @param height The height the final image will fit within.
+ * @param width The width in pixels the final image will fit within.
+ * @param height The height in pixels the final image will fit within.
* @return A new Bitmap shrunk to fit within the given dimensions, or toFit if toFit's width or height matches the
* given dimensions and toFit fits within the given dimensions
*/
diff --git a/library/src/main/java/com/bumptech/glide/request/target/PreloadTarget.java b/library/src/main/java/com/bumptech/glide/request/target/PreloadTarget.java
index 8dfbe600..a8a9b5a2 100644
--- a/library/src/main/java/com/bumptech/glide/request/target/PreloadTarget.java
+++ b/library/src/main/java/com/bumptech/glide/request/target/PreloadTarget.java
@@ -14,8 +14,8 @@ public final class PreloadTarget extends SimpleTarget {
/**
* Returns a PreloadTarget.
*
- * @param width The width of the desired resourece.
- * @param height The height of the desired resource.
+ * @param width The width in pixels of the desired resource.
+ * @param height The height in pixels of the desired resource.
* @param The type of the desired resource.
*/
public static PreloadTarget obtain(int width, int height) {
diff --git a/library/src/main/java/com/bumptech/glide/request/target/SimpleTarget.java b/library/src/main/java/com/bumptech/glide/request/target/SimpleTarget.java
index 78522c32..cdbc9a49 100644
--- a/library/src/main/java/com/bumptech/glide/request/target/SimpleTarget.java
+++ b/library/src/main/java/com/bumptech/glide/request/target/SimpleTarget.java
@@ -44,8 +44,8 @@ public abstract class SimpleTarget extends BaseTarget {
/**
* Constructor for the target that takes the desired dimensions of the decoded and/or transformed resource.
*
- * @param width The desired width of the resource.
- * @param height The desired height of the resource.
+ * @param width The width in pixels of the desired resource.
+ * @param height The height in pixels of the desired resource.
*/
public SimpleTarget(int width, int height) {
this.width = width;
diff --git a/library/src/main/java/com/bumptech/glide/request/target/SizeReadyCallback.java b/library/src/main/java/com/bumptech/glide/request/target/SizeReadyCallback.java
index eb382cd6..22b41180 100644
--- a/library/src/main/java/com/bumptech/glide/request/target/SizeReadyCallback.java
+++ b/library/src/main/java/com/bumptech/glide/request/target/SizeReadyCallback.java
@@ -8,8 +8,8 @@ public interface SizeReadyCallback {
/**
* A callback called on the main thread.
*
- * @param width The width of the target.
- * @param height The height of the target.
+ * @param width The width in pixels of the target.
+ * @param height The height in pixels of the target.
*/
void onSizeReady(int width, int height);
}
--
cgit v1.2.3