Better edge sampling
Better edge sampling

We have SEGV for cases where a calculated X for a sampled Y
is out of the bounds of the calculated length. This happens
because the y0/y1 is always rounded to zero, leading to cases
where the x for such point is actually out of the bounds of
the figure.
We now always sample on y inside the edge, never outside to make
sure that the calculated X is alwyas on the bounds.

turran/enesim,turran/enesim,turran/enesim,turran/enesim