Hi al!!
To solve some problems of some thick lines (like Thick Anti-Aliased Lines of arbitrary width (https://masm32.com/board/index.php?topic=12255.0)) a different approach is requiered.
This line use 2 times Bresenham algorithm: one for the line itself and other to calculate extreme lines, wich are prependicular to the main line.
The width from this process is the true intended width, not cuts width.
(https://i.postimg.cc/Rqbpj2v0/thick1.png) (https://postimg.cc/Rqbpj2v0)
Like previously discussed, another problem is to connect lines. For that an additional element is used.
(https://i.postimg.cc/tYWd2cTw/thick2.png) (https://postimg.cc/tYWd2cTw)
The drawing above is only to explain the process, because all happen in a buffer screen and you just can see the result.
(https://i.postimg.cc/DJGmnttK/thick3.png) (https://postimg.cc/DJGmnttK)
Lines can be flat antialiased or pipe (3D). This last is antialiased implicitly.
Still work in progress :thumbsup:
Note: Source code only for REAL MEN[tm] :biggrin:
Regards, HSE
Note 2: binary is 32 bits
Quote from: HSE on October 06, 2024, 05:13:18 AMNote: Source code only for REAL MEN[tm]
HAH!
I must say, though, that it looks good.
Hi all!
A more efficient process, 100% in a single line.
Updated in first post.
Regards, HSE.