diff options
-rw-r--r-- | amiga/font.c | 2 | ||||
-rwxr-xr-x | amiga/plotters.c | 23 |
2 files changed, 16 insertions, 9 deletions
diff --git a/amiga/font.c b/amiga/font.c index 8be407612..19d6dd1f0 100644 --- a/amiga/font.c +++ b/amiga/font.c @@ -712,8 +712,6 @@ ULONG ami_unicode_text(struct RastPort *rp,const char *string,ULONG length,const outf16 = utf16; if(!(ofont = ami_open_outline_font(fstyle, 0))) return 0; - if(rp) SetRPAttrs(rp,RPTAG_APenColor,p96EncodeColor(RGBFB_A8B8G8R8,fstyle->foreground),TAG_DONE); - while(*utf16 != 0) { if (*utf16 < 0xD800 || 0xDFFF < *utf16) diff --git a/amiga/plotters.c b/amiga/plotters.c index 6881de939..7a8e6ccff 100755 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -19,24 +19,29 @@ #include "amiga/plotters.h" #include "amiga/bitmap.h" #include "amiga/font.h" +#include "amiga/gui.h" +#include "amiga/utf8.h" + +#include "desktop/options.h" +#include "utils/utils.h" +#include "utils/log.h" + #include <proto/Picasso96API.h> +#include <proto/exec.h> +#include <proto/intuition.h> + #include <intuition/intuition.h> #include <graphics/rpattr.h> #include <graphics/gfxmacros.h> #include <graphics/gfxbase.h> -#include "amiga/utf8.h" -#include "desktop/options.h" + #ifdef __amigaos4__ #include <graphics/blitattr.h> #include <graphics/composite.h> #endif -#include "utils/log.h" + #include <math.h> #include <assert.h> -#include <proto/exec.h> -#include <proto/intuition.h> -#include "amiga/gui.h" -#include "utils/utils.h" static void ami_bitmap_tile_hook(struct Hook *hook,struct RastPort *rp,struct BackFillMessage *bfmsg); @@ -231,6 +236,8 @@ void ami_plot_setapen(ULONG colour) (colour & 0x00ff0000) << 8, NULL); + if(pen == -1) LOG(("WARNING: Cannot allocate pen for ABGR:%lx", colour)); + SetAPen(glob->rp, pen); } } @@ -499,7 +506,9 @@ bool ami_text(int x, int y, const char *text, size_t length, LOG(("[ami_plotter] Entered ami_text()")); #endif + ami_plot_setapen(fstyle->foreground); ami_unicode_text(glob->rp,text,length,fstyle,x,y); + return true; } |