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

Method apply

snap_drawing/src/snap_drawing/cpp/Drawing/Mask/PaintMask.cpp:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void PaintMask::apply(SkCanvas* canvas) {
44 if (_path.isEmpty()) {
45 canvas->drawRect(_rect.getSkValue(), _paint.getSkValue());
46 } else {
47 canvas->drawPath(_path.getSkValue(), _paint.getSkValue());
48 }
49
50 canvas->restore();
51}
52
53String PaintMask::getDescription() {
54 if (_path.isEmpty()) {

Callers

nothing calls this directly

Calls 3

getSkValueMethod · 0.80
restoreMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected