testing dimension in canvas