Savez vous comment puis je construire un camembert très simplement,
mon bout de code est laborieux
Code : Tout sélectionner
If OpenWindow(0, 0, 0, 200, 200, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If CreateImage(0, 200, 200) And StartDrawing(ImageOutput(0))
Box(0, 0, 200, 200, RGB(255, 255, 255))
Angled.f = 90.0
Anglef.f = -90.0
;debut
LineXY(100, 100, 100+Cos(Angled)*90, 100+Sin(Angled)*90, #Red)
;fin
LineXY(100, 100, 100+Cos(Anglef)*90, 100+Sin(Anglef)*90, #Red)
For Angle2 = 0 To 360
Plot(100+Cos(Angle2)*90, 100+Sin(Angle2)*90,#Red)
Next Angle2
FillArea(100, 100, -1, $0000FF)
StopDrawing()
ImageGadget(0, 0, 0, 200, 200, ImageID(0))
EndIf
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf