synfig-core  1.0.3
Public Types | Public Member Functions | Public Attributes | List of all members
synfig::RendDesc Class Reference

#include <renddesc.h>

Public Types

enum  Lock {
  PX_ASPECT = (1<<0), PX_AREA = (1<<1), PX_W = (1<<2), PX_H = (1<<3),
  IM_ASPECT = (1<<4), IM_SPAN = (1<<5), IM_W = (1<<6), IM_H = (1<<7),
  IM_ZOOMIN = (1<<8), IM_ZOOMOUT = (1<<9), LINK_PX_ASPECT = (1<<10), LINK_PX_AREA = (1<<11),
  LINK_IM_ASPECT = (1<<12), LINK_IM_SPAN = (1<<13), LINK_IM_CENTER = (1<<14), LINK_RES = (1<<15)
}
enum  {
  ANTIALIAS_UNIFORM, ANTIALIAS_MONTE_CARLO, ANTIALIAS_JITTERED, ANTIALIAS_ADAPTIVE,
  ANTIALIAS_QUINTCUNX
}
 Anti alias filers types. Seems never implemented. More...

Public Member Functions

 RendDesc ()
 Default Constructor.
RendDescapply (const RendDesc &x)
 Applies the given Render Description to the current one.
const Colorget_bg_color () const
 Gets the background color.
RendDescset_bg_color (const Color &bg)
 Sets the background color.
int get_w () const
 Return the width of the composition in pixels.
RendDescset_w (int x)
 Set the width of the composition in pixels.
int get_h () const
 Return the height of the composition in pixels.
RendDescset_h (int y)
 Set the height of the composition in pixels.
RendDescset_wh (int x, int y)
 Sets the width and height of the composition in pixels.
Real get_x_res () const
 Returns the horizontal resolution (in dots per meter)
RendDescset_x_res (Real x)
 Sets the horizontal resolution (in dots per meter)
Real get_y_res () const
 Returns the vertical resolution (in dots per meter)
RendDescset_y_res (Real y)
 Sets the vertical resolution (in dots per meter)
Real get_physical_w () const
 Return the physical width of the composition in meters.
Real get_physical_h () const
 Return the physical height of the composition in meters.
RendDescset_physical_w (Real w)
 Set the physical width of the composition in meters.
RendDescset_physical_h (Real h)
 Set the physical height of the composition in meters.
int get_frame_start () const
 Return the index of the first frame.
RendDescset_frame_start (int x)
 Set the index of the first frame.
int get_frame_end () const
 Return the index of the last frame.
RendDescset_frame_end (int x)
 Set the index of the last frame.
const Time get_time_start () const
 Return the starting time of the animation.
RendDescset_time_start (Time x)
 Set the time that the animation will start.
const Time get_time_end () const
 Return the end time of the animation.
RendDescset_time_end (Time x)
 Set the time that the animation will end.
RendDescset_time (Time x)
 Setup for one frame at the given time.
RendDescset_frame (int x)
 Setup for one frame.
const float & get_frame_rate () const
 Return the frame rate (frames-per-second)
RendDescset_frame_rate (float x)
 Set the frame rate (frames-per-second)
const bool & get_interlaced () const
 Return the status of the interlaced flag.
RendDescset_interlaced (bool x)
 Set the interlace flag.
const bool & get_clamp () const
 Return the status of the clamp flag.
RendDescset_clamp (bool x)
 Set the clamp flag.
const bool & get_render_excluded_contexts () const
 Return the status of the render_excluded_contexts flag.
RendDescset_render_excluded_contexts (bool x)
 Set the render_excluded_contexts flag.
RendDescset_flags (const int &x)
 Set constraint flags.
RendDescclear_flags ()
 Clear constraint flags.
int get_flags () const
 Get constraint flags.
Point::value_type get_pixel_aspect () const
 Return the aspect ratio of a single pixel.
Point::value_type get_image_aspect () const
 Return the aspect ratio of the entire image.
void set_pixel_ratio (const int &x, const int &y)
 Set the pixel ratio for LINK_IM_ASPECT flag.
void get_pixel_ratio_reduced (int &w_ratio_reduced, int &h_ratio_reduced)
 Get the reduced pixel ratio (based on euclide reduction)
void set_res_ratio (const Real &x, const Real &y)
 Set the resolution ratio for LINK_RES flag.
const int & get_antialias () const
 Return the antialias amount.
RendDescset_antialias (const int &x)
 Set the antialias amount.
Real get_span () const
 Return the distance from the bottom-right to the top-left.
RendDescset_span (const Real &x)
 Set the span distance.
const Pointget_focus () const
 Gets the focus Point.
RendDescset_focus (const Point &x)
 Sets the focus Point.
const Pointget_tl () const
 Gets the top left point of the compostion.
RendDescset_tl (const Point &x)
 Sets the top left point of the compostion.
const Pointget_br () const
 Gets the bottom right point of the compostion.
RendDescset_br (const Point &x)
 Sets the bottom right point of the compostion.
RendDescset_tl_br (const Point &x, const Point &y)
 Sets the top left and the bottom right of the composition.
Rect get_rect () const
 Returns the rectangle of the composition.
RendDescset_viewport (const Point &__tl, const Point &__br)
 Sets the view port by the top left and right bottom corners.
RendDescset_viewport (Vector::value_type a, Vector::value_type b, Vector::value_type c, Vector::value_type d)
 Sets the view port by the four corners values.
Real get_pw () const
 Returns the width of one pixel.
Real get_ph () const
 Returns the height of one pixel.
RendDescset_subwindow (int x, int y, int w, int h)
 Sets viewport to represent the screen at the given pixel coordinates.
RendDescset_duration (Time t)
 Sets the duration of the animation.
const Time get_duration ()
 Gets the duration of the animation.
void set_transformation_matrix (const Matrix &x)
 Sets the transformation matrix.
const Matrixget_transformation_matrix () const
 Gets the transformation matrix.
Matrix get_world_to_pixels_matrix () const
Matrix get_pixels_to_world_matrix () const

Public Attributes

enum synfig::RendDesc:: { ... }  AntialiasFilter
 Anti alias filers types. Seems never implemented.

Detailed Description

Todo:
writeme

Member Enumeration Documentation

Enumerator:
PX_ASPECT 
PX_AREA 
PX_W 
PX_H 
IM_ASPECT 
IM_SPAN 
IM_W 
IM_H 
IM_ZOOMIN 
IM_ZOOMOUT 
LINK_PX_ASPECT 
LINK_PX_AREA 
LINK_IM_ASPECT 
LINK_IM_SPAN 
LINK_IM_CENTER 
LINK_RES 
anonymous enum

Anti alias filers types. Seems never implemented.

Enumerator:
ANTIALIAS_UNIFORM 
ANTIALIAS_MONTE_CARLO 
ANTIALIAS_JITTERED 
ANTIALIAS_ADAPTIVE 
ANTIALIAS_QUINTCUNX 

Constructor & Destructor Documentation

synfig::RendDesc::RendDesc ( )
inline

Default Constructor.

References f.

Member Function Documentation

RendDesc & RendDesc::apply ( const RendDesc x)

Applies the given Render Description to the current one.

const Color & RendDesc::get_bg_color ( ) const

Gets the background color.

Referenced by synfig::Target_Scanline::add_frame(), and encode_canvas().

RendDesc & RendDesc::set_bg_color ( const Color bg)

Sets the background color.

int RendDesc::get_w ( ) const

Return the width of the composition in pixels.

