View Issue Details

IDProjectCategoryView StatusLast Update
0035127FPCFCLpublic2019-03-02 11:38
ReporterOndrej PokornyAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.3.1Product Build 
Target Version3.2.0Fixed in Version3.3.1 
Summary0035127: fcl-image Clipping bug: wrong y comparison for ClearRect
Descriptionprocedure CheckRectClipping in clipping.pp has a wrong y comparison for ClearRect.

As a result you get a clear rect if "x1,y1, x2,y2" actually do not need to be clipped.
TagsNo tags attached.
Fixed in Revision41546
FPCOldBugId
FPCTarget
Attached Files
  • clipping-clearrect-01.patch (452 bytes)
    Index: packages/fcl-image/src/clipping.pp
    ===================================================================
    --- packages/fcl-image/src/clipping.pp	(revision 41351)
    +++ packages/fcl-image/src/clipping.pp	(working copy)
    @@ -87,7 +87,7 @@
           y1 := top;
         if ( y2 > bottom ) then // bottom side needs to be clipped
           y2 := bottom;
    -    if (x1 > x2) or (y1 < y2) then
    +    if (x1 > x2) or (y1 > y2) then
           ClearRect;
         end;
     end;
    

Activities

Ondrej Pokorny

2019-02-21 10:01

reporter  

clipping-clearrect-01.patch (452 bytes)
Index: packages/fcl-image/src/clipping.pp
===================================================================
--- packages/fcl-image/src/clipping.pp	(revision 41351)
+++ packages/fcl-image/src/clipping.pp	(working copy)
@@ -87,7 +87,7 @@
       y1 := top;
     if ( y2 > bottom ) then // bottom side needs to be clipped
       y2 := bottom;
-    if (x1 > x2) or (y1 < y2) then
+    if (x1 > x2) or (y1 > y2) then
       ClearRect;
     end;
 end;

Michael Van Canneyt

2019-03-02 11:30

administrator   ~0114552

Checked & applied. Many thanks !

Ondrej Pokorny

2019-03-02 11:38

reporter   ~0114553

Thank you!

Issue History

Date Modified Username Field Change
2019-02-21 10:01 Ondrej Pokorny New Issue
2019-02-21 10:01 Ondrej Pokorny File Added: clipping-clearrect-01.patch
2019-02-21 15:02 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-02-21 15:02 Michael Van Canneyt Status new => assigned
2019-03-02 11:30 Michael Van Canneyt Fixed in Revision => 41546
2019-03-02 11:30 Michael Van Canneyt Note Added: 0114552
2019-03-02 11:30 Michael Van Canneyt Status assigned => resolved
2019-03-02 11:30 Michael Van Canneyt Fixed in Version => 3.3.1
2019-03-02 11:30 Michael Van Canneyt Resolution open => fixed
2019-03-02 11:30 Michael Van Canneyt Target Version => 3.2.0
2019-03-02 11:38 Ondrej Pokorny Note Added: 0114553
2019-03-02 11:38 Ondrej Pokorny Status resolved => closed