MCPcopy Create free account
hub / github.com/Kitware/VTK / OnLeftButtonUp

Method OnLeftButtonUp

Interaction/Style/vtkInteractorStyleDrawPolygon.cxx:145–163  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

143
144//------------------------------------------------------------------------------
145void vtkInteractorStyleDrawPolygon::OnLeftButtonUp()
146{
147 if (!this->Interactor || !this->Moving)
148 {
149 return;
150 }
151
152 if (this->DrawPolygonPixels)
153 {
154 const int* size = this->Interactor->GetRenderWindow()->GetSize();
155 unsigned char* pixels = this->PixelArray->GetPointer(0);
156 this->Interactor->GetRenderWindow()->SetPixelData(0, 0, size[0] - 1, size[1] - 1, pixels, 0);
157 this->Interactor->GetRenderWindow()->Frame();
158 }
159
160 this->Moving = 0;
161 this->InvokeEvent(vtkCommand::SelectionChangedEvent);
162 this->InvokeEvent(vtkCommand::EndInteractionEvent);
163}
164
165//------------------------------------------------------------------------------
166void vtkInteractorStyleDrawPolygon::DrawPolygon()

Callers

nothing calls this directly

Calls 6

InvokeEventMethod · 0.80
GetSizeMethod · 0.45
GetRenderWindowMethod · 0.45
GetPointerMethod · 0.45
SetPixelDataMethod · 0.45
FrameMethod · 0.45

Tested by

no test coverage detected