1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-04 16:07:57 +03:00

Test circle

This commit is contained in:
Lucie Anglade 2021-04-14 11:44:56 +02:00
parent 1d383127e7
commit a48e9a0700

View File

@ -245,3 +245,53 @@ def test_polygon_fill():
stroke="red" stroke-width="2" fill="blue"/> stroke="red" stroke-width="2" fill="blue"/>
</svg> </svg>
''') ''')
@assert_no_logs
def test_circle_stroke():
assert_pixels('circle_stroke', 10, 10, '''
__________
__RRRRRR__
_RRRRRRRR_
_RRRRRRRR_
_RRR__RRR_
_RRR__RRR_
_RRRRRRRR_
_RRRRRRRR_
__RRRRRR__
__________
''', '''
<style>
@page { size: 10px }
svg { display: block }
</style>
<svg width="10px" height="10px" xmlns="http://www.w3.org/2000/svg">
<circle cx="5" cy="5" r="3"
stroke="red" stroke-width="2" fill="none"/>
</svg>
''')
@assert_no_logs
def test_circle_fill():
assert_pixels('circle_fill', 10, 10, '''
__________
__RRRRRR__
_RRRRRRRR_
_RRRRRRRR_
_RRRBBRRR_
_RRRBBRRR_
_RRRRRRRR_
_RRRRRRRR_
__RRRRRR__
__________
''', '''
<style>
@page { size: 10px }
svg { display: block }
</style>
<svg width="10px" height="10px" xmlns="http://www.w3.org/2000/svg">
<circle cx="5" cy="5" r="3"
stroke="red" stroke-width="2" fill="blue"/>
</svg>
''')