mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 04:31:30 +11:00
Use accessible colors that maintain contrast in the conflation scene
This commit is contained in:
parent
fff43bba0d
commit
97e6e12799
|
@ -414,11 +414,14 @@ fn conflation_artifacts(sb: &mut SceneBuilder, _: &mut SceneParams) {
|
||||||
let x = N + 0.5; // Fractional pixel offset reveals the problem on axis-aligned edges.
|
let x = N + 0.5; // Fractional pixel offset reveals the problem on axis-aligned edges.
|
||||||
let mut y = N;
|
let mut y = N;
|
||||||
|
|
||||||
|
let bg_color = Color::rgb8(255, 194, 19);
|
||||||
|
let fg_color = Color::rgb8(12, 165, 255);
|
||||||
|
|
||||||
// Two adjacent triangles touching at diagonal edge with opposing winding numbers
|
// Two adjacent triangles touching at diagonal edge with opposing winding numbers
|
||||||
sb.fill(
|
sb.fill(
|
||||||
Fill::NonZero,
|
Fill::NonZero,
|
||||||
Affine::translate((x, y)) * scale,
|
Affine::translate((x, y)) * scale,
|
||||||
Color::RED,
|
fg_color,
|
||||||
None,
|
None,
|
||||||
&[
|
&[
|
||||||
// triangle 1
|
// triangle 1
|
||||||
|
@ -439,14 +442,14 @@ fn conflation_artifacts(sb: &mut SceneBuilder, _: &mut SceneParams) {
|
||||||
sb.fill(
|
sb.fill(
|
||||||
Fill::EvenOdd,
|
Fill::EvenOdd,
|
||||||
Affine::translate((x, y)) * scale,
|
Affine::translate((x, y)) * scale,
|
||||||
Color::RED,
|
bg_color,
|
||||||
None,
|
None,
|
||||||
&Rect::new(0.0, 0.0, N, N),
|
&Rect::new(0.0, 0.0, N, N),
|
||||||
);
|
);
|
||||||
sb.fill(
|
sb.fill(
|
||||||
Fill::EvenOdd,
|
Fill::EvenOdd,
|
||||||
Affine::translate((x, y)) * scale,
|
Affine::translate((x, y)) * scale,
|
||||||
Color::GREEN,
|
fg_color,
|
||||||
None,
|
None,
|
||||||
&[
|
&[
|
||||||
// left rect
|
// left rect
|
||||||
|
@ -467,14 +470,14 @@ fn conflation_artifacts(sb: &mut SceneBuilder, _: &mut SceneParams) {
|
||||||
sb.fill(
|
sb.fill(
|
||||||
Fill::EvenOdd,
|
Fill::EvenOdd,
|
||||||
Affine::translate((x, y)) * scale,
|
Affine::translate((x, y)) * scale,
|
||||||
Color::RED,
|
bg_color,
|
||||||
None,
|
None,
|
||||||
&Rect::new(0.0, 0.0, N, N),
|
&Rect::new(0.0, 0.0, N, N),
|
||||||
);
|
);
|
||||||
sb.fill(
|
sb.fill(
|
||||||
Fill::EvenOdd,
|
Fill::EvenOdd,
|
||||||
Affine::translate((x, y)) * scale,
|
Affine::translate((x, y)) * scale,
|
||||||
Color::GREEN,
|
fg_color,
|
||||||
None,
|
None,
|
||||||
&[
|
&[
|
||||||
// left rect
|
// left rect
|
||||||
|
|
Loading…
Reference in a new issue