renderWay method
void
renderWay(
- RenderInfo<
Renderinstruction> renderInfo, - RenderContext renderContext,
- WayProperties wayProperties
Renders a rectangle for a way.
Implementation
@override
void renderWay(RenderInfo renderInfo, RenderContext renderContext, WayProperties wayProperties) {
if (renderContext is! UiRenderContext) throw Exception("renderContext is not UiRenderContext ${renderContext.runtimeType}");
MapRectangle rectangle = wayProperties.getBoundaryAbsolute().offset(renderContext.reference);
UiRect rect = UiRect(rectangle.left, rectangle.top, rectangle.right, rectangle.bottom);
if (fill != null) renderContext.canvas.drawRect(rect, fill!);
if (stroke != null) renderContext.canvas.drawRect(rect, stroke!);
}