1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 03:25:07 +00:00
Commit graph

6 commits

Author SHA1 Message Date
Jelle Raaijmakers
0e8ef1b886 LibGfx: Prevent out-of-bounds accumulation in PathRasterizer
Negative accumulation on the right-hand side of the accumulation bitmap
would wrap around to the left, causing a negative start for certain
lines which resulted in horizontal streaks of lower alpha values.
Prevent this by not writing out of bounds :^)

Fixes #18394
2023-04-19 06:05:10 +02:00
Jelle Raaijmakers
8dc55f5fda LibGfx: Clean up PathRasterizer
No functional changes; mainly cleaning up the code style and
simplifying the code so I could understand it better.
2023-04-19 06:05:10 +02:00
Tim Schumacher
82a152b696 LibGfx: Remove try_ prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit
it.
2023-01-26 20:24:37 +00:00
MacDue
eeb6072f15 LibGfx+LibPDF: Apply subpixel offset in affine transformation 2023-01-05 13:50:26 +01:00
MacDue
ada48a1daf LibGfx: Add ability to request glyphs at subpixel offsets to fonts
This adds the option to pass a subpixel offset when fetching a glyph
from a font, this offset is currently snapped to thirds of a pixel
(i.e. 0, 0.33, 0.66). This is then used when rasterizing the glyph,
which is then cached like usual.

Note that when using subpixel offsets you're trading a bit of space
for accuracy. With the current third of a pixel offsets you can end
up with up to 9 bitmaps per glyph.
2023-01-05 12:09:35 +01:00
Julian Offenhäuser
0b6299849e LibGfx: Move TTF::Rasterizer to its own files
The custom TTF path rasterizer is actually generic enough for it to be
used for other fonts. To make this more clear, it now lives on its own
in the "Font" directory.
2022-11-19 11:04:34 +01:00