MCPcopy Create free account
hub / github.com/Snapchat/Valdi / canViewNodeScroll

Method canViewNodeScroll

valdi/src/valdi/android/NativeBridge.cpp:1045–1064  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
1067jlong ValdiAndroid::NativeBridge::getViewNodeSize( // NOLINT

Callers

nothing calls this directly

Calls 6

getRuntimeWrapperFunction · 0.85
getViewNodeFunction · 0.85
pixelsToPointsFunction · 0.85
canScrollMethod · 0.80
PointClass · 0.50
getPointScaleMethod · 0.45

Tested by

no test coverage detected