[smooth] Improve code readability.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
This commit is contained in:
parent
74916997de
commit
465ab99585
@ -1,3 +1,9 @@
|
||||
2014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
[smooth] Improve code readability.
|
||||
|
||||
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Rearrange code.
|
||||
|
||||
2014-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
Unify hypotenuse approximations.
|
||||
|
@ -182,14 +182,6 @@
|
||||
height_org = height;
|
||||
#endif
|
||||
|
||||
/* release old bitmap buffer */
|
||||
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
|
||||
{
|
||||
FT_FREE( bitmap->buffer );
|
||||
slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
|
||||
}
|
||||
|
||||
/* allocate new one */
|
||||
pitch = width;
|
||||
if ( hmul )
|
||||
{
|
||||
@ -250,10 +242,14 @@
|
||||
bitmap->rows = height;
|
||||
bitmap->pitch = pitch;
|
||||
|
||||
/* translate outline to render it into the bitmap */
|
||||
FT_Outline_Translate( outline, -x_shift, -y_shift );
|
||||
have_outline_shifted = TRUE;
|
||||
/* release old bitmap buffer */
|
||||
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
|
||||
{
|
||||
FT_FREE( bitmap->buffer );
|
||||
slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
|
||||
}
|
||||
|
||||
/* allocate new one */
|
||||
if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) )
|
||||
goto Exit;
|
||||
else
|
||||
@ -261,6 +257,10 @@
|
||||
|
||||
slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
|
||||
|
||||
/* translate outline to render it into the bitmap */
|
||||
FT_Outline_Translate( outline, -x_shift, -y_shift );
|
||||
have_outline_shifted = TRUE;
|
||||
|
||||
/* set up parameters */
|
||||
params.target = bitmap;
|
||||
params.source = outline;
|
||||
|
Loading…
Reference in New Issue
Block a user