LibWeb+LibGfx: Implement shadowBlur for Canvas2D

This commit is contained in:
Lucien Fiorini 2024-12-03 21:22:44 +01:00 committed by Alexander Kalenik
commit e8cc0dc998
Notes: github-actions[bot] 2024-12-05 16:08:13 +00:00
8 changed files with 73 additions and 19 deletions

View file

@ -26,6 +26,9 @@ public:
virtual float shadow_offset_y() const = 0;
virtual void set_shadow_offset_y(float offsetY) = 0;
virtual float shadow_blur() const = 0;
virtual void set_shadow_blur(float offsetY) = 0;
virtual String shadow_color() const = 0;
virtual void set_shadow_color(String color) = 0;

View file

@ -3,6 +3,6 @@ interface mixin CanvasShadowStyles {
// shadows
attribute unrestricted double shadowOffsetX; // (default 0)
attribute unrestricted double shadowOffsetY; // (default 0)
[FIXME] attribute unrestricted double shadowBlur; // (default 0)
attribute unrestricted double shadowBlur; // (default 0)
attribute DOMString shadowColor; // (default transparent black)
};

View file

@ -82,6 +82,7 @@ public:
FillOrStrokeStyle stroke_style { Gfx::Color::Black };
float shadow_offset_x { 0.0f };
float shadow_offset_y { 0.0f };
float shadow_blur { 0.0f };
Gfx::Color shadow_color { Gfx::Color::Transparent };
float line_width { 1 };
Bindings::CanvasLineCap line_cap { Bindings::CanvasLineCap::Butt };