Clipline – fast line clipping and rasterization (0.1.2 release)

clipline is a crate for line segment rasterization with pixel-perfect (integer arithmetic only) clipping to a rectangular window. It eliminates the need for bounds checking when indexing into your frame buffer (see: pixels , minifb , softbuffer, and others), outperforming existing Bresenham's algorithm crates (benchmarked with line_drawing and bresenham).

Small animation of clipline in action (made with the pixels crate)

clip_anim

I'd be happy to learn and improve this crate with your feedback!

3 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.