Bläddra i källkod

help compiler & debugger

johann 5 år sedan
förälder
incheckning
63fb5b0f83

+ 2 - 2
lazpaint/tools/utoolpolygon.pas

@@ -43,7 +43,7 @@ type
     procedure UpdateUserMode; virtual;
     procedure ShapeValidated; override;
     function DoToolKeyDown(var key: Word): TRect; override;
-    function RoundCoordinate(ptF: TPointF): TPointF; override;
+    function RoundCoordinate(constref ptF: TPointF): TPointF; override;
   public
     function ToolUp: TRect; override;
     function ToolKeyPress(var key: TUTF8Char): TRect; override;
@@ -358,7 +358,7 @@ begin
     Result:=inherited DoToolKeyDown(key);
 end;
 
-function TToolPolygon.RoundCoordinate(ptF: TPointF): TPointF;
+function TToolPolygon.RoundCoordinate(constref ptF: TPointF): TPointF;
 begin
   If Editor.GridActive then
     result := Editor.SnapToGrid(ptF, false)

+ 2 - 2
lazpaint/tools/utoolselect.pas

@@ -16,7 +16,7 @@ type
   protected
     function GetIsSelectingTool: boolean; override;
     procedure AssignShapeStyle({%H-}AMatrix: TAffineMatrix; {%H-}AAlwaysFit: boolean); override;
-    function RoundCoordinate(ptF: TPointF): TPointF; override;
+    function RoundCoordinate(constref ptF: TPointF): TPointF; override;
     function UpdateShape(toolDest: TBGRABitmap): TRect; override;
     procedure QuickDefineEnd; override;
     function BigImage: boolean;
@@ -219,7 +219,7 @@ begin
   end;
 end;
 
-function TVectorialSelectTool.RoundCoordinate(ptF: TPointF): TPointF;
+function TVectorialSelectTool.RoundCoordinate(constref ptF: TPointF): TPointF;
 begin
   Result:= PointF(floor(ptF.x)+0.5,floor(ptF.y)+0.5);
 end;

+ 2 - 2
lazpaint/tools/utooltext.pas

@@ -27,7 +27,7 @@ type
     procedure ShapeEditingChange(ASender: TObject); override;
     procedure AssignShapeStyle(AMatrix: TAffineMatrix; AAlwaysFit: boolean); override;
     procedure QuickDefineEnd; override;
-    function RoundCoordinate(ptF: TPointF): TPointF; override;
+    function RoundCoordinate(constref ptF: TPointF): TPointF; override;
     function ForeGradTexMode: TVectorShapeUsermode; override;
     function BackGradTexMode: TVectorShapeUsermode; override;
     function ShapeForeFill: TVectorialFill; override;
@@ -201,7 +201,7 @@ begin
   FShape.Usermode := vsuEditText;
 end;
 
-function TToolText.RoundCoordinate(ptF: TPointF): TPointF;
+function TToolText.RoundCoordinate(constref ptF: TPointF): TPointF;
 begin
   result := PointF(floor(ptF.x)+0.5,floor(ptF.y)+0.5);
 end;

+ 2 - 2
lazpaint/tools/utoolvectorial.pas

@@ -48,7 +48,7 @@ type
     procedure AssignShapeStyle(AMatrix: TAffineMatrix; AAlwaysFit: boolean); virtual;
     function GetManagerShapeOptions: TShapeOptions; virtual;
     procedure QuickDefineShape(AStart,AEnd: TPointF); virtual;
-    function RoundCoordinate(ptF: TPointF): TPointF; virtual;
+    function RoundCoordinate(constref ptF: TPointF): TPointF; virtual;
     function GetIsSelectingTool: boolean; override;
     function UpdateShape(toolDest: TBGRABitmap): TRect; virtual;
     function PreferDraftUpdate: boolean;
@@ -1862,7 +1862,7 @@ begin
   FShape.QuickDefine(AStart, AEnd);
 end;
 
-function TVectorialTool.RoundCoordinate(ptF: TPointF): TPointF;
+function TVectorialTool.RoundCoordinate(constref ptF: TPointF): TPointF;
 begin
   if not (toDrawShape in GetManagerShapeOptions) or
     (Assigned(FShape) and not (vsfPenFill in FShape.Fields)) then

