I'm trying to create a rectangle for web app but mostly I'm finding examples for windows app.
I tried the following code (using VB) but it is filling the rectangle - I want to be able just to create rectangle (borders) without filling whole rectangle area!
Dim bmp As New Bitmap(200, 500)
Dim g As Graphics = Graphics.FromImage(bmp)
g.Clear(Color.SlateBlue)
Dim snowPen As New Pen(Color.Tan, 2)
g.DrawRectangle(snowPen, 5, 25, 20, 20)
Dim path As [String] = Server.MapPath("~/Image/Rectangle.jpg")
bmp.Save(path, ImageFormat.Jpeg)
Image1.ImageUrl = "~/Image/Rectangle.jpg"
g.Dispose()
bmp.Dispose()
I think you can create rectangle in jquery itself. like below links.
http://motyar.blogspot.in/2010/02/draw-rectangle-with-jquery.html
http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/408652/animate-rectangle-with-jquery
Marked as answer by mentori79 on Dec 26, 2012 08:18 PM
mentori79
Member
2 Points
8 Posts
How to create rectangle for web app
Dec 26, 2012 07:53 AM|LINK
I'm trying to create a rectangle for web app but mostly I'm finding examples for windows app.
I tried the following code (using VB) but it is filling the rectangle - I want to be able just to create rectangle (borders) without filling whole rectangle area!
Dim bmp As New Bitmap(200, 500) Dim g As Graphics = Graphics.FromImage(bmp) g.Clear(Color.SlateBlue) Dim snowPen As New Pen(Color.Tan, 2) g.DrawRectangle(snowPen, 5, 25, 20, 20) Dim path As [String] = Server.MapPath("~/Image/Rectangle.jpg") bmp.Save(path, ImageFormat.Jpeg) Image1.ImageUrl = "~/Image/Rectangle.jpg" g.Dispose() bmp.Dispose()Any help with example?
NadeemZee
Participant
942 Points
178 Posts
Re: How to create rectangle for web app
Dec 26, 2012 09:41 AM|LINK
modify your code and remove the line:
Good Luck
Do FEAR (Face Everything And Rise)
Please mark as Answer if my post helps you..!
Do FEAR (Face Everything And Rise)
Please mark as Answer if my post helps you..!
viralpatel
Member
213 Points
63 Posts
Re: How to create rectangle for web app
Dec 26, 2012 09:46 AM|LINK
I think you can create rectangle in jquery itself. like below links.
http://motyar.blogspot.in/2010/02/draw-rectangle-with-jquery.html
http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/408652/animate-rectangle-with-jquery
mentori79
Member
2 Points
8 Posts
Re: How to create rectangle for web app
Dec 26, 2012 08:47 PM|LINK
I tried removing the line but it didn't work either!
any other idea?