Browse Source

unused variables

circular17 5 years ago
parent
commit
a295f678cf

+ 0 - 1
lazpaint/dialog/ublendop.pas

@@ -82,7 +82,6 @@ var lColor: TBGRAPixel;
   idx: integer;
   idx: integer;
   fullPatternName, attr: string;
   fullPatternName, attr: string;
   i: integer;
   i: integer;
-  ratio: single;
 begin
 begin
   fullPatternName:= APattern;
   fullPatternName:= APattern;
   for i := 0 to high(FPatterns) do
   for i := 0 to high(FPatterns) do

+ 0 - 2
lazpaint/dialog/usaveoption.pas

@@ -427,7 +427,6 @@ procedure TFSaveOption.Button_OKClick(Sender: TObject);
   var inputStream,outputStream: TStream;
   var inputStream,outputStream: TStream;
     icoCur: TBGRAIconCursor;
     icoCur: TBGRAIconCursor;
     picture: TBGRACustomBitmap;
     picture: TBGRACustomBitmap;
-    bpp: integer;
   begin
   begin
     icoCur := TBGRAIconCursor.Create;
     icoCur := TBGRAIconCursor.Create;
     if FileManager.FileExists(FOutputFilename) then
     if FileManager.FileExists(FOutputFilename) then
@@ -443,7 +442,6 @@ procedure TFSaveOption.Button_OKClick(Sender: TObject);
       icoCur.FileType:= ImageFormat;
       icoCur.FileType:= ImageFormat;
     end;
     end;
     try
     try
-      bpp := WantedBitsPerPixel;
       if PngStreamNeeded then
       if PngStreamNeeded then
       begin
       begin
         MakePngStreamIfNeeded;
         MakePngStreamIfNeeded;

+ 2 - 2
lazpaint/lazpaintmainform.pas

@@ -811,7 +811,7 @@ type
     procedure HideFill(ATimeMs: Integer = 300; AClearTime: boolean = false);
     procedure HideFill(ATimeMs: Integer = 300; AClearTime: boolean = false);
     procedure OnPaintHandler;
     procedure OnPaintHandler;
     procedure OnImageChangedHandler({%H-}AEvent: TLazPaintImageObservationEvent);
     procedure OnImageChangedHandler({%H-}AEvent: TLazPaintImageObservationEvent);
-    procedure OnImageRenderChanged(sender: TObject);
+    procedure OnImageRenderChanged({%H-}Sender: TObject);
     procedure LabelAutosize(ALabel: TLabel);
     procedure LabelAutosize(ALabel: TLabel);
     procedure AskMergeSelection(ACaption: string);
     procedure AskMergeSelection(ACaption: string);
     procedure ReleaseMouseButtons(Shift: TShiftState);
     procedure ReleaseMouseButtons(Shift: TShiftState);
@@ -4400,7 +4400,7 @@ begin
   if AEvent.DelayedStackUpdate then FUpdateStackWhenIdle := true;
   if AEvent.DelayedStackUpdate then FUpdateStackWhenIdle := true;
 end;
 end;
 
 
-procedure TFMain.OnImageRenderChanged(sender: TObject);
+procedure TFMain.OnImageRenderChanged(Sender: TObject);
 begin
 begin
   InvalidatePicture;
   InvalidatePicture;
 end;
 end;

+ 1 - 1
lazpaint/tools/utoolbasic.pas

@@ -321,7 +321,7 @@ begin
     if Manager.ShapeOptionAliasing then
     if Manager.ShapeOptionAliasing then
     begin
     begin
       pts := toolDest.Pen.ComputePolyline([PointF(destF.X,destF.Y),PointF(originF.X,originF.Y)],
       pts := toolDest.Pen.ComputePolyline([PointF(destF.X,destF.Y),PointF(originF.X,originF.Y)],
-       Manager.PenWidth, testPix, False);
+       Manager.PenWidth, BGRAPixelTransparent, False);
       toolDest.FillPoly(pts, b);
       toolDest.FillPoly(pts, b);
     end else
     end else
     begin
     begin

+ 6 - 5
lazpaint/tools/utooldeformationgrid.pas

@@ -957,10 +957,9 @@ begin
       if curDist < minDist then
       if curDist < minDist then
       begin
       begin
         minDist := curDist;
         minDist := curDist;
-        deformationGridX := xb;
-        deformationGridY := yb;
+        x := xb;
+        y := yb;
         result := True;
         result := True;
-        deformationOrigin := ptF;
       end;
       end;
     end;
     end;
 end;
 end;
@@ -988,7 +987,7 @@ var xb,yb,NbX,NbY: integer;
     layer,backupLayer : TBGRABitmap;
     layer,backupLayer : TBGRABitmap;
     PreviousClipRect: TRect;
     PreviousClipRect: TRect;
     previousBounds: TRect;
     previousBounds: TRect;
