[cairo] Best strategy for complex screen drawing
MenTaLguY
mental at rydia.net
Mon Nov 28 19:57:57 PST 2005
On Mon, 2005-11-28 at 16:06 -0800, Bill Spitzak wrote:
> I was thinking that only straight lines are used between joined
> shapes, either because polygonal modelling is being used as in this
> example, or because the curve cannot be accurately described with
> curveto.
There's no reason two abutting shapes can't use matched curves.
This could be the normal antialising control, with the odd effect that
the current antialised state is remembered as the path is constructed
for fill.
Of course, that still doesn't solve things for abutting shapes which
aren't either automatically generated or hand-annotated with
antialiasing information.
Basically simulating partial coverage via the alpha channel is
inherently broken for non-trivial cases. Which is not an argument for
or against your proposed workaround, just a reminder that it's only
useful for a very narrow range of use cases (i.e. "manually" stitching
together adjacent shapes into bigger meta-shapes, but not e.g. distinct
shapes which should be seamlessly touching).
Antialiasing may be the wrong way to think of it. Perhaps, rather than
thinking of it as "aliased_lineto", it should be "abutting_lineto" or
similar? If it's not required that the de-seaming be accomplished via
turning off antialiasing, it opens up opportunities for backends to take
different approaches when they are available.
(For example, the SWF format has two-sided fills, so a hypothetical SWF
backend could use "abutting_lineto" annotations as a hint when it tries
to merge adjacent edges.)
-mental
-------------- 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/20051128/a29418ea/attachment.pgp
More information about the cairo
mailing list