LibWeb: Add simple ref test for SVG masking
This commit is contained in:
parent
909bcfe9a4
commit
8270b9ab7e
Notes:
sideshowbarker
2024-07-17 01:10:58 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/8270b9ab7e Pull-request: https://github.com/SerenityOS/serenity/pull/21012 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/awesomekling
3 changed files with 28 additions and 0 deletions
4
Tests/LibWeb/Ref/reference/simple-svg-mask-ref.html
Normal file
4
Tests/LibWeb/Ref/reference/simple-svg-mask-ref.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<svg width="200" viewBox="-10 -10 120 120">
|
||||
<rect x="-10" y="-10" width="120" height="120" fill="blue" />
|
||||
<rect x="50" y="10" width="40" height="80" fill="red" />
|
||||
</svg>
|
After Width: | Height: | Size: 175 B |
11
Tests/LibWeb/Ref/simple-svg-mask.html
Normal file
11
Tests/LibWeb/Ref/simple-svg-mask.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<link rel="match" href="reference/simple-svg-mask-ref.html" />
|
||||
<svg width="200" viewBox="-10 -10 120 120">
|
||||
<mask id="myMask">
|
||||
<!-- Everything under a white pixel will be visible -->
|
||||
<rect x="0" y="0" width="100" height="100" fill="white" />
|
||||
<!-- Everything under a black pixel will be invisible -->
|
||||
<rect x="0" y="0" width="50" height="100" fill="black" />
|
||||
</mask>
|
||||
<rect x="-10" y="-10" width="120" height="120" fill="blue" />
|
||||
<rect x="10" y="10" width="80" height="80" fill="red" mask="url(#myMask)" />
|
||||
</svg>
|
13
Tests/LibWeb/Ref/svg-mask-in-defs.html
Normal file
13
Tests/LibWeb/Ref/svg-mask-in-defs.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<link rel="match" href="reference/simple-svg-mask-ref.html" />
|
||||
<svg width="200" viewBox="-10 -10 120 120">
|
||||
<defs>
|
||||
<mask id="myMask">
|
||||
<!-- Everything under a white pixel will be visible -->
|
||||
<rect x="0" y="0" width="100" height="100" fill="white" />
|
||||
<!-- Everything under a black pixel will be invisible -->
|
||||
<rect x="0" y="0" width="50" height="100" fill="black" />
|
||||
</mask>
|
||||
</defs>
|
||||
<rect x="-10" y="-10" width="120" height="120" fill="blue" />
|
||||
<rect x="10" y="10" width="80" height="80" fill="red" mask="url(#myMask)" />
|
||||
</svg>
|
Loading…
Add table
Reference in a new issue