using Canvas.rows() instead of Canvas.frame()