[ok] roundbox(),box(),circle()... et outline
Publié : ven. 10/juil./2015 8:31
salut
On devrait voir normalement une roundbox(), box(),circle(), etc... affichés sur un sprite avec le drawingmode outline mais on ne voit rien.
Visiblement c'est un bug semble-t-il, non ?
[ Edit ]
ça marche avec :
On devrait voir normalement une roundbox(), box(),circle(), etc... affichés sur un sprite avec le drawingmode outline mais on ne voit rien.
Visiblement c'est un bug semble-t-il, non ?
Code : Tout sélectionner
InitSprite()
screenwidth = 1024
screenheight = 768
OpenWindow(0, 0, 0, screenwidth, screenheight, "Antialiased Line Demo", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If OpenWindowedScreen(WindowID(0),0,0,screenwidth, screenheight)=0
MessageRequester("Error", "Can't Open Screen!", 0)
End
EndIf
If CreateSprite(0, 200, 200,#PB_Sprite_AlphaBlending) And StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_AllChannels)
Box(0,0,200,200,RGBA(0,0,0,0)) ; on efface le calque
DrawingMode(#PB_2DDrawing_AlphaBlend)
; RoundBox(0, 0, 200, 200, 20, 20, RGBA(Random(255), Random(255), Random(255),255)) ; uncomment to see the roundbox()
DrawingMode(#PB_2DDrawing_Outlined)
Box(0,0,100,100,RGBA(0,0,0,255))
Circle(50,50,40,RGBA(255,0,0,255))
y = 0
For x = 0 To 95 Step 10
RoundBox(x, y, 200-2*x, 200-2*y, 20, 20, RGBA(Random(255), Random(255), Random(255),255))
y + 10
Next x
StopDrawing()
; ImageGadget(0, 0, 0, 200, 200, ImageID(0))
EndIf
Repeat
Event = WaitWindowEvent()
ClearScreen(RGB(120,120,120))
DisplayTransparentSprite(0,0,0)
FlipBuffers()
Until Event = #PB_Event_CloseWindow
ça marche avec :
Code : Tout sélectionner
DrawingMode(#PB_2DDrawing_AlphaBlend|#PB_2DDrawing_Outlined)