Changeset 30 for trunk/UGeometric.pas


Ignore:
Timestamp:
Apr 18, 2015, 6:17:34 PM (9 years ago)
Author:
chronos
Message:
  • Added: Automatic zooming to all existed map stations. This solve problem if too many stations were existed and some of them appeared behind window border.
  • Added: Much of used TCanvas functions are now available through TMetaCanvas.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGeometric.pas

    r29 r30  
    2424function RectEquals(A, B: TRect): Boolean;
    2525function RectEnlarge(Rect: TRect; Value: Integer): TRect;
     26function ShiftRect(ARect: TRect; Delta: TPoint): TRect;
    2627
    2728implementation
     
    135136function RectEnlarge(Rect: TRect; Value: Integer): TRect;
    136137begin
    137   Rect.Left := Rect.Left - Value;
    138   Rect.Right := Rect.Right + Value;
    139   Rect.Top := Rect.Top - Value;
    140   Rect.Bottom := Rect.Bottom + Value;
     138  Result.Left := Rect.Left - Value;
     139  Result.Right := Rect.Right + Value;
     140  Result.Top := Rect.Top - Value;
     141  Result.Bottom := Rect.Bottom + Value;
     142end;
     143
     144function ShiftRect(ARect: TRect; Delta: TPoint): TRect;
     145begin
     146  Result := Rect(ARect.Left + Delta.X, ARect.Top + Delta.Y,
     147    ARect.Right + Delta.X, ARect.Bottom + Delta.Y);
    141148end;
    142149
Note: See TracChangeset for help on using the changeset viewer.