#PB_2DDrawing_XOr problem

Post bugreports for the Windows version here
williamvanhoecke
User
User
Posts: 68
Joined: Wed Jun 07, 2017 10:13 pm

#PB_2DDrawing_XOr problem

Post by williamvanhoecke »

Ver: 6.30
#PB_2DDrawing_XOr drawing on Windowoutput
Xor function seems to work, colors however are all reset to black !!!!!

Code: Select all

  If OpenWindow(0, 0, 0, 200, 200, "2DDrawing Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ;If CreateImage(0, 200, 200) And StartDrawing(ImageOutput(0))
    If StartDrawing(WindowOutput(0))
      DrawingMode(#PB_2DDrawing_Outlined |#PB_2DDrawing_XOr)
      ;DrawingMode(#PB_2DDrawing_Outlined)
      y = 0
      For x = 0 To 95 Step 10
        FrontColor(RGB(Random(255), Random(255), Random(255)))
        Box(x, y, 200-2*x, 200-2*y)
        y + 10        ; the same as y = y + 10
      Next x
      StopDrawing() 
      ;ImageGadget(0, 0, 0, 200, 200, ImageID(0))
    EndIf
    
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow
  EndIf
Mesa
Enthusiast
Enthusiast
Posts: 464
Joined: Fri Feb 24, 2012 10:19 am

Re: #PB_2DDrawing_XOr problem

Post by Mesa »

Yes, i confirm, i've got the same problem with pb6.03 too.

M.
Fred
Administrator
Administrator
Posts: 18478
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: #PB_2DDrawing_XOr problem

Post by Fred »

You shouldn't use WindowOutput(), it's old and weird, not really cross-platform and has refresh issues.
Post Reply