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

Edited Feature: Different behavior of DrawLine* methods with points outside bitmap [20684]

$
0
0
Hi!

We came across an issue with DrawPolyline. When the array contains points that are outside the bitmap the lines is not correct. It seems that there is a problem with he slope of the line. This also leaves holes between the lines of the polyline. I have prepared a demo that demonstrates this problem. While I was doing the demo I noticed, that the different DrawLine methods return different results when provided with the same points.

* __DrawLineDDA__ and __DrawLineBresenham__ work always correctly.
* __DrawLine__ fluctuate depending on the slope of the line
* __DrawLineAa__ is clipped incorrectly and simply doesn't work in scenario with points outside the bitmap.

The problem can be reproduced both in SL and WPF with the latest version of the library (1.0.9.0).
Comments: ** Comment from web user: teichgraf **

Just fixed this in chageset 113259 by using CohenSutherlandLineClip for DrawLineAa and DrawLine


Viewing all articles
Browse latest Browse all 360

Trending Articles