You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous implementation incorrectly checked `dx == 0` to detect
vertical edges, but dx is modified by Bresenham reduction (line 144:
dx = dx % dy). This caused diagonal lines with integer slopes to
incorrectly use the vertical optimization, resulting in thin diagonal
strokes disappearing.
Root cause identified by cubic-dev-ai review:
- dx is reduced to Bresenham remainder, losing original slope info
- Integer-slope diagonals (e.g., 45° lines where dx == dy) would
have dx==0 after modulo reduction
- These were incorrectly routed to _span_fill_vertical()
- Thin diagonal strokes collapsed due to sub-pixel span width
Fix:
- Use aa_quality flag instead of dx for vertical edge detection
- aa_quality is set from ORIGINAL dx value before Bresenham reduction
- aa_quality==0 means truly vertical edge (original dx==0)
- aa_quality==2 means needs full 4x4 AA
Testing:
- Build successful with no warnings
- mado-perf shows diagonal lines using full 4x4 AA (correct)
- Vertical lines still benefit from optimization
0 commit comments