Commit 10d955f1 authored by ozantonkal's avatar ozantonkal

widget2d setcolor implementation

parent 318b1c00
......@@ -53,6 +53,8 @@ namespace temp_viz
Widget2D() {}
Widget2D(const Widget &other);
Widget2D& operator=(const Widget &other);
void setColor(const Color &color);
};
......
......@@ -182,4 +182,13 @@ temp_viz::Widget2D& temp_viz::Widget2D::operator=(const Widget &other)
CV_Assert(actor);
Widget::operator=(other);
return *this;
}
void temp_viz::Widget2D::setColor(const Color &color)
{
vtkActor2D *actor = vtkActor2D::SafeDownCast(WidgetAccessor::getActor(*this));
CV_Assert(actor);
Color c = vtkcolor(color);
actor->GetProperty ()->SetColor (c.val);
actor->Modified ();
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment