How can I draw text (currently using TextOut),
anti-aliased in a TrueType font onto an HDC?
Similarly, how can I get functionality like
FillRect & RoundRect, but with anti-aliased edges?
Bryan
You must create a WindowDC-compatible DC in memory, than draw all into this
DC.
After drawing you must use your own function for anti-alias.
After anti-aliasing use BitBlt(...) to move data from MemoryDC to WindowDC.
I think, this approach is not simple but it will work and helps you.
Be careful if your application is time-critical.
With best regards,
Sergey Hrushev.
I'm trying to get 60 fps, at 1600x1200 .....
Any idea where to pick up an antialias routine, an algorithm I can code?
I've no idea how it works (I know what it does, but not how).
Bryan
Sergey Hrushev wrote in message ...
I can refer you to the bible of graphics algorithms. It is Computer
Graphics: Principles and Practice ISBN:0201848406. It is pretty intense on
the math end, but it should help. You should try browsing Amazon.com(no, I
don't work for them) in the programming section under Graphics & Multimedia.
Cheers.
"Bryan" <c@d.D> wrote in message
news:OOWXGi7c$GA....@cppssbbsa02.microsoft.com...
"John" <jmha...@microage.com> spake the secret code
<87vkfq$452$1...@nnrp02.primenet.com> thusly:
>Let me know if you find one. I've been trying to find a good algo for quite
>some time. As far as 60fps goes, good luck.
For text you can always ammortize the anti-aliasing by computing it
once for a specific font and cache the results. Then when you render
AA text using the same font you just blt the AA characters into the
final image. If you're using Direct3D as well, you can put the AA
font into a single texture map and draw it with textured quads.
--
http://www.xmission.com/~legalize Legalize Adulthood!
lega...@xmission.com
``Ain't it funny that they all fire the pistol, <URL: http://
at the wrong end of the race?''--PDBT www.eden.com/~thewho>
Let me note, that cached image of anti-aliased "A" can be used only if it
will be putted on "unicolor" background.
In case of "bitmapped" background antialiasing must be done for each
occurence of "A" independently.
About 60fps on 1600x1200:
1600*1200*60 = 115 200 000 bytes (with 8bit color depth, I think really
color depth is 16bit, 24bit or 32bit).
So to provide 60fps it is necessary to have in-memory transfer 115 200 000
bytes/s.
If such program will work on computer with 100MHz system bus it is
impossible to provide 115 200 000 transfer.
If anybody knows, can this be done on SGI or SUN ?
With best regards,
Sergey Hrushev.
> "John" <jmha...@microage.com> spake the secret code