improved canvas rotation