mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
LibGfx: Add ability to draw inverted rectangles
This commit is contained in:
parent
c460f4a3cb
commit
607c78336b
3 changed files with 52 additions and 11 deletions
|
@ -103,7 +103,8 @@ public:
|
|||
|
||||
enum class DrawOp {
|
||||
Copy,
|
||||
Xor
|
||||
Xor,
|
||||
Invert
|
||||
};
|
||||
void set_draw_op(DrawOp op) { state().draw_op = op; }
|
||||
DrawOp draw_op() const { return state().draw_op; }
|
||||
|
@ -128,6 +129,7 @@ public:
|
|||
|
||||
protected:
|
||||
void set_pixel_with_draw_op(u32& pixel, const Color&);
|
||||
void fill_scanline_with_draw_op(int y, int x, int width, const Color& color);
|
||||
void fill_rect_with_draw_op(const IntRect&, Color);
|
||||
void blit_with_alpha(const IntPoint&, const Gfx::Bitmap&, const IntRect& src_rect);
|
||||
void blit_with_opacity(const IntPoint&, const Gfx::Bitmap&, const IntRect& src_rect, float opacity);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue