J'ai essayé en passant par le GDI de windows mais sans succès... La foncion Rectangle fonctionne mais pas l'AngleArc alors que le principe est le même...
Code : Tout sélectionner
Procedure IsDrawing()
!extrn _PB_2DDrawing_GlobalStructure
!MOV eax, [_PB_2DDrawing_GlobalStructure]
ProcedureReturn
EndProcedure
Procedure Rectangle(left, top, right, bottom, Color = #PB_Default)
If Color <> #PB_Default
FrontColor(Color)
EndIf
ProcedureReturn Rectangle_(IsDrawing(), left, top, right, bottom)
EndProcedure
Procedure AngleArc(x, y, Radius, StartAngle.f, StopAngle.f, Color = #PB_Default)
Protected SweepAngle.f
If Color <> #PB_Default
FrontColor(Color)
EndIf
SweepAngle = StopAngle - StartAngle
ProcedureReturn AngleArc_(IsDrawing(), x, y, Abs(Radius), StartAngle, SweepAngle)
EndProcedure
Width=200
Height=150
If OpenWindow(0, 0, 0, Width, Height, "Circles", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CreateGadgetList( WindowID(0) )
Repeat
Event = WaitWindowEvent()
If Event = #WM_PAINT And StartDrawing( WindowOutput(0) )
Rectangle(10, 10, 30, 20, #Blue)
AngleArc(100, 75, 70, 45, 135, #Red)
StopDrawing()
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
Dri
