- override
Renders this display object with the given renderState
.
The display object is rendered without its filters.
Source
@override void render(RenderState renderState) { var renderContext = renderState.renderContext; if (renderContext is RenderContextCanvas) { CanvasRenderingContext2D rawContext = renderContext.rawContext; Matrix shadowMatrix = renderState.globalMatrix; rawContext.save(); rawContext.shadowColor = color2rgba(shadowColor); rawContext.shadowBlur = sqrt(shadowMatrix.det) * shadowBlur; rawContext.shadowOffsetX = shadowOffsetX * shadowMatrix.a + shadowOffsetY * shadowMatrix.c; rawContext.shadowOffsetY = shadowOffsetX * shadowMatrix.b + shadowOffsetY * shadowMatrix.d; renderState.renderObject(this.displayObject); rawContext.restore(); } else { renderState.renderObject(this.displayObject); } }