Board index » cppbuilder » Anti-aliasing

Anti-aliasing


2003-08-07 10:28:18 PM
cppbuilder36
Does anyone have any info about how to code an anti-aliasing
routine given bitmap data and a colour to blend? Can't find
anything with Google....
A library I am using give me the following function:
copy_alpha(gx_device * dev, const byte * data, int data_x,
int raster, gx_bitmap_id id, int x, int y, int width,
int height, gx_color_index color, int depth)
So, the actual bitmap is pointed to by 'data' and the color I
want to blend is 'color'. Each pixel is represented by 4 bits.
The small amount of help that comes with this libray says this:
Fill a given region with a given color modified by an individual
alpha value for each pixel. For each pixel, this is equivalent
to alpha-compositing with a source pixel whose alpha value is
obtained from the pixmap (data, data_x, and raster) and whose
color is the given color (which has not been premultiplied by
the alpha value), using the Sover rule.
Thanks,
Steve.
 
 

Re:Anti-aliasing

Hi Steve,
please take a look at:
support.microsoft.com/default.aspx
80/support/kb/articles/Q303/9/16.ASP&NoWebContent=1
(Microsoft Knowledge Base Article - 303916 - HOWTO: Platform Independent
Alpha Blending)
Hope that helps. :-)
ciao,
JMM
"Steve" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote

Does anyone have any info about how to code an anti-aliasing
routine given bitmap data and a colour to blend? Can't find
anything with Google....

A library I am using give me the following function:

copy_alpha(gx_device * dev, const byte * data, int data_x,
int raster, gx_bitmap_id id, int x, int y, int width,
int height, gx_color_index color, int depth)

So, the actual bitmap is pointed to by 'data' and the color I
want to blend is 'color'. Each pixel is represented by 4 bits.

The small amount of help that comes with this libray says this:

Fill a given region with a given color modified by an individual
alpha value for each pixel. For each pixel, this is equivalent
to alpha-compositing with a source pixel whose alpha value is
obtained from the pixmap (data, data_x, and raster) and whose
color is the given color (which has not been premultiplied by
the alpha value), using the Sover rule.

Thanks,

Steve.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 24.04.2003
 

Re:Anti-aliasing

In article < XXXX@XXXXX.COM >, Achim Berg wrote:
Quote

Does anyone know a simple way of drawing circles or lines to a canvas with
anti-aliasing?
Ask in b.p.delphi.graphics, that is the most appropriate group for this type
of question. I think Earl Glynns Delphi pages also have a sizable section on
graphics, you may want to check them: www.efg2.com/lab
Peter Below (TeamB)
Use the newsgroup archives :
www.mers.com/searchsite.html
www.tamaracka.com/search.htm
groups.google.com
www.prolix.be
 

{smallsort}