Hi RahulH,
To get a corner button you might draw a polygon on the graphics object of
your bitmap as this:
//create a graphics object from the bitmap
Graphics g= Graphics.FromImage (bitmap);
//paint the background as specified by the user or else paint it as the
default
g.Clear (bgColor);
//add border to mark a button shape
Point[] poly = {new Point(10, 3), new Point(bitmapWidth-10, 3), new
Point(bitmapWidth-5, 5),
new Point(bitmapWidth-3, 10), new Point(bitmapWidth-3, bitmapHeight-10),
new Point(bitmapWidth-5, bitmapHeight-5), new Point(bitmapWidth-10,
bitmapHeight-3),
new Point(10, bitmapHeight-3), new Point(5, bitmapHeight-5),
new Point(3, bitmapHeight-10), new Point(3, 10),
new Point(5, 5), new Point(10, 3)};
g.FillPolygon (new SolidBrush (buttonBGColor), poly);
As for placing the text and the polygon on the same bitmap, you may review
demo#2 from my website:
http://www.societopia.net/Samples/ --
HTH,
Phillip Williams
http://www.societopia.net http://www.webswapp.com [quoted text, click to view] "RahulH" wrote:
> Hi,
> I am a novice to System.Drawing namespace. I want to create a web custom
> button control with rounded images.
> I can create rounded corners, and image of text. but is there a way that i
> can now join these images into a single image.
> Thanks in advance,