Task

Create a window and draw a pixel in it, subject to the following:

  the window is 320 x 240
  the color of the pixel must be red (255,0,0)
  the position of the pixel is x = 100, y = 100
 
  If OpenWindow(0, 0, 0, 320, 240, "Rosetta Code Draw A Pixel in PureBasic")
    If CreateImage(0, 320, 240) And StartDrawing(ImageOutput(0))
          Plot(100, 100,RGB(255,0,0))
      StopDrawing() 
      ImageGadget(0, 0, 0, 320, 240, ImageID(0))
    EndIf
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow
  EndIf
 