src/java.desktop/share/native/libfreetype/src/raster/ftrend1.c
changeset 54876 da3834261f0c
parent 49234 3375a8039fde
equal deleted inserted replaced
54875:bcfedddcf4ce 54876:da3834261f0c
     1 /***************************************************************************/
     1 /****************************************************************************
     2 /*                                                                         */
     2  *
     3 /*  ftrend1.c                                                              */
     3  * ftrend1.c
     4 /*                                                                         */
     4  *
     5 /*    The FreeType glyph rasterizer interface (body).                      */
     5  *   The FreeType glyph rasterizer interface (body).
     6 /*                                                                         */
     6  *
     7 /*  Copyright 1996-2018 by                                                 */
     7  * Copyright (C) 1996-2019 by
     8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
     8  * David Turner, Robert Wilhelm, and Werner Lemberg.
     9 /*                                                                         */
     9  *
    10 /*  This file is part of the FreeType project, and may only be used,       */
    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      */
    11  * modified, and distributed under the terms of the FreeType project
    12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
    12  * license, LICENSE.TXT.  By continuing to use, modify, or distribute
    13 /*  this file you indicate that you have read the license and              */
    13  * this file you indicate that you have read the license and
    14 /*  understand and accept it fully.                                        */
    14  * understand and accept it fully.
    15 /*                                                                         */
    15  *
    16 /***************************************************************************/
    16  */
    17 
    17 
    18 
    18 
    19 #include <ft2build.h>
    19 #include <ft2build.h>
    20 #include FT_INTERNAL_DEBUG_H
    20 #include FT_INTERNAL_DEBUG_H
    21 #include FT_INTERNAL_OBJECTS_H
    21 #include FT_INTERNAL_OBJECTS_H
    22 #include FT_OUTLINE_H
    22 #include FT_OUTLINE_H
    23 #include "ftrend1.h"
    23 #include "ftrend1.h"
    24 #include "ftraster.h"
    24 #include "ftraster.h"
    25 #include "rastpic.h"
       
    26 
    25 
    27 #include "rasterrs.h"
    26 #include "rasterrs.h"
    28 
    27 
    29 
    28 
    30   /* initialize renderer -- init its raster */
    29   /* initialize renderer -- init its raster */
   126     {
   125     {
   127       FT_FREE( bitmap->buffer );
   126       FT_FREE( bitmap->buffer );
   128       slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
   127       slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
   129     }
   128     }
   130 
   129 
   131     ft_glyphslot_preset_bitmap( slot, mode, origin );
   130     if ( ft_glyphslot_preset_bitmap( slot, mode, origin ) )
       
   131     {
       
   132       error = FT_THROW( Raster_Overflow );
       
   133       goto Exit;
       
   134     }
   132 
   135 
   133     /* allocate new one */
   136     /* allocate new one */
   134     if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, bitmap->pitch ) )
   137     if ( FT_ALLOC_MULT( bitmap->buffer, bitmap->rows, bitmap->pitch ) )
   135       goto Exit;
   138       goto Exit;
   136 
   139 
   195     (FT_Renderer_RenderFunc)   ft_raster1_render,     /* render_glyph    */
   198     (FT_Renderer_RenderFunc)   ft_raster1_render,     /* render_glyph    */
   196     (FT_Renderer_TransformFunc)ft_raster1_transform,  /* transform_glyph */
   199     (FT_Renderer_TransformFunc)ft_raster1_transform,  /* transform_glyph */
   197     (FT_Renderer_GetCBoxFunc)  ft_raster1_get_cbox,   /* get_glyph_cbox  */
   200     (FT_Renderer_GetCBoxFunc)  ft_raster1_get_cbox,   /* get_glyph_cbox  */
   198     (FT_Renderer_SetModeFunc)  ft_raster1_set_mode,   /* set_mode        */
   201     (FT_Renderer_SetModeFunc)  ft_raster1_set_mode,   /* set_mode        */
   199 
   202 
   200     (FT_Raster_Funcs*)&FT_STANDARD_RASTER_GET         /* raster_class    */
   203     (FT_Raster_Funcs*)&ft_standard_raster             /* raster_class    */
   201   )
   204   )
   202 
   205 
   203 
   206 
   204 /* END */
   207 /* END */