| |
|
|
| Gepunktete Horiz Linie con pequeño Einstellungen en Ensamblador
{$cleq}
$U thread.Pcu = thread.
proc hDottedLine
parámetros hDC&,x&,y&,xx&,hop&,mtr&,c1&,c2&
AsmStart hDottedLine
Parámetros hDC&,x&,y&,xx&,hop&,mtr&,c1&,c2&
.data
vx dd 0
hop dd 0
mtr dd 0
.code
mov esi,para4
cmp esi,0
jle eop
mov esi,para5
mov hop,esi
mov esi,para6
inc esi
mov mtr,esi
mov esi,para4
.mientras que vx<esi
inc vx
inc hop
mov eax,mtr
cmp hop,eax
je eob
jg eoa
mov ebx,vx
add ebx,para2
invoke SetPixel,para1,ebx,para3,para7
jmp cnt
eoa:
mov hop,0
eob:
mov ebx,vx
add ebx,para2
invoke SetPixel,para1,ebx,para3,para8
cnt:
.endw
eop:
ASMEND
ENDPROC
declarar c&,dlgdc&,dlg&
dlg&:=createwindow(0,"",0,0,640,480)
dlgdc&:=external("user32","GetWindowDC",dlg&)
mientras que 1
thread.start;waitinput;thread.stop
wend
end
proc thread.do
hDottedLine dlgDC&,0,0,width(dlg&),c&,10,rgb(255,0,0),rgb(255,255,255)
c&+:caso c&==12:c&:=0
ENDPROC
Viel Spaß así!
Salve, IF. |
|
|
| |
|
|