Hi , Last time I wrote the BasicShape object , today I think that I should add some proprieties : value & font in order to add text to shapes. Also a font's setter method :
/**
* Set font proprieties.
*
* @param int size : Size of border in pixel.
* @param string color : Color of border (Hex).
* @param string family : Font family.
* @return void
*/
BasicShape.prototype.Font = function (size, color, family) {
this.font.size = size || 14;
this.font.color = color || '#000000';
this.font.family = family || 'Arial';
};
The next big thing is how to draw text on a shape while respecting border , border-radius , and padding ?!!