41 return (blob ==
nullptr)
56 if (outline ==
nullptr || outline->
loop ==
nullptr)
59 StartPoint = outline->
loop;
60 EdgePoint = StartPoint;
62 NextPoint = EdgePoint->
next;
65 if (EdgePoint->
pos.
x != NextPoint->
pos.
x ||
66 EdgePoint->
pos.
y != NextPoint->
pos.
y) {
72 MFOutline =
push(MFOutline, NewPoint);
74 EdgePoint = NextPoint;
75 }
while (EdgePoint != StartPoint);
77 if (MFOutline !=
nullptr)
96 while (outline !=
nullptr) {
98 if (mf_outline !=
nullptr)
99 mf_outlines =
push(mf_outlines, mf_outline);
100 outline = outline->
next;
138 while (EdgePoint != Outline);
157 while (Start !=
nullptr) {
205 while (Last != First);
229 while (!
PointAt(EdgePoint)->ExtremityMark)
263 }
while (EdgePoint != Outline);
292 ASSERT_HOST(!
"How did NormalizeOutlines get called in character mode?");
323 for (Current = Start; Current != End; Current =
NextPointAfter (Current))
324 PointAt (Current)->Direction = Direction;
326 PointAt (End)->PreviousDirection = Direction;
349 CurrentPoint =
PointAt(Current);
357 while (Current != First);
388 Start->
Slope = -FLT_MAX;
391 Start->
Slope = FLT_MAX;
395 Start->
Slope = Delta.
y / Delta.
x;
398 if (Start->
Slope > MinSlope) {
399 if (Start->
Slope < MaxSlope) {
408 else if (Start->
Slope < -MinSlope) {
409 if (Start->
Slope > -MaxSlope) {
417 }
else if (Delta.
y > 0) {
418 if (Start->
Slope < -MinSlope) {
419 if (Start->
Slope > -MaxSlope) {
427 }
else if (Start->
Slope > MinSlope) {
428 if (Start->
Slope < MaxSlope) {
452 InitialDirection =
PointAt (EdgePoint)->Direction;
458 }
while (
PointAt(EdgePoint)->Direction == InitialDirection &&
460 next_pt !=
nullptr && !
PointAt(next_pt)->Hidden);
MFOUTLINE NextExtremity(MFOUTLINE EdgePoint)
void MarkDirectionChanges(MFOUTLINE Outline)
void ChangeDirection(MFOUTLINE Start, MFOUTLINE End, DIRECTION Direction)
void NormalizeOutline(MFOUTLINE Outline, float XOrigin)
void NormalizeOutlines(LIST Outlines, float *XScale, float *YScale)
void FreeOutlines(LIST Outlines)
#define DegenerateOutline(O)
#define set_rest(l, cell)
void FindDirectionChanges(MFOUTLINE Outline, float MinSlope, float MaxSlope)
MFOUTLINE ConvertOutline(TESSLINE *outline)
LIST push(LIST list, void *element)
LIST ConvertOutlines(TESSLINE *outline, LIST mf_outlines, OUTLINETYPE outline_type)
const int kBlnBaselineOffset
MFOUTLINE NextDirectionChange(MFOUTLINE EdgePoint)
LIST ConvertBlob(TBLOB *blob)
void LocalNormTransform(const TPOINT &pt, TPOINT *transformed) const
void destroy_nodes(LIST list, void_dest destructor)
void ComputeDirection(MFEDGEPT *Start, MFEDGEPT *Finish, float MinSlope, float MaxSlope)
void CharNormalizeOutline(MFOUTLINE Outline, const DENORM &cn_denorm)
#define NextPointAfter(E)
#define MakeOutlineCircular(O)
DIRECTION PreviousDirection
void FreeMFOutline(void *arg)
MFEDGEPT * NewEdgePoint()