w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

hints.c File Reference
#include "types.h"
#include "objects.h"
#include "spaces.h"
#include "paths.h"
#include "regions.h"
#include "hints.h"
Include dependency graph for hints.c:

Go to the source code of this file.

Macros

#define MAXLABEL   20
 
#define ODD(x)   (((int)(x)) & 01)
 
#define FPFLOOR(fp)   TOFRACTPEL((fp) >> FRACTBITS)
 
#define FPROUND(fp)   FPFLOOR((fp) + FPHALF)
 
#define ISTOP(flag)   ((flag)&0x20)
 
#define ISBOTTOM(flag)   ((flag)&0x10)
 
#define ISLEFT(flag)   ((flag)&0x08)
 
#define XofY(edge, y)   edge->xvalues[y - edge->ymin]
 
#define findXofY(edge, y)   ((y < edge->ymin || y >= edge->ymax) ? SearchXofY(edge, y) : XofY(edge, y))
 
#define ISBREAK(top, bot)   (top->ymax != bot->ymin)
 
#define BLACKABOVE   -1
 
#define BLACKBELOW   +1
 
#define NONE   0
 
#define IsValidPel(j)   (j!=MINPEL)
 
#define WeAreAtTop(e, i)   (ISTOP(e->flag) && e->ymin == i)
 
#define WeAreAtBottom(e, i)   (ISBOTTOM(e->flag) && e->ymax-1 == i)
 
#define WeAreInMiddle(e, i)    ((!ISTOP(e->flag) && !ISBOTTOM(e->flag))||(i < e->ymax-1 && i > e->ymin))
 
#define SAMESWATH(e1, e2)   (e1->ymin == e2->ymin)
 

Functions

void t1_InitHints (void)
 
void t1_CloseHints (struct fractpoint *hintP)
 
static void ComputeHint (struct hintsegment *hP, fractpel currX, fractpel currY, struct fractpoint *hintP)
 
void t1_ProcessHint (struct hintsegment *hP, fractpel currX, fractpel currY, struct fractpoint *hintP)
 
static pel SearchXofY (register struct edgelist *edge, register pel y)
 
static int ImpliedHorizontalLine (register struct edgelist *e1, register struct edgelist *e2, register int y)
 
static void FixSubPaths (register struct region *R)
 
static struct edgelistbefore (struct edgelist *)
 
static void DumpSubPaths (struct edgelist *anchor)
 
static void writeXofY (struct edgelist *e, int y, int x)
 
static void CollapseWhiteRun (struct edgelist *anchor, pel yblack, struct edgelist *left, struct edgelist *right, pel ywhite)
 
void t1_ApplyContinuity (struct region *R)
 

Variables

struct {
   int   inuse
 
   int   computed
 
   struct fractpoint   hint
 
oldHint [20]
 

Macro Definition Documentation

◆ BLACKABOVE

#define BLACKABOVE   -1

Definition at line 410 of file hints.c.

◆ BLACKBELOW

#define BLACKBELOW   +1

Definition at line 411 of file hints.c.

◆ findXofY

#define findXofY (   edge,
  y 
)    ((y < edge->ymin || y >= edge->ymax) ? SearchXofY(edge, y) : XofY(edge, y))

Definition at line 349 of file hints.c.

◆ FPFLOOR

#define FPFLOOR (   fp)    TOFRACTPEL((fp) >> FRACTBITS)

Definition at line 82 of file hints.c.

◆ FPROUND

#define FPROUND (   fp)    FPFLOOR((fp) + FPHALF)

Definition at line 83 of file hints.c.

◆ ISBOTTOM

#define ISBOTTOM (   flag)    ((flag)&0x10)

Definition at line 326 of file hints.c.

◆ ISBREAK

#define ISBREAK (   top,
  bot 
)    (top->ymax != bot->ymin)

Definition at line 398 of file hints.c.

◆ ISLEFT

#define ISLEFT (   flag)    ((flag)&0x08)

Definition at line 331 of file hints.c.

◆ ISTOP

#define ISTOP (   flag)    ((flag)&0x20)

Definition at line 325 of file hints.c.

◆ IsValidPel

#define IsValidPel (   j)    (j!=MINPEL)

Definition at line 695 of file hints.c.

◆ MAXLABEL

#define MAXLABEL   20

