if (this->State != VTKIS_NONE) {
return;
}
- this->StartState(VTKIS_PICK);
+ this->StartState(VTKIS_PICK_NEW);
this->InvokeEvent(vtkCommand::StartPickEvent, this);
}
//----------------------------------------------------------------------------
void vvInteractorStyleNavigator::EndPick()
{
- if (this->State != VTKIS_PICK) {
+ if (this->State != VTKIS_PICK_NEW) {
return;
}
this->InvokeEvent(vtkCommand::EndPickEvent, this);
this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
break;
- case VTKIS_PICK:
+ case VTKIS_PICK_NEW:
this->FindPokedRenderer(x, y);
this->Pick();
this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
case VTKIS_WINDOW_LEVEL:
break;
- case VTKIS_PICK:
+ case VTKIS_PICK_NEW:
break;
case VTKIS_PAN:
case VTKIS_WINDOW_LEVEL:
break;
- case VTKIS_PICK:
+ case VTKIS_PICK_NEW:
break;
case VTKIS_PAN:
{
// DD("OnLeftButtonUp");
switch (this->State) {
- case VTKIS_PICK:
+ case VTKIS_PICK_NEW:
this->EndPick();
if ( this->Interactor ) {
this->ReleaseFocus();
// Motion flags
#define VTKIS_WINDOW_LEVEL 1024
-#define VTKIS_PICK 1025
+#define VTKIS_PICK_NEW 1025
class vvInteractorStyleNavigator : public vtkInteractorStyle
// Screenshot
vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter = vtkSmartPointer<vtkWindowToImageFilter>::New();
windowToImageFilter->SetInput(renderWindow);
+#if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1
+ windowToImageFilter->SetScale(1);
+#else
windowToImageFilter->SetMagnification(1);
+#endif
windowToImageFilter->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel
windowToImageFilter->Update();
if (!fileName.isEmpty()) {
vtkSmartPointer<vtkWindowToImageFilter> w2i = vtkSmartPointer<vtkWindowToImageFilter>::New();
w2i->SetInput(widget->GetRenderWindow());
+#if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1
+ w2i->SetScale(1);
+#else
w2i->SetMagnification(1);
+#endif
w2i->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel
w2i->Update();
vtkImageData *image = w2i->GetOutput();