This commit is contained in:
2026-03-19 14:54:09 +03:00
parent 7145b66e0e
commit 37036f8f75
26 changed files with 5466 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
@startuml
title Линия: полная схема растризации
start
:Input local endpoints (x0,y0),(x1,y1)\n+ color + thickness;
:Map endpoints Local -> World -> Buffer;
:Compute pixel thickness from transform scale;
if (thickness_px <= 0?) then (yes)
stop
endif
if (draw_when_outside == false?) then (yes)
:Clip segment to expanded buffer bounds\n(Liang-Barsky);
if (segment rejected?) then (yes)
stop
endif
endif
:Compute angle-based thickness correction\n(using |dx|/len and |dy|/len);
:Initialize Bresenham state\ndx,dy,sx,sy,err;
while (not reached end point?)
:Choose effective half-thickness:\nfull in viewport, 0 outside if draw_when_outside;
:Draw stripe around center pixel\n(along normal axis);
:Advance Bresenham step by error update;
endwhile
stop
@enduml