…re no such API available in cc.DrawNode class, So I have written a new method in cc.DrawNode class called as drawRoundRect for drawing rounded rectanglen which accepts arguments such as height , width , background color, border width, border color, radius and type. I am using this method to draw rounded rectangle in my game that is on production for past 2 years and it works well when compile it for andriod as well
Simple useage:
var myRoundRect = new cc.DrawNode();
myRoundRect.drawRoundRect(300,100,cc.color(255,0,0), 5, cc.color(255,255,255), 50);
…re no such API available in cc.DrawNode class, So I have written a new method in cc.DrawNode class called as drawRoundRect for drawing rounded rectanglen which accepts arguments such as height , width , background color, border width, border color, radius and type. I am using this method to draw rounded rectangle in my game that is on production for past 2 years and it works well when compile it for andriod as well Simple useage: var myRoundRect = new cc.DrawNode(); myRoundRect.drawRoundRect(300,100,cc.color(255,0,0), 5, cc.color(255,255,255), 50);
see image for output reference.
Thanks