Skip to content

Commit

Permalink
add test for linear gradient with transform
Browse files Browse the repository at this point in the history
  • Loading branch information
anthrotype committed Apr 21, 2020
1 parent 82b735f commit 3174196
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/color_glyph_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,23 @@ def test_transform(view_box, upem, expected_transform):
)
},
),
# linear with gradientTransform
(
"linear_gradient_transform.svg",
{
PaintLinearGradient(
extend=Extend.REFLECT,
stops=(
ColorStop(stopOffset=0.0, color=Color.fromstring("green")),
ColorStop(stopOffset=0.5, color=Color.fromstring("white")),
ColorStop(stopOffset=1.0, color=Color.fromstring("red")),
),
p0=Point(x=0, y=1000),
p1=Point(x=1000, y=1000),
p2=Point(x=499.99999999999994, y=499.99999999999994),
)
},
),
],
)
def test_paint_from_shape(svg_in, expected_paints):
Expand Down
16 changes: 16 additions & 0 deletions tests/linear_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 3174196

Please sign in to comment.