Changed the optional 'multiply alpha' boolean argument in love.graphics.setBlendMode to be an enum with constants 'alphamultiply' and 'premultiplied'.

The default value for the second argument of setBlendMode is 'alphamultiply'.
This commit is contained in:
Alex Szpakowski
2015-12-16 14:53:16 -04:00
parent 39127cd1b2
commit 48345bd58c
5 changed files with 61 additions and 21 deletions
+3 -3
View File
@@ -243,12 +243,12 @@ public:
/**
* Sets the current blend mode.
**/
void setBlendMode(BlendMode mode, bool multiplyalpha);
void setBlendMode(BlendMode mode, BlendAlpha alphamode);
/**
* Gets the current blend mode.
**/
BlendMode getBlendMode(bool &multiplyalpha) const;
BlendMode getBlendMode(BlendAlpha &alphamode) const;
/**
* Sets the default filter for images, canvases, and fonts.
@@ -478,7 +478,7 @@ private:
Colorf backgroundColor = Colorf(0.0, 0.0, 0.0, 255.0);
BlendMode blendMode = BLEND_ALPHA;
bool blendMultiplyAlpha = true;
BlendAlpha blendAlphaMode = BLENDALPHA_MULTIPLY;
float lineWidth = 1.0f;
LineStyle lineStyle = LINE_SMOOTH;