From b9092d6271469e8491ac6bd71991de61353afc4e Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Wed, 14 Mar 2012 22:06:07 +0000 Subject: Restructured the plotter driver struct and declared misc functions static within the vdi driver. svn path=/trunk/netsurf/; revision=13519 --- atari/plot/font_freetype.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'atari/plot/font_freetype.c') diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c index 9eba3b48b..e62263ec7 100755 --- a/atari/plot/font_freetype.c +++ b/atari/plot/font_freetype.c @@ -377,17 +377,20 @@ static void draw_glyph8(FONT_PLOTTER self, GRECT * loc, uint8_t * pixdata, int p uint32_t fontpix; size_t bmpstride; int xloop,yloop,xoff,yoff; - int x,y,w,h; + int x,y,w,h; + struct rect clipping; x = loc->g_x; y = loc->g_y; w = loc->g_w; - h = loc->g_h; + h = loc->g_h; + + self->plotter->get_clip( self->plotter, &clipping ); - clip.g_x = self->plotter->clipping.x0; - clip.g_y = self->plotter->clipping.y0; - clip.g_w = (self->plotter->clipping.x1 - self->plotter->clipping.x0)+1; - clip.g_h = (self->plotter->clipping.y1 - self->plotter->clipping.y0)+1; + clip.g_x = clipping.x0; + clip.g_y = clipping.y0; + clip.g_w = (clipping.x1 - clipping.x0)+1; + clip.g_h = (clipping.y1 - clipping.y0)+1; if( !rc_intersect( &clip, loc ) ){ return; @@ -425,17 +428,20 @@ static void draw_glyph1(FONT_PLOTTER self, GRECT * loc, uint8_t * pixdata, int p int xloop,yloop,xoff,yoff; int x,y,w,h; uint8_t bitm; - const uint8_t *fntd; + const uint8_t *fntd; + struct rect clipping; x = loc->g_x; y = loc->g_y; w = loc->g_w; - h = loc->g_h; + h = loc->g_h; + + self->plotter->get_clip( self->plotter, &clipping ); - clip.g_x = self->plotter->clipping.x0; - clip.g_y = self->plotter->clipping.y0; - clip.g_w = (self->plotter->clipping.x1 - self->plotter->clipping.x0)+1; - clip.g_h = (self->plotter->clipping.y1 - self->plotter->clipping.y0)+1; + clip.g_x = clipping.x0; + clip.g_y = clipping.y0; + clip.g_w = (clipping.x1 - clipping.x0)+1; + clip.g_h = (clipping.y1 - clipping.y0)+1; if( !rc_intersect( &clip, loc ) ){ return; -- cgit v1.2.3