tesseract
3.05.02
|
integer coordinate More...
#include <points.h>
Public Member Functions | |
ICOORD () | |
empty constructor More... | |
ICOORD (inT16 xin, inT16 yin) | |
~ICOORD () | |
destructor More... | |
inT16 | x () const |
access function More... | |
inT16 | y () const |
access_function More... | |
void | set_x (inT16 xin) |
rewrite function More... | |
void | set_y (inT16 yin) |
rewrite function More... | |
void | set_with_shrink (int x, int y) |
Set from the given x,y, shrinking the vector to fit if needed. More... | |
float | sqlength () const |
find sq length More... | |
float | length () const |
find length More... | |
float | pt_to_pt_sqdist (const ICOORD &pt) const |
sq dist between pts More... | |
float | pt_to_pt_dist (const ICOORD &pt) const |
Distance between pts. More... | |
float | angle () const |
find angle More... | |
BOOL8 | operator== (const ICOORD &other) const |
test equality More... | |
BOOL8 | operator!= (const ICOORD &other) const |
test inequality More... | |
void | rotate (const FCOORD &vec) |
void | setup_render (ICOORD *major_step, ICOORD *minor_step, int *major, int *minor) const |
bool | Serialize (FILE *fp) const |
bool | DeSerialize (bool swap, FILE *fp) |
Protected Attributes | |
inT16 | xcoord |
inT16 | ycoord |
Friends | |
class | FCOORD |
ICOORD | operator! (const ICOORD &) |
rotate 90 deg anti More... | |
ICOORD | operator- (const ICOORD &) |
unary minus More... | |
ICOORD | operator+ (const ICOORD &, const ICOORD &) |
add More... | |
ICOORD & | operator+= (ICOORD &, const ICOORD &) |
add More... | |
ICOORD | operator- (const ICOORD &, const ICOORD &) |
subtract More... | |
ICOORD & | operator-= (ICOORD &, const ICOORD &) |
subtract More... | |
inT32 | operator% (const ICOORD &, const ICOORD &) |
scalar product More... | |
inT32 | operator* (const ICOORD &, const ICOORD &) |
cross product More... | |
ICOORD | operator* (const ICOORD &, inT16) |
multiply More... | |
ICOORD | operator* (inT16, const ICOORD &) |
multiply More... | |
ICOORD & | operator*= (ICOORD &, inT16) |
multiply More... | |
ICOORD | operator/ (const ICOORD &, inT16) |
divide More... | |
ICOORD & | operator/= (ICOORD &, inT16) |
divide More... | |
bool ICOORD::DeSerialize | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 70 of file points.cpp.
|
inline |
|
inline |
Distance between pts.
Definition at line 92 of file points.h.
|
inline |
|
inline |
bool ICOORD::Serialize | ( | FILE * | fp | ) | const |
Definition at line 63 of file points.cpp.
void ICOORD::set_with_shrink | ( | int | x, |
int | y | ||
) |
Set from the given x,y, shrinking the vector to fit if needed.
Definition at line 43 of file points.cpp.
|
inline |
rewrite function
|
inline |
rewrite function
void ICOORD::setup_render | ( | ICOORD * | major_step, |
ICOORD * | minor_step, | ||
int * | major, | ||
int * | minor | ||
) | const |
Setup for iterating over the pixels in a vector by the well-known Bresenham rendering algorithm. Starting with major/2 in the accumulator, on each step move by major_step, and then add minor to the accumulator. When accumulator >= major subtract major and also move by minor_step.
Definition at line 86 of file points.cpp.
|
inline |
access function
|
inline |
access_function