On Jan 9, 2008 9:11 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote:

> You could comment out these two lines:
>
>      x = (int)x + 0.5;
>      y = (int)y + 0.5;
>
> and see if that corrects your wiggliness problem, just to confirm that
> as the source.
>
> The bigger question is -- there was probably a good reason that this
> code was put in there in the first place, so it probably isn't a good
> idea to remove it en masse.  It may need to be exposed as an argument so
> some things get this behavior and others don't.  I know that dashed
> lines that are perpendicular to the edges of the figure (e.g. grid
> lines) look much worse if they aren't rounded to pixel centers.  But in
> general for polygons, I don't know if that's true.

For subpixel accuracy in rendering, agg antialiasing causes different
line segments to appear different in their thicknesses if they do not
have the same subpixel values.  Maxim wrote the following essay on the
subject:

http://antigrain.com/tips/line_alignment/line_alignment.agdoc.html#PAGE_LINE_ALIGNMENT


For this reason, to preserve visible consistency of the segments, I
have several parts in the agg code which snaps the vertices ot the
pixel centers.  I have never found a solution that seems to work in
all cases, since removing the snapto code will cause the
inconsistencies referred to above.  I think should probably be a
graphics context property (which could get the information from an
artist property) so at least the user could control it when needed.


JDH

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to