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

Method SetStrokeStyle

core/android/BitmapCanvasContext.cpp:231–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231void BitmapCanvasContext::SetStrokeStyle(const std::string &color) {
232 TraceCommand("SetStrokeStyle: " + color);
233 if (color != strokeColorCache_ && CanvasColorParser::Parse(color, strokeColor_)) {
234 strokeColorCache_ = color;
235 }
236 int resultColor = CanvasColorParser::RGBAToHex(strokeColor_);
237 resultColor = darkModeManager_.GetColorWithInt(resultColor);
238
239 env_ = GetJniEnvSafe();
240 F2SafeCallVoidMethod(env_, canvasContext_->obj(), setStrokeStyle_, resultColor);
241}
242
243void BitmapCanvasContext::SetStrokeStyle(const CanvasFillStrokeStyle &style) {
244 TraceCommand("SetStrokeStyle style");

Callers 1

ResetContextMethod · 0.45

Calls 3

GetJniEnvSafeFunction · 0.85
GetColorWithIntMethod · 0.80
objMethod · 0.45

Tested by

no test coverage detected