File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 22
33(* ******************************************************************************
44* Author : Angus Johnson *
5- * Date : 16 September 2023 *
5+ * Date : 19 September 2023 *
66* Website : http://www.angusj.com *
77* Copyright : Angus Johnson 2010-2023 *
88* Purpose : Path Offset (Inflate/Shrink) *
@@ -430,7 +430,7 @@ procedure TClipperOffset.BuildNormals;
430430procedure TClipperOffset.OffsetPolygon ;
431431var
432432 i,j: integer;
433- a: double;
433+ a, offsetMinDim : double;
434434 rec: TRect64;
435435begin
436436 // when the path is contracting, make sure
@@ -440,7 +440,8 @@ procedure TClipperOffset.OffsetPolygon;
440440 if (a < 0 ) <> (fGroupDelta < 0 ) then
441441 begin
442442 rec := GetBounds(fInPath);
443- if Abs(fGroupDelta) * 2 >= rec.Width then Exit;
443+ offsetMinDim := Abs(fGroupDelta) * 2 ;
444+ if (offsetMinDim >= rec.Width) or (offsetMinDim >= rec.Height) then Exit;
444445 end ;
445446
446447 j := high(fInPath);
You can’t perform that action at this time.
0 commit comments