diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-14 08:55:29 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-14 08:55:29 +0000 |
commit | 2c1cc98a68fe4076a81b57fc45e5e94d98a7dc92 (patch) | |
tree | 3cd96cf8dc84a1a92f5172c9ae4a58668e829724 /prototypes/fpgui2/source | |
parent | 09ea089c7f527d5bc99148dfa6b6641136c82d3f (diff) | |
download | fpGUI-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/source')
-rw-r--r-- | prototypes/fpgui2/source/core/gfxbase.pas | 12 |
1 files changed, 6 insertions, 6 deletions
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; |