Definition at line 74 of file hints.c.

◆ NONE

#define NONE   0

Definition at line 412 of file hints.c.

◆ ODD

#define ODD (   x)    (((int)(x)) & 01)

Definition at line 81 of file hints.c.

◆ SAMESWATH

#define SAMESWATH (   e1,
  e2 
)    (e1->ymin == e2->ymin)

Definition at line 728 of file hints.c.

◆ WeAreAtBottom

#define WeAreAtBottom (   e,
  i 
)    (ISBOTTOM(e->flag) && e->ymax-1 == i)

Definition at line 721 of file hints.c.

◆ WeAreAtTop

#define WeAreAtTop (   e,
  i 
)    (ISTOP(e->flag) && e->ymin == i)

Definition at line 720 of file hints.c.

◆ WeAreInMiddle

#define WeAreInMiddle (   e,
  i 
)     ((!ISTOP(e->flag) && !ISBOTTOM(e->flag))||(i < e->ymax-1 && i > e->ymin))

Definition at line 722 of file hints.c.

◆ XofY

#define XofY (   edge,
  y 
)    edge->xvalues[y - edge->ymin]

Definition at line 340 of file hints.c.

Function Documentation

◆ before()

static struct edgelist * before ( struct edgelist e)
static

Definition at line 674 of file hints.c.

References e, and r.

Referenced by DumpSubPaths().

◆ CollapseWhiteRun()

static void CollapseWhiteRun ( struct edgelist anchor,
pel  yblack,
struct edgelist left,
struct edgelist right,
pel  ywhite 
)
static

◆ ComputeHint()

static void ComputeHint ( struct hintsegment hP,
fractpel  currX,
fractpel  currY,
struct fractpoint hintP 
)
static

◆ DumpSubPaths()

static void DumpSubPaths ( struct edgelist anchor)
static

Definition at line 631 of file hints.c.

References before(), e, IfTrace0, IfTrace1, IfTrace2, IfTrace4, ISBREAK, ISDOWN, ISPERMANENT, edge::link, ON, TRUE, VALIDEDGE, y, and edgelist::ymax.

Referenced by t1_ApplyContinuity().

◆ FixSubPaths()

static void FixSubPaths ( register struct region R)
static

Definition at line 486 of file hints.c.

References e, ISAMBIGUOUS, ISBOTTOM, ISBREAK, ISDOWN, ISLEFT, ISTOP, edge::link, next, NULL, ON, prev, R, edgelist::subpath, t1_abort(), TRUE, and VALIDEDGE.

Referenced by t1_ApplyContinuity().

◆ ImpliedHorizontalLine()

static int ImpliedHorizontalLine ( register struct edgelist e1,
register struct edgelist e2,
register int  y 
)
static

Definition at line 414 of file hints.c.

References ISBOTTOM, ISBREAK, ISDOWN, ISTOP, NONE, edgelist::subpath, t1_abort(), TRUE, y, edgelist::ymax, and edgelist::ymin.

Referenced by t1_ApplyContinuity().

◆ SearchXofY()

static pel SearchXofY ( register struct edgelist edge,
register pel  y 
)
static

Definition at line 361 of file hints.c.

References e, ISBOTTOM, ISTOP, MINPEL, t1_abort(), XofY, y, and edgelist::ymin.

◆ t1_ApplyContinuity()

◆ t1_CloseHints()

void t1_CloseHints ( struct fractpoint hintP)

Definition at line 100 of file hints.c.

References FALSE, HintDebug, i, IfTrace3, inuse, MAXLABEL, oldHint, fractpoint::x, and fractpoint::y.

◆ t1_InitHints()

void t1_InitHints ( void  )

Definition at line 85 of file hints.c.

References FALSE, i, MAXLABEL, and oldHint.

◆ t1_ProcessHint()

◆ writeXofY()

static void writeXofY ( struct edgelist e,
int  y,
int  x 
)
static

Definition at line 706 of file hints.c.

References e, cordic::x, and y.

Referenced by CollapseWhiteRun(), and t1_ApplyContinuity().

Variable Documentation

◆ computed

int computed

Definition at line 77 of file hints.c.

Referenced by do_math_spacing().

◆ hint

◆ inuse

int inuse

◆ 

oldHint[ 20 ] { ... } struct