Skip to content

Commit 36c56c8

Browse files
committed
Add the SDL_ComposeCustomBlendMode() function
1 parent 6781b31 commit 36c56c8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

sdlblendmode.inc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,20 @@ const
4141
SDL_BLENDFACTOR_DST_ALPHA = $9; {**< dstA, dstA, dstA, dstA *}
4242
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = $A; {**< 1-dstA, 1-dstA, 1-dstA, 1-dstA *}
4343

44+
{**
45+
* \brief Create a custom blend mode, which may or may not be supported by a given renderer
46+
*
47+
* \param srcColorFactor source color factor
48+
* \param dstColorFactor destination color factor
49+
* \param colorOperation color operation
50+
* \param srcAlphaFactor source alpha factor
51+
* \param dstAlphaFactor destination alpha factor
52+
* \param alphaOperation alpha operation
53+
*
54+
* The result of the blend mode operation will be:
55+
* dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor
56+
* and
57+
* dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor
58+
*}
59+
Function SDL_ComposeCustomBlendMode(srcColorFactor, dstColorFactor : TSDL_BlendFactor; colorOperation : TSDL_BlendOperation; srcAlphaFactor, dstAlphaFactor : TSDL_BlendFactor; alphaOperation : TSDL_BlendOperation) : TSDL_BlendMode cdecl;
60+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_ComposeCustomBlendMode' {$ENDIF} {$ENDIF};

0 commit comments

Comments
 (0)