00001 /* === S Y N F I G ========================================================= */ 00021 /* ========================================================================= */ 00022 00023 /* === S T A R T =========================================================== */ 00024 00025 #ifndef __SYNFIG_TARGET_SCANLINE_H 00026 #define __SYNFIG_TARGET_SCANLINE_H 00027 00028 /* === H E A D E R S ======================================================= */ 00029 00030 #include "target.h" 00031 00032 /* === M A C R O S ========================================================= */ 00033 00034 /* === T Y P E D E F S ===================================================== */ 00035 00036 /* === C L A S S E S & S T R U C T S ======================================= */ 00037 00038 namespace synfig { 00039 00044 class Target_Scanline : public Target 00045 { 00046 int threads_; 00047 int curr_frame_; 00048 00049 public: 00050 typedef etl::handle<Target_Scanline> Handle; 00051 typedef etl::loose_handle<Target_Scanline> LooseHandle; 00052 typedef etl::handle<const Target_Scanline> ConstHandle; 00053 00054 Target_Scanline(); 00055 00057 virtual bool render(ProgressCallback *cb=NULL); 00058 00060 00063 virtual bool start_frame(ProgressCallback *cb=NULL)=0; 00064 00065 virtual int next_frame(Time& time); 00066 00068 00069 virtual void end_frame()=0; 00070 00072 00078 virtual Color * start_scanline(int scanline)=0; 00079 00081 00086 virtual bool end_scanline()=0; 00087 00088 void set_threads(int x) { threads_=x; } 00089 00090 int get_threads()const { return threads_; } 00091 00092 bool add_frame(const synfig::Surface *surface); 00093 private: 00094 }; // END of class Target_Scanline 00095 00096 }; // END of namespace synfig 00097 00098 /* === E N D =============================================================== */ 00099 00100 #endif