Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floor outwards when converting to SKRectI #2568

Merged
merged 2 commits into from
Aug 20, 2023
Merged

Floor outwards when converting to SKRectI #2568

merged 2 commits into from
Aug 20, 2023

Conversation

mattleibow
Copy link
Contributor

Description of Change

Truncation will chop off parts, and this will lose value. Flooring outwards ensure that the size touches the edge of the containing rect. This is useful that any partial overhang with integer sizes can be clipped when drawing.

Bugs Fixed

API Changes

None.

Behavioral Changes

None.

Required skia PR

None.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Merged related skia PRs
  • Changes adhere to coding standard
  • Updated documentation

Truncation will chop off parts, and this will lose value. Flooring outwards ensure that the size touches the edge of the containing rect. This is useful that any partial overhang with integer sizes can be clipped when drawing.
@mattleibow mattleibow added backport/release/2.x Backport this PR to release/2.x backport/release/2.88.4-preview Backport this PR to release/2.88.4-preview labels Aug 19, 2023
@mattleibow mattleibow merged commit 8fd4dc5 into main Aug 20, 2023
3 checks passed
@mattleibow mattleibow deleted the dev/fix-2562 branch August 20, 2023 15:47
github-actions bot pushed a commit that referenced this pull request Aug 20, 2023
Truncation will chop off parts, and this will lose value. Flooring outwards ensure that the size touches the edge of the containing rect. This is useful that any partial overhang with integer sizes can be clipped when drawing.

(cherry picked from commit 8fd4dc5)
github-actions bot pushed a commit that referenced this pull request Aug 20, 2023
Truncation will chop off parts, and this will lose value. Flooring outwards ensure that the size touches the edge of the containing rect. This is useful that any partial overhang with integer sizes can be clipped when drawing.

(cherry picked from commit 8fd4dc5)
mattleibow added a commit that referenced this pull request Aug 22, 2023
Truncation will chop off parts, and this will lose value. Flooring outwards ensure that the size touches the edge of the containing rect. This is useful that any partial overhang with integer sizes can be clipped when drawing.

(cherry picked from commit 8fd4dc5)

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
mattleibow added a commit that referenced this pull request Aug 22, 2023
Truncation will chop off parts, and this will lose value. Flooring outwards ensure that the size touches the edge of the containing rect. This is useful that any partial overhang with integer sizes can be clipped when drawing.

(cherry picked from commit 8fd4dc5)

Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/release/2.x Backport this PR to release/2.x backport/release/2.88.4-preview Backport this PR to release/2.88.4-preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] public readonly SKRectI AspectFill(SKSizeI size) Math Rounding error / Crash
1 participant