Skip to content

Commit

Permalink
fix: image offset by 1px in "nearest" filtering mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom94 committed Jan 4, 2025
1 parent 14c50d5 commit 0f965f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ImageCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ Vector2f ImageCanvas::pixelOffset(const Vector2i& size) const {
// size.x() % 2 == 0 ? 0.5f : 0.0f,
// size.y() % 2 == 0 ? -0.5f : 0.0f,
// } + Vector2f{0.1111111f};
return Vector2f{0.1111111f};
return Vector2f{-0.1111111f};
}

Matrix3f ImageCanvas::transform(const Image* image) {
Expand Down

0 comments on commit 0f965f4

Please sign in to comment.