Skip to content

Commit

Permalink
add test for radial gradient with transform
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Apr 20, 2020
1 parent a22402f commit 82b735f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/color_glyph_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,24 @@ def test_transform(view_box, upem, expected_transform):
)
},
),
# TODO gradientTransform => affine2x2
# radial with gradientTransform
(
"radial_gradient_transform.svg",
{
PaintRadialGradient(
stops=(
ColorStop(stopOffset=0.0, color=Color.fromstring("darkblue")),
ColorStop(stopOffset=0.5, color=Color.fromstring("skyblue")),
ColorStop(stopOffset=1.0, color=Color.fromstring("darkblue")),
),
c0=Point(x=506.9851171331012, y=500.0),
c1=Point(x=506.9851171331012, y=500.0),
r0=0,
r1=500,
affine2x2=(1.0, 0.0, 0.36397023426620234, -1.0),
)
},
),
],
)
def test_paint_from_shape(svg_in, expected_paints):
Expand Down
13 changes: 13 additions & 0 deletions tests/radial_gradient_transform.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 82b735f

Please sign in to comment.