summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-01-03 23:29:25 +0000
committerOle Loots <ole@monochrom.net>2012-01-03 23:29:25 +0000
commit68466df8a27383717d2e29ae12a6c8e0e08a4922 (patch)
tree744bc1bafb6e521cba9ae54161138048961da1b2
parent5cdfd5a08689b92986ade030d7bea21de19ff1c8 (diff)
downloadnetsurf-68466df8a27383717d2e29ae12a6c8e0e08a4922.tar.gz
netsurf-68466df8a27383717d2e29ae12a6c8e0e08a4922.tar.bz2
Fix clipping and only apply color conversion for hicolor systems.
svn path=/trunk/netsurf/; revision=13372
-rwxr-xr-xatari/plot/font_freetype.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c
index c328a47fa..3bf8e3428 100755
--- a/atari/plot/font_freetype.c
+++ b/atari/plot/font_freetype.c
@@ -386,8 +386,8 @@ static void draw_glyph8(FONT_PLOTTER self, GRECT * loc, uint8_t * pixdata, int p
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;
- clip.g_h = self->plotter->clipping.y1 - 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;
if( !rc_intersect( &clip, loc ) ){
return;
@@ -434,8 +434,8 @@ static void draw_glyph1(FONT_PLOTTER self, GRECT * loc, uint8_t * pixdata, int p
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;
- clip.g_h = self->plotter->clipping.y1 - 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;
if( !rc_intersect( &clip, loc ) ){
return;
@@ -503,7 +503,8 @@ static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t leng
uint32_t c = fstyle->foreground ;
/* in -> BGR */
/* out -> ARGB */
- c = ABGR_TO_RGB(c);
+ if( app.nplanes > 8 )
+ c = ABGR_TO_RGB(c);
while (nxtchr < length) {
ucs4 = utf8_to_ucs4(text + nxtchr, length - nxtchr);
@@ -526,7 +527,7 @@ static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t leng
&loc,
bglyph->bitmap.buffer,
bglyph->bitmap.pitch,
- fstyle->foreground
+ c
);
}
}