[cairo] Disabling antialiased shape drawing

Bill Spitzak spitzak at d2.com
Fri Aug 5 12:28:11 PDT 2005



Billy Biggs wrote:

>   There has been interest in the past by multiple people for support of
> non-antialiased shape rendering in Cairo.  See [2], [3], and other posts
> from those threads.  I will try to summarize the main motivations for
> this patch:
> 
>   - Compatibility.  Some vector graphics formats specify whether objects
>     should be drawn antialiased or not.  Having this feature in cairo
>     may allow them to render correctly.  [4]
> 
>   - Completeness.  Other APIs like GDI+ and CoreGraphics provide
>     mechanisms for non-antialiased rendering.  Having this in Cairo
>     helps cross-platform development and implementors of porting tools.
> 
>   - Consistency.  If other parts of an application are being drawn using
>     an API which does not support antialiased line drawing, having
>     certain widgets or adornments antialiased may appear inconsistent.
> 
>   - Debugging.  It is useful for the programmer to disable antialiased
>     shapes when trying to determine what's causing a rendering error.

I believe the #1 reason, which you didn't really list, is that many 
programs assumme that filling both sides of an arbitrary path is 
equivalent to filling the entire area, ie. the seam between the areas is 
not visible. This can only be done if the fill either has 100% effect or 
0% effect, which either implies no antialiasing or that a larger 
no-antialiasing picture is drawn and then filtered down to the final 
display.




More information about the cairo mailing list