CanvasRenderer: Do not use c-style type cast