There can be different approaches. You can generate Canvas drawing on the fly, using this HTML5 feature:
http://www.w3schools.com/html/html5_canvas.asp[
^].
The problem with that is not all Web browsers support HTML5 to the required degree. To check up, please see:
http://en.wikipedia.org/wiki/HTML5[
^],
http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28HTML5%29[
^].
Alternatively, you can draw everything on the server side, using
System.Drawing.Bitmap
:
http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.drawing.image.aspx[
^].
To draw on the bitmap, you should use the instance of the
System.Drawing.Graphics
obtained from the instance of
Bitmap
or an instance of any other type of
System.Drawing.Image
:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.fromimage.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.aspx[
^].
Then you can write a bitmap file on the server side and deliver it to the client through the
<img>
element with the value of
src
attribute containing the URI of your image. Alternatively, you can generate the whole HTTP response with appropriate content type to show just the graphics directly, without creating any files.
—SA