Added alpha-blending to the Quantizer, otherwise the colors would be counted wrong and look like sh*t.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2509 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-02-27 17:17:31 +00:00
parent e5ee2c3711
commit 565bf262db
2 changed files with 35 additions and 6 deletions

View file

@ -138,6 +138,17 @@ namespace GreenshotPlugin.Core {
bool Contains(int x, int y);
}
/// <summary>
/// This interface is implemented when there is a alpha-blending possibility
/// </summary>
public interface IFastBitmapWithBlend : IFastBitmap {
Color BackgroundBlendColor {
get;
set;
}
Color GetBlendedColorAt(int x, int y);
}
/// <summary>
/// The base class for the fast bitmap implementation
/// </summary>
@ -659,7 +670,7 @@ namespace GreenshotPlugin.Core {
/// <summary>
/// This is the implementation of the IFastBitmap for 32 bit images with Alpha
/// </summary>
public unsafe class Fast32ARGBBitmap : FastBitmap {
public unsafe class Fast32ARGBBitmap : FastBitmap, IFastBitmapWithBlend {
public override bool hasAlphaChannel {
get {
return true;