Skip to content

Commit

Permalink
InsideOut: Define get_cairocolor needed to properly render using cair…
Browse files Browse the repository at this point in the history
…o_t*
  • Loading branch information
genete committed Jul 6, 2013
1 parent a4a229b commit d018f58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions synfig-core/src/modules/lyr_std/insideout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ InsideOut::get_color(Context context, const Point &p)const
return context.get_color(invpos+origin);
}

CairoColor
InsideOut::get_cairocolor(Context context, const Point &p)const
{
Point pos(p-origin);
Real inv_mag=pos.inv_mag();
Point invpos(pos*inv_mag*inv_mag);
return context.get_cairocolor(invpos+origin);
}

class InsideOut_Trans : public Transform
{
etl::handle<const InsideOut> layer;
Expand Down
1 change: 1 addition & 0 deletions synfig-core/src/modules/lyr_std/insideout.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class InsideOut : public Layer
virtual bool set_param(const String &param, const ValueBase &value);
virtual ValueBase get_param(const String &param)const;
virtual Color get_color(Context context, const Point &pos)const;
virtual CairoColor get_cairocolor(Context context, const Point &pos)const;
synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
virtual Vocab get_param_vocab()const;
virtual etl::handle<synfig::Transform> get_transform()const;
Expand Down

0 comments on commit d018f58

Please sign in to comment.