1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:47:45 +00:00

PixelPaint: Fix gradient tool clipping issues

This ensures that the gradient does not paint over the rulers at
any zoom level, and also shows the guidelines/handles even when the
gradient is clipped.
This commit is contained in:
MacDue 2023-01-26 20:43:17 +00:00 committed by Linus Groh
parent efb2bed525
commit 681ed93a41
2 changed files with 11 additions and 8 deletions

View file

@ -49,7 +49,7 @@ private:
Gfx::FloatLine m_gradient_end_line;
void reset();
void draw_gradient(GUI::Painter&, bool with_guidelines = false, const Gfx::FloatPoint drawing_offset = { 0.0f, 0.0f }, float scale = 1);
void draw_gradient(GUI::Painter&, bool with_guidelines = false, const Gfx::FloatPoint drawing_offset = { 0.0f, 0.0f }, float scale = 1, Optional<Gfx::IntRect const&> gradient_clip = {});
void rasterize_gradient();
void calculate_gradient_lines();
void update_gradient_end_and_derive_start(Gfx::IntPoint const);