zenilib: zenilib/jni/external/freetype2/src/pshinter/pshalgo.h File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Typedefs | Enumerations | Functions
pshalgo.h File Reference
`#include "pshrec.h"`
`#include "pshglob.h"`
`#include <FT_TRIGONOMETRY_H>`

Go to the source code of this file.

## Classes

struct | PSH_ContourRec_
struct | PSH_GlyphRec_
struct | PSH_Hint_TableRec_
struct | PSH_HintRec_
struct | PSH_PointRec_
struct | PSH_ZoneRec_

## Macros

#define | PSH_DIR_COMPARE(d1, d2) ( (d1) == (d2) || (d1) == -(d2) )
#define | PSH_DIR_HORIZONTAL 2
#define | PSH_DIR_IS_HORIZONTAL(d) PSH_DIR_COMPARE( d, PSH_DIR_HORIZONTAL )
#define | PSH_DIR_IS_VERTICAL(d) PSH_DIR_COMPARE( d, PSH_DIR_VERTICAL )
#define | PSH_DIR_VERTICAL 1
#define | psh_hint_activate(x) (x)->flags |= PSH_HINT_ACTIVE
#define | psh_hint_deactivate(x) (x)->flags &= ~PSH_HINT_ACTIVE
#define | psh_hint_is_active(x) ( ( (x)->flags & PSH_HINT_ACTIVE ) != 0 )
#define | psh_hint_is_fitted(x) ( ( (x)->flags & PSH_HINT_FITTED ) != 0 )
#define | psh_hint_is_ghost(x) ( ( (x)->flags & PSH_HINT_GHOST ) != 0 )
#define | psh_hint_set_fitted(x) (x)->flags |= PSH_HINT_FITTED
#define | PSH_POINT_ANGLE(a, b)
#define | PSH_POINT_EQUAL_ORG(a, b)
#define | psh_point_is_edge_max(p) ( (p)->flags2 & PSH_POINT_EDGE_MAX )
#define | psh_point_is_edge_min(p) ( (p)->flags2 & PSH_POINT_EDGE_MIN )
#define | psh_point_is_extremum(p) ( (p)->flags2 & PSH_POINT_EXTREMUM )
#define | psh_point_is_fitted(p) ( (p)->flags2 & PSH_POINT_FITTED )
#define | psh_point_is_inflex(p) ( (p)->flags & PSH_POINT_INFLEX )
#define | psh_point_is_negative(p) ( (p)->flags2 & PSH_POINT_NEGATIVE )
#define | psh_point_is_off(p) ( (p)->flags & PSH_POINT_OFF )
#define | psh_point_is_positive(p) ( (p)->flags2 & PSH_POINT_POSITIVE )
#define | psh_point_is_smooth(p) ( (p)->flags & PSH_POINT_SMOOTH )
#define | psh_point_is_strong(p) ( (p)->flags2 & PSH_POINT_STRONG )
#define | psh_point_set_edge_max(p) (p)->flags2 |= PSH_POINT_EDGE_MAX
#define | psh_point_set_edge_min(p) (p)->flags2 |= PSH_POINT_EDGE_MIN
#define | psh_point_set_extremum(p) (p)->flags2 |= PSH_POINT_EXTREMUM
#define | psh_point_set_fitted(p) (p)->flags2 |= PSH_POINT_FITTED
#define | psh_point_set_inflex(p) (p)->flags |= PSH_POINT_INFLEX
#define | psh_point_set_negative(p) (p)->flags2 |= PSH_POINT_NEGATIVE
#define | psh_point_set_off(p) (p)->flags |= PSH_POINT_OFF
#define | psh_point_set_positive(p) (p)->flags2 |= PSH_POINT_POSITIVE
#define | psh_point_set_smooth(p) (p)->flags |= PSH_POINT_SMOOTH
#define | psh_point_set_strong(p) (p)->flags2 |= PSH_POINT_STRONG

## Typedefs

typedef struct PSH_ContourRec_ * | PSH_Contour
typedef struct PSH_ContourRec_ | PSH_ContourRec
typedef struct PSH_GlyphRec_ * | PSH_Glyph
typedef struct PSH_GlyphRec_ | PSH_GlyphRec
typedef typedefFT_BEGIN_HEADER struct PSH_HintRec_ * | PSH_Hint
typedef enum PSH_Hint_Flags_ | PSH_Hint_Flags
typedef struct PSH_Hint_TableRec_ * | PSH_Hint_Table
typedef struct PSH_Hint_TableRec_ | PSH_Hint_TableRec
typedef struct PSH_HintRec_ | PSH_HintRec
typedef struct PSH_PointRec_ * | PSH_Point
typedef struct PSH_PointRec_ | PSH_PointRec
typedef struct PSH_ZoneRec_ * | PSH_Zone
typedef struct PSH_ZoneRec_ | PSH_ZoneRec

## Enumerations

enum | { PSH_DIR_NONE = 4, PSH_DIR_UP = -1, PSH_DIR_DOWN = 1, PSH_DIR_LEFT = -2, PSH_DIR_RIGHT = 2 }
enum | { PSH_POINT_OFF = 1, PSH_POINT_SMOOTH = 2, PSH_POINT_INFLEX = 4 }
enum | { PSH_POINT_STRONG = 16, PSH_POINT_FITTED = 32, PSH_POINT_EXTREMUM = 64, PSH_POINT_POSITIVE = 128, PSH_POINT_NEGATIVE = 256, PSH_POINT_EDGE_MIN = 512, PSH_POINT_EDGE_MAX = 1024 }
enum | PSH_Hint_Flags_ { PSH_HINT_GHOST = PS_HINT_FLAG_GHOST, PSH_HINT_BOTTOM = PS_HINT_FLAG_BOTTOM, PSH_HINT_ACTIVE = 4, PSH_HINT_FITTED = 8 }

## Functions

FT_Error | ps_hints_apply (PS_Hints ps_hints, FT_Outline *outline, PSH_Globals globals, FT_Render_Mode hint_mode)

## Macro Definition Documentation

#define PSH_DIR_COMPARE | ( |  | d1,
|  |  | d2
| ) |  | ( (d1) == (d2) || (d1) == -(d2) )

Definition at line 111 of file pshalgo.h.

Referenced by psh_glyph_find_blue_points(), and psh_hint_table_find_strong_points().

#define PSH_DIR_HORIZONTAL 2

Definition at line 108 of file pshalgo.h.

Referenced by psh_glyph_find_blue_points(), psh_glyph_find_strong_points(), and psh_hint_table_find_strong_points().

#define PSH_DIR_IS_HORIZONTAL | ( |  | d | ) | PSH_DIR_COMPARE( d, PSH_DIR_HORIZONTAL )

Definition at line 112 of file pshalgo.h.

#define PSH_DIR_IS_VERTICAL | ( |  | d | ) | PSH_DIR_COMPARE( d, PSH_DIR_VERTICAL )

Definition at line 113 of file pshalgo.h.

#define PSH_DIR_VERTICAL 1

Definition at line 109 of file pshalgo.h.

Referenced by psh_glyph_find_strong_points().

#define psh_hint_activate | ( |  | x | ) | (x)->flags |= PSH_HINT_ACTIVE

Definition at line 49 of file pshalgo.h.

Referenced by psh_hint_table_activate_mask(), and psh_hint_table_record().

#define psh_hint_deactivate | ( |  | x | ) | (x)->flags &= ~PSH_HINT_ACTIVE

Definition at line 50 of file pshalgo.h.

Referenced by psh_hint_table_deactivate().

#define psh_hint_is_active | ( |  | x | ) | ( ( (x)->flags & PSH_HINT_ACTIVE ) != 0 )

Definition at line 45 of file pshalgo.h.

Referenced by psh_hint_table_activate_mask(), and psh_hint_table_record().

#define psh_hint_is_fitted | ( |  | x | ) | ( ( (x)->flags & PSH_HINT_FITTED ) != 0 )

Definition at line 47 of file pshalgo.h.

Referenced by psh_hint_align().

#define psh_hint_is_ghost | ( |  | x | ) | ( ( (x)->flags & PSH_HINT_GHOST ) != 0 )

Definition at line 46 of file pshalgo.h.

#define psh_hint_set_fitted | ( |  | x | ) | (x)->flags |= PSH_HINT_FITTED

Definition at line 51 of file pshalgo.h.

Referenced by psh_hint_align().

#define PSH_POINT_ANGLE | ( |  | a,
|  |  | b
| ) |  |

Value:
FT_Atan2( (b)->org_u - (a)->org_u, \
(b)->org_v - (a)->org_v )
a
GLboolean GLboolean GLboolean GLboolean a
Definition: glew.h:8736
FT_Atan2
FT_Atan2(FT_Fixed x, FT_Fixed y)
Definition: fttrigon.c:374
b
GLdouble GLdouble GLdouble b
Definition: glew.h:8383

Definition at line 192 of file pshalgo.h.

#define PSH_POINT_EQUAL_ORG | ( |  | a,
|  |  | b
| ) |  |

Value:
( (a)->org_u == (b)->org_u && \
(a)->org_v == (b)->org_v )
a
GLboolean GLboolean GLboolean GLboolean a
Definition: glew.h:8736
b
GLdouble GLdouble GLdouble b
Definition: glew.h:8383

Definition at line 189 of file pshalgo.h.

#define psh_point_is_edge_max | ( |  | p | ) | ( (p)->flags2 & PSH_POINT_EDGE_MAX )

Definition at line 151 of file pshalgo.h.

Referenced by psh_glyph_interpolate_strong_points().

#define psh_point_is_edge_min | ( |  | p | ) | ( (p)->flags2 & PSH_POINT_EDGE_MIN )

Definition at line 150 of file pshalgo.h.

Referenced by psh_glyph_interpolate_strong_points().

#define psh_point_is_extremum | ( |  | p | ) | ( (p)->flags2 & PSH_POINT_EXTREMUM )

Definition at line 147 of file pshalgo.h.

Referenced by psh_glyph_compute_extrema(), psh_glyph_interpolate_normal_points(), and psh_hint_table_find_strong_points().

#define psh_point_is_fitted | ( |  | p | ) | ( (p)->flags2 & PSH_POINT_FITTED )

Definition at line 146 of file pshalgo.h.

Referenced by psh_glyph_interpolate_other_points().

#define psh_point_is_inflex | ( |  | p | ) | ( (p)->flags & PSH_POINT_INFLEX )

Definition at line 127 of file pshalgo.h.

Referenced by psh_glyph_interpolate_normal_points().

#define psh_point_is_negative | ( |  | p | ) | ( (p)->flags2 & PSH_POINT_NEGATIVE )

Definition at line 149 of file pshalgo.h.

#define psh_point_is_off | ( |  | p | ) | ( (p)->flags & PSH_POINT_OFF )

Definition at line 126 of file pshalgo.h.

#define psh_point_is_positive | ( |  | p | ) | ( (p)->flags2 & PSH_POINT_POSITIVE )

Definition at line 148 of file pshalgo.h.

#define psh_point_is_smooth | ( |  | p | ) | ( (p)->flags & PSH_POINT_SMOOTH )

Definition at line 125 of file pshalgo.h.

Referenced by psh_glyph_interpolate_normal_points().

#define psh_point_is_strong | ( |  | p | ) | ( (p)->flags2 & PSH_POINT_STRONG )

Definition at line 145 of file pshalgo.h.

Referenced by psh_glyph_find_blue_points(), psh_glyph_find_strong_points(), psh_glyph_interpolate_normal_points(), psh_glyph_save_points(), and psh_hint_table_find_strong_points().

#define psh_point_set_edge_max | ( |  | p | ) | (p)->flags2 |= PSH_POINT_EDGE_MAX

Definition at line 159 of file pshalgo.h.

#define psh_point_set_edge_min | ( |  | p | ) | (p)->flags2 |= PSH_POINT_EDGE_MIN

Definition at line 158 of file pshalgo.h.

#define psh_point_set_extremum | ( |  | p | ) | (p)->flags2 |= PSH_POINT_EXTREMUM

Definition at line 155 of file pshalgo.h.

Referenced by psh_glyph_compute_extrema().

#define psh_point_set_fitted | ( |  | p | ) | (p)->flags2 |= PSH_POINT_FITTED

Definition at line 154 of file pshalgo.h.

Referenced by psh_glyph_find_blue_points(), psh_glyph_interpolate_normal_points(), and psh_glyph_interpolate_strong_points().

#define psh_point_set_inflex | ( |  | p | ) | (p)->flags |= PSH_POINT_INFLEX

Definition at line 131 of file pshalgo.h.

Referenced by psh_glyph_compute_inflections().

#define psh_point_set_negative | ( |  | p | ) | (p)->flags2 |= PSH_POINT_NEGATIVE

Definition at line 157 of file pshalgo.h.

Referenced by psh_glyph_compute_extrema().

#define psh_point_set_off | ( |  | p | ) | (p)->flags |= PSH_POINT_OFF

Definition at line 130 of file pshalgo.h.

#define psh_point_set_positive | ( |  | p | ) | (p)->flags2 |= PSH_POINT_POSITIVE

Definition at line 156 of file pshalgo.h.

Referenced by psh_glyph_compute_extrema().

#define psh_point_set_smooth | ( |  | p | ) | (p)->flags |= PSH_POINT_SMOOTH

Definition at line 129 of file pshalgo.h.

#define psh_point_set_strong | ( |  | p | ) | (p)->flags2 |= PSH_POINT_STRONG

Definition at line 153 of file pshalgo.h.

Referenced by psh_glyph_find_blue_points(), psh_glyph_find_strong_points(), and psh_hint_table_find_strong_points().

## Typedef Documentation

typedef struct PSH_ContourRec_* PSH_Contour

Definition at line 97 of file pshalgo.h.

typedef struct PSH_ContourRec_ PSH_ContourRec

typedef struct PSH_GlyphRec_ * PSH_Glyph

typedef struct PSH_GlyphRec_ PSH_GlyphRec

typedef typedefFT_BEGIN_HEADER struct PSH_HintRec_* PSH_Hint

Definition at line 32 of file pshalgo.h.

typedef enum PSH_Hint_Flags_ PSH_Hint_Flags

typedef struct PSH_Hint_TableRec_ * PSH_Hint_Table

typedef struct PSH_Hint_TableRec_ PSH_Hint_TableRec

typedef struct PSH_HintRec_ PSH_HintRec

typedef struct PSH_PointRec_* PSH_Point

Definition at line 96 of file pshalgo.h.

typedef struct PSH_PointRec_ PSH_PointRec

typedef struct PSH_ZoneRec_ * PSH_Zone

typedef struct PSH_ZoneRec_ PSH_ZoneRec

## Enumeration Type Documentation

anonymous enum

Enumerator
PSH_DIR_NONE |
PSH_DIR_UP |
PSH_DIR_DOWN |
PSH_DIR_LEFT |
PSH_DIR_RIGHT |

Definition at line 99 of file pshalgo.h.

anonymous enum

Enumerator
PSH_POINT_OFF |
PSH_POINT_SMOOTH |
PSH_POINT_INFLEX |

Definition at line 118 of file pshalgo.h.

anonymous enum

Enumerator
PSH_POINT_STRONG |
PSH_POINT_FITTED |
PSH_POINT_EXTREMUM |
PSH_POINT_POSITIVE |
PSH_POINT_NEGATIVE |
PSH_POINT_EDGE_MIN |
PSH_POINT_EDGE_MAX |

Definition at line 134 of file pshalgo.h.

enum PSH_Hint_Flags_

Enumerator
PSH_HINT_GHOST |
PSH_HINT_BOTTOM |
PSH_HINT_ACTIVE |
PSH_HINT_FITTED |

Definition at line 35 of file pshalgo.h.

## Function Documentation

FT_Error ps_hints_apply | ( | PS_Hints | ps_hints,
|  | FT_Outline * | outline,
|  | PSH_Globals | globals,
|  | FT_Render_Mode | hint_mode
| ) |  |

Definition at line 2181 of file pshalgo.c.

References PSH_GlyphRec_::do_horz_hints, PSH_GlyphRec_::do_horz_snapping, PSH_GlyphRec_::do_stem_adjust, PSH_GlyphRec_::do_vert_hints, PSH_GlyphRec_::do_vert_snapping, error, FALSE, FT_Bool, FT_BOOL, FT_FREE, FT_MulDiv(), FT_MulFix(), FT_NEW, FT_PIX_ROUND, FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V, FT_RENDER_MODE_LIGHT, FT_RENDER_MODE_MONO, PSH_GlyphRec_::globals, PSH_GlyphRec_::hint_tables, FT_Outline_::n_contours, FT_Outline_::n_points, psh_globals_set_scale(), psh_glyph_compute_extrema(), psh_glyph_done(), psh_glyph_find_blue_points(), psh_glyph_find_strong_points(), psh_glyph_init(), psh_glyph_interpolate_normal_points(), psh_glyph_interpolate_other_points(), psh_glyph_interpolate_strong_points(), psh_glyph_load_points(), psh_glyph_save_points(), psh_hint_table_align_hints(), PSH_DimensionRec_::scale_mult, and TRUE.

Referenced by t1_hints_funcs_init(), and t2_hints_funcs_init().