X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fcanvas.h;h=a6474da9afbb902d93c77e582cbdb5fa748caa4a;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=a62c6415ab0709bf7bd7d550b09f1394e2a00a90;hpb=1b597586609b1c4df37d5ce9726f2ab27bfd64ea;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/canvas.h b/synfig-core/trunk/src/synfig/canvas.h index a62c641..a6474da 100644 --- a/synfig-core/trunk/src/synfig/canvas.h +++ b/synfig-core/trunk/src/synfig/canvas.h @@ -6,7 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -45,7 +45,65 @@ /* === M A C R O S ========================================================= */ -#define CURRENT_CANVAS_VERSION "0.2" +/* version change history: + * + * 0.1: the original version + * + * if a waypoint goes from -179 to 179 degrees, that is a 2 + * degree change. there's no way to express a 720 degree + * rotation with a single pair of waypoints + * + * 0.2: svn r1227 + * + * angles no longer wrap at -180 degrees back to 180 degrees; if + * a waypoint goes from -179 to 179 degrees, that is a rotation + * of 358 degrees. loading a version 0.1 canvas will modify + * constant angle waypoints to that they are within 180 degrees + * of the previous waypoint's value + * + * the 'straight' blend method didn't used to work properly. it + * didn't work at all on transparent pixels in layers other than + * the PasteCanvas layer. for example, the examples/japan.sifz + * file has a red circle (straight, amount=1.0) on top of a + * striped conical gradient. if 'straight' was working, the + * conical gradient would be entirely obscured by the circle + * layer (even by its transparent pixels) + * + * 0.3: svn r1422 + * + * the 'straight' blend method was fixed. loading a version 0.2 + * or older canvas will replace the 'straight' blend method in + * non-pastecanvas layers with 'composite', unless they're + * completely transparent, in which case it will replace them + * with an 'alpha over' blend instead. Images like + * examples/logo.sifz use transparent straight blends to do + * masking, which no longer works now that 'straight' blending is + * fixed. + * + * Tangent lengths calculated by the "Segment Tangent" and "BLine + * Tangent" ValueNodes were scaled by a factor of 0.5. + * + * 0.4: svn r1856 + * + * Stop scaling tangents by 0.5. + * + * 0.5: svn r1863 + * + * Added "offset", "scale", and "fixed_length" links to the + * "BLine Tangent" ValueNode. + * + * 0.6: svn r2067 + * + * Added "scale" link to the "BLine Width" ValueNode in svn r1872. + * + * Added "loop" link to the "Gradient Color" ValueNode in svn r1901. + * + * 0.7: svn r2315 + * + * Added "loop" link to the "Random" ValueNode in svn r2315. + */ + +#define CURRENT_CANVAS_VERSION "0.7" /* === T Y P E D E F S ===================================================== */ @@ -72,7 +130,7 @@ public: typedef std::list Children; - friend void synfig::optimize_layers(Context, Canvas::Handle, bool seen_motion_blur); + friend void synfig::optimize_layers(Time, Context, Canvas::Handle, bool seen_motion_blur); /* -- ** -- D A T A ------------------------------------------------------------- @@ -415,19 +473,19 @@ public: ** If not found, it creates a new Canvas and returns it ** If an error occurs, it returns an empty handle */ - Handle surefind_canvas(const String &id); + Handle surefind_canvas(const String &id,String &warnings); //! Finds a child Canvas in the Canvas with the given \a id /*! \return If found, returns a handle to the child Canvas. ** Otherwise, returns an empty handle. */ - Handle find_canvas(const String &id); + Handle find_canvas(const String &id, String &warnings); //! Finds a child Canvas in the Canvas with the given \a id /*! \return If found, returns a handle to the child Canvas. ** Otherwise, returns an empty handle. */ - ConstHandle find_canvas(const String &id)const; + ConstHandle find_canvas(const String &id, String &warnings)const; //! Sets the file path for the Canvas //void set_file_path(const String &); @@ -487,6 +545,12 @@ public: Handle clone(const GUID& deriv_guid=GUID())const; + void register_external_canvas(String file, Handle canvas); + +#ifdef _DEBUG + void show_externals(String file, int line, String text) const; +#endif // _DEBUG + private: void add_group_pair(String group, etl::handle layer); void remove_group_pair(String group, etl::handle layer); @@ -498,7 +562,7 @@ protected: virtual void get_times_vfunc(Node::time_set &set) const; }; // END of class Canvas -void optimize_layers(Context context, Canvas::Handle op_canvas, bool seen_motion_blur=false); +void optimize_layers(Time time, Context context, Canvas::Handle op_canvas, bool seen_motion_blur=false); }; // END of namespace synfig