Author: Nikita Kitaev <[email protected]>
Date: Mon Mar 21 18:47:17 2011 -0700
Add a function to set the rending method (Software, OpenGL, or Cairo). Author
Nikita Kitaev
---
synfig-core/src/synfig/target.cpp | 3 ++-
synfig-core/src/synfig/target.h | 14 ++++++++++++++
2 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/synfig-core/src/synfig/target.cpp
b/synfig-core/src/synfig/target.cpp
index 24c12a1..af3f28c 100644
--- a/synfig-core/src/synfig/target.cpp
+++ b/synfig-core/src/synfig/target.cpp
@@ -98,7 +98,8 @@ Target::Target():
gamma_(*default_gamma_),
remove_alpha(false),
avoid_time_sync_(false),
- curr_frame_(0)
+ curr_frame_(0),
+ render_method_(SOFTWARE)
{
}
diff --git a/synfig-core/src/synfig/target.h b/synfig-core/src/synfig/target.h
index a69dd31..2295508 100644
--- a/synfig-core/src/synfig/target.h
+++ b/synfig-core/src/synfig/target.h
@@ -79,6 +79,13 @@ class Canvas;
class ProgressCallback;
struct TargetParam;
+//! Available rendering methods
+enum RenderMethod {
+ SOFTWARE = 0x100, //!< Software rendering
+ OPENGL, //!< OpenGL rendering (not supported)
+ CAIRO //!< Cairo rendering
+};
+
/*! \class Target
** \brief Used to produce rendered animations of the documents
**
@@ -173,12 +180,19 @@ public:
//! The current frame being rendered
int curr_frame_;
+ //! Rendering method used by the Target to generate images from data
+ RenderMethod render_method_;
+
protected:
//! Default constructor
Target();
public:
virtual ~Target() { }
+ //! Returns Target rendering method
+ RenderMethod get_render_method()const { return render_method_; }
+ //! Sets Target rendering method
+ void set_render_method(RenderMethod method) { render_method_ = method; }
//! Gets the target quality
int get_quality()const { return quality_; }
//! Sets the target quality
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl