I know and I understand why you don't follow the sfml-master.
But I really need this changes (it's a primary major bug) and I need to rebuild all the sources. It's done in c++, but I need only the BlendMode.java (if I have understood) to compile in jsfml
in c++, the class BlendMode evolve from:
enum BlendMode
{
BlendAlpha, ///< Pixel = Source * Source.a + Dest * (1 - Source.a)
BlendAdd, ///< Pixel = Source + Dest
BlendMultiply, ///< Pixel = Source * Dest
BlendNone ///< Pixel = Source
};
to
struct SFML_GRAPHICS_API BlendMode
{
enum Factor
{
Zero, ///< (0, 0, 0, 0)
One, ///< (1, 1, 1, 1)
SrcColor, ///< (src.r, src.g, src.b, src.a)
OneMinusSrcColor, ///< (1, 1, 1, 1) - (src.r, src.g, src.b, src.a)
DstColor, ///< (dst.r, dst.g, dst.b, dst.a)
OneMinusDstColor, ///< (1, 1, 1, 1) - (dst.r, dst.g, dst.b, dst.a)
SrcAlpha, ///< (src.a, src.a, src.a, src.a)
OneMinusSrcAlpha, ///< (1, 1, 1, 1) - (src.a, src.a, src.a, src.a)
DstAlpha, ///< (dst.a, dst.a, dst.a, dst.a)
OneMinusDstAlpha ///< (1, 1, 1, 1) - (dst.a, dst.a, dst.a, dst.a)
};
enum Equation
{
Add, ///< Pixel = Src * SrcFactor + Dst * DstFactor
Subtract ///< Pixel = Src * SrcFactor - Dst * DstFactor
};
BlendMode();
BlendMode(Factor sourceFactor, Factor destinationFactor, Equation blendEquation = Add);
BlendMode(Factor colorSourceFactor, Factor colorDestinationFactor,
Equation colorBlendEquation, Factor alphaSourceFactor,
Factor alphaDestinationFactor, Equation alphaBlendEquation);
////////////////////////////////////////////////////////////
// Member Data
////////////////////////////////////////////////////////////
Factor colorSrcFactor; ///< Source blending factor for the color channels
Factor colorDstFactor; ///< Destination blending factor for the color channels
Equation colorEquation; ///< Blending equation for the color channels
Factor alphaSrcFactor; ///< Source blending factor for the alpha channel
Factor alphaDstFactor; ///< Destination blending factor for the alpha channel
Equation alphaEquation; ///< Blending equation for the alpha channel
};
SFML_GRAPHICS_API bool operator ==(const BlendMode& left, const BlendMode& right);
SFML_GRAPHICS_API bool operator !=(const BlendMode& left, const BlendMode& right);
SFML_GRAPHICS_API extern const BlendMode BlendAlpha; ///< Blend source and dest according to dest alpha
SFML_GRAPHICS_API extern const BlendMode BlendAdd; ///< Add source to dest
SFML_GRAPHICS_API extern const BlendMode BlendMultiply; ///< Multiply source and dest
SFML_GRAPHICS_API extern const BlendMode BlendNone; ///< Overwrite dest with source
} // namespace sf