[18:32:26] <chris11> Thanks, this is really useful.
[18:34:11] <chris11> I was getting some unexplained problems with drawing a polygon on a raster image. Some pixels were being marked as inside said polygon when they were clearly out. And since each cell in the DEM was one pixel by one pixel it was very noticable.
[18:34:35] <chris11> This gives me some more stuff to go through.
[18:35:20] <wiredfool> Cool. As you can see in the PR, there's stuff in the current code that doesn't appear to be well specified or consistent.
[18:36:21] <chris11> Yeah, I noticed the code seemed to be in draw.c, but I'm still trying to wrap my head around it.
[18:36:47] <wiredfool> It's ancient. and very very pixel oriented
[18:37:05] <wiredfool> And honestly, looks a lot like slightly updated direct vga drawing code
[18:38:50] <chris11> That is what I was assuming. It looked it was using something similiar to Bresenham's line algorithm. The polygon rasterization seems to be non-overlapping in the test images I've produced.
[18:39:14] <wiredfool> Bresenham's is in there somewhere. The name even.
[18:48:09] <chris11> So basically it looks like the draw.c code has a few problems with accuracy on the pixel level. I'm currently trying to use it to mask and clip a raster with a polygon to decide which raster cells to analyze. This might be introducing some unexpected results.
[19:03:56] <chris11> Anyway, thanks a lot for the help. I went through my image processing code this weekend to see if I understood what was going on. And now I think I have a better grasp on what is happening.