1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00
serenity/Userland/Applications/PixelPaint/Tools
Jelle Raaijmakers f391ccfe53 LibGfx+Everywhere: Change Gfx::Rect to be endpoint exclusive
Previously, calling `.right()` on a `Gfx::Rect` would return the last
column's coordinate still inside the rectangle, or `left + width - 1`.
This is called 'endpoint inclusive' and does not make a lot of sense for
`Gfx::Rect<float>` where a rectangle of width 5 at position (0, 0) would
return 4 as its right side. This same problem exists for `.bottom()`.

This changes `Gfx::Rect` to be endpoint exclusive, which gives us the
nice property that `width = right - left` and `height = bottom - top`.
It enables us to treat `Gfx::Rect<int>` and `Gfx::Rect<float>` exactly
the same.

All users of `Gfx::Rect` have been updated accordingly.
2023-05-23 12:35:42 +02:00
..
BrushTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
BrushTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
BucketTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
BucketTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
CloneTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
CloneTool.h PixelPaint: Minimize clone tool sample marker repaints 2023-03-15 23:56:47 +01:00
EllipseTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
EllipseTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
EraseTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
EraseTool.h PixelPaint: Propagate errors from making tool property widgets 2023-02-16 23:36:58 +00:00
GradientTool.cpp PixelPaint: Use ValueSlider for radial gradient hardness 2023-05-06 08:03:02 +02:00
GradientTool.h PixelPaint: Add radial gradient support 2023-04-29 11:55:31 +01:00
GuideTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
GuideTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
LassoSelectTool.cpp PixelPaint: Ensure the selection is always within image bounds 2023-05-05 16:35:42 +01:00
LassoSelectTool.h PixelPaint: Allow lasso tool to select outside the active layer 2023-05-05 16:35:42 +01:00
LineTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
LineTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
MoveTool.cpp LibGfx+Everywhere: Change Gfx::Rect to be endpoint exclusive 2023-05-23 12:35:42 +02:00
MoveTool.h PixelPaint: Do not change layers when scaling with the move tool 2023-03-01 08:15:46 +00:00
PenTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
PenTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
PickerTool.cpp PixelPaint: Display color information on mousemove with the PickerTool 2023-03-12 22:08:24 +01:00
PickerTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
PolygonalSelectTool.cpp PixelPaint: Ensure the selection is always within image bounds 2023-05-05 16:35:42 +01:00
PolygonalSelectTool.h PixelPaint: Ensure the selection is always within image bounds 2023-05-05 16:35:42 +01:00
RectangleSelectTool.cpp PixelPaint: Ensure the selection is always within image bounds 2023-05-05 16:35:42 +01:00
RectangleSelectTool.h PixelPaint: Ensure the selection is always within image bounds 2023-05-05 16:35:42 +01:00
RectangleTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
RectangleTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
SprayTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
SprayTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
TextTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
TextTool.h Everywhere: Stop using NonnullRefPtrVector 2023-03-06 23:46:35 +01:00
Tool.cpp PixelPaint: Hold shift to constrain polygonal select tool line angle 2023-01-13 15:52:57 +01:00
Tool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
WandSelectTool.cpp PixelPaint: Ensure the selection is always within image bounds 2023-05-05 16:35:42 +01:00
WandSelectTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00
ZoomTool.cpp LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
ZoomTool.h PixelPaint: Store tool cursors as NNRP<Gfx::Bitmap const> 2023-02-21 00:54:04 +01:00