1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

PixelPaint: Allow bigger Brush-Tool sizes

This patch allows a bigger brush tool size of 250 pixels and limits the
cursor bitmap to a reasonable size so that its not much bigger than the
image editor size. If the cursor is bigger as the editor it is rended
with a red edge to indicate that the actual cursor is bigger than
displayed. This change mitigates the OOM conditions when the cursor
gets unusual big.
This commit is contained in:
Torstennator 2023-07-18 14:25:33 +02:00 committed by Sam Atkins
parent 55edfe5c3c
commit 31ee20e179
4 changed files with 46 additions and 22 deletions

View file

@ -26,6 +26,7 @@ protected:
virtual Color color_for(GUI::MouseEvent const& event) override;
virtual void draw_point(Gfx::Bitmap& bitmap, Gfx::Color color, Gfx::IntPoint point) override;
virtual NonnullRefPtr<Gfx::Bitmap> build_cursor() override;
virtual float preferred_cursor_size() override;
private:
virtual StringView tool_name() const override { return "Erase Tool"sv; }