Wiladams / svgandme

SVG Parser and rendering using blend2d for graphics
MIT License
9 stars 4 forks source link

BUG - mergeRect() fails when the first rect has top-left corner not at (0,0) #12

Closed abu-irrational closed 4 months ago

abu-irrational commented 4 months ago

Consider this case: rectA = {-100, -100, 200, 200 } rectB = { 0,0, 20, 20} // thus rectB is contained in rectA, then mergeRect() should be equal to rectA

// old mergeRect mergeRect(rectA,rectB) -- > {-100,-100, 100, 100 } // wrong

// new mergeRect mergeRect(rectA,rectB) -- > {-100,-100, 200, 200 } // correct

Wiladams commented 4 months ago

I merged the changes into svgdatatypes.h instead of svgstructuretypes.h