Quantcast
Channel: WriteableBitmapEx
Viewing all articles
Browse latest Browse all 360

Commented Issue: Add lineWidth overload for DrawLine and DrawLineAa [17046]

$
0
0
It would be very beneficial to pass lineWidth to overloaded methods for standard and Anti-Aliased lines.
Comments: ** Comment from web user: andyb1979 **

Guys, I implemented this using an ellipse blitted at every point of a bresenham line. The result is quite good. You get a jagged edge as the coordinate mode is integer, but the line itself is slightly smoothed at the edges.

I don't have the code to hand, but the process was

- For a pen sized N, create an NxN WPF Ellipse and RenderToBitmap.
- Store this in a WriteableBitmap and get its BitmapContext
- Now modify the code for DrawLineBresenham to pass a BitmapContext in and call Blit on the BitmapContext instead of filling the pixels


Viewing all articles
Browse latest Browse all 360

Trending Articles