------------------------------------------------------------------------------
| 755 | |
| 756 | //------------------------------------------------------------------------------ |
| 757 | void vtkLineWidget::OnRightButtonDown() |
| 758 | { |
| 759 | int X = this->Interactor->GetEventPosition()[0]; |
| 760 | int Y = this->Interactor->GetEventPosition()[1]; |
| 761 | |
| 762 | // Okay, make sure that the pick is in the current renderer |
| 763 | if (!this->CurrentRenderer || !this->CurrentRenderer->IsInViewport(X, Y)) |
| 764 | { |
| 765 | this->State = vtkLineWidget::Outside; |
| 766 | return; |
| 767 | } |
| 768 | |
| 769 | // Okay, we can process this. Try to pick handles first; |
| 770 | // if no handles picked, then pick the bounding box. |
| 771 | vtkAssemblyPath* path = this->GetAssemblyPath(X, Y, 0., this->HandlePicker); |
| 772 | |
| 773 | if (path != nullptr) |
| 774 | { |
| 775 | this->HighlightLine(1); |
| 776 | this->HighlightHandles(1); |
| 777 | this->State = vtkLineWidget::Scaling; |
| 778 | } |
| 779 | else |
| 780 | { |
| 781 | path = this->GetAssemblyPath(X, Y, 0., this->LinePicker); |
| 782 | |
| 783 | if (path != nullptr) |
| 784 | { |
| 785 | this->HighlightHandles(1); |
| 786 | this->HighlightLine(1); |
| 787 | this->State = vtkLineWidget::Scaling; |
| 788 | } |
| 789 | else |
| 790 | { |
| 791 | this->State = vtkLineWidget::Outside; |
| 792 | this->HighlightLine(0); |
| 793 | return; |
| 794 | } |
| 795 | } |
| 796 | |
| 797 | this->EventCallbackCommand->SetAbortFlag(1); |
| 798 | this->StartInteraction(); |
| 799 | this->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr); |
| 800 | this->Interactor->Render(); |
| 801 | } |
| 802 | |
| 803 | //------------------------------------------------------------------------------ |
| 804 | void vtkLineWidget::OnRightButtonUp() |
no test coverage detected