give canvas dynamic dimensions