1 /****************************************************************************
2 *
3 * ftoutln.c
4 *
5 * FreeType outline management (body).
6 *
7 * Copyright (C) 1996-2019 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
9 *
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
15 *
16 */
17
18
19 #include <ft2build.h>
20 #include FT_OUTLINE_H
21 #include FT_INTERNAL_OBJECTS_H
22 #include FT_INTERNAL_CALC_H
23 #include FT_INTERNAL_DEBUG_H
24 #include FT_TRIGONOMETRY_H
25
26
27 /**************************************************************************
694 FT_MulFix( vector->y, matrix->xy );
695
696 yz = FT_MulFix( vector->x, matrix->yx ) +
697 FT_MulFix( vector->y, matrix->yy );
698
699 vector->x = xz;
700 vector->y = yz;
701 }
702
703
704 /* documentation is in ftoutln.h */
705
706 FT_EXPORT_DEF( void )
707 FT_Outline_Transform( const FT_Outline* outline,
708 const FT_Matrix* matrix )
709 {
710 FT_Vector* vec;
711 FT_Vector* limit;
712
713
714 if ( !outline || !matrix )
715 return;
716
717 vec = outline->points;
718 limit = vec + outline->n_points;
719
720 for ( ; vec < limit; vec++ )
721 FT_Vector_Transform( vec, matrix );
722 }
723
724
725 #if 0
726
727 #define FT_OUTLINE_GET_CONTOUR( outline, c, first, last ) \
728 do \
729 { \
730 (first) = ( c > 0 ) ? (outline)->points + \
731 (outline)->contours[c - 1] + 1 \
732 : (outline)->points; \
733 (last) = (outline)->points + (outline)->contours[c]; \
734 } while ( 0 )
|
1 /****************************************************************************
2 *
3 * ftoutln.c
4 *
5 * FreeType outline management (body).
6 *
7 * Copyright (C) 1996-2020 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
9 *
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
15 *
16 */
17
18
19 #include <ft2build.h>
20 #include FT_OUTLINE_H
21 #include FT_INTERNAL_OBJECTS_H
22 #include FT_INTERNAL_CALC_H
23 #include FT_INTERNAL_DEBUG_H
24 #include FT_TRIGONOMETRY_H
25
26
27 /**************************************************************************
694 FT_MulFix( vector->y, matrix->xy );
695
696 yz = FT_MulFix( vector->x, matrix->yx ) +
697 FT_MulFix( vector->y, matrix->yy );
698
699 vector->x = xz;
700 vector->y = yz;
701 }
702
703
704 /* documentation is in ftoutln.h */
705
706 FT_EXPORT_DEF( void )
707 FT_Outline_Transform( const FT_Outline* outline,
708 const FT_Matrix* matrix )
709 {
710 FT_Vector* vec;
711 FT_Vector* limit;
712
713
714 if ( !outline || !matrix || !outline->points )
715 return;
716
717 vec = outline->points;
718 limit = vec + outline->n_points;
719
720 for ( ; vec < limit; vec++ )
721 FT_Vector_Transform( vec, matrix );
722 }
723
724
725 #if 0
726
727 #define FT_OUTLINE_GET_CONTOUR( outline, c, first, last ) \
728 do \
729 { \
730 (first) = ( c > 0 ) ? (outline)->points + \
731 (outline)->contours[c - 1] + 1 \
732 : (outline)->points; \
733 (last) = (outline)->points + (outline)->contours[c]; \
734 } while ( 0 )
|