summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/Rect.h
AgeCommit message (Collapse)Author
2021-11-17AK: Convert AK::Format formatting helpers to returning ErrorOr<void>Andreas Kling
This isn't a complete conversion to ErrorOr<void>, but a good chunk. The end goal here is to propagate buffer allocation failures to the caller, and allow the use of TRY() with formatting functions.
2021-09-21LibGfx: Add rounded_int_rect() function for RectsSam Atkins
We were seeing a problem in LibWeb, where layout elements would be 1px larger than they should be, due to layout positions using float values, and then converting using `enclosing_int_rect()`. `rounded_int_rect()` replaces that use, by maintaining the original rect's size.
2021-09-19LibGfx: Add per-side overloads of Rect::inflate() and ::shrink()Sam Atkins
These are in CSS order (top, right, bottom, left) since LibWeb is the reason I'm adding these. :^)
2021-08-31LibGfx: Add Rect::centered_within(Rect)Andreas Kling
I've wanted this API a number of times but never added it.
2021-07-21LibGfx: Add an algorithm to disperse overlapping rectanglesTom
2021-07-09LibGfx: Make enclosing_int_rect(FloatRect) actually enclose the rectAndreas Kling
2021-06-20LibGfx: Add a Line class and a Rect<T>::RelativeLocation classTom
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-16LibGfx: Convert Rect to east-const styleAndreas Kling
2021-06-16LibGfx: Add a bunch of [[nodiscard]] to Gfx::RectAndreas Kling
2021-06-11LibGfx: Add Rect::centered_on()Dmitrii Ubskii
This is a helper function for creating Rects of a given Size centered on a Point.
2021-05-02LibGfx: Unify Rect, Point, and SizeMatthew Olsson
This commit unifies methods and method/param names between the above classes, as well as adds [[nodiscard]] and ALWAYS_INLINE where appropriate. It also renamed the various move_by methods to translate_by, as that more closely matches the transformation terminology.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
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-03-12Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)Andreas Kling
Good-bye LogStream. Long live AK::Format!
2021-03-02SpaceAnalyzer: Reduce thickness of black borders between cells.Mart G
-Adds take_from_{left,right,top,bottom} to Rect.
2021-01-23LibGfx: Implement Rect resizing around a fixed pointBen Wiederhake
2021-01-22LibGfx: Allow comparing Points, Sizes, and Rects of different typeNico Weber
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling