MCPcopy Create free account
hub / github.com/antvis/F2Native / GetGradientPositions

Method GetGradientPositions

core/android/BitmapCanvasContext.cpp:12–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace xg::canvas;
11
12ScopedJavaLocalRef<jfloatArray> BitmapCanvasContext::GetGradientPositions(JNIEnv *env, const CanvasGradient &gradient) {
13 std::vector<float> positions;
14 std::for_each(gradient.colorStops.begin(), gradient.colorStops.end(),
15 [&](const ColorStop &item) -> void { positions.push_back(item.offset); });
16 return VectorToJFloatArray(env, positions);
17}
18
19ScopedJavaLocalRef<jintArray> BitmapCanvasContext::GetGradientColors(JNIEnv *env, const CanvasGradient &gradient,
20 token::DarkModeManager &darkModeManager) {

Callers

nothing calls this directly

Calls 4

VectorToJFloatArrayFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected