001/* 002 * BGFGImage -- A 2D background or foreground (overlay) image for use in a BGFGCanvas3D object. 003 * 004 * Copyright (C) 2009-2016, by Joseph A. Huwaldt. 005 * All rights reserved. 006 * 007 * This library is free software; you can redistribute it and/or 008 * modify it under the terms of the GNU Lesser General Public 009 * License as published by the Free Software Foundation; either 010 * version 2.1 of the License, or (at your option) any later version. 011 * 012 * This library is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * Lesser General Public License for more details. 016 * 017 * You should have received a copy of the GNU Lesser General Public License 018 * along with this program; if not, write to the Free Software 019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 020 * Or visit: http://www.gnu.org/licenses/lgpl.html 021 */ 022package jahuwaldt.j3d; 023 024import java.awt.image.BufferedImage; 025 026/** 027 * The interface in common to any objects that provide a background or foreground 028 * (overlay) image to render behind or on top of a {@link BGFGCanvas3D}. 029 * 030 * <p> Modified by: Joseph A.Huwaldt </p> 031 * 032 * @author Joseph A. Huwaldt, Date: April 9, 2009 033 * @version September 16, 2016 034 */ 035public interface BGFGImage { 036 037 /** 038 * Returns a BufferedImage containing the background or overlay to be displayed in a 039 * {@link BGFGCanvas3D} canvas either behind or over top of the 3D scene or returns 040 * <code>null</code> for no image. 041 * 042 * @return The background or overlay image. 043 */ 044 public BufferedImage getImage(); 045 046 /** 047 * Returns the X coordinate location on the canvas where the upper-left corner of the 048 * buffered image should be drawn. 049 * 050 * @return X-coordinate of the upper-left corner of the image on the canvas. 051 */ 052 public int getImageX(); 053 054 /** 055 * Returns the Y coordinate location on the canvas where the upper-left corner of the 056 * buffered image should be drawn. 057 * 058 * @return Y-coordinate of the upper-left corner of the image on the canvas. 059 */ 060 public int getImageY(); 061 062}