MCPcopy Create free account
hub / github.com/Tencent/libpag / ExpandPath

Function ExpandPath

src/rendering/utils/PathUtil.cpp:67–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void ExpandPath(tgfx::Path* path, float expansion) {
68 if (expansion == 0) {
69 return;
70 }
71 auto strokePath = *path;
72 tgfx::Stroke stroke(fabsf(expansion) * 2, tgfx::LineCap::Butt, tgfx::LineJoin::Round);
73 stroke.applyToPath(&strokePath);
74 if (expansion < 0) {
75 path->addPath(strokePath, tgfx::PathOp::Difference);
76 } else {
77 path->addPath(strokePath, tgfx::PathOp::Union);
78 }
79}
80} // namespace pag

Callers 3

RenderMasksFunction · 0.85
MeasureFeatherMaskBoundsFunction · 0.85
drawMethod · 0.85

Calls 1

applyToPathMethod · 0.45

Tested by

no test coverage detected