20#include FT_INTERNAL_DEBUG_H
24#include FT_INTERNAL_OBJECTS_H
64 FT_Int source_pitch_sign, target_pitch_sign;
68 return FT_THROW( Invalid_Library_Handle );
76 source_pitch_sign =
source->pitch < 0 ? -1 : 1;
77 target_pitch_sign =
target->pitch < 0 ? -1 : 1;
82 if ( source_pitch_sign != target_pitch_sign )
101 if ( target_pitch < 0 )
102 target_pitch = -target_pitch;
105 if ( target_size !=
size )
120 if ( source_pitch_sign == target_pitch_sign )
157 unsigned int new_pitch;
167 switch (
bitmap->pixel_mode )
171 new_pitch = (
width + xpixels + 7 ) >> 3;
175 new_pitch = (
width + xpixels + 3 ) >> 2;
179 new_pitch = (
width + xpixels + 1 ) >> 1;
185 new_pitch =
width + xpixels;
188 return FT_THROW( Invalid_Glyph_Format );
192 if ( ypixels == 0 && new_pitch <= pitch )
199 if ( bit_last < bit_width )
240 unsigned int delta = new_pitch - pitch;
244 out += new_pitch * ypixels;
264 unsigned int delta = new_pitch - pitch;
309 return FT_THROW( Invalid_Library_Handle );
312 return FT_THROW( Invalid_Argument );
316 return FT_THROW( Invalid_Argument );
321 if ( xstr == 0 && ystr == 0 )
323 else if ( xstr < 0 || ystr < 0 )
324 return FT_THROW( Invalid_Argument );
326 switch (
bitmap->pixel_mode )
371 p =
bitmap->buffer + pitch * ystr;
387 for (
x = pitch - 1;
x >= 0;
x-- )
393 for (
i = 1;
i <= xstr;
i++ )
401 p[
x] |=
p[
x - 1] << ( 8 -
i );
420 if (
p[
x] ==
bitmap->num_grays - 1 )
435 for (
x = 1;
x <= ystr;
x++ )
441 for (
i = 0;
i < pitch;
i++ )
480 l = ( 4732UL * bgra[0] * bgra[0] +
481 46871UL * bgra[1] * bgra[1] +
482 13933UL * bgra[2] * bgra[2] ) >> 16;
517 return FT_THROW( Invalid_Library_Handle );
520 return FT_THROW( Invalid_Argument );
524 switch (
source->pixel_mode )
534 FT_Int pad, old_target_pitch, target_pitch;
538 old_target_pitch =
target->pitch;
539 if ( old_target_pitch < 0 )
540 old_target_pitch = -old_target_pitch;
553 pad = alignment - pad;
558 if ( target_pitch > 0 &&
560 return FT_THROW( Invalid_Argument );
566 target->pitch =
target->pitch < 0 ? -target_pitch : target_pitch;
583 switch (
source->pixel_mode )
600 for (
j =
source->width >> 3;
j > 0;
j-- )
605 tt[0] = (
FT_Byte)( (
val & 0x80 ) ? 0xff : 0);
606 tt[1] = (
FT_Byte)( (
val & 0x40 ) ? 0xff : 0);
607 tt[2] = (
FT_Byte)( (
val & 0x20 ) ? 0xff : 0);
608 tt[3] = (
FT_Byte)( (
val & 0x10 ) ? 0xff : 0);
609 tt[4] = (
FT_Byte)( (
val & 0x08 ) ? 0xff : 0);
610 tt[5] = (
FT_Byte)( (
val & 0x04 ) ? 0xff : 0);
611 tt[6] = (
FT_Byte)( (
val & 0x02 ) ? 0xff : 0);
612 tt[7] = (
FT_Byte)( (
val & 0x01 ) ? 0xff : 0);
638 tt[0] = (
FT_Byte)( (
val & 0x80 ) ? 0xff : 0);
690 for (
j =
source->width >> 2;
j > 0;
j-- )
740 for (
j =
source->width >> 1;
j > 0;
j-- )
753 tt[0] = (
FT_Byte)( (
ss[0] & 0xF0 ) >> 4 );
803 if (
slot &&
slot->format == FT_GLYPH_FORMAT_BITMAP &&
833 return FT_THROW( Invalid_Library_Handle );
836 return FT_THROW( Invalid_Argument );
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
FT_GlyphSlot_Own_Bitmap(FT_GlyphSlot slot)
FT_Bitmap_Convert(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment)
FT_Bitmap_New(FT_Bitmap *abitmap)
FT_Bitmap_Done(FT_Library library, FT_Bitmap *bitmap)
static const FT_Bitmap null_bitmap
FT_Bitmap_Embolden(FT_Library library, FT_Bitmap *bitmap, FT_Pos xStrength, FT_Pos yStrength)
FT_Bitmap_Copy(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target)
FT_Bitmap_Init(FT_Bitmap *abitmap)
static FT_Error ft_bitmap_assure_buffer(FT_Memory memory, FT_Bitmap *bitmap, FT_UInt xpixels, FT_UInt ypixels)
static FT_Byte ft_gray_for_premultiplied_srgb_bgra(const FT_Byte *bgra)
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_QALLOC_MULT(ptr, count, item_size)
#define FT_QREALLOC(ptr, cursz, newsz)
#define FT_ARRAY_COPY(dest, source, count)
#define FT_QALLOC(ptr, size)
#define FT_MEM_COPY(dest, source, count)
#define FT_MEM_ZERO(dest, count)
#define FT_GLYPH_OWN_BITMAP
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static char memory[1024 *256]