[paint] Add a test for recursion

This commit is contained in:
Matthias Clasen 2022-12-26 16:50:32 -05:00 committed by Behdad Esfahbod
parent c3a8c6bb8b
commit 2a51567925
3 changed files with 351 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,349 @@
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
start clip rectangle 0.000000 500.000000 500.000000 1000.000000
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
push group
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
push group
start transform 50.000000 0.000000 -0.000000 50.000000 0.000000 0.000000
start clip glyph 159
start transform 0.020000 0.000000 0.000000 0.020000 0.000000 0.000000
solid 128 128 128 102
end transform
end clip
end transform
pop group mode 3
pop group mode 3
end clip
end transform

View File

@ -274,6 +274,7 @@ typedef struct {
#define NOTO_HAND "fonts/noto_handwriting-cff2_colr_1.otf" #define NOTO_HAND "fonts/noto_handwriting-cff2_colr_1.otf"
#define TEST_GLYPHS "fonts/test_glyphs-glyf_colr_1.ttf" #define TEST_GLYPHS "fonts/test_glyphs-glyf_colr_1.ttf"
#define BAD_COLRV1 "fonts/bad_colrv1.ttf"
#define ROCHER_ABC "fonts/RocherColorGX.abc.ttf" #define ROCHER_ABC "fonts/RocherColorGX.abc.ttf"
/* To verify the rendering visually, use /* To verify the rendering visually, use
@ -294,6 +295,7 @@ static paint_test_t paint_tests[] = {
{ TEST_GLYPHS, 20, 0, 123, 0, "test-20-0-123" }, { TEST_GLYPHS, 20, 0, 123, 0, "test-20-0-123" },
{ TEST_GLYPHS, 20, 0, 165, 0, "test-20-0-165" }, // linear gradient { TEST_GLYPHS, 20, 0, 165, 0, "test-20-0-165" }, // linear gradient
{ TEST_GLYPHS, 20, 0, 175, 0, "test-20-0-175" }, // layers { TEST_GLYPHS, 20, 0, 175, 0, "test-20-0-175" }, // layers
{ BAD_COLRV1, 20, 0, 154, 0, "bad-20-0-154" }, // recursion
/* COLRv0 */ /* COLRv0 */
{ ROCHER_ABC, 120, 0.3, 1, 0, "rocher-120-0.3-1" }, { ROCHER_ABC, 120, 0.3, 1, 0, "rocher-120-0.3-1" },
{ ROCHER_ABC, 120, 0.3, 2, 2, "rocher-120-0.3-2" }, { ROCHER_ABC, 120, 0.3, 2, 2, "rocher-120-0.3-2" },