SDL standard library

Dependents:   H261_encoder

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SDL_blendmode.h Source File

SDL_blendmode.h

Go to the documentation of this file.
00001 /*
00002   Simple DirectMedia Layer
00003   Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
00004 
00005   This software is provided 'as-is', without any express or implied
00006   warranty.  In no event will the authors be held liable for any damages
00007   arising from the use of this software.
00008 
00009   Permission is granted to anyone to use this software for any purpose,
00010   including commercial applications, and to alter it and redistribute it
00011   freely, subject to the following restrictions:
00012 
00013   1. The origin of this software must not be misrepresented; you must not
00014      claim that you wrote the original software. If you use this software
00015      in a product, an acknowledgment in the product documentation would be
00016      appreciated but is not required.
00017   2. Altered source versions must be plainly marked as such, and must not be
00018      misrepresented as being the original software.
00019   3. This notice may not be removed or altered from any source distribution.
00020 */
00021 
00022 /**
00023  *  \file SDL_blendmode.h
00024  *
00025  *  Header file declaring the SDL_BlendMode enumeration
00026  */
00027 
00028 #ifndef _SDL_blendmode_h
00029 #define _SDL_blendmode_h
00030 
00031 #include "begin_code.h"
00032 /* Set up for C function definitions, even when using C++ */
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00037 /**
00038  *  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
00039  */
00040 typedef enum
00041 {
00042     SDL_BLENDMODE_NONE = 0x00000000,     /**< no blending
00043                                               dstRGBA = srcRGBA */
00044     SDL_BLENDMODE_BLEND = 0x00000001,    /**< alpha blending
00045                                               dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
00046                                               dstA = srcA + (dstA * (1-srcA)) */
00047     SDL_BLENDMODE_ADD = 0x00000002,      /**< additive blending
00048                                               dstRGB = (srcRGB * srcA) + dstRGB
00049                                               dstA = dstA */
00050     SDL_BLENDMODE_MOD = 0x00000004       /**< color modulate
00051                                               dstRGB = srcRGB * dstRGB
00052                                               dstA = dstA */
00053 } SDL_BlendMode;
00054 
00055 /* Ends C function definitions when using C++ */
00056 #ifdef __cplusplus
00057 }
00058 #endif
00059 #include "close_code.h"
00060 
00061 #endif /* _SDL_video_h */
00062 
00063 /* vi: set ts=4 sw=4 expandtab: */