mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +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
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/TobyAsE
Commit: 31a9196bfe
Pull-request: https://github.com/SerenityOS/serenity/pull/12934
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