[cairo] Turning off antialiasing
acjgenius at earthlink.net
Mon Oct 18 16:39:10 PDT 2004
On Mon, 2004-10-18 at 11:39 -0700, Bill Spitzak wrote:
> 2. There is no requirement to draw such lines at any other angle. I do not
> think the "radio button" example is at all convincing, in my opinion the
> anti-aliased version is vastly superior. Also you can just draw a bitmap of
> the radio button image. Same thing for the checkmark in SWF.
I have to disagree. the whole point of a vector api is scalability.
Using a bitmap image presumes a static size, completely unscalable with
any degree of accuracy, and thus hardly an ideal solution. You can think
the AA button looks "better" I do not. I think it has its own set of
imprecisions which make it just as "bad" sometimes, which is to say in
this case, simply different. I have seen cases where a radio button
would always look better AA, I have also seen the reverse, and I think
this is up to the person implementing them to decide.
> I do not think the proposed solution in the FAQ will do the job. First it
> does not work if you do any scaling, making it impossible to make sharp
> outlined rectangles at any transform other than the identity. More
> importantly the .5 addition is painful as you cannot reuse pixel arrays for
> the fill and stroke and you cannot use an integer API.
> My proposal is that Cairo must support a special mode for stroking the path.
> The requirements of this mode are:
> 1. Lines drawn parallel with the pixel rows and columns must be 100% opaque
> and positioned so that they completely obscure the antialiased edge made by
> filling the same path.
> 2. Zero-length lines (dots) draw a 100% opaque dot that fills at least one
> 3. If the user translates one unit in a direction parallel to the pixel grid
> and draws perpendicular lines they will touch or overlap such that no
> partially transparent pixels are between them. Drawing a row of dots 1 unit
> apart must also produce a solid line. I think this means it must be able to
> draw integer thicknesses greater than 1 and that dots must be rectangles.
> 4. There are no requirements for lines drawn at angles not parallel with the
> pixels. Ideally they should look nice, which means antialiased, and the same
> darkness as the parallel lines.
Here again I disagree. The presumption is AA always looks looks "nicer".
Often yes, perhaps even usually, always, no. And this is in good deal a
personal preference, I think both can be nice and both can be.. not-so
nice according to how they are used. The default should always be AA,
the capability for final decision should be up the user/developer.
Andrew Johnson <acjgenius at earthlink.net>
More information about the cairo