#include <AGG.h>
List of all members.
Static Public Member Functions |
static unsigned | mono8 (unsigned r, unsigned g, unsigned b) |
static void | render (unsigned char *ptr, int x, unsigned count, const unsigned char *covers, const rgba8 &c) |
static void | hline (unsigned char *ptr, int x, unsigned count, const rgba8 &c) |
static rgba8 | get (unsigned char *ptr, int x) |
Detailed Description
Definition at line 791 of file AGG.h.
Member Function Documentation
static rgba8 agg::span_mono8::get |
( |
unsigned char * |
ptr, |
|
|
int |
x |
|
) |
| [inline, static] |
Definition at line 829 of file AGG.h.
{
unsigned rgb = ptr[x];
rgba8 c;
c.r = rgb;
c.g = rgb;
c.b = rgb;
c.a = 255;
return c;
}
static void agg::span_mono8::hline |
( |
unsigned char * |
ptr, |
|
|
int |
x, |
|
|
unsigned |
count, |
|
|
const rgba8 & |
c |
|
) |
| [inline, static] |
Definition at line 818 of file AGG.h.
{
unsigned char* p = ptr + x;
unsigned v = mono8(c.r, c.g, c.b);
do { *p++ = v; } while(--count);
}
static unsigned agg::span_mono8::mono8 |
( |
unsigned |
r, |
|
|
unsigned |
g, |
|
|
unsigned |
b |
|
) |
| [inline, static] |
Definition at line 794 of file AGG.h.
{
return (r * 77 + g * 150 + b * 29) >> 8;
}
static void agg::span_mono8::render |
( |
unsigned char * |
ptr, |
|
|
int |
x, |
|
|
unsigned |
count, |
|
|
const unsigned char * |
covers, |
|
|
const rgba8 & |
c |
|
) |
| [inline, static] |
Definition at line 800 of file AGG.h.
{
unsigned char* p = ptr + x;
unsigned dst = mono8(c.r, c.g, c.b);
do
{
int alpha = (*covers++) * c.a;
unsigned src = *p;
*p++ = (((dst - src) * alpha) + (src << 16)) >> 16;
}
while(--count);
}
The documentation for this struct was generated from the following file:
- /home/cube/sources/osgearth/src/osgEarthSymbology/AGG.h