summaryrefslogtreecommitdiffstats
path: root/android/source/src/java/org/libreoffice/canvas/CanvasElementImplRequirement.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/source/src/java/org/libreoffice/canvas/CanvasElementImplRequirement.java')
-rw-r--r--android/source/src/java/org/libreoffice/canvas/CanvasElementImplRequirement.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/android/source/src/java/org/libreoffice/canvas/CanvasElementImplRequirement.java b/android/source/src/java/org/libreoffice/canvas/CanvasElementImplRequirement.java
new file mode 100644
index 000000000..26789e8d8
--- /dev/null
+++ b/android/source/src/java/org/libreoffice/canvas/CanvasElementImplRequirement.java
@@ -0,0 +1,25 @@
+package org.libreoffice.canvas;
+
+import android.graphics.Canvas;
+
+/**
+ * The interface defines a set of method that a typical CanvasElement
+ * implementation should implement.
+ */
+interface CanvasElementImplRequirement {
+
+ /**
+ * Implement hit test here
+ * @param x - x coordinate of the
+ * @param y - y coordinate of the
+ */
+ boolean onHitTest(float x, float y);
+
+ /**
+ * Called inside draw if the element is visible. Override this method to
+ * draw the element on the canvas.
+ *
+ * @param canvas - the canvas
+ */
+ void onDraw(Canvas canvas);
+}