Galooshi / happo

Visual diffing in CI for user interfaces
505 stars 16 forks source link

Improve screenshotting of components with sub-pixel dimensions #152

Closed lencioni closed 8 years ago

lencioni commented 8 years ago

Some components may have sub-pixel values for their location or dimensions. Due to the way we were rounding values, this would cause them to be incorrectly cropped, which made them lose the final row or column of pixels. I fixed this by rounding top/left down and right/bottom up before calculating the width and height, which ensures that we always include the entire component in the screenshot.

Fixes #151