synfig-core  1.0.3
Public Member Functions | Static Public Member Functions | List of all members
synfig::Context Class Reference

Context is a class to warp the iterator for a double queue of layers (that is the CanvasBase) with additional information about rendering parameters. More...

#include <context.h>

Inheritance diagram for synfig::Context:
synfig::IndependentContext

Public Member Functions

 Context ()
 Context (const IndependentContext &x, const ContextParams &params)
 Constructor based on IndependentContext.
 Context (const IndependentContext &x, const Context &context)
 Constructor based on IndependentContext and other Context (to get parameters).
 Context (const CanvasBase::const_iterator &x, const ContextParams &params)
 Constructor based on other CanvasBase iterator and other Context (to get parameters).
 Context (const CanvasBase::const_iterator &x, const Context &context)
Context get_next () const
 Returns next iterator.
Context get_previous () const
 Returns previous iterator.
const ContextParamsget_params () const
 Get rendering parameters.
Color get_color (const Point &pos) const
CairoColor get_cairocolor (const Point &pos) const
*bool accelerated_render (Surface *surface, int quality, const RendDesc &renddesc, ProgressCallback *cb) const
bool accelerated_cairorender (cairo_t *cr, int quality, const RendDesc &renddesc, ProgressCallback *cb) const
Rect get_full_bounding_rect () const
etl::handle< Layerhit_check (const Point &point) const
 Returns the first context's layer's handle that intesects the given */.
void set_render_method (RenderMethod x)
bool active (const Layer &layer)
 Returns true if layer is active in this context.
float z_depth_visibility (const Layer &layer)
 Returns true if layers is visible in z_depth range in this context.
bool active () const
 Returns true if layer is active in this context.
bool in_z_range () const
 Returns true if layer is visible in z_depth range in this context.
- Public Member Functions inherited from synfig::IndependentContext
 IndependentContext ()
 IndependentContext (const CanvasBase::const_iterator &x)
 Constructor based on other CanvasBase iterator.
IndependentContext operator= (const CanvasBase::const_iterator &x)
 Assignation operator.
void set_time (Time time) const
 Sets the context to the Time . It is done recursively.
void set_time (Time time, const Vector &pos) const
 Sets the context to the Time . It is done recursively. Vector is not used.
void set_dirty_outlines ()
 Sets dirty (dirty_time_= Time::end()) to all Outline type layers.

Static Public Member Functions

static bool active (const ContextParams &context_params, const Layer &layer)
 Returns true if layer is active with this context_params.
static float z_depth_visibility (const ContextParams &cp, const Layer &layer)
 Returns a value between 1.0 and 0.0 for layer visibility in z_depth range with this context_params.

Detailed Description

Context is a class to warp the iterator for a double queue of layers (that is the CanvasBase) with additional information about rendering parameters.

See Also
Layer, Canvas, CanvasBase, IndependentContext, ContextParams

Constructor & Destructor Documentation

synfig::Context::Context ( )
inline

Referenced by get_next(), and get_previous().

synfig::Context::Context ( const IndependentContext x,
const ContextParams params 
)
inline

Constructor based on IndependentContext.

synfig::Context::Context ( const IndependentContext x,
const Context context 
)
inline

Constructor based on IndependentContext and other Context (to get parameters).

synfig::Context::Context ( const CanvasBase::const_iterator &  x,
const ContextParams params 
)
inline

Constructor based on other CanvasBase iterator and other Context (to get parameters).

synfig::Context::Context ( const CanvasBase::const_iterator &  x,
const Context context 
)
inline

Member Function Documentation

Context synfig::Context::get_next ( ) const
inline
Context synfig::Context::get_previous ( ) const
inline

Returns previous iterator.

References Context().

Referenced by SuperSample::accelerated_render().

const ContextParams& synfig::Context::get_params ( ) const
inline
Color Context::get_color ( const Point pos) const

Returns the color of the context at the Point . It is the blended color of the context

References active(), get_next(), and in_z_range().

Referenced by CurveWarp::accelerated_cairorender(), synfig::Layer_SphereDistort::accelerated_render(), CurveWarp::accelerated_render(), Warp::accelerated_render(), synfig::Layer_Duplicate::get_color(), Blur_Layer::get_color(), synfig::Layer_SolidColor::get_color(), Zoom::get_color(), LumaKey::get_color(), InsideOut::get_color(), Translate::get_color(), Layer_Shade::get_color(), synfig::Layer_Mime::get_color(), synfig::Layer_Stretch::get_color(), synfig::Layer_MotionBlur::get_color(), CheckerBoard::get_color(), XORPattern::get_color(), RadialBlur::get_color(), synfig::Layer_Clamp::get_color(), Rotate::get_color(), SimpleCircle::get_color(), Layer_Stroboscope::get_color(), synfig::Layer_MeshTransform::get_color(), Rectangle::get_color(), Twirl::get_color(), synfig::Layer_ColorCorrect::get_color(), synfig::Layer_Bitmap::get_color(), synfig::Layer_SphereDistort::get_color(), Metaballs::get_color(), Layer_Bevel::get_color(), SpiralGradient::get_color(), ConicalGradient::get_color(), RadialGradient::get_color(), FilledRect::get_color(), CurveWarp::get_color(), NoiseDistort::get_color(), Layer_TimeLoop::get_color(), LinearGradient::get_color(), Halftone2::get_color(), CurveGradient::get_color(), Halftone3::get_color(), Noise::get_color(), Warp::get_color(), Mandelbrot::get_color(), Julia::get_color(), Circle::get_color(), synfig::Layer_Shape::get_color(), Layer_Freetype::get_color(), synfig::Layer_PasteCanvas::get_color(), synfig::Layer::get_color(), synfig::parametric_render(), synfig::render(), and synfig::render_threaded().

