API Reference > imodeljs-frontend > Rendering > CanvasDecoration > drawDecoration drawDecoration Method Required method to draw this decoration into the supplied CanvasRenderingContext2D. This method is called every time a frame is rendered. drawDecoration(ctx: CanvasRenderingContext2D): void note Before this this function is called, the state of the CanvasRenderingContext2D is saved, and it is restored when this method returns. Therefore, it is not necessary for implementers to save/restore themselves. Parameter Type Description ctx CanvasRenderingContext2D The CanvasRenderingContext2D for the ScreenViewport being rendered. Returns - void Defined in core/frontend/src/render/CanvasDecoration.ts Line 28 Last Updated: 13 June, 2024