synfig-core
1.0.3
|
Class of the Pasted Canvas layer. More...
#include <layer_pastecanvas.h>
Public Member Functions | |
sigc::signal< void > & | signal_subcanvas_changed () |
Wrapper for the subcanvas changed signal. | |
void | update_renddesc () |
virtual void | on_canvas_set () |
void | set_muck_with_time (bool x=false) |
etl::handle< synfig::Canvas > | get_sub_canvas () const |
void | set_sub_canvas (etl::handle< synfig::Canvas > x) |
Real | get_time_dilation () const |
Gets time dilation parameter. | |
Time | get_time_offset () const |
Gets time offset parameter. | |
Point | get_origin () const |
Get origin parameter. | |
Transformation | get_transformation () const |
Get transformation parameter. | |
Transformation | get_summary_transformation () const |
Get summary transformation. | |
Layer_PasteCanvas () | |
Default constructor. | |
virtual | ~Layer_PasteCanvas () |
Destructor. | |
virtual String | get_local_name () const |
Returns a string with the localized name of this layer. | |
virtual bool | set_param (const String ¶m, const synfig::ValueBase &value) |
Sets the parameter described by param to value. | |
virtual ValueBase | get_param (const String ¶m) const |
Get the value of the specified parameter. | |
virtual void | apply_z_range_to_params (ContextParams &cp) const |
Sets z_range* fields of specified ContextParams cp. | |
virtual Color | get_color (Context context, const Point &pos) const |
Gets the blend color of the Layer in the context at pos. | |
virtual void | set_time (IndependentContext context, Time time) const |
Sets the time of the Paste Canvas Layer and those under it. | |
virtual bool | accelerated_render (Context context, Surface *surface, int quality, const RendDesc &renddesc, ProgressCallback *cb) const |
virtual bool | accelerated_cairorender (Context context, cairo_t *cr, int quality, const RendDesc &renddesc, ProgressCallback *cb) const |
Rect | get_bounding_rect_context_dependent (const ContextParams &context_params) const |
Bounding rect for this layer depends from context_params. | |
virtual Rect | get_full_bounding_rect (Context context) const |
virtual Vocab | get_param_vocab () const |
Gets the parameter vocabulary. | |
virtual synfig::Layer::Handle | hit_check (synfig::Context context, const synfig::Point &point) const |
Checks to see if a part of the Paste Canvas Layer is directly under point. | |
virtual void | set_render_method (Context context, RenderMethod x) |
Sets the render method to the layer. Not all layers uses this virtual member. | |
virtual void | fill_sound_processor (SoundProcessor &soundProcessor) const |
Public Member Functions inherited from synfig::Layer_Composite | |
float | get_amount () const |
Gets the amount of the layer. | |
Layer_Composite & | set_amount (float x) |
Sets the amount of the layer and returns this layer. | |
Color::BlendMethod | get_blend_method () const |
Gets the blend method of the layer. | |
Layer_Composite & | set_blend_method (Color::BlendMethod x) |
Sets the blend method of the layer and returns this layer. | |
virtual bool | is_solid_color () const |
Returns true is amount is 1 and blend method is straight. | |
bool | is_disabled () const |
Returns true if the amount is zero. | |
Public Member Functions inherited from synfig::Layer | |
sigc::signal< void > & | signal_status_changed () |
Status Changed. | |
sigc::signal< void, String > & | signal_param_changed () |
Parameter changed. | |
sigc::signal< void > & | signal_description_changed () |
Description Changed. | |
sigc::signal< void, int, etl::handle< Canvas > > & | signal_moved () |
Moved. | |
sigc::signal< void, String > & | signal_added_to_group () |
sigc::signal< void, String > & | signal_removed_from_group () |
virtual | ~Layer () |
void | add_to_group (const String &) |
Adds this layer to the given layer group. | |
void | remove_from_group (const String &) |
Removes this layer from the given layer group. | |
void | remove_from_all_groups () |
Removes this layer from all layer groups. | |
String | get_group () const |
Gets the name of the group that this layer belongs to. | |
const DynamicParamList & | dynamic_param_list () const |
void | enable () |
Enables the layer for rendering (Making it active) | |
void | disable () |
Disables the layer for rendering. (Making it inactive) | |
void | set_active (bool x) |
Sets the 'active' flag for the Layer to the state described by x. | |
bool | active () const |
Returns that status of the 'active' flag. | |
bool | optimized () const |
flag to prevent re-apply optimization features | |
void | set_optimized (bool x) |
set flag to prevent re-apply optimization features | |
void | set_exclude_from_rendering (bool x) |
Sets the 'exclude_from_rendering' flag for the Layer. | |
bool | get_exclude_from_rendering () const |
Returns that status of the 'exclude_from_rendering' flag. | |
int | get_depth () const |
Returns the position of the layer in the canvas. | |
float | get_z_depth () const |
Gets the non animated z depth of the layer. | |
float | get_z_depth (const synfig::Time &t) const |
Gets the z depth of the layer at a time t. | |
float | get_true_z_depth (const synfig::Time &t=Time(0)) const |
Gets the true z depth of the layer (index + parameter) | |
void | set_z_depth (float x) |
Sets the z depth of the layer (non animated) | |
void | set_canvas (etl::loose_handle< Canvas > canvas) |
Sets the Canvas that this Layer is a part of. | |
etl::loose_handle< Canvas > | get_canvas () const |
Returns a handle to the Canvas to which this Layer belongs. | |
const String & | get_description () const |
Returns the description of the layer. | |
String | get_string () const |
void | set_description (const String &x) |
Sets the description of the layer. | |
const String | get_non_empty_description () const |
Returns the layer's description if it's not empty, else its local name. | |
const String | get_param_local_name (const String ¶m_name) const |
Returns the localised version of the given layer parameter. | |
Layer::LooseHandle | get_parent_paste_canvas_layer () const |
Returns a handle to the Parent PasteCanvas layer or NULL if layer belongs to root canvas. | |
virtual Rect | get_bounding_rect () const |
virtual String | get_name () const |
Returns a string containing the name of the Layer. | |
virtual String | get_version () const |
Gets the version string for this layer. | |
virtual etl::handle< Transform > | get_transform () const |
virtual bool | set_version (const String &ver) |
Sets the virtual version to use for backwards-compatibility. | |
virtual void | reset_version () |
Resets the virtual version. | |
virtual bool | set_param_list (const ParamList &) |
Sets a list of parameters. | |
virtual ParamList | get_param_list () const |
Get a list of all of the parameters and their values. | |
virtual void | set_time (IndependentContext context, Time time, const Point &point) const |
Sets the time for the selected Layer and those under it for a specific point. | |
virtual CairoColor | get_cairocolor (Context context, const Point &pos) const |
virtual Handle | clone (etl::loose_handle< Canvas > canvas, const GUID &deriv_guid=GUID()) const |
Duplicates the Layer. | |
virtual bool | reads_context () const |
Returns true if the layer needs to be able to examine its context. | |
virtual Handle | simple_clone () const |
Duplicates the Layer without duplicating the value nodes. | |
virtual bool | connect_dynamic_param (const String ¶m, etl::loose_handle< ValueNode >) |
Connects the parameter to another Value Node. | |
virtual bool | disconnect_dynamic_param (const String ¶m) |
Disconnects the parameter from any Value Node. | |
Real | get_parent_canvas_grow_value () const |
Retrieves the grow value from its parent canvas. | |
Public Member Functions inherited from synfig::Node | |
sigc::signal< void > & | signal_deleted () |
sigc::signal< void > & | signal_changed () |
sigc::signal< void, GUID > & | signal_guid_changed () |
GUID Changed. | |
virtual | ~Node () |
void | changed () |
const GUID & | get_guid () const |
Gets the GUID for this Node. | |
virtual void | set_guid (const GUID &x) |
Sets the GUID for this Node. | |
int | get_time_last_changed () const |
Gets the time when the Node was changed. | |
void | add_child (Node *x) |
Adds the parameter as the child of the current Node. | |
void | remove_child (Node *x) |
Removes the parameter as a child of the current Node. | |
int | parent_count () const |
Returns how many parenst has the current Node. | |
const time_set & | get_times () const |
Returns the cached times values for all the children. | |
RWLock & | get_rw_lock () const |
Writeme! |
Protected Member Functions | |
virtual void | get_times_vfunc (Node::time_set &set) const |
Protected Member Functions inherited from synfig::Layer_Composite | |
Layer_Composite (Real amount=1.0, Color::BlendMethod blend_method=Color::BLEND_COMPOSITE) | |
Default constructor. Not used directly. | |
Protected Member Functions inherited from synfig::Layer | |
Layer () | |
virtual void | on_changed () |
This is called whenever a parameter is changed. | |
Protected Member Functions inherited from synfig::Node | |
Node () | |
void | begin_delete () |
virtual void | on_guid_changed (GUID guid) |
Additional Inherited Members | |
Public Types inherited from synfig::Layer | |
typedef Layer *(* | Factory )() |
Type that represents a pointer to a Layer's constructor. | |
typedef std::map< String, BookEntry > | Book |
Book of types of layers indexed by layer type name. | |
typedef std::map< String, ValueBase > | ParamList |
Map of Value Base parameters indexed by name. | |
typedef etl::handle< Layer > | Handle |
typedef etl::loose_handle< Layer > | LooseHandle |
typedef etl::handle< const Layer > | ConstHandle |
typedef std::map< String, etl::rhandle< ValueNode > > | DynamicParamList |
Map of parameters that are animated Value Nodes indexed by the param name. | |
typedef ParamVocab | Vocab |
A list type which describes all the parameters that a layer has. | |
Static Public Member Functions inherited from synfig::Layer | |
static void | register_in_book (const BookEntry &) |
static Book & | book () |
static bool | subsys_init () |
static bool | subsys_stop () |
Stops the layer system by deleting the book of registered layers. | |
static bool | render_transformed (const Layer *layer, Context context, Surface *surface, int quality, const RendDesc &renddesc, ProgressCallback *cb, const char *file, int line) |
static Layer::LooseHandle | create (const String &type) |
Creates a Layer of type type. | |
Public Attributes inherited from synfig::Node | |
std::set< Node * > | parent_set |
Protected Attributes inherited from synfig::Layer_Composite | |
bool | converted_blend_ |
bool | transparent_color_ |
Class of the Pasted Canvas layer.
Layer_PasteCanvas::Layer_PasteCanvas | ( | ) |
Default constructor.
References synfig::Time::begin(), SET_INTERPOLATION_DEFAULTS, and SET_STATIC_DEFAULTS.
|
virtual |
Destructor.
References set_sub_canvas().
|
inline |
Wrapper for the subcanvas changed signal.
Referenced by set_sub_canvas().
void Layer_PasteCanvas::update_renddesc | ( | ) |
Recursively update the Render Description for the inner inline only pasted canvases. Used for copy and paste Paste Canvas Layers between compositions.
References synfig::Layer::get_canvas().
|
virtual |
Every time the Paste Canvas Layer parent canvas is changed, this is called and it sets the parent of the canvas parameter to that canvas if it is on line
Reimplemented from synfig::Layer.
References synfig::Layer::get_canvas().
Referenced by set_sub_canvas().
|
inline |
Sets muck_with_time.
|
inline |
Gets the canvas parameter. It is called sub_canvas to avoid confusion with the get_canvas from the Layer class.
Referenced by synfig::Layer::get_parent_paste_canvas_layer(), and synfig::optimize_layers().
void Layer_PasteCanvas::set_sub_canvas | ( | etl::handle< synfig::Canvas > | x | ) |
Sets the canvas parameter.
References synfig::Node::add_child(), synfig::Layer::get_canvas(), on_canvas_set(), synfig::Node::remove_child(), and signal_subcanvas_changed().
Referenced by svg_layer::set_param(), set_param(), synfig::Canvas::~Canvas(), and ~Layer_PasteCanvas().
|
inline |
Gets time dilation parameter.
References synfig::ValueBase::get().
|
inline |
Gets time offset parameter.
References synfig::ValueBase::get().
Referenced by synfig::optimize_layers().
|
inline |
Get origin parameter.
References synfig::ValueBase::get().
Referenced by get_summary_transformation(), and synfig::optimize_layers().
|
inline |
Get transformation parameter.
References synfig::ValueBase::get().
Referenced by get_summary_transformation().
|
inline |
Get summary transformation.
References get_origin(), get_transformation(), and synfig::Transformation::transform().
Referenced by accelerated_cairorender(), accelerated_render(), get_bounding_rect_context_dependent(), get_color(), and hit_check().
|
virtual |
Returns a string with the localized name of this layer.
Reimplemented from synfig::Layer.
Reimplemented in synfig::Layer_Group, and synfig::Layer_Switch.
References synfig::Layer::get_canvas().
|
virtual |
Sets the parameter described by param to value.
Reimplemented from synfig::Layer_Composite.
Reimplemented in synfig::Layer_Group, synfig::Layer_Switch, and svg_layer.
References synfig::ValueBase::can_get(), synfig::Node::changed(), synfig::ValueBase::get(), IMPORT_VALUE, synfig::ValueBase::put(), synfig::ValueBase::same_type_as(), and set_sub_canvas().
Get the value of the specified parameter.
Reimplemented from synfig::Layer_Composite.
Reimplemented in synfig::Layer_Group, synfig::Layer_Switch, and svg_layer.
References EXPORT_VALUE.
Referenced by synfig::optimize_layers().
|
virtual |
Sets z_range* fields of specified ContextParams cp.
Reimplemented in synfig::Layer_Group, and synfig::Layer_Switch.
Referenced by get_bounding_rect_context_dependent(), get_color(), hit_check(), and synfig::optimize_layers().
Gets the blend color of the Layer in the context at pos.
Reimplemented from synfig::Layer.
References synfig::Color::alpha(), apply_z_range_to_params(), synfig::Transformation::back_transform(), synfig::Color::blend(), synfig::Layer_Composite::get_amount(), synfig::Layer_Composite::get_blend_method(), synfig::Context::get_color(), synfig::Context::get_params(), get_summary_transformation(), and MAX_DEPTH.
|
virtual |
Sets the time of the Paste Canvas Layer and those under it.
Reimplemented from synfig::Layer.
References synfig::ValueBase::get(), MAX_DEPTH, synfig::ValueBase::set(), and synfig::IndependentContext::set_time().
|
virtual |
Renders the Canvas to the given Surface in an accelerated manner See Layer::accelerated_render
Reimplemented from synfig::Layer_Composite.
References synfig::Context::accelerated_render(), synfig::ProgressCallback::amount_complete(), synfig::Time::begin(), synfig::Color::BLEND_COMPOSITE, synfig::Color::BLEND_STRAIGHT, synfig::Surface::blit_to(), synfig::RendDesc::clear_flags(), synfig::ValueBase::get(), synfig::Layer_Composite::get_amount(), synfig::Layer_Composite::get_blend_method(), synfig::RendDesc::get_br(), synfig::Context::get_full_bounding_rect(), synfig::RendDesc::get_h(), synfig::Layer::get_parent_canvas_grow_value(), synfig::RendDesc::get_rect(), get_summary_transformation(), synfig::RendDesc::get_tl(), synfig::RendDesc::get_transformation_matrix(), synfig::RendDesc::get_w(), intersect(), synfig::Color::is_onto(), synfig::Layer_Composite::is_solid_color(), synfig::Color::is_straight(), MAX_DEPTH, synfig::Surface::alpha_pen::set_blend_method(), synfig::RendDesc::set_br(), synfig::RendDesc::set_tl(), synfig::RendDesc::set_transformation_matrix(), synfig::RendDesc::set_wh(), synfig::Transformation::transform_bounds(), and synfig::warning().
|
virtual |
Reimplemented from synfig::Layer_Composite.
References synfig::Context::accelerated_cairorender(), synfig::ProgressCallback::amount_complete(), synfig::Time::begin(), cairo_paint_with_alpha_operator(), synfig::error(), synfig::ValueBase::get(), synfig::Layer_Composite::get_amount(), synfig::Layer_Composite::get_blend_method(), synfig::RendDesc::get_h(), synfig::Transformation::get_matrix(), synfig::Layer::get_parent_canvas_grow_value(), get_summary_transformation(), synfig::RendDesc::get_w(), matrix, and MAX_DEPTH.
Rect Layer_PasteCanvas::get_bounding_rect_context_dependent | ( | const ContextParams & | context_params | ) | const |
Bounding rect for this layer depends from context_params.
References apply_z_range_to_params(), get_summary_transformation(), synfig::Transformation::transform_bounds(), and zero().
Referenced by get_full_bounding_rect().
Returns the rectangle that includes the context of the layer and the intersection of the layer in case it is active and not onto
Reimplemented from synfig::Layer_Composite.
References synfig::Layer_Composite::get_blend_method(), get_bounding_rect_context_dependent(), synfig::Context::get_full_bounding_rect(), synfig::Context::get_params(), synfig::Layer_Composite::is_disabled(), and synfig::Color::is_onto().
|
virtual |
Gets the parameter vocabulary.
Reimplemented from synfig::Layer_Composite.
Reimplemented in synfig::Layer_Group, synfig::Layer_Switch, and svg_layer.
References _, synfig::Layer_Composite::get_param_vocab(), and synfig::Layer::set_description().
|
virtual |
Checks to see if a part of the Paste Canvas Layer is directly under point.
Reimplemented from synfig::Layer.
References apply_z_range_to_params(), synfig::Transformation::back_transform(), synfig::ValueBase::get(), synfig::Layer_Composite::get_amount(), synfig::Context::get_params(), get_summary_transformation(), synfig::Context::hit_check(), and MAX_DEPTH.
|
virtual |
Sets the render method to the layer. Not all layers uses this virtual member.
Reimplemented from synfig::Layer.
References synfig::Context::set_render_method().
|
virtual |
Reimplemented from synfig::Layer.
References synfig::Layer::active().
|
protectedvirtual |
Function to be overloaded that fills the Time Point Set with all the children Time Points. In this case the children Time Points are the canvas parameter children layers Time points and the Paste Canvas Layer time points.
Reimplemented from synfig::Layer.
References synfig::ValueBase::get(), synfig::TimePoint::get_time(), and synfig::TimePoint::set_time().