1

how to draw next image with labels in rectangles? thanks for help:

enter image description here

DmitryB
  • 1,149
  • 5
  • 20
  • 34

2 Answers2

4

Use the different classes in the System.Drawing namespace.

Alternatively, use one of the many drawing libraries around.


Note:

The documentation on MSDN gives the following warning:

Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions. For a supported alternative, see Windows Imaging Components.

However, I and others who have done so have not found problems. Even MSDN magazine suggests it...

Community
  • 1
  • 1
Oded
  • 489,969
  • 99
  • 883
  • 1,009
1

There's a very good, detailed article at the 4guysfromrolla web site. I used this the first time I needed to do such a thing, and I still use the same pattern.

https://web.archive.org/web/20211020111734/https://www.4guysfromrolla.com/articles/042209-1.aspx

This one is fairly good as well, but nowhere near as well-explained as the first one. http://blogs.sitepoint.com/generating-asp-net-images-fly/

David
  • 72,686
  • 18
  • 132
  • 173