------------------------------------------------------------------------------
| 1171 | |
| 1172 | //------------------------------------------------------------------------------ |
| 1173 | void vtkAxisActor2D::ShiftPosition( |
| 1174 | double xTick[3], double textAngle, int stringWidth, int stringHeight, int offset, int finalPos[2]) |
| 1175 | { |
| 1176 | // Text Horizontal: center text |
| 1177 | finalPos[0] = xTick[0] - stringWidth / 2 * std::cos(textAngle); |
| 1178 | finalPos[1] = xTick[1] - stringWidth / 2 * std::sin(textAngle); |
| 1179 | |
| 1180 | // Text Vertical: put text "under" axes |
| 1181 | finalPos[0] += stringHeight * std::sin(textAngle); |
| 1182 | finalPos[1] -= stringHeight * std::cos(textAngle); |
| 1183 | |
| 1184 | // Axis Vertical: add extra offset |
| 1185 | finalPos[0] += offset * std::sin(textAngle); |
| 1186 | finalPos[1] -= offset * std::cos(textAngle); |
| 1187 | } |
| 1188 | |
| 1189 | //------------------------------------------------------------------------------ |
| 1190 | double vtkAxisActor2D::ComputeStringOffset(double width, double height, double theta) |
no test coverage detected