Referenced by Blur_Layer::accelerated_cairorender(), SuperSample::accelerated_cairorender(), Layer_Shade::accelerated_cairorender(), RadialBlur::accelerated_cairorender(), LumaKey::accelerated_cairorender(), CheckerBoard::accelerated_cairorender(), synfig::Layer_SphereDistort::accelerated_cairorender(), Layer_Bevel::accelerated_cairorender(), synfig::Layer_ColorCorrect::accelerated_cairorender(), SpiralGradient::accelerated_cairorender(), FilledRect::accelerated_cairorender(), CurveWarp::accelerated_cairorender(), synfig::Layer_Bitmap::accelerated_cairorender(), Halftone2::accelerated_cairorender(), CurveGradient::accelerated_cairorender(), Halftone3::accelerated_cairorender(), Warp::accelerated_cairorender(), synfig::Layer_Composite::accelerated_cairorender(), synfig::Layer_Shape::accelerated_cairorender(), Layer_Freetype::accelerated_cairorender(), synfig::Layer_PasteCanvas::accelerated_cairorender(), Blur_Layer::accelerated_render(), synfig::Layer_Duplicate::accelerated_render(), synfig::Layer_SolidColor::accelerated_render(), SuperSample::accelerated_render(), Layer_Shade::accelerated_render(), synfig::Layer_Stretch::accelerated_render(), RadialBlur::accelerated_render(), synfig::Layer_MotionBlur::accelerated_render(), LumaKey::accelerated_render(), synfig::Layer_Clamp::accelerated_render(), Rectangle::accelerated_render(), synfig::Layer_MeshTransform::accelerated_render(), synfig::Layer_SphereDistort::accelerated_render(), Layer_Bevel::accelerated_render(), synfig::Layer_ColorCorrect::accelerated_render(), Metaballs::accelerated_render(), ConicalGradient::accelerated_render(), SpiralGradient::accelerated_render(), FilledRect::accelerated_render(), RadialGradient::accelerated_render(), CurveWarp::accelerated_render(), synfig::Layer_Bitmap::accelerated_render(), LinearGradient::accelerated_render(), CurveGradient::accelerated_render(), Noise::accelerated_render(), Warp::accelerated_render(), Circle::accelerated_render(), synfig::Layer_Shape::accelerated_render(), synfig::Context::accelerated_render(), Layer_Freetype::accelerated_render(), synfig::Layer_PasteCanvas::accelerated_render(), cairo_renddesc_untransform(), synfig::cairorender(), encode_canvas(), yuv::end_frame(), exr_trgt::end_frame(), gif::end_frame(), synfig::Target_Multi::end_scanline(), bmp::end_scanline(), ppm::end_scanline(), dv_trgt::end_scanline(), imagemagick_trgt::end_scanline(), png_trgt::end_scanline(), ffmpeg_trgt::end_scanline(), exr_trgt::end_scanline(), jpeg_trgt::end_scanline(), mng_trgt::end_scanline(), OptionsProcessor::extract_renddesc(), synfig::Layer_Shape::feather_cairo_surface(), get_pixels_to_world_matrix(), get_world_to_pixels_matrix(), yuv::init(), imagemagick_trgt::init(), mng_trgt::init(), gif::init(), cairo_png_trgt::obtain_surface(), synfig::parametric_render(), process_job(), synfig::render(), synfig::render_threaded(), synfig::Layer::render_transformed(), yuv::set_rend_desc(), ffmpeg_trgt::set_rend_desc(), png_trgt_spritesheet::set_rend_desc(), synfig::Target_Null::start_frame(), bmp::start_frame(), ppm::start_frame(), dv_trgt::start_frame(), ffmpeg_trgt::start_frame(), imagemagick_trgt::start_frame(), png_trgt::start_frame(), exr_trgt::start_frame(), jpeg_trgt::start_frame(), and png_trgt_spritesheet::start_scanline().

RendDesc & RendDesc::set_w ( int  x)

Set the width of the composition in pixels.

The other parameters are adjusted according to the constraints placed on the flags. Seems to be incomplete and doesn't use all the possible flags.

Todo:
write the needed code to keep the flags usage
Todo:
This needs to be documented further.
Todo:
This needs to be documented further.

References FLAGS.

Referenced by synfig::Layer_MeshTransform::accelerated_render(), cairo_renddesc_untransform(), synfig::Layer::render_transformed(), yuv::set_rend_desc(), and ffmpeg_trgt::set_rend_desc().

int RendDesc::get_h ( ) const

Return the height of the composition in pixels.

