libc: BGI Фаза 2d-2 — setlinestyle (стили и толщина линий)
setlinestyle/getlinesettings: SOLID/DOTTED/CENTER/DASHED/USERBIT + NORM/THICK. _bgi_styled_line — Брезенхэм с 16-битной маской (пропуск пикселя по биту) и дублированием ±1 перпендикулярно оси для THICK; SOLID+NORM идёт быстрым путём (accel _bgi_lineseg). line/lineto/linerel/ rectangle/drawpoly переведены на него. Проверено в MAME (tests/bgitest). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
void rectangle(int left, int top, int right, int bottom)
|
||||
{
|
||||
uint8_t c = _bgi_fg;
|
||||
_bgi_lineseg(left, top, right, top, c); /* верх */
|
||||
_bgi_lineseg(right, top, right, bottom, c); /* право */
|
||||
_bgi_lineseg(right, bottom, left, bottom, c); /* низ */
|
||||
_bgi_lineseg(left, bottom, left, top, c); /* лево */
|
||||
_bgi_styled_line(left, top, right, top, c); /* верх */
|
||||
_bgi_styled_line(right, top, right, bottom, c); /* право */
|
||||
_bgi_styled_line(right, bottom, left, bottom, c); /* низ */
|
||||
_bgi_styled_line(left, bottom, left, top, c); /* лево */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user