navit
0.5.3-trunk
|
Macros | |
#define | raster_rect_inline raster_rect |
#define | MODIFIED_ALPHA_PIXEL_ROUTINE |
#define | clip_xmin(surface) surface->clip_rect.x |
#define | clip_xmax(surface) surface->clip_rect.x+surface->clip_rect.w-1 |
#define | clip_ymin(surface) surface->clip_rect.y |
#define | clip_ymax(surface) surface->clip_rect.y+surface->clip_rect.h-1 |
#define | CLIP_LEFT_EDGE 0x1 |
#define | CLIP_RIGHT_EDGE 0x2 |
#define | CLIP_BOTTOM_EDGE 0x4 |
#define | CLIP_TOP_EDGE 0x8 |
#define | CLIP_INSIDE(a) (!a) |
#define | CLIP_REJECT(a, b) (a&b) |
#define | CLIP_ACCEPT(a, b) (!(a|b)) |
#define | AAlevels 256 |
#define | AAbits 8 |
Functions | |
static void | raster_rect_inline (SDL_Surface *dst, int16_t x1, int16_t y1, int16_t w, int16_t h, uint32_t color) |
void | raster_rect (SDL_Surface *s, int16_t x, int16_t y, int16_t w, int16_t h, uint32_t col) |
static void | raster_PutPixel (SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color) |
static void | raster_PutPixelAlpha (SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color, Uint8 alpha) |
static int | raster_pixelColorNolock (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color) |
static int | raster_pixelColorWeightNolock (SDL_Surface *dst, Sint16 x, Sint16 y, Uint32 color, Uint32 weight) |
static void | raster_hline (SDL_Surface *dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color) |
static void | raster_vline (SDL_Surface *dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color) |
static int | clipEncode (Sint16 x, Sint16 y, Sint16 left, Sint16 top, Sint16 right, Sint16 bottom) |
static int | clipLine (SDL_Surface *dst, Sint16 *x1, Sint16 *y1, Sint16 *x2, Sint16 *y2) |
void | raster_line (SDL_Surface *dst, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t color) |
static void | raster_aalineColorInt (SDL_Surface *dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color, int draw_endpoint) |
void | raster_aaline (SDL_Surface *s, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint32_t col) |
void | raster_circle (SDL_Surface *dst, int16_t x, int16_t y, int16_t r, uint32_t color) |
static void | raster_AAFilledEllipse (SDL_Surface *surface, Sint16 xc, Sint16 yc, Sint16 rx, Sint16 ry, Uint32 color) |
void | raster_aacircle (SDL_Surface *s, int16_t x, int16_t y, int16_t r, uint32_t col) |
static int | gfxPrimitivesCompareInt (const void *a, const void *b) |
static int | raster_filledPolygonColorMT (SDL_Surface *dst, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color, int **polyInts, int *polyAllocated) |
void | raster_polygon (SDL_Surface *s, int16_t n, int16_t *vx, int16_t *vy, uint32_t col) |
void | raster_aapolygon (SDL_Surface *dst, int16_t n, int16_t *vx, int16_t *vy, uint32_t color) |
void | raster_aapolygon_with_holes (SDL_Surface *s, struct point *p, int count, int hole_count, int *ccount, struct point **holes, uint32_t col) |
render filled polygon with holes by raycasting along the y axis More... | |
void | raster_polygon_with_holes (SDL_Surface *s, struct point *p, int count, int hole_count, int *ccount, struct point **holes, uint32_t col) |
render filled polygon with holes by raycasting along the y axis More... | |
Variables | |
static int * | gfxPrimitivesPolyIntsGlobal = NULL |
static int | gfxPrimitivesPolyAllocatedGlobal = 0 |
#define AAbits 8 |
#define AAlevels 256 |
#define CLIP_ACCEPT | ( | a, | |
b | |||
) | (!(a|b)) |
#define CLIP_BOTTOM_EDGE 0x4 |
#define CLIP_INSIDE | ( | a | ) | (!a) |
#define CLIP_LEFT_EDGE 0x1 |
#define CLIP_REJECT | ( | a, | |
b | |||
) | (a&b) |
#define CLIP_RIGHT_EDGE 0x2 |
#define CLIP_TOP_EDGE 0x8 |
#define clip_xmax | ( | surface | ) | surface->clip_rect.x+surface->clip_rect.w-1 |
#define clip_xmin | ( | surface | ) | surface->clip_rect.x |
#define clip_ymax | ( | surface | ) | surface->clip_rect.y+surface->clip_rect.h-1 |
#define clip_ymin | ( | surface | ) | surface->clip_rect.y |
#define MODIFIED_ALPHA_PIXEL_ROUTINE |
#define raster_rect_inline raster_rect |
|
static |
References CLIP_BOTTOM_EDGE, CLIP_LEFT_EDGE, CLIP_RIGHT_EDGE, and CLIP_TOP_EDGE.
Referenced by clipLine().
|
static |
References CLIP_ACCEPT, CLIP_BOTTOM_EDGE, CLIP_INSIDE, CLIP_LEFT_EDGE, CLIP_REJECT, CLIP_RIGHT_EDGE, CLIP_TOP_EDGE, and clipEncode().
Referenced by raster_aalineColorInt(), and raster_line().
|
static |
Referenced by raster_aapolygon(), raster_filledPolygonColorMT(), and raster_polygon_with_holes().
void raster_aacircle | ( | SDL_Surface * | s, |
int16_t | x, | ||
int16_t | y, | ||
int16_t | r, | ||
uint32_t | col | ||
) |
References raster_AAFilledEllipse().
Referenced by draw_circle().
|
static |
References raster_hline(), raster_PutPixel(), raster_PutPixelAlpha(), and raster_vline().
Referenced by raster_aacircle().
void raster_aaline | ( | SDL_Surface * | s, |
int16_t | x1, | ||
int16_t | y1, | ||
int16_t | x2, | ||
int16_t | y2, | ||
uint32_t | col | ||
) |
References raster_aalineColorInt().
Referenced by draw_lines().
|
static |
References AAbits, clipLine(), raster_hline(), raster_line(), raster_pixelColorNolock(), raster_pixelColorWeightNolock(), and raster_vline().
Referenced by raster_aaline(), raster_aapolygon(), and raster_aapolygon_with_holes().
void raster_aapolygon | ( | SDL_Surface * | dst, |
int16_t | n, | ||
int16_t * | vx, | ||
int16_t * | vy, | ||
uint32_t | color | ||
) |
void raster_aapolygon_with_holes | ( | SDL_Surface * | s, |
struct point * | p, | ||
int | count, | ||
int | hole_count, | ||
int * | ccount, | ||
struct point ** | holes, | ||
uint32_t | col | ||
) |
render filled polygon with holes by raycasting along the y axis
This function renders a filled polygon that can have holes by SDL primitive graphic functions by raycasting along the y axis. This works basically the same as for complex polygons. Only difference is the "holes" are individual polygon loops not connected to the outer loop. FIXME: This draws well as long as the "hole" does not intersect with the outer polygon. However such multipolygons are seen a mapping error in OSM and therefore the rendering err may even help in detecting them. But this could be fixed by never starting a line on a vertex that came from a hole intersection.
s | SDL surface to draw on |
p | Array of points containing the outer polygon |
count | Number of points in outer polygon |
hole_count | Number of hole polygons |
ccount | number of points per hole polygon @oaram holes array of point arrays. One for each "hole" |
col | Color to draw this. |
References p, raster_aalineColorInt(), raster_polygon_with_holes(), point::x, and point::y.
Referenced by draw_polygon_with_holes().
void raster_circle | ( | SDL_Surface * | dst, |
int16_t | x, | ||
int16_t | y, | ||
int16_t | r, | ||
uint32_t | color | ||
) |
References raster_hline(), and raster_PutPixel().
Referenced by draw_circle().
|
inlinestatic |
References gfxPrimitivesCompareInt(), gfxPrimitivesPolyAllocatedGlobal, gfxPrimitivesPolyIntsGlobal, and raster_hline().
Referenced by raster_polygon().
|
inlinestatic |
void raster_line | ( | SDL_Surface * | dst, |
int16_t | x1, | ||
int16_t | y1, | ||
int16_t | x2, | ||
int16_t | y2, | ||
uint32_t | color | ||
) |
References clipLine(), raster_hline(), raster_PutPixel(), and raster_vline().
Referenced by draw_lines(), and raster_aalineColorInt().
|
static |
References raster_PutPixel().
Referenced by raster_aalineColorInt().
|
static |
References raster_PutPixelAlpha().
Referenced by raster_aalineColorInt().
void raster_polygon | ( | SDL_Surface * | s, |
int16_t | n, | ||
int16_t * | vx, | ||
int16_t * | vy, | ||
uint32_t | col | ||
) |
References raster_filledPolygonColorMT().
void raster_polygon_with_holes | ( | SDL_Surface * | s, |
struct point * | p, | ||
int | count, | ||
int | hole_count, | ||
int * | ccount, | ||
struct point ** | holes, | ||
uint32_t | col | ||
) |
render filled polygon with holes by raycasting along the y axis
This function renders a filled polygon that can have holes by SDL primitive graphic functions by raycasting along the y axis. This works basically the same as for complex polygons. Only difference is the "holes" are individual polygon loops not connected to the outer loop. FIXME: This draws well as long as the "hole" does not intersect with the outer polygon. However such multipolygons are seen a mapping error in OSM and therefore the rendering err may even help in detecting them. But this could be fixed by never starting a line on a vertex that came from a hole intersection.
s | SDL surface to draw on |
p | Array of points containing the outer polygon |
count | Number of points in outer polygon |
hole_count | Number of hole polygons |
ccount | number of points per hole polygon @oaram holes array of point arrays. One for each "hole" |
col | Color to draw this. |
References gfxPrimitivesCompareInt(), p, raster_hline(), point::x, and point::y.
Referenced by draw_polygon_with_holes(), and raster_aapolygon_with_holes().
|
static |
References clip_xmax, clip_xmin, clip_ymax, and clip_ymin.
Referenced by raster_AAFilledEllipse(), raster_circle(), raster_line(), and raster_pixelColorNolock().
|
static |
References clip_xmax, clip_xmin, clip_ymax, clip_ymin, and color::r.
Referenced by raster_AAFilledEllipse(), and raster_pixelColorWeightNolock().
void raster_rect | ( | SDL_Surface * | s, |
int16_t | x, | ||
int16_t | y, | ||
int16_t | w, | ||
int16_t | h, | ||
uint32_t | col | ||
) |
References raster_rect_inline.
Referenced by draw_rectangle().
|
inlinestatic |
References rect::h.
|
static |
Referenced by raster_AAFilledEllipse(), raster_aalineColorInt(), and raster_line().
|
static |
Referenced by raster_aapolygon(), and raster_filledPolygonColorMT().
|
static |
Referenced by raster_aapolygon(), and raster_filledPolygonColorMT().