开发者

C++ and wxWidgets - Rasterisation - line width and filling

开发者 https://www.devze.com 2023-02-02 11:52 出处:网络
Is there a modifi开发者_JAVA技巧cation of Bresenhman (or any) algorithm to draw line with defined line width? I can only use DrawPoint(x,y) function. And second question: how to implement filling a fi

Is there a modifi开发者_JAVA技巧cation of Bresenhman (or any) algorithm to draw line with defined line width? I can only use DrawPoint(x,y) function. And second question: how to implement filling a figure (for example i draw a triangle and how to make a fill). Please help :)


All you need is inside wxDC class. A small tutorial is here.

How to implement polygon filling: The Polygon Primeval by Michael Abrash.

How to draw a line with a width: Extrude the 2-point line to a 4-point box and use the above algorithm.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号