33#define FT_COMPONENT outline
48#define SCALED( x ) ( (x) * ( 1L << shift ) - delta )
71 if ( !func_interface )
74 shift = func_interface->shift;
75 delta = func_interface->delta;
83 FT_TRACE5((
"FT_Outline_Decompose: Outline %d\n",
n ));
106 goto Invalid_Outline;
123 v_start.
x = ( v_start.
x + v_last.
x ) / 2;
124 v_start.
y = ( v_start.
y + v_last.
y ) / 2;
133 v_start.
x / 64.0, v_start.
y / 64.0 ));
134 error = func_interface->move_to( &v_start,
user );
183 " with control (%.2f, %.2f)\n",
185 v_control.
x / 64.0, v_control.
y / 64.0 ));
186 error = func_interface->conic_to( &v_control, &
vec,
user );
193 goto Invalid_Outline;
195 v_middle.
x = ( v_control.
x +
vec.
x ) / 2;
196 v_middle.
y = ( v_control.
y +
vec.
y ) / 2;
199 " with control (%.2f, %.2f)\n",
200 v_middle.
x / 64.0, v_middle.
y / 64.0,
201 v_control.
x / 64.0, v_control.
y / 64.0 ));
202 error = func_interface->conic_to( &v_control, &v_middle,
user );
211 " with control (%.2f, %.2f)\n",
212 v_start.
x / 64.0, v_start.
y / 64.0,
213 v_control.
x / 64.0, v_control.
y / 64.0 ));
214 error = func_interface->conic_to( &v_control, &v_start,
user );
224 goto Invalid_Outline;
244 " with controls (%.2f, %.2f) and (%.2f, %.2f)\n",
246 vec1.
x / 64.0, vec1.
y / 64.0,
247 vec2.
x / 64.0, vec2.
y / 64.0 ));
248 error = func_interface->cubic_to( &vec1, &vec2, &
vec,
user );
255 " with controls (%.2f, %.2f) and (%.2f, %.2f)\n",
256 v_start.
x / 64.0, v_start.
y / 64.0,
257 vec1.
x / 64.0, vec1.
y / 64.0,
258 vec2.
x / 64.0, vec2.
y / 64.0 ));
259 error = func_interface->cubic_to( &vec1, &vec2, &v_start,
user );
267 v_start.
x / 64.0, v_start.
y / 64.0 ));
268 error = func_interface->line_to( &v_start,
user );
277 FT_TRACE5((
"FT_Outline_Decompose: Done\n" ));
303 return FT_THROW( Invalid_Library_Handle );
307 if ( !anoutline || !
memory )
308 return FT_THROW( Invalid_Argument );
312 if ( numContours < 0 ||
313 (
FT_UInt)numContours > numPoints )
314 return FT_THROW( Invalid_Argument );
324 anoutline->n_points = (
FT_Short)numPoints;
325 anoutline->n_contours = (
FT_Short)numContours;
352 if ( n_points == 0 && n_contours == 0 )
356 if ( n_points <= 0 || n_contours <= 0 )
360 for (
n = 0;
n < n_contours;
n++ )
365 if ( end <= end0 || end >= n_points )
371 if (
end != n_points - 1 )
379 return FT_THROW( Invalid_Argument );
397 return FT_THROW( Invalid_Argument );
415 target->flags &= ~FT_OUTLINE_OWNER;
416 target->flags |= is_owner;
432 return FT_THROW( Invalid_Library_Handle );
440 return FT_THROW( Invalid_Argument );
460 FT_Pos xMin, yMin, xMax, yMax;
478 xMin = xMax =
vec->
x;
479 yMin = yMax =
vec->
y;
488 if (
x < xMin ) xMin =
x;
489 if (
x > xMax ) xMax =
x;
492 if (
y < yMin ) yMin =
y;
493 if (
y > yMax ) yMax =
y;
604 return FT_THROW( Invalid_Library_Handle );
610 return FT_THROW( Invalid_Argument );
613 if ( cbox.
xMin < -0x1000000L || cbox.
yMin < -0x1000000L ||
614 cbox.
xMax > 0x1000000L || cbox.
yMax > 0x1000000L )
628 params->clip_box.xMax = ( cbox.
xMax + 63 ) >> 6;
629 params->clip_box.yMax = ( cbox.
yMax + 63 ) >> 6;
664 return FT_THROW( Invalid_Argument );
726#define FT_OUTLINE_GET_CONTOUR( outline, c, first, last ) \
729 (first) = ( c > 0 ) ? (outline)->points + \
730 (outline)->contours[c - 1] + 1 \
731 : (outline)->points; \
732 (last) = (outline)->points + (outline)->contours[c]; \
766 if ( intersect >= 0 )
768 if ( intersect == 0 &&
a->y ==
point->
y )
778 x =
a->x + (
b->x -
a->x ) * (
point->
y -
a->y ) / (
b->y -
a->y );
847 if ( ft_contour_enclosed(
outline,
i ) )
869 prev = ( xmin_point ==
first ) ?
last : xmin_point - 1;
872 if (
FT_Atan2( prev->
x - xmin_point->
x, prev->
y - xmin_point->
y ) >
880 else if ( orient != o )
918 if ( xstrength == 0 && ystrength == 0 )
925 return FT_THROW( Invalid_Argument );
944 in.x =
in.y = anchor.
x = anchor.
y = 0;
1041 FT_BBox cbox = { 0, 0, 0, 0 };
1064 if ( cbox.
xMin < -0x1000000L || cbox.
yMin < -0x1000000L ||
1065 cbox.
xMax > 0x1000000L || cbox.
yMax > 0x1000000L )
1070 xshift =
FT_MAX( xshift, 0 );
1073 yshift =
FT_MAX( yshift, 0 );
1093 v_cur.
x + v_prev.
x ) );
1103 else if (
area < 0 )
void user(int argc, const char *argv[])
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
FT_MulFix(FT_Long a, FT_Long b)
FT_Vector_NormLen(FT_Vector *vector)
#define FT_TRACE5(varformat)
#define FT_CURVE_TAG_CUBIC
#define FT_RASTER_FLAG_AA
#define FT_CURVE_TAG_CONIC
#define FT_RASTER_FLAG_CLIP
#define FT_RASTER_FLAG_DIRECT
#define FT_CURVE_TAG(flag)
#define FT_OUTLINE_POINTS_MAX
#define FT_OUTLINE_REVERSE_FILL
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_NEW_ARRAY(ptr, count)
#define FT_ARRAY_COPY(dest, source, count)
FT_Lookup_Renderer(FT_Library library, FT_Glyph_Format format, FT_ListNode *node)
static const FT_Outline null_outline
FT_Outline_Check(FT_Outline *outline)
FT_Outline_EmboldenXY(FT_Outline *outline, FT_Pos xstrength, FT_Pos ystrength)
FT_Outline_Reverse(FT_Outline *outline)
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
FT_Outline_Get_Bitmap(FT_Library library, FT_Outline *outline, const FT_Bitmap *abitmap)
FT_Outline_Get_Orientation(FT_Outline *outline)
FT_Outline_New(FT_Library library, FT_UInt numPoints, FT_Int numContours, FT_Outline *anoutline)
FT_Outline_Decompose(FT_Outline *outline, const FT_Outline_Funcs *func_interface, void *user)
FT_Vector_Transform(FT_Vector *vector, const FT_Matrix *matrix)
FT_Outline_Embolden(FT_Outline *outline, FT_Pos strength)
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
FT_Outline_Done(FT_Library library, FT_Outline *outline)
FT_Outline_Render(FT_Library library, FT_Outline *outline, FT_Raster_Params *params)
FT_Outline_Copy(const FT_Outline *source, FT_Outline *target)
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
@ FT_ORIENTATION_POSTSCRIPT
@ FT_ORIENTATION_TRUETYPE
enum FT_Orientation_ FT_Orientation
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_Atan2(FT_Fixed x, FT_Fixed y)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLboolean GLboolean GLboolean GLboolean a
GLsizei const GLfloat * points
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static char memory[1024 *256]
static Real area(Real A[2], Real B[2], Real C[2])
static unsigned __int64 next
FT_Raster_Render_Func raster_render
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out