Gwyscan Library
|
int | gwyscan_modify_path_insert (double *xypos_dest, int *indexes, int *n_indexes, const double *xypos_source, int n_source, double xpos, double ypos, int interval) |
Inserts points to existing path. More... | |
void | gwyscan_modify_path_revert (double *xypos_dest, const double *xypos_source, int n) |
Reverts existing path. More... | |
void | gwyscan_modify_path_flip_horizontal (double *xypos_dest, const double *xypos_source, int n) |
Flips existing path horizontally. More... | |
void | gwyscan_modify_path_flip_vertical (double *xypos_dest, const double *xypos_source, int n) |
Flips existing path vertically. More... | |
void gwyscan_modify_path_flip_horizontal | ( | double * | xypos_dest, |
const double * | xypos_source, | ||
int | n | ||
) |
Flips existing path horizontally.
The function flips points of existing input path horizontally and put them to existing output path. Size of input and output array must be the same.
xypos_dest | is an allocated array of xy positions to fill. |
xypos_source | is an allocated array of source xy positions. |
n | is the number of points. |
void gwyscan_modify_path_flip_vertical | ( | double * | xypos_dest, |
const double * | xypos_source, | ||
int | n | ||
) |
Flips existing path vertically.
The function flips points of existing input path vertically and put them to existing output path. Size of input and output array must be the same.
xypos_dest | is an allocated array of xy positions to fill. |
xypos_source | is an allocated array of source xy positions. |
n | is the number of points. |
int gwyscan_modify_path_insert | ( | double * | xypos_dest, |
int * | indexes, | ||
int * | nindexes, | ||
const double * | xypos_source, | ||
int | n_source, | ||
double | xpos, | ||
double | ypos, | ||
int | interval | ||
) |
Inserts points to existing path.
The function inserts [xpos
, ypos
] points to existing path in intervals distant interval
indexes. First [xpos, ypos] point is inserted as the first element at index 0, then [xpos, ypos] point are inserted every interval
elements. Last [xpos, ypos] point is inserted at the last index.
If you pass NULL
for xypos_dest
the function then just calculates and returns the number of positions in the path (n). This is the recommended way of finding out how large xypos_dest
array you need to create. Note that each position has two coordinates so you must allocate xypos_dest
as array with 2*n elements.
xypos_dest | is an allocated array of xy positions to fill. Pass NULL to just calculate number of positions. |
indexes | is an allocated array of inserted indexes to fill. Pass NULL when calculating number of positions. |
nindexes | is a number of indexes in indexes array. |
xypos_source | is an allocated array of source xy positions. |
n_source | is the number of points in xypos_source array. |
xpos | is a x coordinate of inserted point. |
ypos | is a y coordinate of inserted point. |
interval | is a distance of inserted points. |
xypos_dest
is NULL. void gwyscan_modify_path_revert | ( | double * | xypos_dest, |
const double * | xypos_source, | ||
int | n | ||
) |
Reverts existing path.
The function reverts points of existing input path and put them to existing output path. Size of input and output array must be the same.
xypos_dest | is an allocated array of xy positions to fill. |
xypos_source | is an allocated array of source xy positions. |
n | is the number of points. |