Referenced by Blur_Layer::accelerated_cairorender(), SuperSample::accelerated_cairorender(), Layer_Shade::accelerated_cairorender(), RadialBlur::accelerated_cairorender(), LumaKey::accelerated_cairorender(), CheckerBoard::accelerated_cairorender(), synfig::Layer_SphereDistort::accelerated_cairorender(), Layer_Bevel::accelerated_cairorender(), synfig::Layer_ColorCorrect::accelerated_cairorender(), SpiralGradient::accelerated_cairorender(), FilledRect::accelerated_cairorender(), CurveWarp::accelerated_cairorender(), synfig::Layer_Bitmap::accelerated_cairorender(), Halftone2::accelerated_cairorender(), CurveGradient::accelerated_cairorender(), Halftone3::accelerated_cairorender(), Warp::accelerated_cairorender(), synfig::Layer_Composite::accelerated_cairorender(), synfig::Layer_Shape::accelerated_cairorender(), Layer_Freetype::accelerated_cairorender(), synfig::Layer_PasteCanvas::accelerated_cairorender(), Blur_Layer::accelerated_render(), synfig::Layer_Duplicate::accelerated_render(), synfig::Layer_SolidColor::accelerated_render(), SuperSample::accelerated_render(), Layer_Shade::accelerated_render(), synfig::Layer_Stretch::accelerated_render(), RadialBlur::accelerated_render(), synfig::Layer_MotionBlur::accelerated_render(), LumaKey::accelerated_render(), synfig::Layer_Clamp::accelerated_render(), Rectangle::accelerated_render(), synfig::Layer_MeshTransform::accelerated_render(), synfig::Layer_SphereDistort::accelerated_render(), Layer_Bevel::accelerated_render(), synfig::Layer_ColorCorrect::accelerated_render(), Metaballs::accelerated_render(), ConicalGradient::accelerated_render(), SpiralGradient::accelerated_render(), FilledRect::accelerated_render(), RadialGradient::accelerated_render(), CurveWarp::accelerated_render(), synfig::Layer_Bitmap::accelerated_render(), LinearGradient::accelerated_render(), CurveGradient::accelerated_render(), Noise::accelerated_render(), Warp::accelerated_render(), Circle::accelerated_render(), synfig::Layer_Shape::accelerated_render(), synfig::Context::accelerated_render(), Layer_Freetype::accelerated_render(), synfig::Layer_PasteCanvas::accelerated_render(), cairo_renddesc_untransform(), synfig::cairorender(), encode_canvas(), yuv::end_frame(), exr_trgt::end_frame(), gif::end_frame(), OptionsProcessor::extract_renddesc(), synfig::Layer_Shape::feather_cairo_surface(), get_pixels_to_world_matrix(), get_world_to_pixels_matrix(), yuv::init(), mng_trgt::init(), gif::init(), cairo_png_trgt::obtain_surface(), synfig::parametric_render(), process_job(), synfig::render(), synfig::Target_Scanline::render(), synfig::render_threaded(), synfig::Layer::render_transformed(), yuv::set_rend_desc(), ffmpeg_trgt::set_rend_desc(), png_trgt_spritesheet::set_rend_desc(), bmp::start_frame(), ppm::start_frame(), dv_trgt::start_frame(), imagemagick_trgt::start_frame(), ffmpeg_trgt::start_frame(), png_trgt::start_frame(), exr_trgt::start_frame(), jpeg_trgt::start_frame(), and png_trgt_spritesheet::start_scanline().

RendDesc & RendDesc::set_h ( int  y)

Set the height of the composition in pixels.

The other parameters are adjusted according to the constraints placed on the flags. Seems to be incomplete and doesn't use all the possible flags.

Todo:
write the needed code to keep the flags usage
Todo:
This needs to be documented further.
Todo:
This needs to be documented further.

References FLAGS.

Referenced by synfig::Layer_MeshTransform::accelerated_render(), cairo_renddesc_untransform(), synfig::Layer::render_transformed(), yuv::set_rend_desc(), and ffmpeg_trgt::set_rend_desc().

RendDesc & RendDesc::set_wh ( int  x,
int  y 
)
Real RendDesc::get_x_res ( ) const
RendDesc & RendDesc::set_x_res ( Real  x)

Sets the horizontal resolution (in dots per meter)

References FLAGS.

Referenced by OptionsProcessor::extract_renddesc().

Real RendDesc::get_y_res ( ) const
RendDesc & RendDesc::set_y_res ( Real  y)

Sets the vertical resolution (in dots per meter)

References FLAGS.

Referenced by OptionsProcessor::extract_renddesc().

Real RendDesc::get_physical_w ( ) const

