On 02/25/2010 12:00 AM, Robert O'Callahan wrote:
There was a discussion today about implementing CSS3 border rendering in
its full generality in cairo. I think there are two main issues:

1) Handling sitautions where one edge of the border is adjacent to the
edge of the background, especially when the edge is curved due to
border-radius:
1a) With 'background-clip:padding', the edge of the background is
adjacent to the inner edge of the border.
1b) With 'background-clip:border', the edge of the background is
adjacent to the outer edge of the border.
In both of these cases a naive implementation can have seam artifacts
due to coverage-based antialiasing. Case 1a can be solved pretty easily
by putting the background and border into a group and using operator ADD
to combine them (since they don't overlap). Case 1b is much harder but
we think we can solve it using a combination of groups and operators.

background-clip is per-layer, so 1a applies only when all layers clip
to the padding edge.

For 1b, couldn't you overpaint both by a few px, composit them, and
then mask back in by those px when adding to the layer underneath?
(Sorry, that may not make any sense. I'm not a graphics person.)

~fantasai

_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to