Stop OS4.1 losing alpha channels when scaling images

svn path=/trunk/netsurf/; revision=6720
This commit is contained in:
Chris Young 2009-03-05 19:07:26 +00:00
parent a763e36d2e
commit 2aee9f4c09
1 changed files with 4 additions and 1 deletions

View File

@ -298,7 +298,10 @@ struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int height,s
if(GfxBase->lib_Version >= 53) // AutoDoc says v52, but this function isn't in OS4.0, so checking for v53 (OS4.1)
{
CompositeTags(COMPOSITE_Src,tbm,scaledbm,
uint32 comptype = COMPOSITE_Src;
if(!bitmap->opaque) comptype = COMPOSITE_Src_Over_Dest;
CompositeTags(comptype,tbm,scaledbm,
COMPTAG_ScaleX,COMP_FLOAT_TO_FIX(width/bitmap->width),
COMPTAG_ScaleY,COMP_FLOAT_TO_FIX(height/bitmap->height),
COMPTAG_Flags,COMPFLAG_IgnoreDestAlpha,