DEV Community

Discussion on: I've created an awesome painting app using React and Canvas API

Collapse
 
dhruvgarg79 profile image
Dhruv garg
const cursor = `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23000000" opacity="0.3" height="${width}" viewBox="0 0 ${width} ${width}" width="${width}"><circle cx="${widthHalf}" cy="${widthHalf}" r="${widthHalf}" fill="%23000000" /></svg>') ${widthHalf} ${widthHalf}, auto`;
Enter fullscreen mode Exit fullscreen mode

can you please explain this line from source code?

Collapse
 
adrianbdesigns profile image
Adrian Bece

Sure. I'm replacing the custor with an dynamic background-image svg that is a circle with a certain radius.

Collapse
 
dhruvgarg79 profile image
Dhruv garg

got it. thanks.