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

Correctly paint the CSS canvas’ background #26414

Merged
merged 8 commits into from May 15, 2020

Fix incorrect sign background-image rectangle computation

  • Loading branch information
SimonSapin committed May 15, 2020
commit f53ac953d6713cfd7250fd19cfe2b1ddc6ae6aaf
@@ -21,6 +21,7 @@ pub(super) struct BackgroundLayer {
pub repeat: bool,
}

#[derive(Debug)]
struct Layout1DResult {
repeat: bool,
bounds_origin: f32,
@@ -250,7 +251,8 @@ fn layout_1d(
let tile_stride = *tile_size + tile_spacing;
let offset = position - painting_area_origin;
let bounds_origin = position - tile_stride * (offset / tile_stride).ceil();
let bounds_size = painting_area_size - bounds_origin - painting_area_origin;
let bounds_end = painting_area_origin + painting_area_size;
let bounds_size = bounds_end - bounds_origin;
Layout1DResult {
repeat: true,
bounds_origin,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.