summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/ui/SelectionRenderer.java
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2013-05-17 09:09:21 -0700
committerMichael Kolb <kolby@google.com>2013-05-17 15:13:41 -0700
commit01fa94509b880bf80d3c852544c26cda6e882539 (patch)
tree702da0e628e88474b4b66b3236e01b0f4fa7ee6e /src/com/android/gallery3d/filtershow/ui/SelectionRenderer.java
parentce54df0c34bd0d8472e2c1fea4da1e0a9d8fd657 (diff)
downloadandroid_packages_apps_Snap-01fa94509b880bf80d3c852544c26cda6e882539.tar.gz
android_packages_apps_Snap-01fa94509b880bf80d3c852544c26cda6e882539.tar.bz2
android_packages_apps_Snap-01fa94509b880bf80d3c852544c26cda6e882539.zip
Highlight selected option in FX and Borders
Bug: 8791729 Change-Id: I8ac2c3deabe7b293df48db9f44f52956443a92a4
Diffstat (limited to 'src/com/android/gallery3d/filtershow/ui/SelectionRenderer.java')
-rw-r--r--src/com/android/gallery3d/filtershow/ui/SelectionRenderer.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/ui/SelectionRenderer.java b/src/com/android/gallery3d/filtershow/ui/SelectionRenderer.java
new file mode 100644
index 000000000..1b108bd5d
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/ui/SelectionRenderer.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.gallery3d.filtershow.ui;
+
+import android.graphics.Canvas;
+import android.graphics.Paint;
+
+public class SelectionRenderer {
+
+ public static void drawSelection(Canvas canvas, int left, int top, int right, int bottom,
+ int stroke, Paint paint) {
+ canvas.drawRect(left, top, right, top + stroke, paint);
+ canvas.drawRect(left, bottom - stroke, right, bottom, paint);
+ canvas.drawRect(left, top, left + stroke, bottom, paint);
+ canvas.drawRect(right - stroke, top, right, bottom, paint);
+ }
+
+}