diff options
-rw-r--r-- | raetselunit.pas | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/raetselunit.pas b/raetselunit.pas index cbc5f1b..121a9ea 100644 --- a/raetselunit.pas +++ b/raetselunit.pas @@ -776,7 +776,7 @@ end; procedure tFelderRaetsel.zeichnen(cursor: boolean = true); var - i,j: longint; + i,j,k: longint; begin if not (assigned(sudokuCB) and assigned(puzzleCB)) then exit; @@ -826,21 +826,15 @@ begin end; end; zeichenFlaeche.canvas.pen.color:=$8080ff; - zeichenFlaeche.canvas.pen.width:=1; + zeichenFlaeche.canvas.pen.width:=3; if (cursorPosition>=0) and (dim>0) and cursor then begin - zeichenFlaeche.canvas.brush.color:= - $ffffff - $181818 * byte( - diagonalenCB.checked and ( - (cursorPosition mod (dim+1)=0) or - (cursorPosition mod (dim-1)=0) - ) - ); - zeichenFlaeche.canvas.rectangle( - round(((cursorPosition mod dim)+1)*zellGroesze), - round(((cursorPosition div dim)+1)*zellGroesze), - round(((cursorPosition mod dim)+2)*zellGroesze+1), - round(((cursorPosition div dim)+2)*zellGroesze+1) - ); + for i:=0 to 1 do + for j:=0 to 1 do + for k:=0 to 1 do + with zeichenFlaeche.canvas do begin + moveTo(round((i+1+(cursorPosition mod dim))*zellGroesze),round((j+1+(cursorPosition div dim))*zellGroesze)); + lineTo(round((i+1+(cursorPosition mod dim)+(1-2*i)*k/6)*zellGroesze),round((j+1+(cursorPosition div dim)+(1-2*j)*(1-k)/6)*zellGroesze)); + end; end; zeichenFlaeche.canvas.pen.width:=3; zeichenFlaeche.canvas.brush.color:=$ffffff; |