Hello all,
I have a polyline that is has the points with floating point
precision. What I want to do is have the polyline include the complete
pixel that has been touched. Here is a diagram that might help to
visualize what I am trying to do:
http://bp1.blogger.com/_9lf9wnKFBNM/RdvHFfcfRpI/AAAAAAAAAAk/RXysuIGXSzk/s1600-h/curve...
Say we consider two points that have been marked with the red dots. As
you can see, they pass through the middle of a pixel. What I want to
do is transform the points so that the points get shifted to include
the complete pixel that it has touched. This is indicated by the blue
dots as the new values for the given points.
Is there some algorithm that will let me achieve this transformation.
Ultimately, it is just a floor or ceiling operation on the points but
determining which operation to apply on which point seems to be the
trick.
Thanks,
Anja