diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2025-08-19 10:07:59 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2026-09-04 11:06:23 +0200 |
| commit | 9a394c11e7a3e6a2c27b361d40831c61d5da8a1e (patch) | |
| tree | 40dc975a06315b0f0d2bca83d68a82a7c737f734 /samples/tests/gradient.cpp | |
| parent | 711cd23163ef2b593f5c6df64c30f33ae356fe77 (diff) | |
more samples
Diffstat (limited to 'samples/tests/gradient.cpp')
| -rw-r--r-- | samples/tests/gradient.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/samples/tests/gradient.cpp b/samples/tests/gradient.cpp index 2af598d..37379b3 100644 --- a/samples/tests/gradient.cpp +++ b/samples/tests/gradient.cpp @@ -158,3 +158,17 @@ TEST(gradient_alpha) { vkvg_destroy(ctx); } + +TEST(gradient_radial) { + VkvgContext ctx = vkvg_create(test->surf); + + VkvgPattern radial = vkvg_pattern_create_radial(250.0f, 250.0f, 0, 300, 300, 260.0f); + vkvg_pattern_add_color_stop(radial, 0.0, 1, 0, 0, 1); + vkvg_pattern_add_color_stop(radial, 0.5, 0, 1, 0, 1); + vkvg_pattern_add_color_stop(radial, 1.0, 0, 0, 0, 1); + vkvg_set_source(ctx, radial); + vkvg_paint(ctx); + vkvg_pattern_destroy(radial); + + vkvg_destroy(ctx); +} |