RosettaCodeData/Task/Pinstripe-Display/Icon/pinstripe-display.icon
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

23 lines
947 B
Text

link graphics
procedure main() # pinstripe
WOpen("canvas=hidden") # hide for query
height := WAttrib("displayheight") - 45 # adjust for ...
width := WAttrib("displaywidth") - 20 # ... window 7 borders
WClose(&window)
W := WOpen("size="||width||","||height,"bg=black","fg=white") |
stop("Unable to open window")
maxbands := 4 # bands to draw
bandheight := height / maxbands # height of each band
every bands := 1 to maxbands do { # for each band
top := 1 + bandheight * (bands-1) # .. top of band
step := 2^bands # .. number of steps (width)
lines := step / 2 # .. number (width) of stripes
every c := 1 to width by step & l := 0 to lines-1 do
DrawLine(c+l,top,c+l,top+bandheight-1)
}
WDone(W) # q to exit
end