#include <AGG.h>
List of all members.
Static Public Member Functions |
static int16u | rgb555 (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 844 of file AGG.h.
Member Function Documentation
static rgba8 agg::span_rgb555::get |
( |
unsigned char * |
ptr, |
|
|
int |
x |
|
) |
| [inline, static] |
Definition at line 888 of file AGG.h.
{
int16u rgb = ((int16u*)ptr)[x];
rgba8 c;
c.r = (rgb >> 7) & 0xF8;
c.g = (rgb >> 2) & 0xF8;
c.b = (rgb << 3) & 0xF8;
c.a = 255;
return c;
}
static void agg::span_rgb555::hline |
( |
unsigned char * |
ptr, |
|
|
int |
x, |
|
|
unsigned |
count, |
|
|
const rgba8 & |
c |
|
) |
| [inline, static] |
static void agg::span_rgb555::render |
( |
unsigned char * |
ptr, |
|
|
int |
x, |
|
|
unsigned |
count, |
|
|
const unsigned char * |
covers, |
|
|
const rgba8 & |
c |
|
) |
| [inline, static] |
Definition at line 853 of file AGG.h.
{
int16u* p = ((int16u*)ptr) + x;
do
{
int16 rgb = *p;
int alpha = (*covers++) * c.a;
int r = (rgb >> 7) & 0xF8;
int g = (rgb >> 2) & 0xF8;
int b = (rgb << 3) & 0xF8;
*p++ = (((((c.r - r) * alpha) + (r << 16)) >> 9) & 0x7C00) |
(((((c.g - g) * alpha) + (g << 16)) >> 14) & 0x3E0) |
((((c.b - b) * alpha) + (b << 16)) >> 19);
}
while(--count);
}
static int16u agg::span_rgb555::rgb555 |
( |
unsigned |
r, |
|
|
unsigned |
g, |
|
|
unsigned |
b |
|
) |
| [inline, static] |
Definition at line 847 of file AGG.h.
{
return ((r & 0xF8) << 7) | ((g & 0xF8) << 2) | (b >> 3);
}
The documentation for this struct was generated from the following file:
- /home/cube/sources/osgearth/src/osgEarthSymbology/AGG.h