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

Method InStringBox

Rendering/Annotation/vtkLeaderActor2D.cxx:599–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599int 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.

Callers 1

BuildCurvedLeaderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected