| 872 | } |
| 873 | |
| 874 | void vtkParallelCoordinatesView::Pan(unsigned long eventId) |
| 875 | { |
| 876 | vtkParallelCoordinatesInteractorStyle* style = |
| 877 | vtkParallelCoordinatesInteractorStyle::SafeDownCast(this->GetInteractorStyle()); |
| 878 | vtkParallelCoordinatesRepresentation* rep = |
| 879 | vtkParallelCoordinatesRepresentation::SafeDownCast(this->GetRepresentation()); |
| 880 | |
| 881 | double p1[2], size[2], p2[2]; |
| 882 | rep->GetPositionAndSize(p1, size); |
| 883 | p2[0] = p1[0] + size[0]; |
| 884 | p2[1] = p1[1] + size[1]; |
| 885 | |
| 886 | double cursorPosition[2], cursorLastPosition[2], cursorStartPosition[2]; |
| 887 | style->GetCursorCurrentPosition(this->GetRenderer(), cursorPosition); |
| 888 | style->GetCursorLastPosition(this->GetRenderer(), cursorLastPosition); |
| 889 | style->GetCursorStartPosition(this->GetRenderer(), cursorStartPosition); |
| 890 | |
| 891 | double dx = cursorPosition[0] - cursorLastPosition[0]; |
| 892 | double dy = cursorPosition[1] - cursorLastPosition[1]; |
| 893 | |
| 894 | if (eventId == vtkCommand::StartInteractionEvent) |
| 895 | { |
| 896 | } |
| 897 | else if (eventId == vtkCommand::InteractionEvent) |
| 898 | { |
| 899 | double p1new[2] = { p1[0] + dx, p1[1] + dy }; |
| 900 | double p2new[2] = { p2[0] + dx, p2[1] + dy }; |
| 901 | |
| 902 | double sizenew[] = { p2new[0] - p1new[0], p2new[1] - p1new[1] }; |
| 903 | |
| 904 | rep->SetPositionAndSize(p1new, sizenew); |
| 905 | this->SetAxisHighlightPosition(rep, this->SelectedAxisPosition); |
| 906 | } |
| 907 | else if (eventId == vtkCommand::EndInteractionEvent) |
| 908 | { |
| 909 | } |
| 910 | } |
| 911 | |
| 912 | void vtkParallelCoordinatesView::ApplyViewTheme(vtkViewTheme* theme) |
| 913 | { |
no test coverage detected