include/SDL_blendmode.h
changeset 7502 6ff02ff3cf06
parent 7191 75360622e65f
child 8149 681eb46b8ac4
equal deleted inserted replaced
7501:b27825bb5879 7502:6ff02ff3cf06
    37 /**
    37 /**
    38  *  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
    38  *  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
    39  */
    39  */
    40 typedef enum
    40 typedef enum
    41 {
    41 {
    42     SDL_BLENDMODE_NONE = 0x00000000,     /**< No blending */
    42     SDL_BLENDMODE_NONE = 0x00000000,     /**< no blending
    43     SDL_BLENDMODE_BLEND = 0x00000001,    /**< dst = (src * A) + (dst * (1-A)) */
    43                                               dstRGBA = srcRGBA */
    44     SDL_BLENDMODE_ADD = 0x00000002,      /**< dst = (src * A) + dst */
    44     SDL_BLENDMODE_BLEND = 0x00000001,    /**< alpha blending
    45     SDL_BLENDMODE_MOD = 0x00000004       /**< dst = src * dst */
    45                                               dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
       
    46                                               dstA = srcA + (dstA * (1-srcA)) */
       
    47     SDL_BLENDMODE_ADD = 0x00000002,      /**< additive blending
       
    48                                               dstRGB = (srcRGB * srcA) + dstRGB
       
    49                                               dstA = dstA */
       
    50     SDL_BLENDMODE_MOD = 0x00000004       /**< color modulate
       
    51                                               dstRGB = srcRGB * dstRGB
       
    52                                               dstA = dstA */
    46 } SDL_BlendMode;
    53 } SDL_BlendMode;
    47 
    54 
    48 /* Ends C function definitions when using C++ */
    55 /* Ends C function definitions when using C++ */
    49 #ifdef __cplusplus
    56 #ifdef __cplusplus
    50 }
    57 }