| |
|
|
|
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
graphic: Simple Schachbrett produce
PRFellow-Presentation
Author: Thomas Hölzer
Simple Schachbrett
Parameter:
1: x-Koordinate the left oberen corner
2: y-Koordinate the left oberen corner
3: Feldbreite-/höhe
4: lever the Ausgabefensters (can too omitted go)
Proc ChessBoard
Parameters x%,y%,size%,hwin%
Case Equ(hwin%,0): Let hwin%=GetActiveWindow()
StartPaint hwin%
Case Lt(size%,10): Let size%=10
Declare i%,r%,l%,white&
Let l%=x%
Let white&=RGB(255,255,255) the becomes with eachone Farbeinstellung white
While Lt(i%,64)
If Equ(Mod(r%,2),0)
If Equ(Mod(i%,2),0)
UseBrush 1,white&
Else
UseBrush 1,0
EndIf
Else
If Equ(Mod(i%,2),0)
UseBrush 1,0
Else
UseBrush 1,white&
EndIf
EndIf
Rectangle x%,y%-Add(x%,size%),Add(y%,size%)
Add x%,size%
Inc i%
If Equ(Mod(i%,8),0)
Add y%,size%
Let x%=l%
Inc r%
EndIf
Wend
EndPaint
ENDPROC
example
Cls RGB(23,23,23)
Window Title Schachbrett
ChessBoard 180,80,32,%hwnd
WaitInput
|
|
|
| |
|
|