renderLine method
void
renderLine(
- dynamic v1,
- dynamic v2,
- Material material
Implementation
void renderLine(RenderableVertex v1, RenderableVertex v2, Material material) {
String path = 'M${convert(v1.positionScreen.x)},'
'${convert(v1.positionScreen.y)}L'
'${convert(v2.positionScreen.x)},'
'${convert(v2.positionScreen.y)}';
if (material is LineBasicMaterial) {
String style =
'fill:none;stroke:${material.color.getStyle()};stroke-opacity:${material.opacity};stroke-width:${material.linewidth};stroke-linecap:${material.linecap}';
if (material is LineDashedMaterial) {
style = '$style;stroke-dasharray:${material.dashSize!},${material.gapSize!}';
}
addPath(style, path);
}
}