Return the physical width of the composition in meters.

Real RendDesc::get_physical_h ( ) const

Return the physical height of the composition in meters.

RendDesc & RendDesc::set_physical_w ( Real  w)

Set the physical width of the composition in meters.

RendDesc & RendDesc::set_physical_h ( Real  h)

Set the physical height of the composition in meters.

int RendDesc::get_frame_start ( ) const
RendDesc & RendDesc::set_frame_start ( int  x)

Set the index of the first frame.

int RendDesc::get_frame_end ( ) const
RendDesc & RendDesc::set_frame_end ( int  x)

Set the index of the last frame.

const Time RendDesc::get_time_start ( ) const

Return the starting time of the animation.

Referenced by encode_canvas(), OptionsProcessor::extract_renddesc(), and synfig::Target::next_frame().

RendDesc & RendDesc::set_time_start ( Time  x)

Set the time that the animation will start.

Referenced by OptionsProcessor::extract_renddesc().

const Time RendDesc::get_time_end ( ) const

Return the end time of the animation.

Referenced by encode_canvas(), and synfig::Target::next_frame().

RendDesc & RendDesc::set_time_end ( Time  x)

Set the time that the animation will end.

Referenced by OptionsProcessor::extract_renddesc().

RendDesc & RendDesc::set_time ( Time  x)

Setup for one frame at the given time.

Referenced by OptionsProcessor::extract_renddesc().

RendDesc & RendDesc::set_frame ( int  x)

Setup for one frame.

const float & RendDesc::get_frame_rate ( ) const
RendDesc & RendDesc::set_frame_rate ( float  x)

Set the frame rate (frames-per-second)

Referenced by OptionsProcessor::extract_renddesc(), dv_trgt::set_rend_desc(), and gif::set_rend_desc().

const bool & RendDesc::get_interlaced ( ) const

Return the status of the interlaced flag.

RendDesc & RendDesc::set_interlaced ( bool  x)

Set the interlace flag.

Referenced by dv_trgt::set_rend_desc().

const bool & RendDesc::get_clamp ( ) const

Return the status of the clamp flag.

References clamp().

Referenced by synfig::parametric_render(), synfig::render(), and synfig::render_threaded().

RendDesc & RendDesc::set_clamp ( bool  x)

Set the clamp flag.

References clamp().

const bool & RendDesc::get_render_excluded_contexts ( ) const

Return the status of the render_excluded_contexts flag.

RendDesc & RendDesc::set_render_excluded_contexts ( bool  x)

Set the render_excluded_contexts flag.

RendDesc & RendDesc::set_flags ( const int &  x)
RendDesc & RendDesc::clear_flags ( )
int RendDesc::get_flags ( ) const

Get constraint flags.

Referenced by cairo_renddesc_untransform().

Real RendDesc::get_pixel_aspect ( ) const

Return the aspect ratio of a single pixel.

Referenced by process_job(), and exr_trgt::start_frame().

Real RendDesc::get_image_aspect ( ) const

Return the aspect ratio of the entire image.

Referenced by process_job().

void RendDesc::set_pixel_ratio ( const int &  x,
const int &  y 
)

Set the pixel ratio for LINK_IM_ASPECT flag.

Affect the pixel ratio for LINK_IM_ASPECT flag.

void RendDesc::get_pixel_ratio_reduced ( int &  w_ratio_reduced,
int &  h_ratio_reduced 
)

Get the reduced pixel ratio (based on euclide reduction)

void RendDesc::set_res_ratio ( const Real x,
const Real y 
)

Set the resolution ratio for LINK_RES flag.

Affect the resolution ratio for LINK_RES flag.

const int & RendDesc::get_antialias ( ) const
RendDesc & RendDesc::set_antialias ( const int &  x)

Set the antialias amount.

Referenced by OptionsProcessor::extract_renddesc().

Real RendDesc::get_span ( ) const

Return the distance from the bottom-right to the top-left.

Referenced by process_job().

RendDesc & RendDesc::set_span ( const Real x)

Set the span distance.

Todo:
this looks wrong. I suspect the intention was to check
Todo:
This needs to be documented further. or fix me
Todo:
This needs to be documented further. or fix me

