| 597 | } |
| 598 | |
| 599 | int vtkLeaderActor2D::InStringBox(double center[3], int stringSize[2], double x[3]) |
| 600 | { |
| 601 | double minX = center[0] - static_cast<double>(stringSize[0]) / 2.0; |
| 602 | double maxX = center[0] + static_cast<double>(stringSize[0]) / 2.0; |
| 603 | double minY = center[1] - static_cast<double>(stringSize[1]) / 2.0; |
| 604 | double maxY = center[1] + static_cast<double>(stringSize[1]) / 2.0; |
| 605 | |
| 606 | if (minX <= x[0] && x[0] <= maxX && minY <= x[1] && x[1] <= maxY) |
| 607 | { |
| 608 | return 1; |
| 609 | } |
| 610 | else |
| 611 | { |
| 612 | return 0; |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | //------------------------------------------------------------------------------ |
| 617 | // Release any graphics resources that are being consumed by this actor. |