------------------------------------------------------------------------------
| 24 | |
| 25 | //------------------------------------------------------------------------------ |
| 26 | vtkContextView::vtkContextView() |
| 27 | { |
| 28 | this->Context = vtkSmartPointer<vtkContext2D>::New(); |
| 29 | vtkNew<vtkContextDevice2D> pd; |
| 30 | this->Context->Begin(pd); |
| 31 | |
| 32 | vtkNew<vtkContextActor> actor; |
| 33 | this->Renderer->AddActor(actor); |
| 34 | this->Scene = actor->GetScene(); // We keep a pointer to this for convenience |
| 35 | // Should not need to do this... |
| 36 | this->Scene->SetRenderer(this->Renderer); |
| 37 | |
| 38 | vtkContextInteractorStyle* style = vtkContextInteractorStyle::New(); |
| 39 | style->SetScene(this->Scene); |
| 40 | this->GetInteractor()->SetInteractorStyle(style); |
| 41 | style->Delete(); |
| 42 | |
| 43 | // Single color background by default. |
| 44 | this->Renderer->SetBackground(1.0, 1.0, 1.0); |
| 45 | } |
| 46 | |
| 47 | //------------------------------------------------------------------------------ |
| 48 | vtkContextView::~vtkContextView() = default; |
nothing calls this directly
no test coverage detected