The task is to create 1 pixel wide coloured vertical pinstripes with a sufficient number of pinstripes to span the entire width of the graphics display.



The pinstripes should either follow the system palette sequence,   or a sequence that includes:

black,   red,   green,   blue,   magenta,   cyan,   yellow,   and   white:

   after filling the top quarter, switch to a wider 2 pixel wide vertical pinstripe pattern,
   halfway down the display, switch to 3 pixel wide vertical pinstripe,
   finally to a 4 pixels wide vertical pinstripe for the last quarter of the display.


See also

   display black and white 
   print colour


 
Module Checkit {
      Window 16, 14000,12000;
      Module Pinstripe {
            Smooth off  ' use of GDI32
            Dim colors(0 to 7)
            Colors(0)=#000000,#FF0000, #00FF00, #0000FF, #FF00FF, #00FFFF, #FFFF00, #FFFFFF
            pixelsX=scale.x/twipsX
            pixelsY=scale.y/twipsY
            zoneheight=scale.y/4
            n=0
            Refresh 5000
            For i=1 to 4 {
                  move 0, (i-1)*zoneheight
                  pinw=i*twipsx
                  For j=1 to pixelsX/i {
                        Fill pinw, zoneheight, color(n)
                        Step  0, -zoneheight
                        n++:if n=8 then n=0
                  }
            }
            \\ now we make the refersh
            Refresh 100
      }
      \\ draw to console window
      \\ now we make a window and draw there
      Pinstripe
      Layer 32 {
            Window 12, 10000,10000
            Pinstripe
            Show
      }
      Declare Pinstripe Form
      Layer Pinstripe {
            Window 12, 10000,10000
            Pinstripe
            motion 2000, 2000
      }
      refresh 20
            Thread {
                 if control$="MAIN" then if mouse then player 32,  mousea.x, mousea.y
            } as anyvar interval 100
 
      Method Pinstripe, "Show", 1
      Threads Erase
      Layer 32 {Hide}
      Cls
}
Checkit
 
 