mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb/Canvas: Support globalCompositionOperation
Canvas now supports compositing and various blending modes via the `globalCompositeOperation` attribute.
This commit is contained in:
committed by
Sam Atkins
parent
19ab213b16
commit
8575bddfe6
Notes:
github-actions[bot]
2025-02-05 11:28:07 +00:00
Author: https://github.com/skyz1 Commit: https://github.com/LadybirdBrowser/ladybird/commit/8575bddfe64 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3267 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/konradekk
@@ -481,7 +481,7 @@ void TinyVGDecodedImageData::draw(Painter& painter) const
|
||||
command.fill->visit(
|
||||
[&](Color color) { painter.fill_path(fill_path, color, WindingRule::EvenOdd); },
|
||||
[&](NonnullRefPtr<SVGGradientPaintStyle> const& style) {
|
||||
painter.fill_path(fill_path, style, {}, 1.0f, WindingRule::EvenOdd);
|
||||
painter.fill_path(fill_path, style, {}, 1.0f, CompositingAndBlendingOperator::SourceOver, WindingRule::EvenOdd);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ void TinyVGDecodedImageData::draw(Painter& painter) const
|
||||
command.stroke->visit(
|
||||
[&](Color color) { painter.stroke_path(draw_path, color, command.stroke_width); },
|
||||
[&](NonnullRefPtr<SVGGradientPaintStyle> const& style) {
|
||||
painter.stroke_path(draw_path, style, {}, command.stroke_width, 1.0f);
|
||||
painter.stroke_path(draw_path, style, {}, command.stroke_width, 1.0f, CompositingAndBlendingOperator::SourceOver);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user