Commit 9a12a244 authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri 💬
Browse files

Fixed the orientation marker widget test for viewport changes

The viewport should be specified in normalized viewport
coordinates with respect to the viewport of the current renderer.
parent 1548b737
......@@ -108,7 +108,7 @@ int TestOrientationMarkerWidget2(int argc, char *argv[])
vtkNew<vtkOrientationMarkerWidget> orientationWidget;
orientationWidget->SetInteractor(iren.GetPointer());
orientationWidget->SetDefaultRenderer(smallViewRenderer.GetPointer());
orientationWidget->SetViewport(smallViewRenderer->GetViewport());
orientationWidget->SetViewport(0, 0, 1, 1);
orientationWidget->SetOrientationMarker(textActor.GetPointer());
orientationWidget->On();
......
......@@ -112,11 +112,14 @@ public:
// Description:
// Set/get the viewport to position/size this widget.
// Coordinates are expressed as (xmin,ymin,xmax,ymax), where each
// coordinate is 0 <= coordinate <= 1.0.
// Default is bottom left corner (0,0,0.2,0.2).
// Note that this viewport is scaled with respect to the viewport of the
// current renderer i.e. if the viewport of the current renderer is
// (0.5, 0.5, 0.75, 0.75) and Viewport is set to (0, 0, 1, 1), the orientation
// marker will be confined to a viewport of (0.5, 0.5, 0.75, 0.75).
// marker will be confined to a viewport of (0.5, 0.5, 0.75, 0.75) in the
// render window.
// \sa SetCurrentRenderer()
vtkSetVector4Macro(Viewport, double);
vtkGetVector4Macro(Viewport, double);
......
Supports Markdown
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