forked from linebender/vello
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a regression test for linebender#616
This was contributed in linebender#616 (comment) Co-Authored-By: TimTom <[email protected]>
- Loading branch information
1 parent
4433203
commit 95481d8
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use vello::{ | ||
kurbo::{Affine, RoundedRect, Stroke}, | ||
peniko::Color, | ||
AaConfig, Scene, | ||
}; | ||
use vello_tests::{snapshot_test_sync, TestParams}; | ||
|
||
#[test] | ||
#[cfg_attr(skip_gpu_tests, ignore)] | ||
fn rounded_rectangle_watertight() { | ||
let mut scene = Scene::new(); | ||
let rect = RoundedRect::new(60.0, 10.0, 80.0, 30.0, 10.0); | ||
let stroke = Stroke::new(2.0); | ||
scene.stroke(&stroke, Affine::IDENTITY, Color::WHITE, None, &rect); | ||
let mut params = TestParams::new("rounded_rectangle_watertight", 70, 30); | ||
params.anti_aliasing = AaConfig::Msaa16; | ||
snapshot_test_sync(scene, ¶ms) | ||
.unwrap() | ||
.assert_mean_less_than(0.001); | ||
} |