Browse Source

* Patch from Ondrej Pokorny to enable Alpha blending in (stretch)Draw (bug ID 34266)

git-svn-id: trunk@39748 -
michael 6 years ago
parent
commit
e1b5f21b01
2 changed files with 2 additions and 2 deletions
  1. 1 1
      packages/fcl-image/src/fpcanvas.inc
  2. 1 1
      packages/fcl-image/src/fpinterpolation.inc

+ 1 - 1
packages/fcl-image/src/fpcanvas.inc

@@ -784,7 +784,7 @@ begin
     begin
     xx := r - x;
     for t := yi to ym do
-      colors [r,t] := image.colors[xx,t-y];
+      colors [r,t] := AlphaBlend(colors [r,t], image.colors[xx,t-y]);
     end;
 end;
 

+ 1 - 1
packages/fcl-image/src/fpinterpolation.inc

@@ -223,7 +223,7 @@ begin
           NewCol.blue:=Min(NewCol.blue+round(Col.blue*f),$ffff);
           NewCol.alpha:=Min(NewCol.alpha+round(Col.alpha*f),$ffff);
         end;
-        Canvas.Colors[x+dx,y+dy]:=NewCol;
+        Canvas.Colors[x+dx,y+dy]:=AlphaBlend(Canvas.Colors[x+dx,y+dy], NewCol);
       end;
     end;
   finally