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

Method SetFillStyle

core/android/BitmapCanvasContext.cpp:183–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181bool BitmapCanvasContext::IsValid() { return canvasContext_->obj() != nullptr; };
182
183void BitmapCanvasContext::SetFillStyle(const std::string &color) {
184 TraceCommand("SetFillStyle: " + color);
185 if (color != fillColorCache_ && CanvasColorParser::Parse(color, fillColor_)) {
186 fillColorCache_ = color;
187 }
188 int resultColor = CanvasColorParser::RGBAToHex(fillColor_);
189 resultColor = darkModeManager_.GetColorWithInt(resultColor);
190 env_ = GetJniEnvSafe();
191 F2SafeCallVoidMethod(env_, canvasContext_->obj(), setFillStyle_, resultColor);
192}
193
194void BitmapCanvasContext::SetFillStyle(const CanvasFillStrokeStyle &style) {
195 env_ = GetJniEnvSafe();

Callers

nothing calls this directly

Calls 3

GetJniEnvSafeFunction · 0.85
GetColorWithIntMethod · 0.80
objMethod · 0.45

Tested by

no test coverage detected