From c01c90424939a4b60edce9900cbfed09a9bfacdf Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 14 Apr 2005 16:03:15 +0000 Subject: [PATCH] * include/freetype/freetype.h (FT_Vector_Transform), include/freetype/ftimage.h (FT_Raster_Params), include/freetype/ftoutln.h, src/base/ftoutln.c (FT_Outline_Get_CBox, FT_Outline_Copy, FT_Outline_Transform, FT_Vector_Transform, FT_Outline_Get_Bitmap), src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c (gray_raster_render): Decorate parameters with `const' where appropriate. * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Fix arguments to call of tt_sbit_decoder_load_bitmap. --- ChangeLog | 13 +++++++++++++ include/freetype/freetype.h | 4 ++-- include/freetype/ftimage.h | 4 ++-- include/freetype/ftoutln.h | 20 ++++++++++---------- src/base/ftoutln.c | 24 ++++++++++++------------ src/raster/ftraster.c | 4 ++-- src/sfnt/ttsbit0.c | 2 +- src/smooth/ftgrays.c | 6 +++--- 8 files changed, 45 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd824c32b..66f0d1502 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-04-14 Kirill Smelkov + + * include/freetype/freetype.h (FT_Vector_Transform), + include/freetype/ftimage.h (FT_Raster_Params), + include/freetype/ftoutln.h, src/base/ftoutln.c (FT_Outline_Get_CBox, + FT_Outline_Copy, FT_Outline_Transform, FT_Vector_Transform, + FT_Outline_Get_Bitmap), src/raster/ftraster.c (ft_black_render), + src/smooth/ftgrays.c (gray_raster_render): Decorate parameters with + `const' where appropriate. + 2005-04-14 Werner Lemberg * src/type1/t1load.c (parse_charstrings): Catch this non-standard @@ -7,6 +17,9 @@ Private begin CharStrings begin + * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Fix arguments + to call of tt_sbit_decoder_load_bitmap. + 2005-04-13 Werner Lemberg * docs/TODO: Updated. diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index e26b3cbad..064703e67 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -3074,8 +3074,8 @@ FT_BEGIN_HEADER /* The result is undefined if either `vector' or `matrix' is invalid. */ /* */ FT_EXPORT( void ) - FT_Vector_Transform( FT_Vector* vec, - FT_Matrix* matrix ); + FT_Vector_Transform( FT_Vector* vec, + const FT_Matrix* matrix ); /* */ diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index ca0ed2156..bff1e7ce0 100644 --- a/include/freetype/ftimage.h +++ b/include/freetype/ftimage.h @@ -5,7 +5,7 @@ /* FreeType glyph image formats and default raster interface */ /* (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1030,7 +1030,7 @@ FT_BEGIN_HEADER /* */ typedef struct FT_Raster_Params_ { - FT_Bitmap* target; + const FT_Bitmap* target; void* source; int flags; FT_SpanFunc gray_spans; diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h index 79ed35b59..e7decd801 100644 --- a/include/freetype/ftoutln.h +++ b/include/freetype/ftoutln.h @@ -5,7 +5,7 @@ /* Support for the FT_Outline type used to store glyph shapes of */ /* most scalable font formats (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003 by */ +/* Copyright 1996-2001, 2002, 2003, 2005 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -229,8 +229,8 @@ FT_BEGIN_HEADER /* acbox :: The outline's control box. */ /* */ FT_EXPORT( void ) - FT_Outline_Get_CBox( FT_Outline* outline, - FT_BBox *acbox ); + FT_Outline_Get_CBox( const FT_Outline* outline, + FT_BBox *acbox ); /*************************************************************************/ @@ -275,8 +275,8 @@ FT_BEGIN_HEADER /* FreeType error code. 0 means success. */ /* */ FT_EXPORT( FT_Error ) - FT_Outline_Copy( FT_Outline* source, - FT_Outline *target ); + FT_Outline_Copy( const FT_Outline* source, + FT_Outline *target ); /*************************************************************************/ @@ -299,8 +299,8 @@ FT_BEGIN_HEADER /* outline's points. */ /* */ FT_EXPORT( void ) - FT_Outline_Transform( FT_Outline* outline, - FT_Matrix* matrix ); + FT_Outline_Transform( FT_Outline* outline, + const FT_Matrix* matrix ); /*************************************************************************/ @@ -353,9 +353,9 @@ FT_BEGIN_HEADER /* It will use the raster correponding to the default glyph format. */ /* */ FT_EXPORT( FT_Error ) - FT_Outline_Get_Bitmap( FT_Library library, - FT_Outline* outline, - FT_Bitmap *abitmap ); + FT_Outline_Get_Bitmap( FT_Library library, + FT_Outline* outline, + const FT_Bitmap *abitmap ); /*************************************************************************/ diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c index 8c6fdfd58..59d50403b 100644 --- a/src/base/ftoutln.c +++ b/src/base/ftoutln.c @@ -4,7 +4,7 @@ /* */ /* FreeType outline management (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -347,8 +347,8 @@ /* documentation is in ftoutln.h */ FT_EXPORT_DEF( FT_Error ) - FT_Outline_Copy( FT_Outline* source, - FT_Outline *target ) + FT_Outline_Copy( const FT_Outline* source, + FT_Outline *target ) { FT_Int is_owner; @@ -414,8 +414,8 @@ /* documentation is in ftoutln.h */ FT_EXPORT_DEF( void ) - FT_Outline_Get_CBox( FT_Outline* outline, - FT_BBox *acbox ) + FT_Outline_Get_CBox( const FT_Outline* outline, + FT_BBox *acbox ) { FT_Pos xMin, yMin, xMax, yMax; @@ -591,9 +591,9 @@ /* documentation is in ftoutln.h */ FT_EXPORT_DEF( FT_Error ) - FT_Outline_Get_Bitmap( FT_Library library, - FT_Outline* outline, - FT_Bitmap *abitmap ) + FT_Outline_Get_Bitmap( FT_Library library, + FT_Outline* outline, + const FT_Bitmap *abitmap ) { FT_Raster_Params params; @@ -618,8 +618,8 @@ /* documentation is in ftoutln.h */ FT_EXPORT_DEF( void ) - FT_Vector_Transform( FT_Vector* vector, - FT_Matrix* matrix ) + FT_Vector_Transform( FT_Vector* vector, + const FT_Matrix* matrix ) { FT_Pos xz, yz; @@ -641,8 +641,8 @@ /* documentation is in ftoutln.h */ FT_EXPORT_DEF( void ) - FT_Outline_Transform( FT_Outline* outline, - FT_Matrix* matrix ) + FT_Outline_Transform( FT_Outline* outline, + const FT_Matrix* matrix ) { FT_Vector* vec = outline->points; FT_Vector* limit = vec + outline->n_points; diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 76aaa2e06..b23ad27ab 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -3257,8 +3257,8 @@ ft_black_render( TRaster_Instance* raster, FT_Raster_Params* params ) { - FT_Outline* outline = (FT_Outline*)params->source; - FT_Bitmap* target_map = params->target; + FT_Outline* outline = (FT_Outline*)params->source; + const FT_Bitmap* target_map = params->target; if ( !raster || !raster->buff || !raster->sizeBuff ) diff --git a/src/sfnt/ttsbit0.c b/src/sfnt/ttsbit0.c index 599945983..31c77856f 100644 --- a/src/sfnt/ttsbit0.c +++ b/src/sfnt/ttsbit0.c @@ -927,7 +927,7 @@ return tt_sbit_decoder_load_bitmap( decoder, image_format, - image_offset + image_start, + image_start, image_end, x_pos, y_pos ); diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index 499cc8cb5..f30c48848 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -4,7 +4,7 @@ /* */ /* A new `perfect' anti-aliasing renderer (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003 by */ +/* Copyright 2000-2001, 2002, 2003, 2005 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1963,8 +1963,8 @@ gray_raster_render( PRaster raster, FT_Raster_Params* params ) { - FT_Outline* outline = (FT_Outline*)params->source; - FT_Bitmap* target_map = params->target; + FT_Outline* outline = (FT_Outline*)params->source; + const FT_Bitmap* target_map = params->target; if ( !raster || !raster->cells || !raster->max_cells )