diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-10-05 11:18:27 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-10-05 11:18:27 +0100 |
commit | a06cb9f05cc4f3ad9e92a8f4c1f4dbd3d3d8fd85 (patch) | |
tree | d0b43d3984a17b6bcf4787d41b4d7a5c23286e01 /amiga/plotters.c | |
parent | f5bdd4b10962659259423e8efa2ddf80b9805053 (diff) | |
download | netsurf-a06cb9f05cc4f3ad9e92a8f4c1f4dbd3d3d8fd85.tar.gz netsurf-a06cb9f05cc4f3ad9e92a8f4c1f4dbd3d3d8fd85.tar.bz2 |
If bitmap is opaque, ensure we override the alpha channel as it may contain nonsense.
Diffstat (limited to 'amiga/plotters.c')
-rwxr-xr-x | amiga/plotters.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c index bf1c2bf69..8c0a15f75 100755 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -344,7 +344,7 @@ bool ami_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style) glob->rp->LinePtrn = PATT_LINE; break; - case PLOT_OP_TYPE_DOT: /**< Doted plot */ + case PLOT_OP_TYPE_DOT: /**< Dotted plot */ glob->rp->LinePtrn = PATT_DOT; break; @@ -694,12 +694,15 @@ static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitma if((GfxBase->LibNode.lib_Version >= 53) && (palette_mapped == false)) { #ifdef __amigaos4__ - uint32 comptype = COMPOSITE_Src; - if(!bitmap->opaque) - comptype = COMPOSITE_Src_Over_Dest; + uint32 comptype = COMPOSITE_Src_Over_Dest; + uint32 compflags = COMPFLAG_IgnoreDestAlpha; + if(bitmap_get_opaque(bitmap)) { + compflags |= COMPFLAG_SrcAlphaOverride; + comptype = COMPOSITE_Src; + } CompositeTags(comptype,tbm,glob->rp->BitMap, - COMPTAG_Flags,COMPFLAG_IgnoreDestAlpha, + COMPTAG_Flags, compflags, COMPTAG_DestX,glob->rect.MinX, COMPTAG_DestY,glob->rect.MinY, COMPTAG_DestWidth,glob->rect.MaxX - glob->rect.MinX + 1, @@ -860,8 +863,11 @@ static void ami_bitmap_tile_hook(struct Hook *hook,struct RastPort *rp,struct Ba if((GfxBase->LibNode.lib_Version >= 53) && (palette_mapped == false)) { #ifdef __amigaos4__ - CompositeTags(COMPOSITE_Src_Over_Dest,bfbm->bm, rp->BitMap, - COMPTAG_Flags,COMPFLAG_IgnoreDestAlpha, + uint32 comptype = COMPOSITE_Src_Over_Dest; + uint32 compflags = COMPFLAG_IgnoreDestAlpha; + + CompositeTags(comptype, bfbm->bm, rp->BitMap, + COMPTAG_Flags, compflags, COMPTAG_DestX,bfmsg->Bounds.MinX, COMPTAG_DestY,bfmsg->Bounds.MinY, COMPTAG_DestWidth,bfmsg->Bounds.MaxX - bfmsg->Bounds.MinX + 1, |