Преглед изворни кода

* 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
     begin
     xx := r - x;
     xx := r - x;
     for t := yi to ym do
     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;
 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.blue:=Min(NewCol.blue+round(Col.blue*f),$ffff);
           NewCol.alpha:=Min(NewCol.alpha+round(Col.alpha*f),$ffff);
           NewCol.alpha:=Min(NewCol.alpha+round(Col.alpha*f),$ffff);
         end;
         end;
-        Canvas.Colors[x+dx,y+dy]:=NewCol;
+        Canvas.Colors[x+dx,y+dy]:=AlphaBlend(Canvas.Colors[x+dx,y+dy], NewCol);
       end;
       end;
     end;
     end;
   finally
   finally