1 package org
.libreoffice
.canvas
;
3 import android
.graphics
.Canvas
;
6 * Common implementation to canvas elements.
8 public abstract class CommonCanvasElement
implements CanvasElement
, CanvasElementImplRequirement
{
10 private boolean mVisible
= false;
16 public boolean isVisible() {
21 * Set element visibility.
24 public void setVisible(boolean visible
) {
29 * Trigger drawing the element on the canvas.
32 public void draw(Canvas canvas
) {
39 * Hit test. Return true if the element was hit. Directly return false if
40 * the element is invisible.
43 public boolean contains(float x
, float y
) {
44 return isVisible() && onHitTest(x
, y
);