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

Method draw

snap_drawing/test/utils/DisplayListBuilder.cpp:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40LayerContent DisplayListBuilder::draw(Size size, Scalar opacity, Valdi::Function<void(DrawingContext&)>&& cb) {
41 DrawingContext ctx(size.width, size.height);
42
43 cb(ctx);
44
45 auto content = ctx.finish();
46
47 layerContent(content, opacity);
48
49 return content;
50}
51
52LayerContent DisplayListBuilder::rectangle(Size size, Scalar opacity) {
53 return draw(size, opacity, [](DrawingContext& drawingContext) {

Callers

nothing calls this directly

Calls 2

cbFunction · 0.50
finishMethod · 0.45

Tested by

no test coverage detected