|
Leptonica
1.54
|
Переменные | |
| static const l_int32 | INITIAL_PTR_ARRAYSIZE = 20 |
Input: ptaa
ipta (to the i-th pta)
x,y (point coordinates)
Return: 0 if OK; 1 on error
Input: ptaa
pta (to be added)
copyflag (L_INSERT, L_COPY, L_CLONE)
Return: 0 if OK, 1 on error
Input: n (initial number of ptrs) Return: ptaa, or null on error
Input: pta
x, y
Return: 0 if OK, 1 on error
| void ptaaDestroy | ( | PTAA ** | pptaa | ) |
Input: &ptaa <to be nulled> Return: void
Input: ptaa Return: 0 if OK, 1 on error
Input: ptaa Return: count, or 0 if no ptaa
Input: ptaa
ipta (to the i-th pta)
jpt (index to the j-th pt in the pta)
&x (<optional return> float x value)
&y (<optional return> float y value)
Return: 0 if OK; 1 on error
Input: ptaa
index (to the i-th pta)
accessflag (L_COPY or L_CLONE)
Return: pta, or null on error
Input: ptaa (can have non-null ptrs in the ptr array)
pta (to be replicated into the entire ptr array)
Return: 0 if OK; 1 on error
| PTAA* ptaaRead | ( | const char * | filename | ) |
Input: filename Return: ptaa, or null on error
| PTAA* ptaaReadStream | ( | FILE * | fp | ) |
Input: stream Return: ptaa, or null on error
Input: ptaa
index (to the index-th pta)
pta (insert and replace any existing one)
Return: 0 if OK, 1 on error
Notes: (1) Any existing pta is destroyed, and the input one is inserted in its place. (2) If the index is invalid, return 1 (error)
Input: ptaa Return: 0 if OK, 1 on error
Notes: (1) This identifies the largest index containing a pta that has any points within it, destroys all pta above that index, and resets the count.
Input: filename
ptaa
type (0 for float values; 1 for integer values)
Return: 0 if OK, 1 on error
Input: stream
ptaa
type (0 for float values; 1 for integer values)
Return: 0 if OK; 1 on error
Input: pta Return: ptr to same pta, or null on error
Input: ptas
istart (starting index in ptas)
iend (ending index in ptas; use 0 to copy to end)
Return: 0 if OK, 1 on error
Input: n (initial array sizes) Return: pta, or null on error.
Input: nax (<optional> can be null)
nay
Return: pta, or null on error.
| void ptaDestroy | ( | PTA ** | ppta | ) |
Input: &pta (<to be nulled>) Return: void
Note:
Input: pta Return: 0 if OK; 1 on error
Input: pta
&nax (<optional return> numa of x array)
&nay (<optional return> numa of y array)
Return: 0 if OK; 1 on error or if pta is empty
Notes: (1) This copies the internal arrays into new Numas.
Input: pta Return: count, or 0 if no pta
Input: pta
index (into arrays)
&x (<optional return> integer x value)
&y (<optional return> integer y value)
Return: 0 if OK; 1 on error
Input: pta
index (into arrays)
&x (<optional return> float x value)
&y (<optional return> float y value)
Return: 0 if OK; 1 on error
Input: pta
index (at which pt is to be inserted)
x, y (point values)
Return: 0 if OK; 1 on error
| PTA* ptaReadStream | ( | FILE * | fp | ) |
Input: stream Return: pta, or null on error
Input: pta
index (of point to be removed)
Return: 0 if OK, 1 on error
Notes: (1) This shifts pta[i] --> pta[i - 1] for all i > index. (2) It should not be used repeatedly on large arrays, because the function is O(n).
Input: pta
index (into arrays)
x, y
Return: 0 if OK; 1 on error
Input: filename
pta
type (0 for float values; 1 for integer values)
Return: 0 if OK, 1 on error
Input: stream
pta
type (0 for float values; 1 for integer values)
Return: 0 if OK; 1 on error
|
static |