------------------------------------------------------------------------------
| 365 | |
| 366 | //------------------------------------------------------------------------------ |
| 367 | void vtkInteractorStyle::HighlightActor2D(vtkActor2D* actor2D) |
| 368 | { |
| 369 | // If nothing has changed, just return |
| 370 | if (actor2D == this->PickedActor2D) |
| 371 | { |
| 372 | return; |
| 373 | } |
| 374 | |
| 375 | if (actor2D) |
| 376 | { |
| 377 | double tmpColor[3]; |
| 378 | actor2D->GetProperty()->GetColor(tmpColor); |
| 379 | |
| 380 | if (this->PickedActor2D) |
| 381 | { |
| 382 | actor2D->GetProperty()->SetColor(this->PickedActor2D->GetProperty()->GetColor()); |
| 383 | this->PickedActor2D->GetProperty()->SetColor(this->PickColor); |
| 384 | } |
| 385 | else |
| 386 | { |
| 387 | actor2D->GetProperty()->SetColor(this->PickColor); |
| 388 | } |
| 389 | |
| 390 | this->PickColor[0] = tmpColor[0]; |
| 391 | this->PickColor[1] = tmpColor[1]; |
| 392 | this->PickColor[2] = tmpColor[2]; |
| 393 | } |
| 394 | else |
| 395 | { |
| 396 | if (this->PickedActor2D) |
| 397 | { |
| 398 | double tmpColor[3]; |
| 399 | this->PickedActor2D->GetProperty()->GetColor(tmpColor); |
| 400 | this->PickedActor2D->GetProperty()->SetColor(this->PickColor); |
| 401 | this->PickColor[0] = tmpColor[0]; |
| 402 | this->PickColor[1] = tmpColor[1]; |
| 403 | this->PickColor[2] = tmpColor[2]; |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | this->PickedActor2D = actor2D; |
| 408 | } |
| 409 | |
| 410 | //------------------------------------------------------------------------------ |
| 411 | // Implementation of motion state control methods |
no test coverage detected