kolibrios/programs/system/desktop/trunk/drawrect.inc
Marat Zakiyanov (Mario79) 5dd2897661 Appl. Desktop:
1) Select colors with ColorDialog
2) Some redesign of the look of the program

git-svn-id: svn://kolibrios.org@3435 a494cfbc-eb01-0410-851d-a64ba20cac60
2013-03-31 22:26:30 +00:00

103 lines
1.6 KiB
PHP

;----------------------------------------------------------------------
draw_rectangle:
; in
; ebx = [coordinate on axis x]*65536 + [size on axis x]
; ecx = [coordinate on axis y]*65536 + [size on axis y]
push edx eax
;--------------------------------------
; top
push ebx ecx
mov eax,ebx
shr eax,16
add bx,ax
mov eax,ecx
shr eax,16
mov cx,ax
sub ecx,1 shl 16 +1
sub ebx,1 shl 16
mcall 38,,,0xffffff
sub ecx,1 shl 16 +1
sub ebx,1 shl 16
inc ebx
xor edx,edx ; color black
mcall
pop ecx ebx
;--------------------------------------
; bottom
push ebx ecx
mov eax,ebx
shr eax,16
add bx,ax
mov eax,ecx
shr eax,16
add cx,ax
mov eax,ecx
ror ecx,16
mov cx,ax
rol ecx,16
sub ebx,1 shl 16
mcall 38,,,0xffffff
add ecx,1 shl 16 +1
sub ebx,1 shl 16
inc ebx
xor edx,edx
mcall
pop ecx ebx
;--------------------------------------
; left
push ebx ecx
mov eax,ebx
shr eax,16
mov bx,ax
mov eax,ecx
shr eax,16
add cx,ax
sub ebx,1 shl 16 +1
sub ecx,1 shl 16
mcall 38,,,0xffffff
sub ebx,1 shl 16 +1
xor edx,edx
mcall
pop ecx ebx
;--------------------------------------
; right
push ebx ecx
mov eax,ebx
shr eax,16
add bx,ax
mov eax,ebx
ror ebx,16
mov bx,ax
rol ebx,16
mov eax,ecx
shr eax,16
add cx,ax
sub ecx,1 shl 16
mcall 38,,,0xffffff
add ebx,1 shl 16 +1
sub ecx,1 shl 16
inc ecx
xor edx,edx
mcall
pop ecx ebx
;--------------------------------------
pop eax edx
ret
;----------------------------------------------------------------------