Anuj Verma pushed to branch master at FreeType / FreeType Demo Programs
Commits:
-
134db7bb
by Anuj Verma at 2022-03-24T09:53:53+05:30
1 changed file:
Changes:
... | ... | @@ -523,24 +523,24 @@ |
523 | 523 | |
524 | 524 | /* Finally loop over all pixels inside the draw region */
|
525 | 525 | /* and copy pixels from the sample region to the draw region. */
|
526 | - for ( FT_UInt j = (FT_UInt)( draw_region.yMax - 1 ),
|
|
527 | - y = (FT_UInt)sample_region.yMin;
|
|
526 | + for ( FT_Int j = (FT_UInt)( draw_region.yMax - 1 ),
|
|
527 | + y = (FT_UInt)sample_region.yMin;
|
|
528 | 528 | j >= draw_region.yMin;
|
529 | 529 | j--, y++ )
|
530 | 530 | {
|
531 | - for ( FT_UInt i = (FT_UInt)draw_region.xMin,
|
|
532 | - x = (FT_UInt)sample_region.xMin;
|
|
531 | + for ( FT_Int i = (FT_UInt)draw_region.xMin,
|
|
532 | + x = (FT_UInt)sample_region.xMin;
|
|
533 | 533 | i < draw_region.xMax;
|
534 | 534 | i++, x++ )
|
535 | 535 | {
|
536 | - FT_UInt display_index = j * (FT_UInt)display->bitmap->width + i;
|
|
537 | - float min_dist;
|
|
536 | + FT_Int display_index = j * (FT_UInt)display->bitmap->width + i;
|
|
537 | + float min_dist;
|
|
538 | 538 | |
539 | 539 | |
540 | 540 | if ( status.nearest_filtering )
|
541 | 541 | {
|
542 | - FT_UInt bitmap_index = ( y / status.scale ) * bitmap->width +
|
|
543 | - x / status.scale;
|
|
542 | + FT_Int bitmap_index = ( y / status.scale ) * bitmap->width +
|
|
543 | + x / status.scale;
|
|
544 | 544 | FT_Byte pixel_value = buffer[bitmap_index];
|
545 | 545 | |
546 | 546 |