comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: antialias fonts
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: antialias fonts [message #42964] Mon, 07 March 2005 07:03
Jim Pendleton is currently offline  Jim Pendleton
Messages: 13
Registered: July 2001
Junior Member
"Jim Pendleton" <jimpendleton@earthlink.net> wrote in message
news:9OZWd.3584$cN6.3353@newsread1.news.pas.earthlink.net...
>
> Possibly a lot of nonsense.

It may have been best to avert your eyes.
There may be some grains of truth in the preceding post, but the technique,
alas, may have been too naive.
Jim P.
Re: antialias fonts [message #42965 is a reply to message #42964] Mon, 07 March 2005 06:45 Go to previous message
Jim Pendleton is currently offline  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.
Re: antialias fonts [message #42966 is a reply to message #42965] Sun, 06 March 2005 23:49 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
Ken Mankoff wrote:
> 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. :(

Anti-aliasing is not supported in direct graphics. Everything is either
"pixel on" or "pixel off." There's no gray* area to allow for AA.

* = pun intended.

> Long answer: You can generate AA fonts in postscript or Object Graphics.
> Object graphics won't work if you are using the MAP_* routines,

Object graphics won't work if you're tied to any direct graphics
routine, MAP_* or otherwise.

> and PS isn't good if you want quick display/results.

Not really. You just have to run your entire program and then just do a
quick command on the system to see the file. It's just one additional
line to type in. For example,

IDL> create_me_plot, data, FILENAME="myfile.ps"
IDL> $display myfile.ps

Of course, I'm assuming that the stated command creates a file for you.
And I'm also assuming that you're using an operating system that
allows you to quickly go to a command line like that. ;-)

-Mike
Re: antialias fonts [message #42967 is a reply to message #42966] Sun, 06 March 2005 13:44 Go to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
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.

-k.

--
http://spacebit.dyndns.org/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: antialias fonts
Next Topic: looking for source of a caught runtime error.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:22:16 PDT 2025

Total time taken to generate the page: 0.00681 seconds