renderFixture method
Renders a Fixture in a Canvas.
Called for each fixture in body when rendering. Override this method to customize how fixtures are rendered. For example, you can filter out fixtures that you don't want to render.
NOTE: If renderBody is false, no fixtures will be rendered. Hence, renderFixture is not called when rendering.
Implementation
void renderFixture(Canvas canvas, Fixture fixture) {
canvas.save();
switch (fixture.type) {
case ShapeType.chain:
_renderChain(canvas, fixture);
case ShapeType.circle:
_renderCircle(canvas, fixture);
case ShapeType.edge:
_renderEdge(canvas, fixture);
case ShapeType.polygon:
_renderPolygon(canvas, fixture);
}
canvas.restore();
}