1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 07:54:58 +00:00
Commit graph

12 commits

Author SHA1 Message Date
Kyle Pereira
649f1df771 LibGfx: Add RepeatingBitmapPaintStyle and OffsetPaintStyle
RepeatingBitmapPaintStyle tiles a bitmap passed on passed in parameters
and paints according to that.

OffsetPaintStyle offsets an existing paint style and paints with that.

These two will be useful in the PDF renderer.
2023-12-10 16:44:24 +01:00
MacDue
b9294e5fdf LibGfx: Add support for SVG repeat/reflect gradients 2023-08-20 20:04:10 +02:00
Timothy Flynn
c911781c21 Everywhere: Remove needless trailing semi-colons after functions
This is a new option in clang-format-16.
2023-07-08 10:32:56 +01:00
MacDue
e4adaa2d20 LibGfx: Make PaintStyle::paint() a public function
It's a pain (and silly) to make this private and add every user as a
friend.
2023-06-01 06:25:00 +02:00
MacDue
81cefab1b1 LibGfx: Implement PaintStyle for SVG radial gradients
This also slightly refactors things to share more implementation with
the SVG linear gradients, and improve accuracy (which fixes some banding
issues).
2023-05-04 16:50:01 +02:00
MacDue
89d3c6d718 LibGfx: Implement PaintStyle for SVG linear gradients 2023-04-28 09:42:28 +02:00
MacDue
064ca625df LibGfx: Add BitmapPaintStyle
This is a simple paint style for filling a path with a bitmap.
2023-04-09 18:42:45 +02:00
MacDue
7bd78d40e9 LibGfx+LibWeb: Propagate OOM when appending CanvasGradient color stops 2023-03-02 11:49:13 +01:00
MacDue
3a0a7e3e96 LibGfx+LibWeb: Propagate OOM when creating PaintStyles 2023-03-02 11:49:13 +01:00
MacDue
63b11030f0 Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
MacDue
1a89d77688 LibGfx: Implement paint styles required for HTML canvas gradients
This implements the gradients for:

- CanvasRenderingContext2D.createLinearGradient()
- CanvasRenderingContext2D.createConicGradient()
- CanvasRenderingContext2D.createRadialGradient()

As loosely defined in: https://html.spec.whatwg.org/multipage/canvas.html#fill-and-stroke-styles
(It's really not very well defined for radial gradients)

Actual implementation (for radial gradients) was done with a lot
of trial and error, then visually comparing to other browsers.
2023-01-22 18:15:52 +01:00
MacDue
b31d768e95 LibGfx: Add paint styles and allow gradients to be used as them
Also while here add option to disable pre-multiplied alpha for gradients
(this will be handy later).
2023-01-22 18:15:52 +01:00