synfig-core
1.0.3
|
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>
Public Member Functions | |
Context () | |
Context (const IndependentContext &x, const ContextParams ¶ms) | |
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 ¶ms) | |
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 ContextParams & | get_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< Layer > | hit_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. |
Context is a class to warp the iterator for a double queue of layers (that is the CanvasBase) with additional information about rendering parameters.
|
inline |
Referenced by get_next(), and get_previous().
|
inline |
Constructor based on IndependentContext.
|
inline |
Constructor based on IndependentContext and other Context (to get parameters).
|
inline |
Constructor based on other CanvasBase iterator and other Context (to get parameters).
|
inline |
|
inline |
Returns next iterator.
References Context().
Referenced by accelerated_cairorender(), accelerated_render(), get_cairocolor(), get_color(), get_full_bounding_rect(), hit_check(), and set_render_method().
|
inline |
|
inline |
Get rendering parameters.
Referenced by synfig::Layer_PasteCanvas::get_color(), synfig::Canvas::get_context(), synfig::Layer_PasteCanvas::get_full_bounding_rect(), synfig::Layer_PasteCanvas::hit_check(), and synfig::optimize_layers().
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 |
References active(), get_next(), and in_z_range().
Referenced by synfig::Layer_SphereDistort::accelerated_cairorender(), Warp::accelerated_cairorender(), synfig::cairorender(), InsideOut::get_cairocolor(), Twirl::get_cairocolor(), Metaballs::get_cairocolor(), synfig::Layer_Bitmap::get_cairocolor(), NoiseDistort::get_cairocolor(), and Noise::get_cairocolor().
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 |
Returns the bounding rectangle of all the context. It is the union of all the layers's bounding rectangle.
References active(), get_next(), in_z_range(), and zero().
Referenced by Warp::accelerated_cairorender(), Warp::accelerated_render(), synfig::Layer_PasteCanvas::accelerated_render(), SuperSample::get_bounding_rect(), LumaKey::get_bounding_rect(), NoiseDistort::get_bounding_rect(), Plant::get_bounding_rect(), Blur_Layer::get_full_bounding_rect(), Zoom::get_full_bounding_rect(), Translate::get_full_bounding_rect(), synfig::Layer_Clamp::get_full_bounding_rect(), Layer_Shade::get_full_bounding_rect(), synfig::Layer_Stretch::get_full_bounding_rect(), Rotate::get_full_bounding_rect(), synfig::Layer_ColorCorrect::get_full_bounding_rect(), Rectangle::get_full_bounding_rect(), Layer_Bevel::get_full_bounding_rect(), Warp::get_full_bounding_rect(), synfig::Layer_Composite::get_full_bounding_rect(), Circle::get_full_bounding_rect(), synfig::Layer_PasteCanvas::get_full_bounding_rect(), and synfig::Layer::get_full_bounding_rect().
Returns the first context's layer's handle that intesects the given */.
References active(), get_next(), hit_check(), and in_z_range().
Referenced by synfig::Canvas::find_layer(), InsideOut::hit_check(), Zoom::hit_check(), LumaKey::hit_check(), synfig::Layer_SolidColor::hit_check(), XORPattern::hit_check(), synfig::Layer_Stretch::hit_check(), synfig::Layer_MeshTransform::hit_check(), Translate::hit_check(), CheckerBoard::hit_check(), Rotate::hit_check(), SimpleCircle::hit_check(), Rectangle::hit_check(), Twirl::hit_check(), synfig::Layer_SphereDistort::hit_check(), ConicalGradient::hit_check(), SpiralGradient::hit_check(), RadialGradient::hit_check(), Metaballs::hit_check(), CurveWarp::hit_check(), NoiseDistort::hit_check(), FilledRect::hit_check(), synfig::Layer_Bitmap::hit_check(), CurveGradient::hit_check(), LinearGradient::hit_check(), Noise::hit_check(), Warp::hit_check(), synfig::Layer_Shape::hit_check(), Circle::hit_check(), hit_check(), synfig::Layer_PasteCanvas::hit_check(), and synfig::Layer::hit_check().
void Context::set_render_method | ( | RenderMethod | x | ) |
References get_next().
Referenced by synfig::Target_Scanline::render(), synfig::Target_Cairo::render(), synfig::Target_Tile::render(), synfig::Target_Cairo_Tile::render(), Import::set_render_method(), synfig::Layer_Bitmap::set_render_method(), synfig::Layer_PasteCanvas::set_render_method(), and synfig::Layer::set_render_method().
|
inlinestatic |
Returns true
if layer is active with this context_params.
References synfig::Layer::active(), synfig::Layer::get_exclude_from_rendering(), and synfig::ContextParams::render_excluded_contexts.
Referenced by accelerated_cairorender(), accelerated_render(), get_cairocolor(), get_color(), get_full_bounding_rect(), hit_check(), and synfig::optimize_layers().
|
inlinestatic |
Returns a value between 1.0 and 0.0 for layer visibility in z_depth range with this context_params.
References synfig::Layer::get_true_z_depth(), synfig::ContextParams::z_range, synfig::ContextParams::z_range_blur, synfig::ContextParams::z_range_depth, and synfig::ContextParams::z_range_position.
Referenced by in_z_range(), synfig::optimize_layers(), and z_depth_visibility().
|
inline |
Returns true
if layer is active in this context.
References active().
|
inline |
Returns true
if layers is visible in z_depth range in this context.
References z_depth_visibility().
|
inline |
Returns true
if layer is active in this context.
Referenced by active().
|
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().