|
@@ -576,6 +576,7 @@ end;
|
|
|
function TToolMagicWand.DoToolDown(toolDest: TBGRABitmap; pt: TPoint;
|
|
|
ptF: TPointF; rightBtn: boolean): TRect;
|
|
|
var penColor: TBGRAPixel;
|
|
|
+ ofs: TPoint;
|
|
|
begin
|
|
|
if not Manager.Image.CurrentLayerVisible then
|
|
|
begin
|
|
@@ -583,7 +584,9 @@ begin
|
|
|
exit;
|
|
|
end;
|
|
|
if rightBtn then penColor := BGRABlack else penColor := BGRAWhite;
|
|
|
- Manager.Image.CurrentLayerReadOnly.ParallelFloodFill(pt.X,pt.Y,toolDest,penColor,fmDrawWithTransparency,Manager.ToolTolerance);
|
|
|
+ ofs := Manager.Image.LayerOffset[Manager.Image.CurrentLayerIndex];
|
|
|
+ Manager.Image.CurrentLayerReadOnly.ParallelFloodFill(pt.X-ofs.X,pt.Y-ofs.Y,
|
|
|
+ toolDest,penColor,fmDrawWithTransparency,Manager.ToolTolerance,ofs.X,ofs.Y);
|
|
|
result := rect(0,0,toolDest.Width,toolDest.Height);
|
|
|
Action.NotifyChange(toolDest, result);
|
|
|
ValidateAction;
|