summaryrefslogtreecommitdiff
path: root/prototypes/fpgui2
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-14 08:55:29 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-14 08:55:29 +0000
commit2c1cc98a68fe4076a81b57fc45e5e94d98a7dc92 (patch)
tree3cd96cf8dc84a1a92f5172c9ae4a58668e829724 /prototypes/fpgui2
parent09ea089c7f527d5bc99148dfa6b6641136c82d3f (diff)
downloadfpGUI-2c1cc98a68fe4076a81b57fc45e5e94d98a7dc92.tar.xz
fpgui2: Fixed the interpolation support under X11. Needs testing under Windows. Alpha support has been disabled for now.
Diffstat (limited to 'prototypes/fpgui2')
-rw-r--r--prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr2
-rw-r--r--prototypes/fpgui2/source/core/gfxbase.pas12
2 files changed, 7 insertions, 7 deletions
diff --git a/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr b/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr
index bf70ea2b..231c1067 100644
--- a/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr
+++ b/prototypes/fpgui2/examples/core/canvastest/fpgcanvas.lpr
@@ -20,7 +20,7 @@ type
TMainForm = class(TfpgForm)
private
bmp: TfpgImage;
- src, dst: TfpgImage;
+ dst: TfpgImage;
protected
procedure HandlePaint; override;
public
diff --git a/prototypes/fpgui2/source/core/gfxbase.pas b/prototypes/fpgui2/source/core/gfxbase.pas
index 97455f50..3c290dec 100644
--- a/prototypes/fpgui2/source/core/gfxbase.pas
+++ b/prototypes/fpgui2/source/core/gfxbase.pas
@@ -438,13 +438,13 @@ begin
Red := fpgGetRed(AColor);
Green := fpgGetGreen(AColor);
Blue := fpgGetBlue(AColor);
- Alpha := fpgGetAlpha(AColor);
+// Alpha := fpgGetAlpha(AColor);
end
end;
function RGBTripleTofpgColor(const AColor: TRGBTriple): TfpgColor;
begin
- Result := AColor.Blue or (AColor.Green shl 8) or (AColor.Red shl 16) or (AColor.Alpha shl 32);
+ Result := AColor.Blue or (AColor.Green shl 8) or (AColor.Red shl 16);// or (AColor.Alpha shl 32);
end;
function fpgGetRed(const AColor: TfpgColor): word;
@@ -871,7 +871,7 @@ begin
begin
c := image.colors[place, y];
rgb := fpgColorToRGBTriple(c);
- a := weight * rgb.Alpha / $FFFF;
+ a := weight; // * rgb.Alpha / $FFFF;
re := re + a * rgb.Red;
gr := gr + a * rgb.Green;
bl := bl + a * rgb.Blue;
@@ -882,7 +882,7 @@ begin
red := ColorRound(re);
green := ColorRound(gr);
blue := ColorRound(bl);
- alpha := ColorRound(gamma * $FFFF);
+// alpha := ColorRound(gamma * $FFFF);
end;
tempimage.colors[x, y] := RGBTripleTofpgColor(rgb);
end;
@@ -942,7 +942,7 @@ begin
begin
c := tempimage.colors[x, place];
rgb := fpgColorToRGBTriple(c);
- a := weight * rgb.alpha / $FFFF;
+ a := weight;// * rgb.alpha / $FFFF;
re := re + a * rgb.red;
gr := gr + a * rgb.green;
bl := bl + a * rgb.blue;
@@ -953,7 +953,7 @@ begin
red := ColorRound(re);
green := ColorRound(gr);
blue := ColorRound(bl);
- alpha := ColorRound(gamma * $FFFF);
+// alpha := ColorRound(gamma * $FFFF);
end;
Canvas.Pixels[x + dx, y + dy] := RGBTripleTofpgColor(rgb);
end;