MCPcopy Create free account
hub / github.com/Tencent/tgfx / drawPath

Method drawPath

src/svg/SVGExportContext.cpp:130–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void SVGExportContext::drawPath(const Path& path, const MCState& state, const Fill& fill) {
131 if (!state.clip.contains(path.getBounds())) {
132 applyClipPath(state.clip);
133 }
134 ElementWriter pathElement("path", context, this, writer.get(), resourceBucket.get(),
135 exportFlags & SVGExportFlags::DisableWarnings, state, fill);
136 pathElement.addPathAttributes(path, tgfx::SVGExportContext::PathEncodingType());
137 if (path.getFillType() == PathFillType::EvenOdd) {
138 pathElement.addAttribute("fill-rule", "evenodd");
139 }
140}
141
142void SVGExportContext::drawShape(std::shared_ptr<Shape> shape, const MCState& state,
143 const Fill& fill) {

Callers 8

onDrawStrokeMethod · 0.45
onDrawFillMethod · 0.45
onDrawStrokeMethod · 0.45
onDrawStrokeMethod · 0.45
onDrawStrokeMethod · 0.45
onDrawStrokeMethod · 0.45
onDrawFillMethod · 0.45
onDrawStrokeMethod · 0.45

Calls 6

addPathAttributesMethod · 0.80
getFillTypeMethod · 0.80
containsMethod · 0.45
getBoundsMethod · 0.45
getMethod · 0.45
addAttributeMethod · 0.45

Tested by

no test coverage detected