+ 1 - 1
lazpaintcontrols/lcvectororiginal.pas

@@ -210,7 +210,7 @@ type
     procedure BeginUpdate(ADiffHandler: TVectorShapeDiffAny=nil);
     procedure EndUpdate;
     procedure FillFit;
-    procedure QuickDefine(const APoint1,APoint2: TPointF); virtual; abstract;
+    procedure QuickDefine(constref APoint1,APoint2: TPointF); virtual; abstract;
     //one of the two Render functions must be overriden
     procedure Render(ADest: TBGRABitmap; AMatrix: TAffineMatrix; ADraft: boolean); virtual;
     procedure Render(ADest: TBGRABitmap; ARenderOffset: TPoint; AMatrix: TAffineMatrix; ADraft: boolean); virtual;

+ 2 - 2
lazpaintcontrols/lcvectorpolyshapes.pas

@@ -114,7 +114,7 @@ type
     procedure MouseMove({%H-}Shift: TShiftState; X, Y: single; var {%H-}ACursor: TOriginalEditorCursor; var AHandled: boolean); override;
     procedure MouseDown(RightButton: boolean; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: single; var {%H-}ACursor: TOriginalEditorCursor; var AHandled: boolean); override;
     procedure KeyDown({%H-}Shift: TShiftState; Key: TSpecialKey; var AHandled: boolean); override;
-    procedure QuickDefine(const APoint1,APoint2: TPointF); override;
+    procedure QuickDefine(constref APoint1,APoint2: TPointF); override;
     procedure LoadFromStorage(AStorage: TBGRACustomOriginalStorage); override;
     procedure SaveToStorage(AStorage: TBGRACustomOriginalStorage); override;
     procedure ConfigureCustomEditor(AEditor: TBGRAOriginalEditor); override;
@@ -1035,7 +1035,7 @@ begin
     inherited KeyDown(Shift, Key, AHandled);
 end;
 
-procedure TCustomPolypointShape.QuickDefine(const APoint1, APoint2: TPointF);
+procedure TCustomPolypointShape.QuickDefine(constref APoint1, APoint2: TPointF);
 begin
   BeginUpdate(TCustomPolypointShapeDiff);
   FPoints := nil;

+ 2 - 2
lazpaintcontrols/lcvectorrectshapes.pas

@@ -75,7 +75,7 @@ type
     procedure SetFixedRatio(AValue: single);
     procedure EnsureRatio(ACenterX,ACenterY: single);
   public
-    procedure QuickDefine(const APoint1,APoint2: TPointF); override;
+    procedure QuickDefine(constref APoint1,APoint2: TPointF); override;
     function SuggestGradientBox(AMatrix: TAffineMatrix): TAffineBox; override;
     procedure LoadFromStorage(AStorage: TBGRACustomOriginalStorage); override;
     procedure SaveToStorage(AStorage: TBGRACustomOriginalStorage); override;
@@ -798,7 +798,7 @@ begin
   result := true;
 end;
 
-procedure TCustomRectShape.QuickDefine(const APoint1, APoint2: TPointF);
+procedure TCustomRectShape.QuickDefine(constref APoint1, APoint2: TPointF);
 begin
   BeginUpdate(TCustomRectShapeDiff);
   FOrigin := (APoint1+APoint2)*0.5;

+ 2 - 2
lazpaintcontrols/lcvectortextshapes.pas

@@ -136,7 +136,7 @@ type
     procedure InsertUnicodeValue;
   public
     constructor Create(AContainer: TVectorOriginal); override;
-    procedure QuickDefine(const APoint1,APoint2: TPointF); override;
+    procedure QuickDefine(constref APoint1,APoint2: TPointF); override;
     procedure LoadFromStorage(AStorage: TBGRACustomOriginalStorage); override;
     procedure SaveToStorage(AStorage: TBGRACustomOriginalStorage); override;
     destructor Destroy; override;
@@ -962,7 +962,7 @@ begin
   FLightPosition := PointF(0,0);
 end;
 
-procedure TTextShape.QuickDefine(const APoint1, APoint2: TPointF);
+procedure TTextShape.QuickDefine(constref APoint1, APoint2: TPointF);
 var minSize: single;
   p2: TPointF;
 begin