diff options
author | Ole Loots <ole@monochrom.net> | 2012-03-14 22:06:07 +0000 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2012-03-14 22:06:07 +0000 |
commit | b9092d6271469e8491ac6bd71991de61353afc4e (patch) | |
tree | db535e55906f5569acdc3d9be86b79188f1076c9 /atari/plot/font_freetype.c | |
parent | c0b0dbd373b3aaf6fa48594f05c5752be9519fbb (diff) | |
download | netsurf-b9092d6271469e8491ac6bd71991de61353afc4e.tar.gz netsurf-b9092d6271469e8491ac6bd71991de61353afc4e.tar.bz2 |
Restructured the plotter driver struct and declared misc functions static within the vdi driver.
svn path=/trunk/netsurf/; revision=13519
Diffstat (limited to 'atari/plot/font_freetype.c')
-rwxr-xr-x | atari/plot/font_freetype.c | 30 |
1 files changed, 18 insertions, 12 deletions
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;
|