瀏覽代碼

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

git-svn-id: trunk@39748 -
michael 6 年之前
父節點
當前提交
e1b5f21b01
共有 2 個文件被更改,包括 2 次插入2 次删除
  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