Skip to content

Commit

Permalink
Revert changes in canvas.cpp/canvas.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Mar 16, 2024
1 parent 274614b commit 20f179c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/video/canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,17 @@ Canvas::draw_gradient(const Color& top, const Color& bottom, int layer,

void
Canvas::draw_filled_rect(const Rectf& rect, const Color& color,
int layer, const Blend& blend)
int layer)
{
draw_filled_rect(rect, color, 0.0f, layer);
}

void
Canvas::draw_filled_rect(const Rectf& rect, const Color& color, float radius, int layer,
const Blend& blend)
Canvas::draw_filled_rect(const Rectf& rect, const Color& color, float radius, int layer)
{
auto request = new(m_obst) FillRectRequest(m_context.transform());

request->layer = layer;
request->blend = blend;

request->rect = Rectf(apply_translate(rect.p1())*scale(),
rect.get_size()*scale());
Expand Down
4 changes: 2 additions & 2 deletions src/video/canvas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class Canvas final
const Vector& position, int layer, const Color& color = Color(1.0,1.0,1.0));
void draw_gradient(const Color& from, const Color& to, int layer, const GradientDirection& direction,
const Rectf& region, const Blend& blend = Blend());
void draw_filled_rect(const Rectf& rect, const Color& color, int layer, const Blend& blend = Blend::BLEND);
void draw_filled_rect(const Rectf& rect, const Color& color, float radius, int layer, const Blend& blend = Blend::BLEND);
void draw_filled_rect(const Rectf& rect, const Color& color, int layer);
void draw_filled_rect(const Rectf& rect, const Color& color, float radius, int layer);

void draw_inverse_ellipse(const Vector& pos, const Vector& size, const Color& color, int layer);

Expand Down

0 comments on commit 20f179c

Please sign in to comment.