| 1043 | |
| 1044 | Valdi::Point output; |
| 1045 | |
| 1046 | if (mode == kModeDirectionAgnosticRelative) { |
| 1047 | output = viewNode->convertPointToRelativeDirectionAgnostic(input); |
| 1048 | } else if (mode == kModeDirectionAgnosticAbsolute) { |
| 1049 | output = viewNode->convertPointToAbsoluteDirectionAgnostic(input); |
| 1050 | } else if (mode == kModeVisualRelative) { |
| 1051 | output = viewNode->convertSelfVisualToParentVisual(input); |
| 1052 | } else if (mode == kModeVisualAbsolute) { |
| 1053 | output = viewNode->convertSelfVisualToRootVisual(input); |
| 1054 | } else if (mode == kModeViewportRelative) { |
| 1055 | output = viewNode->getCalculatedViewport().location(); |
| 1056 | } else if (mode == kModeViewportAbsolute) { |
| 1057 | auto viewportLocation = viewNode->getCalculatedViewport().location(); |
| 1058 | output = viewNode->convertSelfVisualToRootVisual(viewportLocation); |
| 1059 | } else { |
| 1060 | ValdiAndroid::JavaEnv::getUnsafeEnv()->ThrowNew( |
| 1061 | ValdiAndroid::JavaEnv::getCache().getValdiExceptionClass().getClass(), "Invalid coordinate mode"); |
| 1062 | } |
| 1063 | |
| 1064 | return Valdi::pointsToPackedPixels(output.x, output.y, pointScale); |
| 1065 | } |
| 1066 | |
| 1067 | jlong ValdiAndroid::NativeBridge::getViewNodeSize( // NOLINT |
nothing calls this directly
no test coverage detected