typescript canvas cartesian