25 #ifndef SFML_BLENDMODE_HPP
26 #define SFML_BLENDMODE_HPP
31 #include <SFML/Graphics/Export.hpp>
150 SFML_GRAPHICS_API
extern const BlendMode BlendAlpha;
151 SFML_GRAPHICS_API
extern const BlendMode BlendAdd;
152 SFML_GRAPHICS_API
extern const BlendMode BlendMultiply;
153 SFML_GRAPHICS_API
extern const BlendMode BlendNone;
158 #endif // SFML_BLENDMODE_HPP
BlendMode()
Default constructor.
@ Subtract
Pixel = Src * SrcFactor - Dst * DstFactor.
Blending modes for drawing.
Factor alphaSrcFactor
Source blending factor for the alpha channel.
BlendMode(Factor colorSourceFactor, Factor colorDestinationFactor, Equation colorBlendEquation, Factor alphaSourceFactor, Factor alphaDestinationFactor, Equation alphaBlendEquation)
Construct the blend mode given the factors and equation.
Factor colorDstFactor
Destination blending factor for the color channels.
Factor colorSrcFactor
Source blending factor for the color channels.
Equation colorEquation
Blending equation for the color channels.
Factor alphaDstFactor
Destination blending factor for the alpha channel.
@ OneMinusDstColor
(1, 1, 1, 1) - (dst.r, dst.g, dst.b, dst.a)
Equation
Enumeration of the blending equations.
BlendMode(Factor sourceFactor, Factor destinationFactor, Equation blendEquation=Add)
Construct the blend mode given the factors and equation.
@ DstAlpha
(dst.a, dst.a, dst.a, dst.a)
@ DstColor
(dst.r, dst.g, dst.b, dst.a)
@ OneMinusSrcAlpha
(1, 1, 1, 1) - (src.a, src.a, src.a, src.a)
Factor
Enumeration of the blending factors.
Equation alphaEquation
Blending equation for the alpha channel.
@ OneMinusSrcColor
(1, 1, 1, 1) - (src.r, src.g, src.b, src.a)
@ SrcAlpha
(src.a, src.a, src.a, src.a)
@ SrcColor
(src.r, src.g, src.b, src.a)
@ Add
Pixel = Src * SrcFactor + Dst * DstFactor.