Glück auf!
Ich hab wahrscheinlich mathematisches Problem^^
Ich versuche gerade krampfhaft, mit einer Funktion einen Pixel zu finden...
Also ich habe einen Mittelpunkt M(962,106) und den Radius r=8 (werte in pixeln^^)
Jetzt such ich den Punkt P wo Col=161 ist...
Schaut selbst:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19:
| SetCapture(Button1.Handle);
DC:=CreateDC('Display',nil,nil,nil); try
for k:=0 to 360 do begin testx:=cos(k)*8; testy:=sin(k)*8; SetCursorPos(strtoint(floattostr(962+roundto(testx,0))),strtoint(floattostr(106+roundto(testy,0)))); Col:=GetPixel(DC,strtoint(floattostr(962+roundto(testx,0))),strtoint(floattostr(106+roundto(testy,0))));
if Col=161 then showmessage('Spitze gefunden'); end; finally DeleteDC(DC); end; ReleaseCapture; |
Aber irgendwie findet er das net
Wäre für jede Hilfe dankbar
