LibreOffice Module android (master) 1
CanvasElement.java
Go to the documentation of this file.
1/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 */
9
10package org.libreoffice.canvas;
11
12import android.graphics.Canvas;
13
18public interface CanvasElement {
25 void draw(Canvas canvas);
26
32 boolean contains(float x, float y);
33
37 boolean isVisible();
38
43 void setVisible(boolean visible);
44}
45/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Canvas element is an element (or part) that is drawn canvas and can potentially be interacted with.
boolean isVisible()
Return if element is visible.
boolean contains(float x, float y)
Hit test - returns true if the object has been hit.
void draw(Canvas canvas)
Called when the element needs to be draw no the canvas.
void setVisible(boolean visible)
Set element visibility.