Navigation Menu

Skip to content

Commit

Permalink
Reset outline_grow value for root canvas while rendering.
Browse files Browse the repository at this point in the history
Allow to pass global outline_grow value via RendDesc while rendering,
just for future.
  • Loading branch information
blackwarthog authored and morevnaproject committed Feb 23, 2016
1 parent dd97a8f commit 9cd69db
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions synfig-core/src/synfig/renddesc.h
Expand Up @@ -113,6 +113,8 @@ class RendDesc
Time time_begin, time_end;
//! Transformation matrix which should be applied for each primitive before rendering
Matrix transformation_matrix;
//! Root outline grow value
Real outline_grow;

public:
//! Anti alias filers types. Seems never implemented
Expand Down Expand Up @@ -143,6 +145,7 @@ class RendDesc
frame_rate (24),
time_begin (0),
time_end (0),
outline_grow(0),
AntialiasFilter(ANTIALIAS_UNIFORM)
{ }

Expand Down Expand Up @@ -357,6 +360,9 @@ class RendDesc
get_tl()[0], get_tl()[1], 1.0 );
}

Real get_outline_grow() const { return outline_grow; }
void set_outline_grow(Real x) { outline_grow = x; }

}; // END of class RendDesc

//! This operator allows the combining of RendDesc::Lock flags using the '|' operator
Expand Down
2 changes: 2 additions & 0 deletions synfig-core/src/synfig/target_scanline.cpp
Expand Up @@ -174,6 +174,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb)
// Set the time that we wish to render
if(!get_avoid_time_sync() || canvas->get_time()!=t)
canvas->set_time(t);
canvas->set_outline_grow(desc.get_outline_grow());

#ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Canvas::Handle op_canvas;
Expand Down Expand Up @@ -330,6 +331,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb)
// Set the time that we wish to render
if(!get_avoid_time_sync() || canvas->get_time()!=t)
canvas->set_time(t);
canvas->set_outline_grow(desc.get_outline_grow());
Context context;

#ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Expand Down
2 changes: 2 additions & 0 deletions synfig-core/src/synfig/target_tile.cpp
Expand Up @@ -406,6 +406,7 @@ synfig::Target_Tile::render(ProgressCallback *cb)
//if(!get_avoid_time_sync() || canvas->get_time()!=t)
// Why the above line was commented here and not in TargetScaline?
canvas->set_time(t);
canvas->set_outline_grow(desc.get_outline_grow());

#ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Canvas::Handle op_canvas;
Expand Down Expand Up @@ -438,6 +439,7 @@ synfig::Target_Tile::render(ProgressCallback *cb)
// Set the time that we wish to render
//if(!get_avoid_time_sync() || canvas->get_time()!=t)
canvas->set_time(t);
canvas->set_outline_grow(desc.get_outline_grow());

//synfig::info("2time_set_to %s",t.get_string().c_str());

Expand Down

0 comments on commit 9cd69db

Please sign in to comment.