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

Function ApplyPaintToPath

src/rendering/graphics/Text.cpp:161–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161static void ApplyPaintToPath(const tgfx::Paint& paint, tgfx::Path* path) {
162 if (paint.getStyle() == tgfx::PaintStyle::Fill || path == nullptr) {
163 return;
164 }
165 auto strokePath = *path;
166 if (const auto stroke = paint.getStroke()) {
167 stroke->applyToPath(&strokePath);
168 }
169 *path = strokePath;
170}
171
172bool Text::hitTest(RenderCache*, float x, float y) {
173 for (auto& textRun : textRuns) {

Callers 2

hitTestMethod · 0.85
getPathMethod · 0.85

Calls 3

getStyleMethod · 0.80
getStrokeMethod · 0.80
applyToPathMethod · 0.45

Tested by

no test coverage detected