001/* 002 * CapturedImageObserver -- An observer for when images have been captured by an ImageCaptureCanvas3D. 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 * 022 * This is based on CapturedImageObserver from the org.j3d package which included 023 * the following note: 024 * 025 * J3D.org Copyright (c) 2000 026 * Java Source 027 * 028 * This source is licensed under the GNU LGPL v2.1 029 */ 030package jahuwaldt.j3d.image; 031 032import java.awt.image.BufferedImage; 033 034/** 035 * An observer for when images have been captured from the Canvas3D. 036 * 037 * <p> Modified by: Joseph A.Huwaldt </p> 038 * 039 * @author Justin Couch 040 * @version September 16, 2016 041 */ 042public interface CapturedImageObserver { 043 044 /** 045 * Notification that an image has been captured from the canvas and is ready for 046 * processing. 047 * 048 * @param img The image that was captured. 049 */ 050 public void canvasImageCaptured(BufferedImage img); 051 052 /** 053 * Returns a flag indicating if the next frame should be captured or not. 054 * 055 * @return <code>true</code> if the observer should be passed an image for the next 056 * frame and <code>false</code> if it should not. 057 */ 058 public boolean captureNextFrame(); 059}