1 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 package org
.libreoffice
.canvas
;
12 import android
.graphics
.Canvas
;
15 * Canvas element is an element (or part) that is drawn canvas and can
16 * potentially be interacted with.
18 public interface CanvasElement
{
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
);
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
);
35 * Return if element is visible.
40 * Set element visibility.
41 * @param visible - is element visible
43 void setVisible(boolean visible
);
45 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */