Iyonix Select Acorn RISCOS 4 Home About Toolbox Examples Maillist Downloads
AppBasic

Toolbar


bar/gif
General
Hello world 1
Hello world 2
Min app
Bin
Window
Slot machine
Drawing
Colour menu
Drawing
Clock

Drawing

circle/gif
Drawing in a desktop window

You can download the application from here.
  1. Make a new ‘Window application’
  2. De-select the window template's ‘Auto-redraw’ flag
    drawflags/gif
    • Press the menu button over the window's ResEd representation (to popup the edit menu)
    • Select the “Other properties” entry (to open an edit dialogue box)
    • De-select the ‘Auto-redraw’ flag
  3. Set the work-area origin
    extent/gif
    Selecting the Extent... menu entry opens the extent dialogue box. To set the work-area origin to the centre of the window change the lower left-hand and upper right-hand coordinates to (-640,512) and (640,512) respectively.
  4. Insert a (Wimp) redraw event handler
    drawhandler/gif
    • Amend the code to
      DEF PROCDealWith_WindowRedraw(object,xo%,yo%)
      LOCAL radius : radius=400
      CIRCLE FILL xo%,yo%,radius
      ENDPROC
      N.B. When this event-handler is called, the coordinates of the current position of the work-area origin are specified by (xo%,yo%)