make rectangle rounded using canvas [duplicate]

make rectangle rounded using canvas [duplicate]



This question already has an answer here:



I make a rectangle , but I want to make it rounded , how can I do that ??


context.fillStyle = theme.line.strokeColor;
context.fillRect((point1.x + point2.x - width) / 2, (point1.y + point2.y - 18) / 2, width,parseInt('12px arial', 15));
context.fillStyle = '#FFFFFF';
context.fillText(number, ((point1.x + point2.x - width) / 2) + 3, ((point1.y + point2.y - 15) / 2));



here is my rectangle :



enter image description here



I want it to be like this :



enter image description here



This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.




Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)