#include <ft2build.h>
Go to the source code of this file.
◆ FT_Bitmap_Convert()
Definition at line 512 of file ftbitmap.c.
517 {
520
523
524
526 return FT_THROW( Invalid_Library_Handle );
527
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
552
556
557 pad = 0;
559 {
563 }
564
566
567 if ( target_pitch > 0 &&
569 return FT_THROW( Invalid_Argument );
570
574
575 target->pitch =
target->pitch < 0 ? -target_pitch : target_pitch;
576 }
577 break;
578
579 default:
581 }
582
585
586
591
592 switch (
source->pixel_mode )
593 {
595 {
597
598
600
602 {
606
607
608
609 for (
j =
source->width >> 3;
j > 0;
j-- )
610 {
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
636#ifdef __REACTOS__
637 }
638#endif
639
640 tt += 8;
642 }
643
644
647 {
649
650
652 {
653#ifdef __REACTOS__
654 if (hack)
655 tt[0] = (
FT_Byte)( (
val & 0x80 ) ? 0xff : 0);
656 else
657#endif
660 tt += 1;
661 }
662 }
663
666 }
667 }
668 break;
669
670
674 {
677
678
680
682 {
684
687 }
688 }
689 break;
690
691
693 {
695
696
698
700 {
704
705
706
707 for (
j =
source->width >> 2;
j > 0;
j-- )
708 {
710
711
716
718 tt += 4;
719 }
720
723 {
725
726
728 {
731 tt += 1;
732 }
733 }
734
737 }
738 }
739 break;
740
741
743 {
745
746
748
750 {
754
755
756
757 for (
j =
source->width >> 1;
j > 0;
j-- )
758 {
760
761
764
766 tt += 2;
767 }
768
770 tt[0] = (
FT_Byte)( (
ss[0] & 0xF0 ) >> 4 );
771
774 }
775 }
776 break;
777
778
780 {
782
783
785
787 {
791
792
794 {
796
798 tt += 1;
799 }
800
803 }
804 }
805 break;
806
807 default:
808 ;
809 }
810
812 }
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
static FT_Byte ft_gray_for_premultiplied_srgb_bgra(const FT_Byte *bgra)
#define FT_QREALLOC(ptr, cursz, newsz)
#define FT_ARRAY_COPY(dest, source, count)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLint GLint GLsizei width
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]
Referenced by FT_Bitmap_Embolden(), and FT_Render_Glyph_Internal().
◆ FT_Bitmap_Copy()
Definition at line 54 of file ftbitmap.c.
57 {
60
63
64 FT_Int source_pitch_sign, target_pitch_sign;
65
66
68 return FT_THROW( Invalid_Library_Handle );
69
72
75
76 source_pitch_sign =
source->pitch < 0 ? -1 : 1;
77 target_pitch_sign =
target->pitch < 0 ? -1 : 1;
78
80 {
82 if ( source_pitch_sign != target_pitch_sign )
84
86 }
87
90
91 if ( pitch < 0 )
92 pitch = -pitch;
94
96 {
99
100
101 if ( target_pitch < 0 )
102 target_pitch = -target_pitch;
104
105 if ( target_size !=
size )
107 }
108 else
110
112 {
114
115
119
120 if ( source_pitch_sign == target_pitch_sign )
122 else
123 {
124
128
129
131
133 {
135
138 }
139 }
140 }
141
143 }
#define FT_QALLOC(ptr, size)
#define FT_MEM_COPY(dest, source, count)
Referenced by ft_bitmap_glyph_copy(), ft_bitmap_glyph_init(), and FT_GlyphSlot_Own_Bitmap().
◆ FT_Bitmap_Done()
◆ FT_Bitmap_Embolden()
Definition at line 296 of file ftbitmap.c.
300 {
306
307
309 return FT_THROW( Invalid_Library_Handle );
310
312 return FT_THROW( Invalid_Argument );
313
316 return FT_THROW( Invalid_Argument );
317
320
321 if ( xstr == 0 && ystr == 0 )
323 else if ( xstr < 0 || ystr < 0 )
324 return FT_THROW( Invalid_Argument );
325
326 switch (
bitmap->pixel_mode )
327 {
330 {
332
333
334
339
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
361 }
362
367
368
370 if ( pitch > 0 )
371 p =
bitmap->buffer + pitch * ystr;
372 else
373 {
374 pitch = -pitch;
376 }
377
378
380 {
381
382
383
384
385
386
387 for (
x = pitch - 1;
x >= 0;
x-- )
388 {
389 unsigned char tmp;
390
391
393 for (
i = 1;
i <= xstr;
i++ )
394 {
396 {
398
399
401 p[
x] |=
p[
x - 1] << ( 8 -
i );
402
403#if 0
405 break;
406#endif
407 }
408 else
409 {
411 {
413 {
415 break;
416 }
417 else
418 {
420 if (
p[
x] ==
bitmap->num_grays - 1 )
421 break;
422 }
423 }
424 else
425 break;
426 }
427 }
428 }
429
430
431
432
433
434
435 for (
x = 1;
x <= ystr;
x++ )
436 {
438
439
441 for (
i = 0;
i < pitch;
i++ )
443 }
444
446 }
447
450
452 }
FT_Bitmap_Convert(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment)
FT_Bitmap_Done(FT_Library library, FT_Bitmap *bitmap)
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)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble GLdouble q
Referenced by FT_GlyphSlot_Embolden().
◆ FT_Bitmap_Init()
◆ FT_Bitmap_New()
◆ FT_GlyphSlot_Own_Bitmap()
Definition at line 830 of file ftbitmap.c.
831 {
832 if (
slot &&
slot->format == FT_GLYPH_FORMAT_BITMAP &&
834 {
837
838
843
846 }
847
849 }
FT_Bitmap_Copy(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target)
#define FT_GLYPH_OWN_BITMAP
Referenced by FT_GlyphSlot_Embolden().