Commit graph

8 commits

Author SHA1 Message Date
Andreas Kling
5d8f4ab878 LibGfx: Add Gfx::Quad<T> to represent arbitrary quadrilaterals
This comes with a very barebones API for now. You can ask for the
bounding rect of the quad, and also check if a point is inside of it.
2022-04-07 17:06:02 +02:00
Andreas Kling
1f346a490b LibGfx: Templatize Gfx::Triangle
Previously this was limited to integer triangles, but I want to use it
with floats, so let's start by templatizing the class.
2022-04-07 17:06:02 +02:00
Andreas Kling
344374588b LibGfx: Rename FontMetrics => FontPixelMetrics
Let's make it clear in the type name that this contains pixel metrics.
Also rename Font::metrics() => Font::pixel_metrics().
2022-03-30 00:57:15 +02:00
Andreas Kling
73fe6c541a LibGfx: Forward declare Gfx::FontMetrics as a struct 2021-09-24 19:03:46 +02:00
Andreas Kling
d7586aff53 LibGfx: Add a simple Gfx::FontMetrics and Gfx::Font::metrics(code_point)
This is used to get a handy set of glyph metrics.
2021-09-24 15:01:49 +02:00
Tom
499c33ae0c LibGfx: Add a Line class and a Rect<T>::RelativeLocation class
These helpers will be useful in preparation for supporting multiple
displays, e.g. to measure distances to other screens or figure out
where rectangles are located relative to each other.
2021-06-20 14:57:26 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Renamed from Libraries/LibGfx/Forward.h (Browse further)