diff options
author | Christopher Dumas <christopherdumas@gmail.com> | 2019-06-06 08:34:13 -0700 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-06 18:35:00 +0200 |
commit | 908d9458c7496c0d7828db349f57c84703d4545f (patch) | |
tree | e8a13cc5440f24c59c0e54e9376bff58fd6dfae6 /SharedGraphics | |
parent | 90d924a97c157fa97267599d96ba649359b63f06 (diff) | |
download | serenity-908d9458c7496c0d7828db349f57c84703d4545f.zip |
WindowServer: New API for Scaled Blit
Diffstat (limited to 'SharedGraphics')
-rw-r--r-- | SharedGraphics/Painter.cpp | 4 | ||||
-rw-r--r-- | SharedGraphics/Painter.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/SharedGraphics/Painter.cpp b/SharedGraphics/Painter.cpp index c1c85c6deb..31d505fc9e 100644 --- a/SharedGraphics/Painter.cpp +++ b/SharedGraphics/Painter.cpp @@ -204,9 +204,9 @@ void Painter::draw_bitmap(const Point& p, const GlyphBitmap& bitmap, Color color } } -void Painter::blit_scaled(const Point& position, const GraphicsBitmap& source, const Rect& src_rect, float hscale, float vscale) +void Painter::blit_scaled(const Rect& dst_rect_raw, const GraphicsBitmap& source, const Rect& src_rect, float hscale, float vscale) { - auto dst_rect = Rect(position, src_rect.size()).translated(translation()); + auto dst_rect = Rect(dst_rect_raw.location(), dst_rect_raw.size()).translated(translation()); auto clipped_rect = dst_rect.intersected(clip_rect()); if (clipped_rect.is_empty()) return; diff --git a/SharedGraphics/Painter.h b/SharedGraphics/Painter.h index 66d4904115..9c8e275e40 100644 --- a/SharedGraphics/Painter.h +++ b/SharedGraphics/Painter.h @@ -29,7 +29,7 @@ public: void blit_dimmed(const Point&, const GraphicsBitmap&, const Rect& src_rect); void blit_tiled(const Point&, const GraphicsBitmap&, const Rect& src_rect); void blit_offset(const Point&, const GraphicsBitmap&, const Rect& src_rect, const Point&); - void blit_scaled(const Point&, const GraphicsBitmap&, const Rect&, float, float); + void blit_scaled(const Rect&, const GraphicsBitmap&, const Rect&, float, float); void draw_text(const Rect&, const StringView&, const Font&, TextAlignment = TextAlignment::TopLeft, Color = Color::Black, TextElision = TextElision::None); void draw_text(const Rect&, const StringView&, TextAlignment = TextAlignment::TopLeft, Color = Color::Black, TextElision = TextElision::None); void draw_glyph(const Point&, char, Color); |