Skip to content

Commit

Permalink
Update graphics.cpp
Browse files Browse the repository at this point in the history
Fix error C4576
  • Loading branch information
sammycage authored Oct 21, 2024
1 parent 71f2ad5 commit 158b84b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ void Canvas::drawImage(const Bitmap& image, const Rect& dstRect, const Rect& src
{
auto xScale = dstRect.w / srcRect.w;
auto yScale = dstRect.h / srcRect.h;
auto matrix = PLUTOVG_MAKE_MATRIX(xScale, 0, 0, yScale, -srcRect.x * xScale, -srcRect.y * yScale);
plutovg_matrix_t matrix = { xScale, 0, 0, yScale, -srcRect.x * xScale, -srcRect.y * yScale };
plutovg_canvas_reset_matrix(m_canvas);
plutovg_canvas_translate(m_canvas, -m_x, -m_y);
plutovg_canvas_transform(m_canvas, &transform.matrix());
Expand All @@ -658,7 +658,7 @@ void Canvas::drawImage(const Bitmap& image, const Rect& dstRect, const Rect& src

void Canvas::blendCanvas(const Canvas& canvas, BlendMode blendMode, float opacity)
{
auto matrix = PLUTOVG_MAKE_TRANSLATE(static_cast<float>(canvas.x()), static_cast<float>(canvas.y()));
plutovg_matrix_t matrix = { 1, 0, 0, 1, static_cast<float>(canvas.x()), static_cast<float>(canvas.y()) };
plutovg_canvas_reset_matrix(m_canvas);
plutovg_canvas_translate(m_canvas, -m_x, -m_y);
plutovg_canvas_set_operator(m_canvas, static_cast<plutovg_operator_t>(blendMode));
Expand Down

0 comments on commit 158b84b

Please sign in to comment.