Chord

The Chord function draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a "secant"). The chord is outlined by using the current pen and filled by using the current brush.

Chord 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 radial defining the beginning of the chord.

nYRadial1
Specifies the y-coordinate of the endpoint of the radial defining the beginning of the chord.

nXRadial2
Specifies the x-coordinate of the endpoint of the radial defining the end of the chord.

nYRadial2
Specifies the y-coordinate of the endpoint of the radial defining the end of the chord.

Remarks

The curve of the chord 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 segment drawn from the center of the ellipse to a specified endpoint on the ellipse.) The chord is closed by drawing a line from the intersection of the first radial and the curve to the intersection of the second radial and the curve.
If the starting point and ending point of the curve are the same, a complete ellipse is drawn
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,0,0,204
obj.SetColor 3,0,204,0
obj.SetBgColor 0
obj.FillRect 0,0,size-1,size-1

obj.SetBgColor 3
obj.SetDrawColor 1
obj.Chord -size+1,0,size-1,size*2-1,size-1,size-1,0,0

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