summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/imageshow/ImageWithIcon.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/filtershow/imageshow/ImageWithIcon.java')
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageWithIcon.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageWithIcon.java b/src/com/android/gallery3d/filtershow/imageshow/ImageWithIcon.java
new file mode 100644
index 000000000..2666cb73d
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageWithIcon.java
@@ -0,0 +1,34 @@
+package com.android.gallery3d.filtershow.imageshow;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+
+/**
+ * TODO: Insert description here. (generated by hoford)
+ */
+public class ImageWithIcon extends ImageSmallFilter {
+ /**
+ * @param context
+ */
+ public ImageWithIcon(Context context) {
+ super(context);
+ // TODO(hoford): Auto-generated constructor stub
+ }
+
+ private Bitmap bitmap;
+
+ public void setIcon(Bitmap bitmap){
+ this.bitmap = bitmap;
+ }
+
+ @Override
+ public void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ if (bitmap != null) {
+ Rect d = new Rect(0, mMargin, getWidth() - mMargin, getWidth());
+ drawImage(canvas, bitmap, d);
+ }
+ }
+}