[cairo] Re: Using ADD operator to prevent seams

Owen Taylor otaylor at redhat.com
Tue Mar 22 17:06:04 PST 2005


On Wed, 2005-03-23 at 12:54 +1200, Robert O'Callahan wrote:
> On Tue, 22 Mar 2005 19:30:24 -0500, Owen Taylor <otaylor at redhat.com> wrote:
> > When doing antialiased rendering, it's indispensable to position
> > horizontal/vertical edges to integer pixel boundaries. Full-screen
> > supersampling doesn't help: you'll still have fuzz at the edges of the
> > boxes, it will just be "correct" fuzz.
> 
> That is another issue. We can tweak layout logic in a few places, but
> we can't fiddle with  layout coordinates much without breaking
> standards or other expectations. And I don't know how to pixel-align
> rectilinear graphics at paint time in a way that's really consistent
> and preserves sub-pixel-size features. Any suggestions? :-)

You generally can't do it at the graphics level. But at the layout
level, you use pixel rounded metrics and work from there. If a length
specified in px, em or ex is non-integer, then you are doing something
wrong. 

And I'd be suprised if the CSS spec didn't allow rounding absolute (in,
cm, pt) lengths or percentage lengths to pixels values as well.

> > Do adjoining diagonal (or curved) edges really come up enough in web
> > pages to be worth worrying about? (Obviously, you can get whatever
> > problems you have with SVG by embedding an SVG, but that doesn't seem
> > to be the normal case...)
> 
> They're not important outside of SVG, no. But we need a graphics
> substrate that will be robust when people start doing HTML inside of
> SVG; infrastructure for tomorrow's Web, not just today's. If someone
> starts rotating their Web page, we don't want crazy join lines
> suddenly appearing.

I think that's something to worry about when people find a use for 
rotated web pages. We can always add extra backends to Cairo that 
render at some ridiculously large resolution and scale down, but
the cost of doing such right now is pretty prohibitive. Especially
if most of what you are drawing is text and pixel aligned boxes.

Regards,
					 	Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050322/456385f5/attachment.pgp


More information about the cairo mailing list