mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
PixelPaint: Split bitmap() of Layer into {content, display}_bitmap
This is in preparation to support masking of Layers. We now distinguish between the "display_bitmap" which will be the whole Layer with every effect applied and the "content_bitmap" which contains the actual unmodified pixels in the Layer.
This commit is contained in:
parent
b6510f8e76
commit
31a9196bfe
14 changed files with 73 additions and 42 deletions
|
@ -70,7 +70,7 @@ void RectangleTool::on_mouseup(Layer* layer, MouseEvent& event)
|
|||
return;
|
||||
|
||||
if (event.layer_event().button() == m_drawing_button) {
|
||||
GUI::Painter painter(layer->bitmap());
|
||||
GUI::Painter painter(layer->content_bitmap());
|
||||
draw_using(painter, m_rectangle_start_position, m_rectangle_end_position, m_thickness);
|
||||
m_drawing_button = GUI::MouseButton::None;
|
||||
layer->did_modify_bitmap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue