ReactOS 0.4.16-dev-732-g2d1144a
ftbitmap.h File Reference
#include <ft2build.h>
Include dependency graph for ftbitmap.h:

Go to the source code of this file.

Functions

FT_BEGIN_HEADER FT_Bitmap_Init (FT_Bitmap *abitmap)
 
 FT_Bitmap_New (FT_Bitmap *abitmap)
 
 FT_Bitmap_Copy (FT_Library library, const FT_Bitmap *source, FT_Bitmap *target)
 
 FT_Bitmap_Embolden (FT_Library library, FT_Bitmap *bitmap, FT_Pos xStrength, FT_Pos yStrength)
 
 FT_Bitmap_Convert (FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment)
 
 FT_GlyphSlot_Own_Bitmap (FT_GlyphSlot slot)
 
 FT_Bitmap_Done (FT_Library library, FT_Bitmap *bitmap)
 

Function Documentation

◆ FT_Bitmap_Convert()

FT_Bitmap_Convert ( FT_Library  library,
const FT_Bitmap source,
FT_Bitmap target,
FT_Int  alignment 
)

Definition at line 512 of file ftbitmap.c.

517 {
520
521 FT_Byte* s;
522 FT_Byte* t;
523
524
525 if ( !library )
526 return FT_THROW( Invalid_Library_Handle );
527
528 if ( !source || !target )
529 return FT_THROW( Invalid_Argument );
530
532
533 switch ( source->pixel_mode )
534 {
542 {
543 FT_Int pad, old_target_pitch, target_pitch;
545
546
547 old_target_pitch = target->pitch;
548 if ( old_target_pitch < 0 )
549 old_target_pitch = -old_target_pitch;
550
551 old_size = target->rows * (FT_UInt)old_target_pitch;
552
553 target->pixel_mode = FT_PIXEL_MODE_GRAY;
554 target->rows = source->rows;
555 target->width = source->width;
556
557 pad = 0;
558 if ( alignment > 0 )
559 {
560 pad = (FT_Int)source->width % alignment;
561 if ( pad != 0 )
562 pad = alignment - pad;
563 }
564
565 target_pitch = (FT_Int)source->width + pad;
566
567 if ( target_pitch > 0 &&
568 (FT_ULong)target->rows > FT_ULONG_MAX / (FT_ULong)target_pitch )
569 return FT_THROW( Invalid_Argument );
570
571 if ( FT_QREALLOC( target->buffer,
572 old_size, target->rows * (FT_UInt)target_pitch ) )
573 return error;
574
575 target->pitch = target->pitch < 0 ? -target_pitch : target_pitch;
576 }
577 break;
578
579 default:
580 error = FT_THROW( Invalid_Argument );
581 }
582
583 s = source->buffer;
584 t = target->buffer;
585
586 /* take care of bitmap flow */
587 if ( source->pitch < 0 )
588 s -= source->pitch * (FT_Int)( source->rows - 1 );
589 if ( target->pitch < 0 )
590 t -= target->pitch * (FT_Int)( target->rows - 1 );
591
592 switch ( source->pixel_mode )
593 {
595 {
596 FT_UInt i;
597
598
599 target->num_grays = 2;
600
601 for ( i = source->rows; i > 0; i-- )
602 {
603 FT_Byte* ss = s;
604 FT_Byte* tt = t;
605 FT_UInt j;
606
607
608 /* get the full bytes */
609 for ( j = source->width >> 3; j > 0; j-- )
610 {
611 FT_Int val = ss[0]; /* avoid a byte->int cast on each line */
612
613#ifdef __REACTOS__
614 if (hack)
615 {
616 tt[0] = (FT_Byte)( ( val & 0x80 ) ? 0xff : 0);
617 tt[1] = (FT_Byte)( ( val & 0x40 ) ? 0xff : 0);
618 tt[2] = (FT_Byte)( ( val & 0x20 ) ? 0xff : 0);
619 tt[3] = (FT_Byte)( ( val & 0x10 ) ? 0xff : 0);
620 tt[4] = (FT_Byte)( ( val & 0x08 ) ? 0xff : 0);
621 tt[5] = (FT_Byte)( ( val & 0x04 ) ? 0xff : 0);
622 tt[6] = (FT_Byte)( ( val & 0x02 ) ? 0xff : 0);
623 tt[7] = (FT_Byte)( ( val & 0x01 ) ? 0xff : 0);
624 }
625 else
626 {
627#endif
628 tt[0] = (FT_Byte)( ( val & 0x80 ) >> 7 );
629 tt[1] = (FT_Byte)( ( val & 0x40 ) >> 6 );
630 tt[2] = (FT_Byte)( ( val & 0x20 ) >> 5 );
631 tt[3] = (FT_Byte)( ( val & 0x10 ) >> 4 );
632 tt[4] = (FT_Byte)( ( val & 0x08 ) >> 3 );
633 tt[5] = (FT_Byte)( ( val & 0x04 ) >> 2 );
634 tt[6] = (FT_Byte)( ( val & 0x02 ) >> 1 );
635 tt[7] = (FT_Byte)( val & 0x01 );
636#ifdef __REACTOS__
637 }
638#endif
639
640 tt += 8;
641 ss += 1;
642 }
643
644 /* get remaining pixels (if any) */
645 j = source->width & 7;
646 if ( j > 0 )
647 {
648 FT_Int val = *ss;
649
650
651 for ( ; j > 0; j-- )
652 {
653#ifdef __REACTOS__
654 if (hack)
655 tt[0] = (FT_Byte)( ( val & 0x80 ) ? 0xff : 0);
656 else
657#endif
658 tt[0] = (FT_Byte)( ( val & 0x80 ) >> 7);
659 val <<= 1;
660 tt += 1;
661 }
662 }
663
664 s += source->pitch;
665 t += target->pitch;
666 }
667 }
668 break;
669
670
674 {
675 FT_UInt width = source->width;
676 FT_UInt i;
677
678
679 target->num_grays = 256;
680
681 for ( i = source->rows; i > 0; i-- )
682 {
683 FT_ARRAY_COPY( t, s, width );
684
685 s += source->pitch;
686 t += target->pitch;
687 }
688 }
689 break;
690
691
693 {
694 FT_UInt i;
695
696
697 target->num_grays = 4;
698
699 for ( i = source->rows; i > 0; i-- )
700 {
701 FT_Byte* ss = s;
702 FT_Byte* tt = t;
703 FT_UInt j;
704
705
706 /* get the full bytes */
707 for ( j = source->width >> 2; j > 0; j-- )
708 {
709 FT_Int val = ss[0];
710
711
712 tt[0] = (FT_Byte)( ( val & 0xC0 ) >> 6 );
713 tt[1] = (FT_Byte)( ( val & 0x30 ) >> 4 );
714 tt[2] = (FT_Byte)( ( val & 0x0C ) >> 2 );
715 tt[3] = (FT_Byte)( ( val & 0x03 ) );
716
717 ss += 1;
718 tt += 4;
719 }
720
721 j = source->width & 3;
722 if ( j > 0 )
723 {
724 FT_Int val = ss[0];
725
726
727 for ( ; j > 0; j-- )
728 {
729 tt[0] = (FT_Byte)( ( val & 0xC0 ) >> 6 );
730 val <<= 2;
731 tt += 1;
732 }
733 }
734
735 s += source->pitch;
736 t += target->pitch;
737 }
738 }
739 break;
740
741
743 {
744 FT_UInt i;
745
746
747 target->num_grays = 16;
748
749 for ( i = source->rows; i > 0; i-- )
750 {
751 FT_Byte* ss = s;
752 FT_Byte* tt = t;
753 FT_UInt j;
754
755
756 /* get the full bytes */
757 for ( j = source->width >> 1; j > 0; j-- )
758 {
759 FT_Int val = ss[0];
760
761
762 tt[0] = (FT_Byte)( ( val & 0xF0 ) >> 4 );
763 tt[1] = (FT_Byte)( ( val & 0x0F ) );
764
765 ss += 1;
766 tt += 2;
767 }
768
769 if ( source->width & 1 )
770 tt[0] = (FT_Byte)( ( ss[0] & 0xF0 ) >> 4 );
771
772 s += source->pitch;
773 t += target->pitch;
774 }
775 }
776 break;
777
778
780 {
781 FT_UInt i;
782
783
784 target->num_grays = 256;
785
786 for ( i = source->rows; i > 0; i-- )
787 {
788 FT_Byte* ss = s;
789 FT_Byte* tt = t;
790 FT_UInt j;
791
792
793 for ( j = source->width; j > 0; j-- )
794 {
796
797 ss += 4;
798 tt += 1;
799 }
800
801 s += source->pitch;
802 t += target->pitch;
803 }
804 }
805 break;
806
807 default:
808 ;
809 }
810
811 return error;
812 }
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
Definition: align.cpp:48
FT_Library library
Definition: cffdrivr.c:654
size_t const old_size
Definition: expand.cpp:65
return FT_Err_Ok
Definition: ftbbox.c:511
static FT_Byte ft_gray_for_premultiplied_srgb_bgra(const FT_Byte *bgra)
Definition: ftbitmap.c:456
#define FT_THROW(e)
Definition: ftdebug.h:213
@ FT_PIXEL_MODE_GRAY2
Definition: ftimage.h:185
@ FT_PIXEL_MODE_LCD_V
Definition: ftimage.h:188
@ FT_PIXEL_MODE_MONO
Definition: ftimage.h:183
@ FT_PIXEL_MODE_GRAY
Definition: ftimage.h:184
@ FT_PIXEL_MODE_LCD
Definition: ftimage.h:187
@ FT_PIXEL_MODE_BGRA
Definition: ftimage.h:189
@ FT_PIXEL_MODE_GRAY4
Definition: ftimage.h:186
#define FT_QREALLOC(ptr, cursz, newsz)
Definition: ftmemory.h:319
#define FT_ARRAY_COPY(dest, source, count)
Definition: ftmemory.h:244
#define FT_ULONG_MAX
Definition: ftstdlib.h:68
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
unsigned long FT_ULong
Definition: fttypes.h:253
unsigned char FT_Byte
Definition: fttypes.h:154
int FT_Error
Definition: fttypes.h:300
unsigned int FT_UInt
Definition: fttypes.h:231
signed int FT_Int
Definition: fttypes.h:220
GLdouble s
Definition: gl.h:2039
GLdouble GLdouble t
Definition: gl.h:2047
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint GLfloat * val
Definition: glext.h:7180
GLenum target
Definition: glext.h:7315
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
Definition: glfuncs.h:248
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
Definition: glfuncs.h:250
#define ss
Definition: i386-dis.c:441
if(dx< 0)
Definition: linetemp.h:194
#define error(str)
Definition: mkdosfs.c:1605
static char memory[1024 *256]
Definition: process.c:116
FT_Memory memory
Definition: ftobjs.h:918

Referenced by FT_Bitmap_Embolden(), and FT_Render_Glyph_Internal().

◆ FT_Bitmap_Copy()

FT_Bitmap_Copy ( FT_Library  library,
const FT_Bitmap source,
FT_Bitmap target 
)

Definition at line 54 of file ftbitmap.c.

57 {
60
61 FT_Int pitch;
63
64 FT_Int source_pitch_sign, target_pitch_sign;
65
66
67 if ( !library )
68 return FT_THROW( Invalid_Library_Handle );
69
70 if ( !source || !target )
71 return FT_THROW( Invalid_Argument );
72
73 if ( source == target )
74 return FT_Err_Ok;
75
76 source_pitch_sign = source->pitch < 0 ? -1 : 1;
77 target_pitch_sign = target->pitch < 0 ? -1 : 1;
78
79 if ( !source->buffer )
80 {
81 *target = *source;
82 if ( source_pitch_sign != target_pitch_sign )
83 target->pitch = -target->pitch;
84
85 return FT_Err_Ok;
86 }
87
89 pitch = source->pitch;
90
91 if ( pitch < 0 )
92 pitch = -pitch;
93 size = (FT_ULong)pitch * source->rows;
94
95 if ( target->buffer )
96 {
97 FT_Int target_pitch = target->pitch;
98 FT_ULong target_size;
99
100
101 if ( target_pitch < 0 )
102 target_pitch = -target_pitch;
103 target_size = (FT_ULong)target_pitch * target->rows;
104
105 if ( target_size != size )
106 (void)FT_QREALLOC( target->buffer, target_size, size );
107 }
108 else
109 (void)FT_QALLOC( target->buffer, size );
110
111 if ( !error )
112 {
113 unsigned char *p;
114
115
116 p = target->buffer;
117 *target = *source;
118 target->buffer = p;
119
120 if ( source_pitch_sign == target_pitch_sign )
121 FT_MEM_COPY( target->buffer, source->buffer, size );
122 else
123 {
124 /* take care of bitmap flow */
125 FT_UInt i;
126 FT_Byte* s = source->buffer;
127 FT_Byte* t = target->buffer;
128
129
130 t += (FT_ULong)pitch * ( target->rows - 1 );
131
132 for ( i = target->rows; i > 0; i-- )
133 {
134 FT_ARRAY_COPY( t, s, pitch );
135
136 s += pitch;
137 t -= pitch;
138 }
139 }
140 }
141
142 return error;
143 }
#define FT_QALLOC(ptr, size)
Definition: ftmemory.h:316
#define FT_MEM_COPY(dest, source, count)
Definition: ftmemory.h:228
GLsizeiptr size
Definition: glext.h:5919
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by ft_bitmap_glyph_copy(), ft_bitmap_glyph_init(), and FT_GlyphSlot_Own_Bitmap().

◆ FT_Bitmap_Done()

FT_Bitmap_Done ( FT_Library  library,
FT_Bitmap bitmap 
)

Definition at line 855 of file ftbitmap.c.

857 {
859
860
861 if ( !library )
862 return FT_THROW( Invalid_Library_Handle );
863
864 if ( !bitmap )
865 return FT_THROW( Invalid_Argument );
866
868
869 FT_FREE( bitmap->buffer );
871
872 return FT_Err_Ok;
873 }
static const FT_Bitmap null_bitmap
Definition: ftbitmap.c:28
#define FT_FREE(ptr)
Definition: ftmemory.h:329
Definition: uimain.c:89

Referenced by FT_Bitmap_Embolden(), ft_bitmap_glyph_done(), FT_Render_Glyph_Internal(), and IntGetBitmapGlyphWithCache().

◆ FT_Bitmap_Embolden()

FT_Bitmap_Embolden ( FT_Library  library,
FT_Bitmap bitmap,
FT_Pos  xStrength,
FT_Pos  yStrength 
)

Definition at line 296 of file ftbitmap.c.

300 {
302 unsigned char* p;
303 FT_Int i, x, pitch;
304 FT_UInt y;
305 FT_Int xstr, ystr;
306
307
308 if ( !library )
309 return FT_THROW( Invalid_Library_Handle );
310
311 if ( !bitmap || !bitmap->buffer )
312 return FT_THROW( Invalid_Argument );
313
314 if ( ( ( FT_PIX_ROUND( xStrength ) >> 6 ) > FT_INT_MAX ) ||
315 ( ( FT_PIX_ROUND( yStrength ) >> 6 ) > FT_INT_MAX ) )
316 return FT_THROW( Invalid_Argument );
317
318 xstr = (FT_Int)FT_PIX_ROUND( xStrength ) >> 6;
319 ystr = (FT_Int)FT_PIX_ROUND( yStrength ) >> 6;
320
321 if ( xstr == 0 && ystr == 0 )
322 return FT_Err_Ok;
323 else if ( xstr < 0 || ystr < 0 )
324 return FT_THROW( Invalid_Argument );
325
326 switch ( bitmap->pixel_mode )
327 {
330 {
331 FT_Bitmap tmp;
332
333
334 /* convert to 8bpp */
335 FT_Bitmap_Init( &tmp );
336 error = FT_Bitmap_Convert( library, bitmap, &tmp, 1 );
337 if ( error )
338 return error;
339
341 *bitmap = tmp;
342 }
343 break;
344
346 if ( xstr > 8 )
347 xstr = 8;
348 break;
349
351 xstr *= 3;
352 break;
353
355 ystr *= 3;
356 break;
357
359 /* We don't embolden color glyphs. */
360 return FT_Err_Ok;
361 }
362
364 (FT_UInt)xstr, (FT_UInt)ystr );
365 if ( error )
366 return error;
367
368 /* take care of bitmap flow */
369 pitch = bitmap->pitch;
370 if ( pitch > 0 )
371 p = bitmap->buffer + pitch * ystr;
372 else
373 {
374 pitch = -pitch;
375 p = bitmap->buffer + (FT_UInt)pitch * ( bitmap->rows - 1 );
376 }
377
378 /* for each row */
379 for ( y = 0; y < bitmap->rows; y++ )
380 {
381 /*
382 * Horizontally:
383 *
384 * From the last pixel on, make each pixel or'ed with the
385 * `xstr' pixels before it.
386 */
387 for ( x = pitch - 1; x >= 0; x-- )
388 {
389 unsigned char tmp;
390
391
392 tmp = p[x];
393 for ( i = 1; i <= xstr; i++ )
394 {
395 if ( bitmap->pixel_mode == FT_PIXEL_MODE_MONO )
396 {
397 p[x] |= tmp >> i;
398
399 /* the maximum value of 8 for `xstr' comes from here */
400 if ( x > 0 )
401 p[x] |= p[x - 1] << ( 8 - i );
402
403#if 0
404 if ( p[x] == 0xFF )
405 break;
406#endif
407 }
408 else
409 {
410 if ( x - i >= 0 )
411 {
412 if ( p[x] + p[x - i] > bitmap->num_grays - 1 )
413 {
414 p[x] = (unsigned char)( bitmap->num_grays - 1 );
415 break;
416 }
417 else
418 {
419 p[x] = (unsigned char)( p[x] + p[x - i] );
420 if ( p[x] == bitmap->num_grays - 1 )
421 break;
422 }
423 }
424 else
425 break;
426 }
427 }
428 }
429
430 /*
431 * Vertically:
432 *
433 * Make the above `ystr' rows or'ed with it.
434 */
435 for ( x = 1; x <= ystr; x++ )
436 {
437 unsigned char* q;
438
439
440 q = p - bitmap->pitch * x;
441 for ( i = 0; i < pitch; i++ )
442 q[i] |= p[i];
443 }
444
445 p += bitmap->pitch;
446 }
447
448 bitmap->width += (FT_UInt)xstr;
449 bitmap->rows += (FT_UInt)ystr;
450
451 return FT_Err_Ok;
452 }
unsigned char
Definition: typeof.h:29
FT_Bitmap_Convert(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment)
Definition: ftbitmap.c:512
FT_Bitmap_Done(FT_Library library, FT_Bitmap *bitmap)
Definition: ftbitmap.c:855
FT_Bitmap_Init(FT_Bitmap *abitmap)
Definition: ftbitmap.c:34
static FT_Error ft_bitmap_assure_buffer(FT_Memory memory, FT_Bitmap *bitmap, FT_UInt xpixels, FT_UInt ypixels)
Definition: ftbitmap.c:150
#define FT_PIX_ROUND(x)
Definition: ftobjs.h:93
#define FT_INT_MAX
Definition: ftstdlib.h:63
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
uint32 width
Definition: uimain.c:91

Referenced by FT_GlyphSlot_Embolden().

◆ FT_Bitmap_Init()

FT_BEGIN_HEADER FT_Bitmap_Init ( FT_Bitmap abitmap)

Definition at line 34 of file ftbitmap.c.

35 {
36 if ( abitmap )
37 *abitmap = null_bitmap;
38 }

Referenced by FT_Bitmap_Embolden(), ft_bitmap_glyph_init(), FT_GlyphSlot_Own_Bitmap(), and FT_Render_Glyph_Internal().

◆ FT_Bitmap_New()

FT_Bitmap_New ( FT_Bitmap abitmap)

Definition at line 44 of file ftbitmap.c.

45 {
46 if ( abitmap )
47 *abitmap = null_bitmap;
48 }

Referenced by IntGetBitmapGlyphWithCache().

◆ FT_GlyphSlot_Own_Bitmap()

FT_GlyphSlot_Own_Bitmap ( FT_GlyphSlot  slot)

Definition at line 830 of file ftbitmap.c.

831 {
832 if ( slot && slot->format == FT_GLYPH_FORMAT_BITMAP &&
833 !( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) )
834 {
837
838
840 error = FT_Bitmap_Copy( slot->library, &slot->bitmap, &bitmap );
841 if ( error )
842 return error;
843
844 slot->bitmap = bitmap;
845 slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
846 }
847
848 return FT_Err_Ok;
849 }
FT_Bitmap_Copy(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target)
Definition: ftbitmap.c:54
#define FT_GLYPH_OWN_BITMAP
Definition: ftobjs.h:463
Definition: vfat.h:185

Referenced by FT_GlyphSlot_Embolden().