mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +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
|
@ -60,7 +60,7 @@ void LineTool::on_mouseup(Layer* layer, MouseEvent& event)
|
|||
|
||||
auto& layer_event = event.layer_event();
|
||||
if (layer_event.button() == m_drawing_button) {
|
||||
GUI::Painter painter(layer->bitmap());
|
||||
GUI::Painter painter(layer->content_bitmap());
|
||||
painter.draw_line(m_line_start_position, m_line_end_position, m_editor->color_for(m_drawing_button), m_thickness);
|
||||
m_drawing_button = GUI::MouseButton::None;
|
||||
layer->did_modify_bitmap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue