C++ and wxWidgets - Rasterisation - line width and filling
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.
精彩评论