Skip to content

Reducing matte frame width results in uneven rendering #2

@snwau

Description

@snwau

Raised by Cho Seungbo on 9 January 2012 within Cocoa Controls comments:

When I set SWSnapshotStackViewMatteWidth = 3, the margin of left and top looks 3, but the margin of right and bottom is 2.

Suspect it's a rounding issue in frame calculations. As I round both the calculated matte frame and UIImage rectangle to make sure they are aligned appropriately for drawing to avoid unnecessary anti-aliasing (i.e. drawing between pixels, etc).
Lines are drawn on 0.5 point coordinates, UIImage drawn on integer coordinates.

Relates to known issue of using view with smaller frame sizes and scaling of effects to better suit.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions