1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:47:44 +00:00

LibWeb+LibGfx: Move the blit image through 2D transfrom to Gfx::Painter

Even though this code is obnoxiously slow, it still belongs in LibGfx
and should not be hidden away in LibWeb's CanvasRenderingContext2D.
This commit is contained in:
Andreas Kling 2022-09-24 13:00:53 +02:00
parent 37ea6de772
commit b52165c5d7
3 changed files with 59 additions and 54 deletions

View file

@ -56,6 +56,7 @@ public:
void draw_bitmap(IntPoint const&, GlyphBitmap const&, Color = Color());
void draw_scaled_bitmap(IntRect const& dst_rect, Gfx::Bitmap const&, IntRect const& src_rect, float opacity = 1.0f, ScalingMode = ScalingMode::NearestNeighbor);
void draw_scaled_bitmap(IntRect const& dst_rect, Gfx::Bitmap const&, FloatRect const& src_rect, float opacity = 1.0f, ScalingMode = ScalingMode::NearestNeighbor);
void draw_scaled_bitmap_with_transform(IntRect const& dst_rect, Gfx::Bitmap const&, FloatRect const& src_rect, Gfx::AffineTransform const&, float opacity = 1.0f, ScalingMode = ScalingMode::NearestNeighbor);
void draw_triangle(IntPoint const&, IntPoint const&, IntPoint const&, Color);
void draw_triangle(IntPoint const& offset, Span<IntPoint const>, Color);
void draw_ellipse_intersecting(IntRect const&, Color, int thickness = 1);