| Re: antialias fonts [message #42965 is a reply to message #42964] |
Mon, 07 March 2005 06:45   |
Jim Pendleton
Messages: 13 Registered: July 2001
|
Junior Member |
|
|
"Ken Mankoff" <mankoff@gmail.com> wrote in message
news:Pine.OSX.4.61.0503061640490.28119@gouda.local...
> Hi Bringfried,
>
> On Sun, 6 Mar 2005, Bringfried Stecklum wrote:
>> But since antialiasing is common nowadays I thought I have overlooked the
>> corresponding IDL capabilities.
>
> Short answer: You have, unfortunately, overlooked nothing. :(
>
> Long answer: You can generate AA fonts in postscript or Object Graphics.
> Object graphics won't work if you are using the MAP_* routines, and PS
> isn't good if you want quick display/results. For nice fast Anti Aliased
> fonts to your screen, you have overlooked nothing.
Avert your eyes now if you fear hacks!
One technique would involve rendering (or capturing) just the text portion
of your display to a bitmap that you'd TVRD into a buffer. You'd
then might create a mask and stick that into an IDLgrImage for a texture
mapped
IDLgrSurface.
(Capturing of the text could either be performed by drawing only the
text, or, more likely, rendering the text in a specific color that you
can filter to create the mask for use the the texture map.)
You'd set up your IDLgrView in an IDLgrBuffer to match the dimensions
of your image, then "jitter" the image by repeatedly translating your model
back and forth in very small increments, capturing the data at each step to
a buffer array, averaging the resulting buffer.
Next you'd alpha blend your original image with the antialiased text image
buffer, where the opacity of each "text" pixel is a function of its pixel
value
in the buffer. You could let Object Graphics do the blending, but it's not
necessary since alpha blending is a quick array operation whose functional
form is described in the "Alpha Channel and Objects" documentation.
Jim P.
|
|
|
|