MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuRoundContentDraw

Function PiuRoundContentDraw

modules/piu/PC/Common/piuRoundContent.c:77–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void PiuRoundContentDraw(void* it, PiuView* view, PiuRectangle area)
78{
79 PiuRoundContent* self = it;
80 PiuSkin* skin = (*self)->skin;
81 if (skin) {
82 PiuRectangleRecord bounds;
83 PiuColorRecord fillColor;
84 PiuColorRecord strokeColor;
85 PiuState state = (*self)->state;
86 if (state < 0) state = 0;
87 else if (3 < state) state = 3;
88 PiuColorsBlend((*skin)->data.color.fill, state, &fillColor);
89 PiuColorsBlend((*skin)->data.color.stroke, state, &strokeColor);
90 PiuRectangleSet(&bounds, 0, 0, (*self)->bounds.width, (*self)->bounds.height);
91 PiuViewPushClip(view, 0, 0, bounds.width, bounds.height);
92 PiuViewDrawRoundContent(view, 0, 0, bounds.width, bounds.height, (*self)->radius, (*self)->border, (*self)->variant, &fillColor, &strokeColor);
93 PiuViewPopClip(view);
94 }
95}
96
97void PiuRoundContent_create(xsMachine* the)
98{

Callers

nothing calls this directly

Calls 5

PiuColorsBlendFunction · 0.85
PiuRectangleSetFunction · 0.85
PiuViewPushClipFunction · 0.50
PiuViewDrawRoundContentFunction · 0.50
PiuViewPopClipFunction · 0.50

Tested by

no test coverage detected