Last post Dec 25, 2019 01:24 PM by AddWeb Solution
Jul 27, 2013 03:35 AM|bsarahim|LINK
Hi I want to draw a red background small circle and include 10% off inside in the circle.. How can I do it.. thanks
Jul 27, 2013 03:40 AM|mshoaiblibra|LINK
Check below links, Here you will find your problem solution:
Jul 29, 2013 01:22 PM|bsarahim|LINK
Sorry I did not try, looks like the code, will only draw a circle, but I need some text as well in the circle.. Thanks
Jul 31, 2013 10:22 PM|Ericzh|LINK
About drawing a circle and fill text within it in asp.net, you could try below way.
Firstly, you could draw a circle in a pircture and save the pricture in the server side, then fill some text in the pircture.
About Drawing circle in asp.net, you could refer to:
Writing text in a pircture:
Aug 04, 2013 11:30 AM|Ruchira|LINK
but I need some text as well in the circle
Think about HTML5 Canvas.
Please 'Mark as Answer' if this post helps you
Dec 25, 2019 01:24 PM|AddWeb Solution|LINK
We wrote code related to the web form application. We attached below code for .aspx page and .cshtml page.
<asp:Image ID="Image1" runat="server" />
Bitmap bmp = new Bitmap(250, 250);
Graphics g = Graphics.FromImage(bmp);
int heightOfRectangle = 200;
int widthOfRectangle = heightOfRectangle;
int xPosition = 25;
int yPosition = 25;
Rectangle rect = new Rectangle(xPosition, yPosition, widthOfRectangle, heightOfRectangle);
Brush drawingPen = new SolidBrush(Color.Red);
rect = new Rectangle(heightOfRectangle-115, heightOfRectangle-90, widthOfRectangle-50, heightOfRectangle-150);
g.DrawString("Your Text", new Font("Times", 15), Brushes.Black, rect);
string path = Server.MapPath("~/Image/DrawTransparentEllipse.jpg");
Image1.ImageUrl = "~/Image/DrawTransparentEllipse.jpg";
Using the above code you can set your text and color.
If you want still any help please inform us.