Chain Code Line Rasterization
Functions |
int | rapp_rasterize_4conn (char *line, int xs, int ys, int xe, int ye) |
| Rasterize a 4-connectivity chain code.
|
int | rapp_rasterize_8conn (char *line, int xs, int ys, int xe, int ye) |
| Rasterize an 8-connectivity chain code.
|
Detailed Description
Next section: Conditional Operations
Function Documentation
int rapp_rasterize_4conn |
( |
char * |
line, |
|
|
int |
xs, |
|
|
int |
ys, |
|
|
int |
xe, |
|
|
int |
ye | |
|
) |
| | |
Rasterize a 4-connectivity chain code.
- Parameters:
-
[out] | line | Chain code string buffer with at least abs(xe - xs) + abs(ye - ys) + 1 bytes. |
| xs | Start position x coordinate. |
| ys | Start position y coordinate. |
| xe | End position x coordinate. |
| ye | End position y coordinate. |
- Returns:
- The number of codes written to the buffer, not including the trailing '\0' character, or a negative error code on error.
int rapp_rasterize_8conn |
( |
char * |
line, |
|
|
int |
xs, |
|
|
int |
ys, |
|
|
int |
xe, |
|
|
int |
ye | |
|
) |
| | |
Rasterize an 8-connectivity chain code.
- Parameters:
-
[out] | line | Chain code string buffer with at least max(abs(xe - xs), abs(ye - ys)) + 1 bytes. |
| xs | Start position x coordinate. |
| ys | Start position y coordinate. |
| xe | End position x coordinate. |
| ye | End position y coordinate. |
- Returns:
- The number of codes written to the buffer, not including the trailing '\0' character, or a negative error code on error.