FAILURE MAP
← Case archive

FA-51743 / Raster clipping / Member archive

Clipped bresenham prestep: right bound inclusive · case 03

The walk includes the column equal to the half-open scissor right edge.

Member previewVariant 3 · 3 implementations · 13 checks per implementation

Case contract

Each command is [x0,y0,x1,y1,scissor] for an x-major integer line with x0<=x1 and |y1-y0|<=x1-x0 (a zero-length line is a single point). The reference pixel in column x is y0+floor((2*(y1-y0)*(x-x0)+dx)/(2*dx)), ties rounding up. Clipping to the half-open scissor [left,top,right,bottom) intersected with [0,size) must emit exactly the reference pixels inside it, in x order. The walk starts at the first visible column with an exact pre-stepped error term and may stop once y has left the scissor in the direction of travel.

Why this case matters

Raster clipping decides which pixels a primitive may touch; a single wrong clip decision writes outside the target or scissor, or silently drops visible coverage.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
explicit case 4[[[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1]]][[[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1]]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