RoundRect

The RoundRect function draws a rectangle with rounded corners. The rectangle is outlined by using the current pen and filled by using the current brush.

Rectangle nXStart, nYStart, nXEnd, nYEnd, nWidth, nHeight

Parameters

nXStart
Specifies the x-coordinate of the first base corner of the rectangle

nYStart
Specifies the y-coordinate of the first base corner of the rectangle

nXEnd
Specifies the x-coordinate of the second base corner of the rectangle

nYEnd
Specifies the y-coordinate of the second base corner of the rectangle

nWidth
Specifies the width of the ellipse used to draw the rounded corners

nHeight
Specifies the height of the ellipse used to draw the rounded corners

Example
View result

<%@ Language=VBScript %>
<%
Response.ContentType="image/gif"
set obj=Server.CreateObject("shotgraph.image")

size=401
obj.CreateImage size,size,4
obj.SetColor 0,255,255,255
obj.SetColor 1,0,0,0
obj.SetColor 2,204,0,0
obj.SetColor 3,204,204,0
obj.SetBgColor 0
obj.FillRect 0,0,size-1,size-1

obj.CreatePen "PS_SOLID",2,2
obj.SetBkColor 1
obj.CreateBrush "BS_HATCHED",3,"HS_DIAGCROSS"
obj.RoundRect 40,40,size-41,size-41,50,50

img=obj.GifImage(-1,1,"")
Response.BinaryWrite(img)
%>