Pie
The Pie function draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials. The pie is outlined by using the current pen and filled by using the current brush.
Pie
nLeftRect, nTopRect, nRighrRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2
Parameters
-
nLeftRect
-
Specifies the x-coordinate of the upper-left corner of the bounding rectangle.
-
nTopRect
-
Specifies the y-coordinate of the upper-left corner of the bounding rectangle.
-
nRightRect
-
Specifies the x-coordinate of the lower-right corner of the bounding rectangle.
-
nBottomRect
-
Specifies the y-coordinate of the lower-right corner of the bounding rectangle.
-
nXRadial1
-
Specifies the x-coordinate of the endpoint of the first radial.
-
nYRadial1
-
Specifies the y-coordinate of the endpoint of the first radial.
-
nXRadial2
-
Specifies the x-coordinate of the endpoint of the second radial.
-
nYRadial2
-
Specifies the y-coordinate of the endpoint of the second radial.
Remarks
The curve of the pie is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point where the ellipse intersects the first radial and extends counterclockwise to the point where the ellipse intersects the second radial. (A radial is a line drawn from the center of the ellipse to the specified endpoint on the ellipse.)
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,153,153,0
obj.SetBgColor 0
obj.FillRect 0,0,size-1,size-1
obj.CreatePen "PS_SOLID",2,1
obj.SetBgColor 2
obj.Pie 50,50,199,199,125,0,250,0
obj.CreateBrush "BS_HATCHED",2,"HS_CROSS"
obj.Pie 55,40,204,189,255,-10,130,-10
obj.SetBgColor 3
obj.Pie 5,size/2,size-6,size-6,0,size/2,0,0
img=obj.GifImage(-1,1,"")
Response.BinaryWrite(img)
%>