mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 16:21:29 +00:00
LibWeb: Fix stroke-opacity
for stroked paths that use PaintStyles
Ref test included :)
This commit is contained in:
parent
8dc25dffc2
commit
3659149888
Notes:
sideshowbarker
2024-07-17 10:10:18 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/3659149888 Pull-request: https://github.com/SerenityOS/serenity/pull/21637 Reviewed-by: https://github.com/kalenikaliaksandr ✅
|
@ -0,0 +1,14 @@
|
|||
<style>
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
</style>
|
||||
<svg height="150" width="400">
|
||||
<defs>
|
||||
<linearGradient id="grad" x1="0" y1="0" x2="70%" y2="0">
|
||||
<stop offset="0" stop-color="red" stop-opacity="0.3"/>
|
||||
<stop offset="1" stop-color="blue" stop-opacity="0.3"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="115" y="15" width="170" height="110" stroke="url(#grad)" stroke-width="10" fill="none" />
|
||||
</svg>
|
15
Tests/LibWeb/Ref/svg-stroke-paintstyle-with-opacity.html
Normal file
15
Tests/LibWeb/Ref/svg-stroke-paintstyle-with-opacity.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<link rel="match" href="reference/svg-stroke-paintstyle-with-opacity-ref.html" />
|
||||
<style>
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
</style>
|
||||
<svg height="150" width="400">
|
||||
<defs>
|
||||
<linearGradient id="grad" x1="0" y1="0" x2="70%" y2="0">
|
||||
<stop offset="0" stop-color="red"/>
|
||||
<stop offset="1" stop-color="blue"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="115" y="15" width="170" height="110" stroke="url(#grad)" stroke-opacity="0.3" stroke-width="10" fill="none" />
|
||||
</svg>
|
|
@ -91,6 +91,7 @@ void RecordingPainter::stroke_path(StrokePathUsingPaintStyleParams params)
|
|||
.path = params.path,
|
||||
.paint_style = params.paint_style,
|
||||
.thickness = params.thickness,
|
||||
.opacity = params.opacity,
|
||||
.aa_translation = aa_translation,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue