renderWay method

  1. @override
void renderWay(
  1. RenderInfo<Renderinstruction> renderInfo,
  2. RenderContext renderContext,
  3. WayProperties wayProperties
)

Implementation

@override
void renderWay(RenderInfo renderInfo, RenderContext renderContext, WayProperties wayProperties) {
  if (renderContext is! UiRenderContext) throw Exception("renderContext is not UiRenderContext ${renderContext.runtimeType}");
  UiPath path = calculatePath(wayProperties.getCoordinatesAbsolute(), renderContext.reference, renderinstruction.dy);
  if (fill != null) renderContext.canvas.drawPath(path, fill!);
  if (stroke != null) renderContext.canvas.drawPath(path, stroke!);
}