| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Blendmode
Description
Blend modes decide how two colors will mix together. There are both standard modes for basic needs and a means to create custom modes, dictating what sort of math to do on what color components. A set of blend modes used in drawing operations.
These predefined blend modes are supported everywhere.
Additional values may be obtained from SDL_ComposeCustomBlendMode.
- See also
sDL_ComposeCustomBlendMode
Since: 3.2.0
Synopsis
- newtype SDL_BlendMode = SDL_BlendMode {}
- sDL_BLENDMODE_NONE :: CUInt
- sDL_BLENDMODE_BLEND :: CUInt
- sDL_BLENDMODE_BLEND_PREMULTIPLIED :: CUInt
- sDL_BLENDMODE_ADD :: CUInt
- sDL_BLENDMODE_ADD_PREMULTIPLIED :: CUInt
- sDL_BLENDMODE_MOD :: CUInt
- sDL_BLENDMODE_MUL :: CUInt
- sDL_BLENDMODE_INVALID :: CUInt
- newtype SDL_BlendOperation = SDL_BlendOperation {}
- pattern SDL_BLENDOPERATION_ADD :: SDL_BlendOperation
- pattern SDL_BLENDOPERATION_SUBTRACT :: SDL_BlendOperation
- pattern SDL_BLENDOPERATION_REV_SUBTRACT :: SDL_BlendOperation
- pattern SDL_BLENDOPERATION_MINIMUM :: SDL_BlendOperation
- pattern SDL_BLENDOPERATION_MAXIMUM :: SDL_BlendOperation
- newtype SDL_BlendFactor = SDL_BlendFactor {}
- pattern SDL_BLENDFACTOR_ZERO :: SDL_BlendFactor
- pattern SDL_BLENDFACTOR_ONE :: SDL_BlendFactor
- pattern SDL_BLENDFACTOR_SRC_COLOR :: SDL_BlendFactor
- pattern SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR :: SDL_BlendFactor
- pattern SDL_BLENDFACTOR_SRC_ALPHA :: SDL_BlendFactor
- pattern SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA :: SDL_BlendFactor
- pattern SDL_BLENDFACTOR_DST_COLOR :: SDL_BlendFactor
- pattern SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR :: SDL_BlendFactor
- pattern SDL_BLENDFACTOR_DST_ALPHA :: SDL_BlendFactor
- pattern SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA :: SDL_BlendFactor
Documentation
newtype SDL_BlendMode Source #
- C declaration
SDL_BlendMode, defined atSDL3/SDL_blendmode.h 52:16
Constructors
| SDL_BlendMode | |
Instances
sDL_BLENDMODE_NONE :: CUInt Source #
no blending: dstRGBA = srcRGBA
- C declaration
macro SDL_BLENDMODE_NONE, defined atSDL3/SDL_blendmode.h 54:9
sDL_BLENDMODE_BLEND :: CUInt Source #
alpha blending: dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)), dstA = srcA + (dstA * (1-srcA))
- C declaration
macro SDL_BLENDMODE_BLEND, defined atSDL3/SDL_blendmode.h 55:9
sDL_BLENDMODE_BLEND_PREMULTIPLIED :: CUInt Source #
pre-multiplied alpha blending: dstRGBA = srcRGBA + (dstRGBA * (1-srcA))
- C declaration
macro SDL_BLENDMODE_BLEND_PREMULTIPLIED, defined atSDL3/SDL_blendmode.h 56:9
sDL_BLENDMODE_ADD :: CUInt Source #
additive blending: dstRGB = (srcRGB * srcA) + dstRGB, dstA = dstA
- C declaration
macro SDL_BLENDMODE_ADD, defined atSDL3/SDL_blendmode.h 57:9
sDL_BLENDMODE_ADD_PREMULTIPLIED :: CUInt Source #
pre-multiplied additive blending: dstRGB = srcRGB + dstRGB, dstA = dstA
- C declaration
macro SDL_BLENDMODE_ADD_PREMULTIPLIED, defined atSDL3/SDL_blendmode.h 58:9
sDL_BLENDMODE_MOD :: CUInt Source #
color modulate: dstRGB = srcRGB * dstRGB, dstA = dstA
- C declaration
macro SDL_BLENDMODE_MOD, defined atSDL3/SDL_blendmode.h 59:9
sDL_BLENDMODE_MUL :: CUInt Source #
color multiply: dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)), dstA = dstA
- C declaration
macro SDL_BLENDMODE_MUL, defined atSDL3/SDL_blendmode.h 60:9
sDL_BLENDMODE_INVALID :: CUInt Source #
- C declaration
macro SDL_BLENDMODE_INVALID, defined atSDL3/SDL_blendmode.h 61:9
newtype SDL_BlendOperation Source #
The blend operation used when combining source and destination pixel components.
- C declaration
enum SDL_BlendOperation, defined atSDL3/SDL_blendmode.h 69:14
Since: 3.2.0
Constructors
| SDL_BlendOperation | |
Instances
| Storable SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods sizeOf :: SDL_BlendOperation -> Int # alignment :: SDL_BlendOperation -> Int # peekElemOff :: Ptr SDL_BlendOperation -> Int -> IO SDL_BlendOperation # pokeElemOff :: Ptr SDL_BlendOperation -> Int -> SDL_BlendOperation -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_BlendOperation # pokeByteOff :: Ptr b -> Int -> SDL_BlendOperation -> IO () # peek :: Ptr SDL_BlendOperation -> IO SDL_BlendOperation # poke :: Ptr SDL_BlendOperation -> SDL_BlendOperation -> IO () # | |||||
| Generic SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Associated Types
Methods from :: SDL_BlendOperation -> Rep SDL_BlendOperation x # to :: Rep SDL_BlendOperation x -> SDL_BlendOperation # | |||||
| Read SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods readsPrec :: Int -> ReadS SDL_BlendOperation # readList :: ReadS [SDL_BlendOperation] # | |||||
| Show SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods showsPrec :: Int -> SDL_BlendOperation -> ShowS # show :: SDL_BlendOperation -> String # showList :: [SDL_BlendOperation] -> ShowS # | |||||
| Eq SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods (==) :: SDL_BlendOperation -> SDL_BlendOperation -> Bool # (/=) :: SDL_BlendOperation -> SDL_BlendOperation -> Bool # | |||||
| Ord SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods compare :: SDL_BlendOperation -> SDL_BlendOperation -> Ordering # (<) :: SDL_BlendOperation -> SDL_BlendOperation -> Bool # (<=) :: SDL_BlendOperation -> SDL_BlendOperation -> Bool # (>) :: SDL_BlendOperation -> SDL_BlendOperation -> Bool # (>=) :: SDL_BlendOperation -> SDL_BlendOperation -> Bool # max :: SDL_BlendOperation -> SDL_BlendOperation -> SDL_BlendOperation # min :: SDL_BlendOperation -> SDL_BlendOperation -> SDL_BlendOperation # | |||||
| Prim SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods sizeOfType# :: Proxy SDL_BlendOperation -> Int# # sizeOf# :: SDL_BlendOperation -> Int# # alignmentOfType# :: Proxy SDL_BlendOperation -> Int# # alignment# :: SDL_BlendOperation -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_BlendOperation # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_BlendOperation #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_BlendOperation -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_BlendOperation -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_BlendOperation # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_BlendOperation #) # writeOffAddr# :: Addr# -> Int# -> SDL_BlendOperation -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_BlendOperation -> State# s -> State# s # | |||||
| CEnum SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Associated Types
Methods toCEnum :: CEnumZ SDL_BlendOperation -> SDL_BlendOperation # fromCEnum :: SDL_BlendOperation -> CEnumZ SDL_BlendOperation # declaredValues :: proxy SDL_BlendOperation -> DeclaredValues SDL_BlendOperation # showsUndeclared :: proxy SDL_BlendOperation -> Int -> CEnumZ SDL_BlendOperation -> ShowS # readPrecUndeclared :: ReadPrec SDL_BlendOperation # isDeclared :: SDL_BlendOperation -> Bool # mkDeclared :: CEnumZ SDL_BlendOperation -> Maybe SDL_BlendOperation # | |||||
| SequentialCEnum SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode | |||||
| HasFFIType SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Associated Types
Methods toFFIType :: SDL_BlendOperation -> FFIType SDL_BlendOperation # fromFFIType :: FFIType SDL_BlendOperation -> SDL_BlendOperation # | |||||
| ReadRaw SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods readRaw :: Ptr SDL_BlendOperation -> IO SDL_BlendOperation # | |||||
| StaticSize SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods staticSizeOf :: Proxy SDL_BlendOperation -> Int # | |||||
| WriteRaw SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods writeRaw :: Ptr SDL_BlendOperation -> SDL_BlendOperation -> IO () # | |||||
| HasCField SDL_BlendOperation "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_BlendOperation ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods hasField :: SDL_BlendOperation -> (ty -> SDL_BlendOperation, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_BlendOperation) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods getField :: Ptr SDL_BlendOperation -> Ptr ty # | |||||
| type Rep SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode type Rep SDL_BlendOperation = D1 ('MetaData "SDL_BlendOperation" "SDL3.Sys.Bindgen.Blendmode" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_BlendOperation" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt))) | |||||
| type CEnumZ SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode | |||||
| type FFIType SDL_BlendOperation Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode | |||||
| type CFieldType SDL_BlendOperation "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode | |||||
pattern SDL_BLENDOPERATION_ADD :: SDL_BlendOperation Source #
dst + src: supported by all renderers
- C declaration
SDL_BLENDOPERATION_ADD, defined atSDL3/SDL_blendmode.h 71:5
pattern SDL_BLENDOPERATION_SUBTRACT :: SDL_BlendOperation Source #
src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
- C declaration
SDL_BLENDOPERATION_SUBTRACT, defined atSDL3/SDL_blendmode.h 72:5
pattern SDL_BLENDOPERATION_REV_SUBTRACT :: SDL_BlendOperation Source #
dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
- C declaration
SDL_BLENDOPERATION_REV_SUBTRACT, defined atSDL3/SDL_blendmode.h 73:5
pattern SDL_BLENDOPERATION_MINIMUM :: SDL_BlendOperation Source #
min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
- C declaration
SDL_BLENDOPERATION_MINIMUM, defined atSDL3/SDL_blendmode.h 74:5
pattern SDL_BLENDOPERATION_MAXIMUM :: SDL_BlendOperation Source #
max(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
- C declaration
SDL_BLENDOPERATION_MAXIMUM, defined atSDL3/SDL_blendmode.h 75:5
newtype SDL_BlendFactor Source #
The normalized factor used to multiply pixel components.
The blend factors are multiplied with the pixels from a drawing operation (src) and the pixels from the render target (dst) before the blend operation. The comma-separated factors listed above are always applied in the component order red, green, blue, and alpha.
- C declaration
enum SDL_BlendFactor, defined atSDL3/SDL_blendmode.h 88:14
Since: 3.2.0
Constructors
| SDL_BlendFactor | |
Instances
| Storable SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods sizeOf :: SDL_BlendFactor -> Int # alignment :: SDL_BlendFactor -> Int # peekElemOff :: Ptr SDL_BlendFactor -> Int -> IO SDL_BlendFactor # pokeElemOff :: Ptr SDL_BlendFactor -> Int -> SDL_BlendFactor -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_BlendFactor # pokeByteOff :: Ptr b -> Int -> SDL_BlendFactor -> IO () # peek :: Ptr SDL_BlendFactor -> IO SDL_BlendFactor # poke :: Ptr SDL_BlendFactor -> SDL_BlendFactor -> IO () # | |||||
| Generic SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Associated Types
Methods from :: SDL_BlendFactor -> Rep SDL_BlendFactor x # to :: Rep SDL_BlendFactor x -> SDL_BlendFactor # | |||||
| Read SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods readsPrec :: Int -> ReadS SDL_BlendFactor # readList :: ReadS [SDL_BlendFactor] # | |||||
| Show SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods showsPrec :: Int -> SDL_BlendFactor -> ShowS # show :: SDL_BlendFactor -> String # showList :: [SDL_BlendFactor] -> ShowS # | |||||
| Eq SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods (==) :: SDL_BlendFactor -> SDL_BlendFactor -> Bool # (/=) :: SDL_BlendFactor -> SDL_BlendFactor -> Bool # | |||||
| Ord SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods compare :: SDL_BlendFactor -> SDL_BlendFactor -> Ordering # (<) :: SDL_BlendFactor -> SDL_BlendFactor -> Bool # (<=) :: SDL_BlendFactor -> SDL_BlendFactor -> Bool # (>) :: SDL_BlendFactor -> SDL_BlendFactor -> Bool # (>=) :: SDL_BlendFactor -> SDL_BlendFactor -> Bool # max :: SDL_BlendFactor -> SDL_BlendFactor -> SDL_BlendFactor # min :: SDL_BlendFactor -> SDL_BlendFactor -> SDL_BlendFactor # | |||||
| Prim SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods sizeOfType# :: Proxy SDL_BlendFactor -> Int# # sizeOf# :: SDL_BlendFactor -> Int# # alignmentOfType# :: Proxy SDL_BlendFactor -> Int# # alignment# :: SDL_BlendFactor -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_BlendFactor # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_BlendFactor #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_BlendFactor -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_BlendFactor -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_BlendFactor # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_BlendFactor #) # writeOffAddr# :: Addr# -> Int# -> SDL_BlendFactor -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_BlendFactor -> State# s -> State# s # | |||||
| CEnum SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Associated Types
Methods toCEnum :: CEnumZ SDL_BlendFactor -> SDL_BlendFactor # fromCEnum :: SDL_BlendFactor -> CEnumZ SDL_BlendFactor # declaredValues :: proxy SDL_BlendFactor -> DeclaredValues SDL_BlendFactor # showsUndeclared :: proxy SDL_BlendFactor -> Int -> CEnumZ SDL_BlendFactor -> ShowS # readPrecUndeclared :: ReadPrec SDL_BlendFactor # isDeclared :: SDL_BlendFactor -> Bool # mkDeclared :: CEnumZ SDL_BlendFactor -> Maybe SDL_BlendFactor # | |||||
| SequentialCEnum SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode | |||||
| HasFFIType SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Associated Types
Methods | |||||
| ReadRaw SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods readRaw :: Ptr SDL_BlendFactor -> IO SDL_BlendFactor # | |||||
| StaticSize SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods staticSizeOf :: Proxy SDL_BlendFactor -> Int # staticAlignment :: Proxy SDL_BlendFactor -> Int # | |||||
| WriteRaw SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods writeRaw :: Ptr SDL_BlendFactor -> SDL_BlendFactor -> IO () # | |||||
| HasCField SDL_BlendFactor "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_BlendFactor ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods hasField :: SDL_BlendFactor -> (ty -> SDL_BlendFactor, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_BlendFactor) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode Methods getField :: Ptr SDL_BlendFactor -> Ptr ty # | |||||
| type Rep SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode type Rep SDL_BlendFactor = D1 ('MetaData "SDL_BlendFactor" "SDL3.Sys.Bindgen.Blendmode" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_BlendFactor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt))) | |||||
| type CEnumZ SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode | |||||
| type FFIType SDL_BlendFactor Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode | |||||
| type CFieldType SDL_BlendFactor "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Blendmode | |||||
pattern SDL_BLENDFACTOR_ZERO :: SDL_BlendFactor Source #
0, 0, 0, 0
- C declaration
SDL_BLENDFACTOR_ZERO, defined atSDL3/SDL_blendmode.h 90:5
pattern SDL_BLENDFACTOR_ONE :: SDL_BlendFactor Source #
1, 1, 1, 1
- C declaration
SDL_BLENDFACTOR_ONE, defined atSDL3/SDL_blendmode.h 91:5
pattern SDL_BLENDFACTOR_SRC_COLOR :: SDL_BlendFactor Source #
srcR, srcG, srcB, srcA
- C declaration
SDL_BLENDFACTOR_SRC_COLOR, defined atSDL3/SDL_blendmode.h 92:5
pattern SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR :: SDL_BlendFactor Source #
1-srcR, 1-srcG, 1-srcB, 1-srcA
- C declaration
SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR, defined atSDL3/SDL_blendmode.h 93:5
pattern SDL_BLENDFACTOR_SRC_ALPHA :: SDL_BlendFactor Source #
srcA, srcA, srcA, srcA
- C declaration
SDL_BLENDFACTOR_SRC_ALPHA, defined atSDL3/SDL_blendmode.h 94:5
pattern SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA :: SDL_BlendFactor Source #
1-srcA, 1-srcA, 1-srcA, 1-srcA
- C declaration
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, defined atSDL3/SDL_blendmode.h 95:5
pattern SDL_BLENDFACTOR_DST_COLOR :: SDL_BlendFactor Source #
dstR, dstG, dstB, dstA
- C declaration
SDL_BLENDFACTOR_DST_COLOR, defined atSDL3/SDL_blendmode.h 96:5
pattern SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR :: SDL_BlendFactor Source #
1-dstR, 1-dstG, 1-dstB, 1-dstA
- C declaration
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR, defined atSDL3/SDL_blendmode.h 97:5
pattern SDL_BLENDFACTOR_DST_ALPHA :: SDL_BlendFactor Source #
dstA, dstA, dstA, dstA
- C declaration
SDL_BLENDFACTOR_DST_ALPHA, defined atSDL3/SDL_blendmode.h 98:5
pattern SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA :: SDL_BlendFactor Source #
1-dstA, 1-dstA, 1-dstA, 1-dstA
- C declaration
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA, defined atSDL3/SDL_blendmode.h 99:5