Commit 3f3293da authored by Alexei Podtelezhnikov's avatar Alexei Podtelezhnikov

[graph] Decouple the legacy and alpha blenders.

* graph/grblit.c (grBlitGlyphToBitmap): Do not call
`grBlitGlyphToSurface'.
* src/*: s/grBlitGlyphToBitmap/grBlitGlyphToSurface/.
parent 12d9a546
2021-01-26 Alexei Podtelezhnikov <apodtele@gmail.com>
[graph] Decouple the legacy and alpha blenders.
* graph/grblit.c (grBlitGlyphToBitmap): Do not call
`grBlitGlyphToSurface'.
* src/*: s/grBlitGlyphToBitmap/grBlitGlyphToSurface/.
2021-01-26 Alexei Podtelezhnikov <apodtele@gmail.com>
* graph/grfont.c (gr_charcell): Minor.
......
......@@ -10,7 +10,6 @@
/****************************************************************************/
#include "grblit.h"
#include "gblblit.h"
#define GRAY8
......@@ -1800,15 +1799,6 @@
return 0;
}
/* short cut to alpha blender for certain glyph types */
switch ( grBlitGlyphToSurface( (grSurface*)target, glyph, x, y, color ) )
{
case 1:
return 1;
case 0:
return 0;
}
/* set up blitter and compute clipping. Return immediately if needed */
blit.source = *glyph;
blit.target = *target;
......
......@@ -1693,8 +1693,8 @@
return error;
/* now render the bitmap into the display surface */
grBlitGlyphToBitmap( display->bitmap, &bit3, *pen_x + left,
*pen_y - top, display->fore_color );
grBlitGlyphToSurface( display->surface, &bit3, *pen_x + left,
*pen_y - top, display->fore_color );
if ( glyf )
FT_Done_Glyph( glyf );
......@@ -1728,8 +1728,8 @@
}
/* now render the bitmap into the display surface */
grBlitGlyphToBitmap( display->bitmap, &bit3, *pen_x + left,
*pen_y - top, color );
grBlitGlyphToSurface( display->surface, &bit3, *pen_x + left,
*pen_y - top, color );
if ( glyf )
FT_Done_Glyph( glyf );
......@@ -2060,8 +2060,8 @@
top = display->bitmap->rows - top;
/* now render the bitmap into the display surface */
grBlitGlyphToBitmap( display->bitmap, &bit3, left, top,
display->fore_color );
grBlitGlyphToSurface( display->surface, &bit3, left, top,
display->fore_color );
if ( glyf )
FT_Done_Glyph( glyf );
......
......@@ -1090,8 +1090,8 @@
else if ( mode == DISPLAY_MODE_LCD )
glyph.mode = gr_pixel_mode_lcd;
grBlitGlyphToBitmap( display->bitmap, &glyph,
x, y, display->fore_color );
grBlitGlyphToSurface( display->surface, &glyph,
x, y, display->fore_color );
}
......
......@@ -579,9 +579,9 @@
{
bitmap_scale( st, &bitg, scale );
grBlitGlyphToBitmap( display->bitmap, &bitg,
ox + left * scale, oy - top * scale,
st->axis_color );
grBlitGlyphToSurface( display->surface, &bitg,
ox + left * scale, oy - top * scale,
st->axis_color );
free( bitg.buffer );
......
......@@ -345,8 +345,8 @@
x_top = x_offset + glyph->bitmap_left;
y_top = y_offset - glyph->bitmap_top;
grBlitGlyphToBitmap( bit, &bit3,
x_top, y_top, fore_color );
grBlitGlyphToSurface( surface, &bit3,
x_top, y_top, fore_color );
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment