1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 05:47:34 +00:00

LibWeb: Add GradientPainting for painting linear-gradients

This implements support for painting linear-gradients in a spec
correct way :^).

Right now it supports:

- Multi-stop gradients
- Color stop fixups
- Using pre-multiplied alpha mixing when required
- Painting gradients at arbitrary angles

It still needs to support:

- Transition hints
- Double position color stops

However what is implemented now seems to be accurate to other
browsers, and covers the most common use cases.
This commit is contained in:
MacDue 2022-07-17 19:47:43 +01:00 committed by Linus Groh
parent 4246d04e5a
commit 469491906f
3 changed files with 234 additions and 1 deletions

View file

@ -309,6 +309,7 @@ set(SOURCES
Painting/ButtonPaintable.cpp
Painting/CanvasPaintable.cpp
Painting/CheckBoxPaintable.cpp
Painting/GradientPainting.cpp
Painting/ImagePaintable.cpp
Painting/InlinePaintable.cpp
Painting/LabelablePaintable.cpp
@ -323,9 +324,9 @@ set(SOURCES
Painting/SVGGraphicsPaintable.cpp
Painting/SVGPaintable.cpp
Painting/SVGSVGPaintable.cpp
Painting/TextPaintable.cpp
Painting/ShadowPainting.cpp
Painting/StackingContext.cpp
Painting/TextPaintable.cpp
RequestIdleCallback/IdleDeadline.cpp
ResizeObserver/ResizeObserver.cpp
SVG/AttributeNames.cpp