CairoColor Context::get_cairocolor ( const Point pos) const
bool Context::accelerated_render ( Surface surface,
int  quality,
const RendDesc renddesc,
ProgressCallback cb 
) const

With a given and a given render description it puts the context blend result into the painting

References accelerated_render(), active(), synfig::Rect::area(), synfig::Surface::blit_to(), synfig::Surface::clear(), synfig::error(), synfig::RendDesc::get_h(), get_next(), synfig::RendDesc::get_rect(), synfig::RendDesc::get_transformation_matrix(), synfig::RendDesc::get_w(), synfig::info(), and synfig::Surface::alpha_pen::set_blend_method().

Referenced by Blur_Layer::accelerated_render(), synfig::Layer_Duplicate::accelerated_render(), SuperSample::accelerated_render(), synfig::Layer_SolidColor::accelerated_render(), Zoom::accelerated_render(), Translate::accelerated_render(), synfig::Layer_Mime::accelerated_render(), Layer_Shade::accelerated_render(), synfig::Layer_Stretch::accelerated_render(), synfig::Layer_MotionBlur::accelerated_render(), RadialBlur::accelerated_render(), Rotate::accelerated_render(), LumaKey::accelerated_render(), Layer_Stroboscope::accelerated_render(), synfig::Layer_Clamp::accelerated_render(), CheckerBoard::accelerated_render(), synfig::Layer_MeshTransform::accelerated_render(), Rectangle::accelerated_render(), synfig::Layer_SphereDistort::accelerated_render(), SpiralGradient::accelerated_render(), Layer_Bevel::accelerated_render(), synfig::Layer_ColorCorrect::accelerated_render(), Metaballs::accelerated_render(), ConicalGradient::accelerated_render(), FilledRect::accelerated_render(), RadialGradient::accelerated_render(), CurveWarp::accelerated_render(), synfig::Layer_Bitmap::accelerated_render(), Layer_TimeLoop::accelerated_render(), LinearGradient::accelerated_render(), Halftone2::accelerated_render(), CurveGradient::accelerated_render(), Halftone3::accelerated_render(), Noise::accelerated_render(), Warp::accelerated_render(), synfig::Layer_Composite::accelerated_render(), Circle::accelerated_render(), synfig::Layer_Shape::accelerated_render(), Plant::accelerated_render(), accelerated_render(), Layer_Freetype::accelerated_render(), synfig::Layer_PasteCanvas::accelerated_render(), and synfig::Target_Scanline::render().

bool Context::accelerated_cairorender ( cairo_t *  cr,
int  quality,
const RendDesc renddesc,
ProgressCallback cb 
) const

References accelerated_cairorender(), active(), synfig::error(), get_next(), and synfig::info().

Referenced by Blur_Layer::accelerated_cairorender(), synfig::Layer_Duplicate::accelerated_cairorender(), synfig::Layer_SolidColor::accelerated_cairorender(), SuperSample::accelerated_cairorender(), Zoom::accelerated_cairorender(), Translate::accelerated_cairorender(), synfig::Layer_Stretch::accelerated_cairorender(), Layer_Shade::accelerated_cairorender(), synfig::Layer_MotionBlur::accelerated_cairorender(), RadialBlur::accelerated_cairorender(), Rotate::accelerated_cairorender(), LumaKey::accelerated_cairorender(), SimpleCircle::accelerated_cairorender(), Layer_Stroboscope::accelerated_cairorender(), CheckerBoard::accelerated_cairorender(), Rectangle::accelerated_cairorender(), synfig::Layer_SphereDistort::accelerated_cairorender(), Layer_Bevel::accelerated_cairorender(), synfig::Layer_ColorCorrect::accelerated_cairorender(), ConicalGradient::accelerated_cairorender(), SpiralGradient::accelerated_cairorender(), FilledRect::accelerated_cairorender(), RadialGradient::accelerated_cairorender(), CurveWarp::accelerated_cairorender(), synfig::Layer_Bitmap::accelerated_cairorender(), Layer_TimeLoop::accelerated_cairorender(), LinearGradient::accelerated_cairorender(), Halftone2::accelerated_cairorender(), CurveGradient::accelerated_cairorender(), Halftone3::accelerated_cairorender(), Warp::accelerated_cairorender(), synfig::Layer_Composite::accelerated_cairorender(), Circle::accelerated_cairorender(), synfig::Layer_Shape::accelerated_cairorender(), Plant::accelerated_cairorender(), accelerated_cairorender(), Layer_Freetype::accelerated_cairorender(), synfig::Layer_PasteCanvas::accelerated_cairorender(), and synfig::Target_Cairo::render().

Rect Context::get_full_bounding_rect ( ) const
etl::handle< Layer > Context::hit_check ( const Point point) const
void Context::set_render_method ( RenderMethod  x)
static bool synfig::Context::active ( const ContextParams context_params,
const Layer layer 
)
inlinestatic
static float synfig::Context::z_depth_visibility ( const ContextParams cp,
const Layer layer 
)
inlinestatic
bool synfig::Context::active ( const Layer layer)
inline

Returns true if layer is active in this context.

References active().

float synfig::Context::z_depth_visibility ( const Layer layer)
inline

Returns true if layers is visible in z_depth range in this context.

References z_depth_visibility().

bool synfig::Context::active ( ) const
inline

Returns true if layer is active in this context.

Referenced by active().

bool synfig::Context::in_z_range ( ) const
inline

Returns true if layer is visible in z_depth range in this context.

References z_depth_visibility().

Referenced by get_cairocolor(), get_color(), get_full_bounding_rect(), and hit_check().


The documentation for this class was generated from the following files: