get canvas w-h dynamically