00001 /* 00002 * PIAVE - PIAVE Is A Video Editor 00003 * 00004 * Copyright (C) 2002 Rolf Dubitzky, rolf@dubitzky.de 00005 * 00006 */ 00007 00008 /* 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software Foundation, 00021 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00022 */ 00023 00024 00028 #if ! defined( IMAGE_HH ) 00029 #define IMAGE_HH 00030 00031 // PIAVE 00032 #include "libpiave/storybase.hh" 00033 #include "libpiave/plugin.hh" 00034 00035 namespace PIAVE { 00036 00037 class ColorStillPlugin : public Plugin 00038 { 00039 public: 00040 ColorStillPlugin(); 00041 virtual PluginBase * newElement( const PropertyNode * p = 0 ); 00042 }; 00043 00044 // class StillImagePlugin : public Plugin 00045 // { 00046 // public: 00047 // ImagePlugin(); 00048 // virtual PluginBase * newElement( const PropertyNode * p = 0 ); 00049 // }; 00050 00055 class ColorStill : public MediaElement 00056 { 00057 public: 00058 ColorStill( const std::string& name = std::string() ); 00059 virtual ~ColorStill(); 00060 00061 virtual Frame getFrame( Time t ); 00062 virtual PropertyNode * getProperties( PropertyNode * p = 0 ) const; 00063 00064 virtual void print( std::ostream & o, int indent ); 00065 00066 bool useAlpha() const { return _useAlpha; }; 00067 bool setUseAlpha( bool u = true ) { _useAlpha = u; return _useAlpha; }; 00068 00069 public: // private: 00070 void _init(); 00071 00072 bool _initialized; 00073 bool _useAlpha; 00074 Color _color; // the color 00075 VideoBuffer * _vb; // the pixels 00076 00077 }; 00078 00079 00080 00092 // class StillImage : public MediaElement 00093 // { 00094 // public: 00095 // StillImage( const std::string& filename = std::string(), int x_off = 0, int y_off = 0 ); 00096 // virtual ~StillImage(); 00097 00098 // virtual Frame getFrame( Time t ); 00099 00100 // virtual void print( std::ostream & o, int indent ); 00101 00102 // private: 00103 // void _init(); 00104 00105 // public: // private: 00106 // int _x_off, _y_off; 00107 // /// buffer 00108 // VideoBuffer * _vb; 00109 // }; 00110 00111 } 00112 00113 #endif