------------------------------------------------------------------------------
| 574 | |
| 575 | //------------------------------------------------------------------------------ |
| 576 | double vtkAxisActor2D::GetViewportAxisLength(vtkViewport* viewport) |
| 577 | { |
| 578 | int* x = this->PositionCoordinate->GetComputedViewportValue(viewport); |
| 579 | double p1[3]; |
| 580 | p1[0] = x[0]; |
| 581 | p1[1] = x[1]; |
| 582 | p1[2] = 0.0; |
| 583 | |
| 584 | x = this->Position2Coordinate->GetComputedViewportValue(viewport); |
| 585 | double p2[3]; |
| 586 | p2[0] = x[0]; |
| 587 | p2[1] = x[1]; |
| 588 | p2[2] = 0.0; |
| 589 | |
| 590 | double axis[3]; |
| 591 | vtkMath::Subtract(p2, p1, axis); |
| 592 | return vtkMath::Norm(axis); |
| 593 | } |
| 594 | |
| 595 | //------------------------------------------------------------------------------ |
| 596 | double vtkAxisActor2D::GetViewportRulerDistance(vtkViewport* viewport) |
no test coverage detected