mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 22:30:22 +00:00
testsuite: Add a test for subpixel positioning
Draw a grid of 21x21 box glyphs. Each glyph is offset by n/20 pixels in the x and y direction. The background color is carefully selected to be divisible by 16, so that when the box glyph is subpixel positioned by 1/4th of a pixel offset from the pixel grid in either direction, the result will be an edge pixel whose color value can be computed exactly. Cairo still rounds this wrong for color values >= 128 which is why we use a dark gray that guarantees the resulting color values are all <128.
This commit is contained in:
parent
c31b6ff1d5
commit
fff912efd3
2664
testsuite/gsk/compare/subpixel-positioning.node
Normal file
2664
testsuite/gsk/compare/subpixel-positioning.node
Normal file
File diff suppressed because it is too large
Load Diff
BIN
testsuite/gsk/compare/subpixel-positioning.png
Normal file
BIN
testsuite/gsk/compare/subpixel-positioning.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 499 B |
@ -141,6 +141,7 @@ compare_render_tests = [
|
||||
'stroke-fractional-translate-nogl',
|
||||
'stroke-opacity',
|
||||
'stroke-with-3d-contents-nogl-nocairo',
|
||||
'subpixel-positioning',
|
||||
'text-color-mix',
|
||||
'text-glyph-lsb',
|
||||
'text-mixed-color-nocairo',
|
||||
|
Loading…
Reference in New Issue
Block a user