Skip to content

Commit

Permalink
Graphics linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregersn committed May 4, 2024
1 parent 9bc4637 commit 834c066
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/pyro/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace Pyro

public:
Graphics(unsigned int width, unsigned int height, unsigned int channels, unsigned int dpi, Unit unit = Unit::PX);
virtual ~Graphics();
virtual ~Graphics() override;

static Graphics *create(unsigned int width, unsigned int height, GraphicsMode mode = GraphicsMode::CAIRO, unsigned int dpi = 72, Unit unit = Unit::PX);

Expand Down
4 changes: 2 additions & 2 deletions include/pyro/graphics_cairo.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace Pyro

public:
GraphicsCairo(unsigned int width, unsigned int height, unsigned int channels, unsigned int dpi, Unit unit);
~GraphicsCairo();
~GraphicsCairo() override;

void blendmode(int mode);
void blendmode(int mode) override;

void translate(float x, float, Unit unit = Unit::CURRENT) override;
void rotate(float a) override;
Expand Down
3 changes: 1 addition & 2 deletions src/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,9 @@ namespace Pyro
}
int steps{32};
float da{(end - start) / (float)steps};
float a{start};
for (int i{0}; i < steps + 1; i++)
{
a = start + i * da;
float a = start + i * da;
s.vertex(cos(a) * w / 2.0f, sin(a) * h / 2.0f);
}
if (mode == PIE)
Expand Down

0 comments on commit 834c066

Please sign in to comment.