40#define INTERSECTING INT16_MAX
84 ICOORD top_right, int16_t length);
92 static void FakeOutline(
const TBOX &box, C_OUTLINE_LIST *outlines);
105 flags.set(mask,
value);
119 int shift = stepindex % 4 * 2;
120 uint8_t mask = 3 << shift;
121 steps[stepindex / 4] = ((stepdir << shift) & mask) | (steps[stepindex / 4] & ~mask);
130 set_step(stepindex, chaindir);
140 static_cast<int16_t
>(((steps[index / 4] >> (index % 4 * 2)) &
STEP_MASK) << (
DIRBITS - 2)));
144 return step_coords[chain_code(index)];
154 for (
int i = 0;
i < index; ++
i) {
164 const ICOORD &step_to_next(step(index));
165 FCOORD f_pos(pos.
x() + step_to_next.
x() / 2.0f, pos.
y() + step_to_next.
y() / 2.0f);
166 if (offsets !=
nullptr && offsets[index].pixel_diff > 0) {
167 float offset = offsets[index].offset_numerator;
168 offset /= offsets[index].pixel_diff;
169 if (step_to_next.
x() != 0) {
170 f_pos.
set_y(f_pos.
y() + offset);
172 f_pos.
set_x(f_pos.
x() + offset);
179 if (offsets !=
nullptr && offsets[index].pixel_diff > 0) {
180 return offsets[index].direction;
189 if (offsets !=
nullptr) {
190 return offsets[index].pixel_diff;
198 return (steps[index / 4] >> (index % 4 * 2)) &
STEP_MASK;
201 int32_t area()
const;
202 int32_t perimeter()
const;
203 int32_t outer_area()
const;
204 int32_t count_transitions(
211 return other < *
this;
213 int16_t winding_number(
216 int16_t turn_direction()
const;
226 bool IsLegallyNested()
const;
233 void RemoveSmallRecursive(
int min_size, C_OUTLINE_IT *it);
237 void ComputeEdgeOffsets(
int threshold,
Image pix);
240 void ComputeBinaryOffsets();
244 void render(
int left,
int top,
Image pix)
const;
250#ifndef GRAPHICS_DISABLED
267 static ICOORD chain_step(
int chaindir);
273 static const int kMaxOutlineLength = 16000;
280 void increment_step(
int s,
int increment,
ICOORD *pos,
int *dir_counts,
int *pos_totals)
const;
281 int step_mem()
const {
282 return (stepcount + 3) / 4;
288 std::bitset<16> flags;
289 std::vector<uint8_t> steps;
291 C_OUTLINE_LIST children;
292 static ICOORD step_coords[4];
#define ELISTIZEH(CLASSNAME)
bool operator<(const UnicodeText::const_iterator &lhs, const UnicodeText::const_iterator &rhs)
void render_outline(ScrollView *window, TESSLINE *outline, ScrollView::Color color)
int32_t pathlength() const
void set_step(int16_t stepindex, int8_t stepdir)
int direction_at_index(int index) const
const TBOX & bounding_box() const
void set_flag(C_OUTLINE_FLAGS mask, bool value)
ICOORD step(int index) const
ICOORD position_at_index(int index) const
static C_OUTLINE * deep_copy(const C_OUTLINE *src)
DIR128 step_dir(int index) const
int chain_code(int index) const
FCOORD sub_pixel_pos_at_index(const ICOORD &pos, int index) const
int edge_strength_at_index(int index) const
const ICOORD & start_pos() const
bool operator>(C_OUTLINE &other) const
bool flag(C_OUTLINE_FLAGS mask) const
void set_step(int16_t stepindex, DIR128 stepdir)
TDimension y() const
access_function
TDimension x() const
access function
void set_y(float yin)
rewrite function
void set_x(float xin)
rewrite function