References FLAGS.

Referenced by OptionsProcessor::extract_renddesc().

const Point & RendDesc::get_focus ( ) const

Gets the focus Point.

Referenced by process_job().

RendDesc & RendDesc::set_focus ( const Point x)

Sets the focus Point.

const Point & RendDesc::get_tl ( ) const

Gets the top left point of the compostion.

Referenced by Blur_Layer::accelerated_cairorender(), SuperSample::accelerated_cairorender(), Layer_Shade::accelerated_cairorender(), RadialBlur::accelerated_cairorender(), LumaKey::accelerated_cairorender(), CheckerBoard::accelerated_cairorender(), synfig::Layer_SphereDistort::accelerated_cairorender(), synfig::Layer_ColorCorrect::accelerated_cairorender(), Layer_Bevel::accelerated_cairorender(), ConicalGradient::accelerated_cairorender(), SpiralGradient::accelerated_cairorender(), FilledRect::accelerated_cairorender(), CurveWarp::accelerated_cairorender(), synfig::Layer_Bitmap::accelerated_cairorender(), Halftone2::accelerated_cairorender(), CurveGradient::accelerated_cairorender(), Halftone3::accelerated_cairorender(), Warp::accelerated_cairorender(), synfig::Layer_Composite::accelerated_cairorender(), synfig::Layer_Shape::accelerated_cairorender(), Layer_Freetype::accelerated_cairorender(), Blur_Layer::accelerated_render(), Layer_Shade::accelerated_render(), RadialBlur::accelerated_render(), CheckerBoard::accelerated_render(), Rectangle::accelerated_render(), synfig::Layer_SphereDistort::accelerated_render(), Metaballs::accelerated_render(), SpiralGradient::accelerated_render(), Layer_Bevel::accelerated_render(), ConicalGradient::accelerated_render(), FilledRect::accelerated_render(), RadialGradient::accelerated_render(), CurveWarp::accelerated_render(), synfig::Layer_Bitmap::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(), Layer_Freetype::accelerated_render(), synfig::Layer_PasteCanvas::accelerated_render(), cairo_renddesc_untransform(), synfig::cairorender(), encode_canvas(), synfig::Layer_Shape::feather_cairo_surface(), get_pixels_to_world_matrix(), get_rect(), get_world_to_pixels_matrix(), synfig::parametric_render(), process_job(), synfig::render(), synfig::render_threaded(), synfig::Layer::render_transformed(), and bmp::set_rend_desc().

RendDesc & RendDesc::set_tl ( const Point x)
const Point & RendDesc::get_br ( ) const
RendDesc & RendDesc::set_br ( const Point x)
RendDesc & RendDesc::set_tl_br ( const Point x,
const Point y 
)

Sets the top left and the bottom right of the composition.

References std::abs(), and FLAGS.

Referenced by CheckerBoard::accelerated_cairorender(), and cairo_renddesc_untransform().

Rect synfig::RendDesc::get_rect ( ) const
inline
RendDesc & RendDesc::set_viewport ( const Point __tl,
const Point __br 
)

Sets the view port by the top left and right bottom corners.

RendDesc & RendDesc::set_viewport ( Vector::value_type  a,
Vector::value_type  b,
Vector::value_type  c,
Vector::value_type  d 
)

Sets the view port by the four corners values.

Real RendDesc::get_pw ( ) const
Real RendDesc::get_ph ( ) const
RendDesc & RendDesc::set_subwindow ( int  x,
int  y,
int  w,
int  h 
)
RendDesc & RendDesc::set_duration ( Time  t)

Sets the duration of the animation.

const Time RendDesc::get_duration ( )

Gets the duration of the animation.

void synfig::RendDesc::set_transformation_matrix ( const Matrix x)
inline
const Matrix& synfig::RendDesc::get_transformation_matrix ( ) const
inline
Matrix synfig::RendDesc::get_world_to_pixels_matrix ( ) const
inline
Matrix synfig::RendDesc::get_pixels_to_world_matrix ( ) const
inline

References get_br(), get_h(), get_tl(), and get_w().

Member Data Documentation

enum { ... } synfig::RendDesc::AntialiasFilter

Anti alias filers types. Seems never implemented.


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