widget2d setcolor implementation
This commit is contained in:
parent
318b1c00a9
commit
10d955f18b
@ -53,6 +53,8 @@ namespace temp_viz
|
|||||||
Widget2D() {}
|
Widget2D() {}
|
||||||
Widget2D(const Widget &other);
|
Widget2D(const Widget &other);
|
||||||
Widget2D& operator=(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);
|
CV_Assert(actor);
|
||||||
Widget::operator=(other);
|
Widget::operator=(other);
|
||||||
return *this;
|
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 ();
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user