initial canvas drawing code