mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Fix edge case where 1px cut off from right of image
Remove -1 px
This commit is contained in:
parent
dbef4bbd98
commit
cbca2cf152
@ -134,7 +134,7 @@ static void _plot_triangle(Vector2i *vertices, const Vector2i &p_offset, bool p_
|
||||
int max_y = MIN(y[2], height - p_offset.y - 1);
|
||||
for (int yi = y[0]; yi < max_y; yi++) {
|
||||
if (yi >= 0) {
|
||||
for (int xi = (xf > 0 ? int(xf) : 0); xi < (xt < src_width ? xt : src_width - 1); xi++) {
|
||||
for (int xi = (xf > 0 ? int(xf) : 0); xi < (xt <= src_width ? xt : src_width); xi++) {
|
||||
int px = xi, py = yi;
|
||||
int sx = px, sy = py;
|
||||
sx = CLAMP(sx, 0, src_width - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user