Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Graphics Mill does not have rounded rectangle functionality, however perhaps you could emulate it with lines and bezier curves, or polygons. E.g. here is a code sample how to draw rounded rectangle. Code:<%
Dim objBitmap
Dim objGraphics
Set objBitmap = Server.CreateObject("GraphicsMill.Bitmap")
objBitmap.CreateNew 640, 480
Set objGraphics = objBitmap.Graphics
objGraphics.Engine = 1
' Parameters
Dim x, y, width, height, roundness
x = 40
y = 30
width = 450
height = 100
roundness = 40
Dim line1x1, line1y1, line2x1, line2y1, line3x1, line3y1, line4x1, line4y1
Dim line1x2, line1y2, line2x2, line2y2, line3x2, line3y2, line4x2, line4y2
Dim horend, vertend
horend = width * roundness/200
vertend = height * roundness/200
line1x1 = x
line1y1 = y + vertend
line1x2 = x
line1y2 = y + height - vertend
line2x1 = x + horend
line2y1 = y + height
line2x2 = x + width - horend
line2y2 = y + height
line3x1 = x + width
line3y1 = y + height - vertend
line3x2 = x + width
line3y2 = y + vertend
line4x1 = x + horend
line4y1 = y
line4x2 = x + width - horend
line4y2 = y
objGraphics.DrawLine line1x1, line1y1, line1x2, line1y2
objGraphics.DrawLine line2x1, line2y1, line2x2, line2y2
objGraphics.DrawLine line3x1, line3y1, line3x2, line3y2
objGraphics.DrawLine line4x1, line4y1, line4x2, line4y2
objGraphics.DrawBezier line1x1, line1y1, x, y, x, y, line4x1, line4y1
objGraphics.DrawBezier line1x2, line1y2, x, y + height, x, y + height, line2x1, line2y1
objGraphics.DrawBezier line2x2, line2y2, x + width, y + height, x + width, y + height, line3x1, line3y1
objGraphics.DrawBezier line3x2, line3y2, x + width, y, x + width, y, line4x2, line4y2
objBitmap.SaveToStream Response
%>
Hope this helps. Edited by user Sunday, December 23, 2007 4:40:26 PM(UTC)
| Reason: Not specified
|