Update git submodules
[LibreOffice.git] / android / source / src / java / org / libreoffice / canvas / CanvasElement.java
blob51e8801f6b5809395c2456570c5149e3859e0a2e
1 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 package org.libreoffice.canvas;
12 import android.graphics.Canvas;
14 /**
15 * Canvas element is an element (or part) that is drawn canvas and can
16 * potentially be interacted with.
18 public interface CanvasElement {
19 /**
20 * Called when the element needs to be draw no the canvas. This method
21 * should call onDraw when conditions to draw are satisfied.
23 * @param canvas - the canvas
25 void draw(Canvas canvas);
27 /**
28 * Hit test - returns true if the object has been hit
29 * @param x - x coordinate of the
30 * @param y - y coordinate of the
32 boolean contains(float x, float y);
34 /**
35 * Return if element is visible.
37 boolean isVisible();
39 /**
40 * Set element visibility.
41 * @param visible - is element visible
43 void setVisible(boolean visible);
45 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */