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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent a subpixel being able to reset dirty flag #204

Merged
merged 3 commits into from
Feb 24, 2022

Conversation

tocsoft
Copy link
Member

@tocsoft tocsoft commented Feb 24, 2022

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 馃懏.
  • I have provided test coverage for my change (where applicable)

Description

When rasterizing scanlines where the intersection with the region (any where on the line) is less than a pixel wide we had a bug that would reset the scanlineDirty. it should only ever be possible to flip the bit to true and never false in the region of changed code.

How this ended up manifesting is when drawing a shape (seen usually in text) of a pixel wide you would see antialias artefacts even with it disabled.

Before
image
After
image

resolves #203

@codecov
Copy link

codecov bot commented Feb 24, 2022

Codecov Report

Merging #204 (d090e0a) into main (6b6c60f) will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #204   +/-   ##
===================================
  Coverage    70%    70%           
===================================
  Files        87     87           
  Lines      5117   5117           
  Branches   1062   1062           
===================================
  Hits       3628   3628           
  Misses     1279   1279           
  Partials    210    210           
Flag Coverage 螖
unittests 70% <100%> (酶)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
...awing/Shapes/Rasterization/RasterizerExtensions.cs 100% <100%> (酶)

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 6b6c60f...d090e0a. Read the comment docs.

@JimBobSquarePants
Copy link
Member

@tocsoft Looks like a few ref images might actually need updating. I've got the solution open now so will test and commit.

Copy link
Member

@JimBobSquarePants JimBobSquarePants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 馃憤

@JimBobSquarePants JimBobSquarePants added bug Something isn't working text labels Feb 24, 2022
@JimBobSquarePants JimBobSquarePants added this to the 1.0.0-rc.1 milestone Feb 24, 2022
@JimBobSquarePants JimBobSquarePants merged commit 5d46d68 into main Feb 24, 2022
@JimBobSquarePants JimBobSquarePants deleted the sw/subpixel-dirty-flag branch February 24, 2022 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fonts still antialias when Antialias is set to false
2 participants