1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| Function DrawCrossCircled(X, Y, Radius : Double; Color : TColor;
Circled, Scaled : Boolean) : Integer;
Var
R : Double;
TmpDraw : Integer;
begin // Dessiner une croix et un cercle au centre de la parcelle de côté < à 5 mm
// Map.ClearDrawing(ParcelCircle);
if (Scaled) and ((Sqrt(ParcelArea) / Scale) > 0.005) then exit;
TmpDraw := Map.NewDrawing(dlSpatiallyReferencedList);
R := Scale * Radius; // 0.005 (5 mm) est considéré comme minimum visible
Map.DrawLine(X - R, Y, X + R, Y, 2, Color);
Map.DrawLine(X, Y - R, X, Y + R, 2, Color);
R := ConvertRadius(R);
if Circled then
begin
Map.DrawCircle(X, Y, R + 0.001, Color, False);
Map.DrawCircle(X, Y, R - 0.001, Color, False);
end;
Result := TmpDraw;
end;
Procedure FlashPoint(Map : TMap; Count : Integer; Colour : TColor; X, Y : Double);
Var
i, NoPnt : Integer;
begin
For i := 1 to Count do
begin
NoPnt := DrawCrossCircled(X, Y, 0.0015, Colour, True, False) ;
Map.Refresh;
Sleep(250);
Map.ClearDrawing(NoPnt);
Map.Refresh;
Sleep(250);
end;
end; |