Startdrawing(windowoutput

Mac OSX specific forum
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Startdrawing(windowoutput

Post 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
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: Startdrawing(windowoutput

Post 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. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
Fred
Administrator
Administrator
Posts: 18499
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Startdrawing(windowoutput

Post by Fred »

It does work here
jesperbrannmark
Enthusiast
Enthusiast
Posts: 536
Joined: Mon Feb 16, 2009 10:42 am
Location: sweden
Contact:

Re: Startdrawing(windowoutput

Post by jesperbrannmark »

Oh crap it does. I have been overworking before. Thanks.
Post Reply