Jump to content

Colour pinstripe/Printer: Difference between revisions

no edit summary
m (syntax highlighting fixup automation)
No edit summary
Line 178:
End If
End</syntaxhighlight>
 
 
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
include "NSLog.incl"
 
void local fn BuildWindow
CGRect r = { 0, 0, 612, 791 } // U.S. Letter Portrait
long i, j, colorCount, bars = 612
CGFloat y = 0.0, w = 1
CFArrayRef colors = @[¬
fn ColorBlack,¬
fn ColorRed,¬
fn ColorGreen,¬
fn ColorBlue,¬
fn ColorMagenta,¬
fn ColorCyan,¬
fn ColorYellow,¬
fn ColorWhite]
window 1, @"Color Pinstripe Printer Page [U.S. Letter Portrait]", r
pen -1
for j = 1 to 4
r = fn CGRectMake( 0, y, w, 197.75 )
colorCount = 0
for i = 0 to bars - 1
rect fill r, colors[colorCount]
r.origin.x += w
colorCount++
if colorCount == 8 then colorCount = 0
next
bars = bars << 1
y += 197.75 : w++
next
end fn
 
fn BuildWindow
 
HandleEvents
</syntaxhighlight>
{{output}}
[[File:Color Pinstripe Printer Page.png]]
 
 
723

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.