Wie funktioniert bitte das Ausfüllen vom Polygon?
PS_DASHDOT funktioniert auch nicht.
Danke.
Gruss
Code: Alles auswählen
Global hdc.l,*poly,greenpen
Declare api_polyline()
*poly=AllocateMemory(24)
PokeL(*poly,10)
PokeL(*poly+4,10)
PokeL(*poly+8,100)
PokeL(*poly+12,150)
PokeL(*poly+16,190)
PokeL(*poly+20,150)
If OpenWindow(0, 0, 0, 220, 220, "CanvasGadget", #PB_Window_SystemMenu)
CanvasGadget(0, 10, 10, 200, 200)
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Gadget And EventGadget() = 0
If EventType() = #PB_EventType_LeftButtonDown
hdc = StartDrawing(CanvasOutput(0))
api_polyline()
StopDrawing()
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
Procedure api_polyline()
greenPen=CreatePen_(PS_DASHDOT, 4, RGB(0,255,0))
SelectObject_(hdc,greenPen)
Polygon_(hdc,*poly,3)
EndProcedure