Use unsigned tags `FT_Outline`.
This change comes along with 2a7bb4596f
ans is only meant to reduce
pointer casting in the code.
* include/freetype/ftimage.h (FT_Outline): Do it.
* src/*: Update `FT_Outline` users.
This commit is contained in:
parent
b1cbcb2045
commit
044d142be7
|
@ -349,7 +349,7 @@ FT_BEGIN_HEADER
|
|||
unsigned short n_points; /* number of points in the glyph */
|
||||
|
||||
FT_Vector* points; /* the outline's points */
|
||||
char* tags; /* the points flags */
|
||||
unsigned char* tags; /* the points flags */
|
||||
unsigned short* contours; /* the contour end points */
|
||||
|
||||
int flags; /* outline masks */
|
||||
|
|
|
@ -979,7 +979,7 @@
|
|||
/* compute coordinates & Bezier flags, next and prev */
|
||||
{
|
||||
FT_Vector* vec = outline->points;
|
||||
char* tag = outline->tags;
|
||||
FT_Byte* tag = outline->tags;
|
||||
FT_UShort endpoint = outline->contours[0];
|
||||
AF_Point end = points + endpoint;
|
||||
AF_Point prev = end;
|
||||
|
@ -1292,7 +1292,7 @@
|
|||
AF_Point point = hints->points;
|
||||
AF_Point limit = point + hints->num_points;
|
||||
FT_Vector* vec = outline->points;
|
||||
char* tag = outline->tags;
|
||||
FT_Byte* tag = outline->tags;
|
||||
|
||||
|
||||
for ( ; point < limit; point++, vec++, tag++ )
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
FT_Vector* point;
|
||||
FT_Vector* limit;
|
||||
char* tags;
|
||||
FT_Byte* tags;
|
||||
|
||||
FT_Error error;
|
||||
|
||||
|
@ -578,13 +578,13 @@
|
|||
|
||||
/* reverse tags table */
|
||||
{
|
||||
char* p = outline->tags + first;
|
||||
char* q = outline->tags + last;
|
||||
FT_Byte* p = outline->tags + first;
|
||||
FT_Byte* q = outline->tags + last;
|
||||
|
||||
|
||||
while ( p < q )
|
||||
{
|
||||
char swap;
|
||||
FT_Byte swap;
|
||||
|
||||
|
||||
swap = *p;
|
||||
|
|
|
@ -711,7 +711,7 @@
|
|||
{
|
||||
FT_UInt count = border->num_points;
|
||||
FT_Byte* read = border->tags;
|
||||
FT_Byte* write = (FT_Byte*)outline->tags + outline->n_points;
|
||||
FT_Byte* write = outline->tags + outline->n_points;
|
||||
|
||||
|
||||
for ( ; count > 0; count--, read++, write++ )
|
||||
|
@ -2050,7 +2050,7 @@
|
|||
|
||||
FT_Vector* point;
|
||||
FT_Vector* limit;
|
||||
char* tags;
|
||||
FT_Byte* tags;
|
||||
|
||||
FT_Error error;
|
||||
|
||||
|
|
|
@ -178,8 +178,8 @@
|
|||
error = FT_GLYPHLOADER_CHECK_POINTS( loader, 3, 0 );
|
||||
if ( !error )
|
||||
{
|
||||
FT_Vector* vec = outline->points + outline->n_points;
|
||||
FT_Byte* tag = (FT_Byte*)outline->tags + outline->n_points;
|
||||
FT_Vector* vec = outline->points + outline->n_points;
|
||||
FT_Byte* tag = outline->tags + outline->n_points;
|
||||
|
||||
|
||||
vec[0] = *control1;
|
||||
|
|
|
@ -1624,7 +1624,7 @@
|
|||
if ( builder->load_points )
|
||||
{
|
||||
FT_Vector* point = outline->points + outline->n_points;
|
||||
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
|
||||
FT_Byte* control = outline->tags + outline->n_points;
|
||||
|
||||
|
||||
point->x = FIXED_TO_INT( x );
|
||||
|
@ -1739,7 +1739,7 @@
|
|||
{
|
||||
FT_Vector* p1 = outline->points + first;
|
||||
FT_Vector* p2 = outline->points + outline->n_points - 1;
|
||||
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points - 1;
|
||||
FT_Byte* control = outline->tags + outline->n_points - 1;
|
||||
|
||||
|
||||
/* `delete' last point only if it coincides with the first */
|
||||
|
@ -1897,7 +1897,7 @@
|
|||
if ( builder->load_points )
|
||||
{
|
||||
FT_Vector* point = outline->points + outline->n_points;
|
||||
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
|
||||
FT_Byte* control = outline->tags + outline->n_points;
|
||||
|
||||
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
|
||||
PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face );
|
||||
|
@ -2016,7 +2016,7 @@
|
|||
{
|
||||
FT_Vector* p1 = outline->points + first;
|
||||
FT_Vector* p2 = outline->points + outline->n_points - 1;
|
||||
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points - 1;
|
||||
FT_Byte* control = outline->tags + outline->n_points - 1;
|
||||
|
||||
|
||||
/* `delete' last point only if it coincides with the first */
|
||||
|
@ -2184,7 +2184,7 @@
|
|||
if ( builder->load_points )
|
||||
{
|
||||
FT_Vector* point = outline->points + outline->n_points;
|
||||
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
|
||||
FT_Byte* control = outline->tags + outline->n_points;
|
||||
|
||||
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
|
||||
PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face );
|
||||
|
@ -2322,7 +2322,7 @@
|
|||
{
|
||||
FT_Vector* p1 = outline->points + first;
|
||||
FT_Vector* p2 = outline->points + outline->n_points - 1;
|
||||
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points - 1;
|
||||
FT_Byte* control = outline->tags + outline->n_points - 1;
|
||||
|
||||
|
||||
/* `delete' last point only if it coincides with the first */
|
||||
|
|
|
@ -1118,7 +1118,7 @@
|
|||
FT_UInt n;
|
||||
PSH_Point point = glyph->points;
|
||||
FT_Vector* vec = glyph->outline->points;
|
||||
char* tags = glyph->outline->tags;
|
||||
FT_Byte* tags = glyph->outline->tags;
|
||||
|
||||
|
||||
for ( n = 0; n < glyph->num_points; n++ )
|
||||
|
|
|
@ -1598,7 +1598,7 @@
|
|||
FT_Vector* points;
|
||||
FT_Vector* point;
|
||||
FT_Vector* limit;
|
||||
char* tags;
|
||||
FT_Byte* tags;
|
||||
|
||||
UInt tag; /* current point's state */
|
||||
|
||||
|
|
|
@ -431,7 +431,7 @@
|
|||
p += n_ins;
|
||||
|
||||
/* reading the point tags */
|
||||
flag = (FT_Byte*)outline->tags;
|
||||
flag = outline->tags;
|
||||
flag_limit = flag + n_points;
|
||||
|
||||
FT_ASSERT( flag );
|
||||
|
@ -464,7 +464,7 @@
|
|||
|
||||
vec = outline->points;
|
||||
vec_limit = vec + n_points;
|
||||
flag = (FT_Byte*)outline->tags;
|
||||
flag = outline->tags;
|
||||
x = 0;
|
||||
|
||||
for ( ; vec < vec_limit; vec++, flag++ )
|
||||
|
@ -498,7 +498,7 @@
|
|||
|
||||
vec = outline->points;
|
||||
vec_limit = vec + n_points;
|
||||
flag = (FT_Byte*)outline->tags;
|
||||
flag = outline->tags;
|
||||
y = 0;
|
||||
|
||||
for ( ; vec < vec_limit; vec++, flag++ )
|
||||
|
@ -758,8 +758,8 @@
|
|||
zone->org = load->extra_points + start_point;
|
||||
zone->cur = load->outline.points + start_point;
|
||||
zone->orus = load->extra_points2 + start_point;
|
||||
zone->tags = (FT_Byte*)load->outline.tags + start_point;
|
||||
zone->contours = (FT_UShort*)load->outline.contours + start_contour;
|
||||
zone->tags = load->outline.tags + start_point;
|
||||
zone->contours = load->outline.contours + start_contour;
|
||||
zone->first_point = (FT_UShort)start_point;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue