Re: 2D antialiasing?
On Fri, 12 Dec 2008 17:08:38 - Charles Lindsey c...@clerew.man.ac.uk babbled: On Thu, 11 Dec 2008 14:23:51 -, Clemens Eisserer linuxhi...@gmail.com wrote: From the plain X Server POV, antialiasing is always going to be hard, because to do it you need to know the background color or pixmap, and the Xserver does not keep track of how you had earlier set it, so it is up to individual toolkits to keep track, and not all of them do. Well, using XRender nobody needs to keep track of anything, its just composition with a mask (which is generated by the CPU in the case of trapezoids). No, I think you miss my point (or else I miss yours). AIUI, the purpose of Xrender is to enable as much as possible of the image information to be stored on the server, rather than in the client application which may be far away over some network. So it allows you to to construct your image out of various bits and pieces which may be more or less transparent. In the simplest cases (yes, I know you can do more complicated things) you are simply trying to paint some glyphs on top of a background. But when you have combined those together, all the server is allowed to store is the result of the compositing - i.e. it has no knowledge of what was the original background and was was the added glyph. And that is no problem at all, until you want to throw away the glyph that was there before and write a new glyph in its place. And then you need to know what the original background behind the old glyph was, but the server does not have that information, and so it has to be kept in the application, which is precisely what Xrender was trying to avoid :-( . Now even the original X-11 system allowed you to specify a background (as a plain color, or as a pixmap - possibly tiled). But it never retained that information, and it was the lack of that retention that I was complaining about. what you want is a retained-mode rendering system... like a canvas! everything in a canvas is an object - text, backgrounds, overlays - you manipulate each item as you please and the canvas worries about how to redraw and thus make your changes come to life :) i know of one at least that makes all of this kind of hassle go away and works... for me... :) -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)ras...@rasterman.com ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: 2D antialiasing?
On Thu, 11 Dec 2008 14:23:51 -, Clemens Eisserer linuxhi...@gmail.com wrote: From the plain X Server POV, antialiasing is always going to be hard, because to do it you need to know the background color or pixmap, and the Xserver does not keep track of how you had earlier set it, so it is up to individual toolkits to keep track, and not all of them do. Well, using XRender nobody needs to keep track of anything, its just composition with a mask (which is generated by the CPU in the case of trapezoids). No, I think you miss my point (or else I miss yours). AIUI, the purpose of Xrender is to enable as much as possible of the image information to be stored on the server, rather than in the client application which may be far away over some network. So it allows you to to construct your image out of various bits and pieces which may be more or less transparent. In the simplest cases (yes, I know you can do more complicated things) you are simply trying to paint some glyphs on top of a background. But when you have combined those together, all the server is allowed to store is the result of the compositing - i.e. it has no knowledge of what was the original background and was was the added glyph. And that is no problem at all, until you want to throw away the glyph that was there before and write a new glyph in its place. And then you need to know what the original background behind the old glyph was, but the server does not have that information, and so it has to be kept in the application, which is precisely what Xrender was trying to avoid :-( . Now even the original X-11 system allowed you to specify a background (as a plain color, or as a pixmap - possibly tiled). But it never retained that information, and it was the lack of that retention that I was complaining about. -- Charles H. Lindsey -At Home, doing my own thing Tel: +44 161 436 6131 Web: http://www.cs.man.ac.uk/~chl Email: ...@clerew.man.ac.uk snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K. PGP: 2C15F1A9 Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: 2D antialiasing?
And that is no problem at all, until you want to throw away the glyph that was there before and write a new glyph in its place. How? How do you 'remove' a glyph that was there before? There's no 'remove this pixmap' operation. ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: 2D antialiasing?
And that is no problem at all, until you want to throw away the glyph that was there before and write a new glyph in its place. And then you need to know what the original background behind the old glyph was, but the server does not have that information, and so it has to be kept in the application, which is precisely what Xrender was trying to avoid :-( . Well, I guess I missed your point. What does this special use-case have to do with antialiasing in general? If the glyph would be not antialiased, you would have exactly the same problem ;) In your case you can simply save a copy in an additional pixmap before you add any glyphs - and copy the stuff you need back from that pixmap. However I guess it isn't that easy ;) - Clemens ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: 2D antialiasing?
On Wed, 10 Dec 2008 20:23:02 -, Glynn Clements [EMAIL PROTECTED] wrote: Programs which perform anti-aliasing will either be using XRender (or maybe OpenGL), or rendering client-side and blitting the end result. Various facilities in Libxft (which it built atop XRender) will do antialiasing, but when used in unintelligent ways can consume vast CPU resources. See my recent post with Subject: LibXft : xftglyphcore woes (which noone has seen fit to reply to yet :-( ) for how it can go wrong. From the plain X Server POV, antialiasing is always going to be hard, because to do it you need to know the background color or pixmap, and the Xserver does not keep track of how you had earlier set it, so it is up to individual toolkits to keep track, and not all of them do. -- Charles H. Lindsey -At Home, doing my own thing Tel: +44 161 436 6131 Web: http://www.cs.man.ac.uk/~chl Email:[EMAIL PROTECTED]: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K. PGP: 2C15F1A9 Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5 ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: 2D antialiasing?
From the plain X Server POV, antialiasing is always going to be hard, because to do it you need to know the background color or pixmap, and the Xserver does not keep track of how you had earlier set it, so it is up to individual toolkits to keep track, and not all of them do. Well, using XRender nobody needs to keep track of anything, its just composition with a mask (which is generated by the CPU in the case of trapezoids). - Clemens ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: 2D antialiasing?
McDonald, Michael-p7438c wrote: One of our customers thinks X has 2D antialiasing. In the old days, X had very specific pixelization rules which pretty much prohibited antialiasing for general graphics. Is there any supposrt for 2D antialiasing? The only thing I can find is using Xrender for antialiasing fonts. Anything else? The core X11 API doesn't support anti-aliasing. Anti-aliasing requires being able to interpolate pixel values, and the core X11 API treats pixel values as just numbers, without any consideration of how they map to colours (the rendering doesn't pay any attention to Visuals; if you're rendering to a Pixmap, there isn't even a Visual to pay attention to). Also, anti-aliasing tends to do the wrong thing if the GC's function and plane-mask aren't GXcopy and AllPlanes respectively. Programs which perform anti-aliasing will either be using XRender (or maybe OpenGL), or rendering client-side and blitting the end result. -- Glynn Clements [EMAIL PROTECTED] ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg