SvgPath.fromCircleXml constructor
SvgPath.fromCircleXml(
- XmlElement element,
- SvgPainter painter,
- SvgBrush brush
Implementation
factory SvgPath.fromCircleXml(
XmlElement element,
SvgPainter painter,
SvgBrush brush,
) {
final _brush = SvgBrush.fromXml(element, brush, painter);
final cx = SvgParser.getNumeric(element, 'cx', _brush)!.sizeValue;
final cy = SvgParser.getNumeric(element, 'cy', _brush)!.sizeValue;
final r = SvgParser.getNumeric(element, 'r', _brush)!.sizeValue;
final d =
'M${cx - r},${cy}A$r,$r 0,0,0 ${cx + r},${cy}A$r,$r 0,0,0 ${cx - r},${cy}z';
return SvgPath(
d,
_brush,
SvgClipPath.fromXml(element, painter, _brush),
SvgTransform.fromXml(element),
painter,
);
}