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

Function makeRectangle

snap_drawing/test/src/DisplayList_Tests.cpp:11–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace snap::drawing {
10
11static LayerContent makeRectangle(Size size) {
12 DrawingContext ctx(size.width, size.height);
13
14 Paint paint;
15 paint.setColor(Color::blue());
16
17 ctx.drawPaint(paint, ctx.drawBounds());
18
19 return ctx.finish();
20}
21
22TEST(DisplayList, canRecordAndVisitCommands) {
23 auto displayList = makeShared<DisplayList>(Size(100, 100), TimePoint(0));

Callers 1

TESTFunction · 0.85

Calls 3

drawPaintMethod · 0.80
setColorMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected