mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
merged background color with background gradient methods, updated tests to show description of scene
This commit is contained in:
@@ -549,12 +549,14 @@ template<> cv::viz::WText3D cv::viz::Widget::cast<cv::viz::WText3D>()
|
||||
cv::viz::WText::WText(const String &text, const Point &pos, int font_size, const Color &color)
|
||||
{
|
||||
vtkSmartPointer<vtkTextActor> actor = vtkSmartPointer<vtkTextActor>::New();
|
||||
actor->SetPosition(pos.x, pos.y);
|
||||
actor->SetDisplayPosition(pos.x, pos.y);
|
||||
actor->SetInput(text.c_str());
|
||||
|
||||
actor->GetProperty()->SetDisplayLocationToForeground();
|
||||
|
||||
vtkSmartPointer<vtkTextProperty> tprop = actor->GetTextProperty();
|
||||
tprop->SetFontSize(font_size);
|
||||
tprop->SetFontFamilyToArial();
|
||||
tprop->SetFontFamilyToCourier();
|
||||
tprop->SetJustificationToLeft();
|
||||
tprop->BoldOn();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user