1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

LibWeb: Remove opacity parameter for DrawScaledBitmap painting command

Every usage of this command specifies opacity equal to 1.
This commit is contained in:
Aliaksandr Kalenik 2023-11-21 15:25:40 +01:00 committed by Andreas Kling
parent a5cf875e23
commit d9990c6ea9
10 changed files with 13 additions and 15 deletions

View file

@ -147,13 +147,12 @@ void RecordingPainter::draw_rect(Gfx::IntRect const& rect, Color color, bool rou
.rough = rough });
}
void RecordingPainter::draw_scaled_bitmap(Gfx::IntRect const& dst_rect, Gfx::Bitmap const& bitmap, Gfx::IntRect const& src_rect, float opacity, Gfx::Painter::ScalingMode scaling_mode)
void RecordingPainter::draw_scaled_bitmap(Gfx::IntRect const& dst_rect, Gfx::Bitmap const& bitmap, Gfx::IntRect const& src_rect, Gfx::Painter::ScalingMode scaling_mode)
{
push_command(DrawScaledBitmap {
.dst_rect = state().translation.map(dst_rect),
.bitmap = bitmap,
.src_rect = src_rect,
.opacity = opacity,
.scaling_mode = scaling_mode,
});
}
@ -435,7 +434,7 @@ void RecordingPainter::execute(PaintingCommandExecutor& executor)
return executor.fill_rect(command.rect, command.color);
},
[&](DrawScaledBitmap const& command) {
return executor.draw_scaled_bitmap(command.dst_rect, command.bitmap, command.src_rect, command.opacity, command.scaling_mode);
return executor.draw_scaled_bitmap(command.dst_rect, command.bitmap, command.src_rect, command.scaling_mode);
},
[&](SetClipRect const& command) {
return executor.set_clip_rect(command.rect);