Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,54 @@
_window = 1
void local fn BuildGrayBarWindow
NSInteger i
float gray
CGRect r = fn CGRectMake( 0, 0, 640, 400 )
window _window, @"Gray Scale Window", r
WindowSetBackgroundColor( _window, fn ColorBlack )
gray = 0.0
r = fn CGrectMake( 0, 300, 80, 100 )
for i = 1 to 8
textfield i, YES,,r,_window
TextFieldSetEditable( i, NO )
TextFieldSetBackgroundColor( i, fn ColorWithRGB( gray, gray, gray, 1.0 ) )
r = fn CGRectOffset( r, 80, 0 )
gray += 0.142857142857143 // 1/7
next
gray = 1.0
r = fn CGrectMake( 0, 200, 40, 100 )
for i = 11 to 26
textfield i, YES,,r,_window
TextFieldSetEditable( i, NO )
TextFieldSetBackgroundColor( i, fn ColorWithRGB( gray, gray, gray, 1.0 ) )
r = fn CGRectOffset( r, 40, 0 )
gray -= 0.066666666666667 // 1/5
next
gray = 0.0
r = fn CGrectMake( 0, 100, 20, 100 )
for i = 31 to 62
textfield i, YES,,r,_window
TextFieldSetEditable( i, NO )
TextFieldSetBackgroundColor( i, fn ColorWithRGB( gray, gray, gray, 1.0 ) )
r = fn CGRectOffset( r, 20, 0 )
gray += 0.032258064516129 // 1/31
next
gray = 1.0
r = fn CGrectMake( 0, 0, 10, 100 )
for i = 101 to 164
textfield i, YES,,r,_window
TextFieldSetEditable( i, NO )
TextFieldSetBackgroundColor( i, fn ColorWithRGB( gray, gray, gray, 1.0 ) )
r = fn CGRectOffset( r, 10, 0 )
gray -= 0.015873015873016 // 1/63
next
end fn
fn BuildGrayBarWindow
HandleEvents

View file

@ -0,0 +1,25 @@
void local fn BuildWindow
CGRect r = {0,0,640,400}
long i, j, bars = 8
CGFloat gray, delta, y = 0.0, w = 80
window 1, @"Grayscale Bars", r
pen -1
for j = 1 to 4
delta = 1.0/(bars-1)
if ( j mod 2 ) then gray = 0.0 else gray = 1.0 : delta = -delta
r = fn CGRectMake( 0, y, w, 100 )
for i = 1 to bars
rect fill r, fn ColorWithWhite( gray, 1.0 )
r.origin.x += w
gray += delta
next
bars = bars << 1
y += 100 : w = w/2
next
end fn
fn BuildWindow
HandleEvents