-    gridMinX,gridMinY,gridMaxX,gridMaxY, dummyX, dummY: integer;
+    gridMinX,gridMinY,gridMaxX,gridMaxY, dummyX, dummyY: integer;
 
 
   procedure AddToDeformationArea(xi,yi: integer);
   procedure AddToDeformationArea(xi,yi: integer);
   var ptF: TPointF;
   var ptF: TPointF;
@@ -1011,7 +1010,9 @@ begin
 
 
   if not deformationGridMoving then
   if not deformationGridMoving then
   begin
   begin
-    if GetPointAt(ptF, dummyX, dummY) then
+    dummyX := 1;
+    dummyY := 1;
+    if GetPointAt(ptF, dummyX, dummyY) then
       Cursor := crHandPoint
       Cursor := crHandPoint
       else Cursor := crDefault;
       else Cursor := crDefault;
     exit;
     exit;

+ 1 - 0
lazpaint/tools/utoollayer.pas

@@ -590,6 +590,7 @@ begin
       FBackupLayer.nextMatrix := transform;
       FBackupLayer.nextMatrix := transform;
       Manager.Image.AddUndo(invTransformDiff);
       Manager.Image.AddUndo(invTransformDiff);
       Manager.Image.AddUndo(FBackupLayer);
       Manager.Image.AddUndo(FBackupLayer);
+      r := EmptyRect;
       Manager.Image.CurrentState.LayeredBitmap.RenderLayerFromOriginalIfNecessary(layerIdx, false, r);
       Manager.Image.CurrentState.LayeredBitmap.RenderLayerFromOriginalIfNecessary(layerIdx, false, r);
       FBackupLayer := nil;
       FBackupLayer := nil;
     end;
     end;

+ 1 - 1
lazpaint/tools/utooltext.pas

@@ -6,7 +6,7 @@ interface
 
 
 uses
 uses
   Classes, SysUtils, UTool, UToolVectorial, LCLType, Graphics, BGRABitmap, BGRABitmapTypes, BGRATextFX,
   Classes, SysUtils, UTool, UToolVectorial, LCLType, Graphics, BGRABitmap, BGRABitmapTypes, BGRATextFX,
-  BGRAGradients, LCVectorOriginal, LCVectorialFill;
+  BGRAGradients, LCVectorOriginal;
 
 
 type
 type
 
 

+ 4 - 4
lazpaint/uimagelist.pas

@@ -125,15 +125,15 @@ type
     function ScriptOpenNext(AVars: TVariableSet): TScriptResult;
     function ScriptOpenNext(AVars: TVariableSet): TScriptResult;
     function ScriptOpenPrevious(AVars: TVariableSet): TScriptResult;
     function ScriptOpenPrevious(AVars: TVariableSet): TScriptResult;
     function ScriptOpenSelected(AVars: TVariableSet): TScriptResult;
     function ScriptOpenSelected(AVars: TVariableSet): TScriptResult;
-    function ScriptRemoveAll(AVars: TVariableSet): TScriptResult;
+    function ScriptRemoveAll({%H-}AVars: TVariableSet): TScriptResult;
     function ScriptRemoveIndex(AVars: TVariableSet): TScriptResult;
     function ScriptRemoveIndex(AVars: TVariableSet): TScriptResult;
-    function ScriptRemoveNonExistent(AVars: TVariableSet): TScriptResult;
-    function ScriptRemoveUnchecked(AVars: TVariableSet): TScriptResult;
+    function ScriptRemoveNonExistent({%H-}AVars: TVariableSet): TScriptResult;
+    function ScriptRemoveUnchecked({%H-}AVars: TVariableSet): TScriptResult;
     function ScriptSetAutoUncheckMode(AVars: TVariableSet): TScriptResult;
     function ScriptSetAutoUncheckMode(AVars: TVariableSet): TScriptResult;
     function ScriptSetAutoZoomFit(AVars: TVariableSet): TScriptResult;
     function ScriptSetAutoZoomFit(AVars: TVariableSet): TScriptResult;
     function ScriptSetFileChecked(AVars: TVariableSet): TScriptResult;
     function ScriptSetFileChecked(AVars: TVariableSet): TScriptResult;
     function ScriptSetSelectedIndex(AVars: TVariableSet): TScriptResult;
     function ScriptSetSelectedIndex(AVars: TVariableSet): TScriptResult;
-    function ScriptUncheckNonExistent(AVars: TVariableSet): TScriptResult;
+    function ScriptUncheckNonExistent({%H-}AVars: TVariableSet): TScriptResult;
     procedure SetLazPaintInstance(AValue: TLazPaintCustomInstance);
     procedure SetLazPaintInstance(AValue: TLazPaintCustomInstance);
     procedure SetRowChecked(AIndex: integer; AValue: boolean);
     procedure SetRowChecked(AIndex: integer; AValue: boolean);
     procedure RegisterScriptFunctions(ARegister: boolean);
     procedure RegisterScriptFunctions(ARegister: boolean);