With the imminent arrival of trapezoid code from Carl Worth, I've spent a few hours building code to tesselate arbitrary polygons into these trapezoids. This has raised an issue that could use some discussion.
A trapezoidal decomposition of a polygon breaks the figure down into strips of trapezoids, these strips are split along horizontal seams at each vertex of the original polygon. When the polygon vertices have non-integer coordinates, this places a seam along a sub-pixel boundary. Pixels which are completely covered by the polygon are rendered by two separate trapezoids, each covering a portion of the pixels and together precisely filling the pixels. Render has an operation which will cause the right result on the screen, the DisjointOver operator ensures that the pixel will be fully painted with the polygon. However, DisjointOver requires a destination alpha channel to track the pixel coverage. It would be "nice" to allow applications to use the regular rendering operators for compound objects without needing to use this special Disjoint operator. Text painting already does this by adding the glyphs together in a temporary buffer and then applying the result as a mask to the destination; that's essentially the desired effect for polygons. So, the question is whether we should insist that the application provide a destination alpha channel and use the Disjoint operators for tesselated figures, or whether we should provide functionality similar to the text primitives in this case. I believe I could implement this common case without requiring a full-sized temporary alpha map, instead only selected scanlines would require special treatment, so performance wouldn't suffer too badly. Keith Packard XFree86 Core Team HP Cambridge Research Lab _______________________________________________ Render mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/render
