From ce9d6e8ad28b2d84d1a292a871c23b66a4654b54 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 13 Apr 2021 11:30:50 -0400 Subject: Add new guile-sdl2 and chickadee releases. --- manuals/guile-sdl2/Blend-Modes.html | 203 ++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 manuals/guile-sdl2/Blend-Modes.html (limited to 'manuals/guile-sdl2/Blend-Modes.html') diff --git a/manuals/guile-sdl2/Blend-Modes.html b/manuals/guile-sdl2/Blend-Modes.html new file mode 100644 index 0000000..55363a4 --- /dev/null +++ b/manuals/guile-sdl2/Blend-Modes.html @@ -0,0 +1,203 @@ + + + + + + +Blend Modes (Guile-SDL2) + + + + + + + + + + + + + + + + + + + +
+

+Next: , Previous: , Up: API Reference   [Contents][Index]

+
+
+

3.8 Blend Modes

+ +
+
(use-modules (sdl2 blend-mode))
+
+ +

SDL2 provides several of the most commonly used blend modes: +

+
+
Variable: none
+

No blending. +

+ +
+
Variable: blend
+

Alpha blending. +

+ +
+
Variable: add
+

Additive blending. +

+ +
+
Variable: mul
+

Multiplicative blending. +

+ +
+
Variable: mod
+

Color modulation. +

+ +

Custom blend modes can be created using the make-blend-mode +procedure. +

+
+
Procedure: make-blend-mode src-color-factor dst-color-factor color-operation src-alpha-factor dst-alpha-factor alpha-operation
+

Return a new custom blend mode for renderers. +

+

src-color-factor applies to the red, green, and blue components +of the source pixels. +

+

dst-color-factor applies to the red, green, and blue components of the +destination pixels. +

+

color-operation specifies how to combine the red, green, and blue +components of the source and destination pixels. +

+

src-alpha-factor applies to the alpha component of the source pixels. +

+

dst-alpha-factor applies to the alpha component of the destination +pixels. +

+

alpha-operation specifies how to combine the alpha component of the +source and destination pixels. +

+

Possible values for factors are zero, one, +src-color, one-minus-src-color, src-alpha, +one-minus-src-alpha, dst-color, +one-minus-dst-color, dst-alpha, and one-minus-dst +alpha. +

+

Possible values for operations are add, subtract, +rev-subtract, minimum, and maximum. +

+ +
+
Procedure: blend-mode? obj
+

Return #t if obj is a blend mode object. +

+ +
+
Procedure: blend-mode-src-color-factor blend-mode
+

Return the source red, green, and blue channel blend factor for +blend-mode. +

+ +
+
Procedure: blend-mode-dst-color-factor blend-mode
+

Return the destination red, green, and blue channel blend factor for +blend-mode. +

+ +
+
Procedure: blend-mode-color-operation blend-mode
+

Return the red, green, and blue channel blend operation for +blend-mode. +

+ +
+
Procedure: blend-mode-src-alpha-factor blend-mode
+

Return the source alpha channel blend factor for blend-mode. +

+ +
+
Procedure: blend-mode-dst-alpha-factor blend-mode
+

Return the destination alpha channel blend factor for +blend-mode. +

+ +
+
Procedure: blend-mode-alpha-operation blend-mode
+

Return the alpha channel blend operation for blend-mode. +

+ +
+
+

+Next: , Previous: , Up: API Reference   [Contents][Index]

+
+ + + + + -- cgit v1.2.3