NoMainWin
WindowWidth=400:WindowHeight=400

Open "Arc - Alyce Watson" For graphics_nsb_nf As #1
Print #1, "trapclose [quit]"
Print #1, "down; fill yellow;size 5"
Print #1, "color blue"

hwDC=GetDC(hWnd(#1))

Call Arc hwDC,10,10,350,250,40,100,300,200

'to flush graphics drawn via api:
Print #1, "getbmp arc 0 0 500 300"
Print #1, "drawbmp arc 0 0;flush"

Wait

[quit]
Call ReleaseDC hWnd(#1), hwDC
Close #1:End

Sub Arc hDC,x1,y1,x2,y2,x3,y3,x4,y4
CallDLL #gdi32, "Arc",hDC As long,x1 As long,y1 As long,_
x2 As long,y2 As long,x3 As long,y3 As long,_
x4 As long,y4 As long,results As boolean
End Sub

Function GetDC(hWnd)
CallDLL #user32, "GetDC",hWnd As long,GetDC As long
End Function

Sub ReleaseDC hWnd, hDC
CallDLL#user32,"ReleaseDC",hWnd As long,_
hDC As long,result As long
End Sub

' BOOL Arc(
' HDC hdc, // handle to device context
' Int nLeftRect, // x-coordinate of bounding rectangle’s upper-left corner
' Int nTopRect, // y-coordinate of bounding rectangle’s upper-left corner
' Int nRightRect, // x-coordinate of bounding rectangle’s lower-right corner
' Int nBottomRect,// y-coordinate of bounding rectangle’s lower-right corner
' Int nXStartArc, // first radial ending point
' Int nYStartArc, // first radial ending point
' Int nXEndArc, // second radial ending point
' Int nYEndArc // second radial ending point
