... |
... |
@@ -620,22 +620,23 @@ |
620
|
620
|
{
|
621
|
621
|
if ( !ras.fProfile )
|
622
|
622
|
{
|
|
623
|
+ ras.fProfile = (PProfile)ras.top;
|
623
|
624
|
ras.cProfile = (PProfile)ras.top;
|
624
|
|
- ras.fProfile = ras.cProfile;
|
625
|
625
|
ras.top += AlignProfileSize;
|
626
|
|
- }
|
627
|
626
|
|
628
|
|
- if ( ras.top >= ras.maxBuff )
|
629
|
|
- {
|
630
|
|
- ras.error = FT_THROW( Raster_Overflow );
|
631
|
|
- return FAILURE;
|
|
627
|
+ if ( ras.top >= ras.maxBuff )
|
|
628
|
+ {
|
|
629
|
+ FT_TRACE1(( "overflow in New_Profile\n" ));
|
|
630
|
+ ras.error = FT_THROW( Raster_Overflow );
|
|
631
|
+ return FAILURE;
|
|
632
|
+ }
|
632
|
633
|
}
|
633
|
634
|
|
634
|
635
|
ras.cProfile->start = 0;
|
635
|
636
|
ras.cProfile->height = 0;
|
636
|
637
|
ras.cProfile->offset = ras.top;
|
637
|
|
- ras.cProfile->link = (PProfile)0;
|
638
|
|
- ras.cProfile->next = (PProfile)0;
|
|
638
|
+ ras.cProfile->link = NULL;
|
|
639
|
+ ras.cProfile->next = NULL;
|
639
|
640
|
ras.cProfile->flags = ras.dropOutControl;
|
640
|
641
|
|
641
|
642
|
switch ( aState )
|
... |
... |
@@ -704,9 +705,6 @@ |
704
|
705
|
|
705
|
706
|
if ( h > 0 )
|
706
|
707
|
{
|
707
|
|
- PProfile oldProfile;
|
708
|
|
-
|
709
|
|
-
|
710
|
708
|
FT_TRACE7(( " ending profile %p, start = %ld, height = %ld\n",
|
711
|
709
|
(void *)ras.cProfile, ras.cProfile->start, h ));
|
712
|
710
|
|
... |
... |
@@ -719,25 +717,24 @@ |
719
|
717
|
ras.cProfile->flags |= Overshoot_Bottom;
|
720
|
718
|
}
|
721
|
719
|
|
722
|
|
- oldProfile = ras.cProfile;
|
723
|
|
- ras.cProfile = (PProfile)ras.top;
|
|
720
|
+ ras.cProfile->next = (PProfile)ras.top;
|
|
721
|
+ ras.cProfile = (PProfile)ras.top;
|
724
|
722
|
|
725
|
723
|
ras.top += AlignProfileSize;
|
726
|
724
|
|
727
|
|
- ras.cProfile->height = 0;
|
|
725
|
+ if ( ras.top >= ras.maxBuff )
|
|
726
|
+ {
|
|
727
|
+ FT_TRACE1(( "overflow in End_Profile\n" ));
|
|
728
|
+ ras.error = FT_THROW( Raster_Overflow );
|
|
729
|
+ return FAILURE;
|
|
730
|
+ }
|
|
731
|
+
|
728
|
732
|
ras.cProfile->offset = ras.top;
|
|
733
|
+ ras.cProfile->height = 0;
|
729
|
734
|
|
730
|
|
- oldProfile->next = ras.cProfile;
|
731
|
735
|
ras.num_Profs++;
|
732
|
736
|
}
|
733
|
737
|
|
734
|
|
- if ( ras.top >= ras.maxBuff )
|
735
|
|
- {
|
736
|
|
- FT_TRACE1(( "overflow in End_Profile\n" ));
|
737
|
|
- ras.error = FT_THROW( Raster_Overflow );
|
738
|
|
- return FAILURE;
|
739
|
|
- }
|
740
|
|
-
|
741
|
738
|
ras.joint = FALSE;
|
742
|
739
|
|
743
|
740
|
return SUCCESS;
|
... |
... |
@@ -1977,13 +1974,11 @@ |
1977
|
1974
|
ras.joint = FALSE;
|
1978
|
1975
|
ras.fresh = FALSE;
|
1979
|
1976
|
|
1980
|
|
- ras.maxBuff = ras.sizeBuff - AlignProfileSize;
|
|
1977
|
+ ras.top = ras.buff;
|
|
1978
|
+ ras.maxBuff = ras.sizeBuff;
|
1981
|
1979
|
|
1982
|
|
- ras.numTurns = 0;
|
1983
|
|
-
|
1984
|
|
- ras.cProfile = (PProfile)ras.top;
|
1985
|
|
- ras.cProfile->offset = ras.top;
|
1986
|
|
- ras.num_Profs = 0;
|
|
1980
|
+ ras.numTurns = 0;
|
|
1981
|
+ ras.num_Profs = 0;
|
1987
|
1982
|
|
1988
|
1983
|
last = -1;
|
1989
|
1984
|
for ( i = 0; i < ras.outline.n_contours; i++ )
|
... |
... |
@@ -3024,8 +3019,6 @@ |
3024
|
3019
|
ras.minY = (Long)y_min * ras.precision;
|
3025
|
3020
|
ras.maxY = (Long)y_max * ras.precision;
|
3026
|
3021
|
|
3027
|
|
- ras.top = ras.buff;
|
3028
|
|
-
|
3029
|
3022
|
ras.error = Raster_Err_Ok;
|
3030
|
3023
|
|
3031
|
3024
|
if ( Convert_Glyph( RAS_VARS flipped ) )
|
... |
... |
@@ -3048,8 +3041,9 @@ |
3048
|
3041
|
}
|
3049
|
3042
|
else
|
3050
|
3043
|
{
|
3051
|
|
- FT_TRACE6(( "band [%d..%d]: %td bytes remaining\n",
|
3052
|
|
- y_min, y_max, (char*)ras.maxBuff - (char*)ras.top ));
|
|
3044
|
+ FT_TRACE6(( "band [%d..%d]: %hd profiles; %td bytes remaining\n",
|
|
3045
|
+ y_min, y_max, ras.num_Profs,
|
|
3046
|
+ (char*)ras.maxBuff - (char*)ras.top ));
|
3053
|
3047
|
|
3054
|
3048
|
if ( ras.fProfile )
|
3055
|
3049
|
if ( Draw_Sweep( RAS_VAR ) )
|