Das geht, sofern ich ein 24Bit Image verwende (also 3 Byte pro Farbe).
Mit einem 32Bit Image (4Byte RGBA) geht das nicht, obwohl der Alpha Kanal auf 255 intransparent gesetzt ist!
Warum???
Code: Alles auswählen
#Image = 0
#Window = 0
#ImageGadget = 1
If OpenWindow(#Window, 100, 100, 800, 800, "Direct Draw Line", #PB_Window_SystemMenu)
CreateImage(#Image, WindowWidth(#Window), WindowHeight(#Window), 24, RGB(200,200,200))
;CreateImage(#Image, WindowWidth(#Window), WindowHeight(#Window), 32, RGBA(200,200,200,255)) ; DAS GEHT NICHT! WARUM???
ImageGadget(#ImageGadget, 0,0, WindowWidth(#Window), WindowHeight(#Window), ImageID(#Image))
; *Buffer = DrawingBuffer()
Define I, N, Phi.d
StartDrawing(ImageOutput(0))
DrawingMode(#PB_2DDrawing_Outlined)
Circle(400,400, 390, RGBA(0,0,0,255))
For I = 0 To 358 Step 2
Phi = Radian(I)
LineXY(400, 400, 400- 390*Cos(Phi), 400+ 390*Sin(Phi), RGBA(255,0,0,255) )
Next
StopDrawing()
Define Event
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf