parseStroke function
Parses an AVD stroke related attributes to a DrawablePaint.
Implementation
DrawablePaint? parseStroke(List<XmlAttribute> el, Rect bounds) {
final String? rawStroke =
getAttribute(el, 'strokeColor', def: null, namespace: androidNS);
if (rawStroke == null) {
return null;
}
return DrawablePaint(
PaintingStyle.stroke,
color: parseColor(rawStroke)!.withOpacity(parseDouble(
getAttribute(el, 'strokeAlpha', def: '1', namespace: androidNS))!),
strokeWidth: parseDouble(
getAttribute(el, 'strokeWidth', def: '0', namespace: androidNS)),
strokeCap: parseStrokeCap(el),
strokeJoin: parseStrokeJoin(el),
strokeMiterLimit: parseMiterLimit(el),
);
}