Page 1 of 1

Startdrawing(windowoutput

Posted: Wed Aug 08, 2012 10:03 pm
by jesperbrannmark
This didnt work in 4.61, and doesnt work in 4.7b1.X
Whats your idea on that?

Code: Select all

If OpenWindow(0, 0, 0, 340, 419, "Drawing", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)

  Repeat
    Event = WaitWindowEvent()
    
    If Event = #PB_Event_Repaint
      StartDrawing(WindowOutput(0))
      Line(20, 287, 300, 1, RGB(0, 0, 0))
      StopDrawing()
    EndIf
    
  Until Event = #PB_Event_CloseWindow
 
EndIf

Re: Startdrawing(windowoutput

Posted: Wed Aug 08, 2012 10:15 pm
by J. Baker
jesperbrannmark wrote:This didnt work in 4.61, and doesnt work in 4.7b1.X
Whats your idea on that?

Code: Select all

If OpenWindow(0, 0, 0, 340, 419, "Drawing", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)

  Repeat
    Event = WaitWindowEvent()
    
    If Event = #PB_Event_Repaint
      StartDrawing(WindowOutput(0))
      Line(20, 287, 300, 1, RGB(0, 0, 0))
      StopDrawing()
    EndIf
    
  Until Event = #PB_Event_CloseWindow
 
EndIf
Fred did mention that #PB_Event_Repaint had a bug. Not sure when or what version of PB that existed in but is now fixed. ;)

Re: Startdrawing(windowoutput

Posted: Wed Aug 08, 2012 10:33 pm
by Fred
It does work here

Re: Startdrawing(windowoutput

Posted: Thu Aug 09, 2012 6:43 am
by jesperbrannmark
Oh crap it does. I have been overworking before. Thanks.