MCPcopy Create free account
hub / github.com/Tencent/tgfx / setFillStyles

Method setFillStyles

src/layers/ShapeLayer.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void ShapeLayer::setFillStyles(std::vector<std::shared_ptr<ShapeStyle>> fills) {
52 if (_fillStyles.size() == fills.size() &&
53 std::equal(_fillStyles.begin(), _fillStyles.end(), fills.begin())) {
54 return;
55 }
56 for (auto& style : _fillStyles) {
57 detachProperty(style.get());
58 }
59 _fillStyles = std::move(fills);
60 for (auto& style : _fillStyles) {
61 attachProperty(style.get());
62 }
63 invalidateContent();
64}
65
66void ShapeLayer::removeFillStyles() {
67 if (_fillStyles.empty()) {

Callers 1

TGFX_TESTFunction · 0.80

Calls 4

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by 1

TGFX_TESTFunction · 0.64