mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:27:46 +00:00
LibGfx: Make Painter take the scale factor as constructor argument
I want to give Bitmap an intrinsic scale factor and this is a step in that direction. No behavior change.
This commit is contained in:
parent
7a0bc2fdb8
commit
1382bbfc57
4 changed files with 12 additions and 14 deletions
|
@ -41,7 +41,7 @@ namespace Gfx {
|
|||
|
||||
class Painter {
|
||||
public:
|
||||
explicit Painter(Gfx::Bitmap&);
|
||||
explicit Painter(Gfx::Bitmap&, int scale = 1);
|
||||
~Painter();
|
||||
|
||||
enum class LineStyle {
|
||||
|
@ -119,7 +119,6 @@ public:
|
|||
|
||||
void translate(int dx, int dy) { translate({ dx, dy }); }
|
||||
void translate(const IntPoint& delta) { state().translation.move_by(delta * state().scale); }
|
||||
void scale(int s) { state().scale *= s; }
|
||||
|
||||
Gfx::Bitmap* target() { return m_target.ptr(); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue