Skip to content

Commit b4451c3

Browse files
authored
Merge pull request #862 from pimoroni/patch-polygon-clip
Pico Graphics: Avoid unecessary and broken polygon scanline clip.
2 parents ee7f275 + ce42d81 commit b4451c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/pico_graphics/pico_graphics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ namespace pimoroni {
268268
int32_t ex = points[j].x;
269269
int32_t px = int32_t(sx + float(fy - sy) / float(ey - sy) * float(ex - sx));
270270

271-
nodes[n++] = px < clip.x ? clip.x : (px >= clip.x + clip.w ? clip.x + clip.w - 1 : px);// clamp(int32_t(sx + float(fy - sy) / float(ey - sy) * float(ex - sx)), clip.x, clip.x + clip.w);
271+
nodes[n++] = px;
272272
}
273273
}
274274

0 commit comments

Comments
 (0)