Skip to content

Commit fac9bb5

Browse files
committed
readded versionadded tags
1 parent 4e709d9 commit fac9bb5

File tree

1 file changed

+57
-45
lines changed

1 file changed

+57
-45
lines changed

docs/reST/ref/surface.rst

Lines changed: 57 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -112,71 +112,83 @@
112112
The following is a list of all currently available flags, categorized into three sections:
113113

114114
**Blending without Alpha Channel (RGB)**
115-
``BLEND_ADD`` / ``BLEND_RGB_ADD``
116-
Adds the source color channels to the destination color channels, clamped to a maximum of 255.
117-
The result color is always a lighter color.
118115

119-
-) Adding black to any color leaves the color unchanged.
116+
.. versionaddedold:: 1.8 / 1.8.1
120117

121-
-) Adding white to any color produces white.
118+
``BLEND_ADD`` / ``BLEND_RGB_ADD``
119+
Adds the source color channels to the destination color channels, clamped to a maximum of 255.
120+
The result color is always a lighter color.
122121

123-
-) Adding any color to white produces white.
122+
-) Adding black to any color leaves the color unchanged.
124123

125-
``BLEND_SUB`` / ``BLEND_RGB_SUB``
126-
Subtracts the source color channels from the destination color channels, clamped to a minimum of 0.
127-
The result color is always a darker color.
124+
-) Adding white to any color produces white.
128125

129-
-) Subtracting any color from black produces black.
126+
-) Adding any color to white produces white.
130127

131-
-) Subtracting white from any color produces black.
128+
``BLEND_SUB`` / ``BLEND_RGB_SUB``
129+
Subtracts the source color channels from the destination color channels, clamped to a minimum of 0.
130+
The result color is always a darker color.
132131

133-
-) Subtracting black from any color leaves the color unchanged.
132+
-) Subtracting any color from black produces black.
134133

135-
``BLEND_MULT`` / ``BLEND_RGB_MULT``
136-
Multiplies the destination color channels by the source color channels, divided by 256 (or >> 8).
137-
The result color is always a darker color.
134+
-) Subtracting white from any color produces black.
138135

139-
-) Multiplying any color with black produces black.
136+
-) Subtracting black from any color leaves the color unchanged.
140137

141-
-) Multiplying any color with white leaves the color unchanged.
138+
``BLEND_MULT`` / ``BLEND_RGB_MULT``
139+
Multiplies the destination color channels by the source color channels, divided by 256 (or >> 8).
140+
The result color is always a darker color.
142141

143-
``BLEND_MIN`` / ``BLEND_RGB_MIN``
144-
Takes the minimum value between the source and destination color channels.
142+
-) Multiplying any color with black produces black.
145143

146-
-) Minimizing any color with black produces black.
144+
-) Multiplying any color with white leaves the color unchanged.
147145

148-
-) Minimizing any color with white leaves the color unchanged.
146+
``BLEND_MIN`` / ``BLEND_RGB_MIN``
147+
Takes the minimum value between the source and destination color channels.
149148

150-
``BLEND_MAX`` / ``BLEND_RGB_MAX``
151-
Takes the maximum value of each color channel
149+
-) Minimizing any color with black produces black.
152150

153-
-) Maximizing any color with black leaves the color unchanged.
151+
-) Minimizing any color with white leaves the color unchanged.
154152

155-
-) Maximizing any color with white produces white.
153+
``BLEND_MAX`` / ``BLEND_RGB_MAX``
154+
Takes the maximum value of each color channel
155+
156+
-) Maximizing any color with black leaves the color unchanged.
157+
158+
-) Maximizing any color with white produces white.
156159

157160
**Blending with Alpha Channel (RGBA)**
158-
``BLEND_RGBA_ADD``
159-
Works like ``BLEND_RGB_ADD``, but also adds the alpha channel.
160-
``BLEND_RGBA_SUB``
161-
Works like ``BLEND_RGB_SUB``, but also subtracts the alpha channel.
162-
``BLEND_RGBA_MULT``
163-
Works like ``BLEND_RGB_MULT``, but also multiplies the alpha channel.
164-
``BLEND_RGBA_MIN``
165-
Works like ``BLEND_RGB_MIN``, but also minimizes the alpha channel.
166-
``BLEND_RGBA_MAX``
167-
Works like ``BLEND_RGB_MAX``, but also maximizes the alpha channel.
161+
162+
.. versionaddedold:: 1.8.1
163+
164+
``BLEND_RGBA_ADD``
165+
Works like ``BLEND_RGB_ADD``, but also adds the alpha channel.
166+
``BLEND_RGBA_SUB``
167+
Works like ``BLEND_RGB_SUB``, but also subtracts the alpha channel.
168+
``BLEND_RGBA_MULT``
169+
Works like ``BLEND_RGB_MULT``, but also multiplies the alpha channel.
170+
``BLEND_RGBA_MIN``
171+
Works like ``BLEND_RGB_MIN``, but also minimizes the alpha channel.
172+
``BLEND_RGBA_MAX``
173+
Works like ``BLEND_RGB_MAX``, but also maximizes the alpha channel.
168174

169175
**Special Alpha Blending (RGBA)**
170-
``BLEND_PREMULTIPLIED``
171-
Uses premultiplied alpha blending for faster and accurate results when
172-
the color channels are already multiplied by the image alpha channel.
173-
You should only use this blend mode if you previously premultiplied the source
174-
surface with :meth:`premul_alpha()`.
175-
``BLEND_ALPHA_SDL2``
176-
Uses the SDL2 blitter for alpha blending, which may give slightly different
177-
results compared to the default blitter used in Pygame 1. This algorithm uses
178-
different approximations for alpha blending and supports Run-Length Encoding
179-
(RLE) on alpha-blended surfaces.
176+
177+
.. versionaddedold:: 1.9.2
178+
179+
``BLEND_PREMULTIPLIED``
180+
Uses premultiplied alpha blending for faster and accurate results when
181+
the color channels are already multiplied by the image alpha channel.
182+
You should only use this blend mode if you previously premultiplied the source
183+
surface with :meth:`premul_alpha()`.
184+
185+
.. versionaddedold:: 2.0.0
186+
187+
``BLEND_ALPHA_SDL2``
188+
Uses the SDL2 blitter for alpha blending, which may give slightly different
189+
results compared to the default blitter used in Pygame 1. This algorithm uses
190+
different approximations for alpha blending and supports Run-Length Encoding
191+
(RLE) on alpha-blended surfaces.
180192

181193
.. method:: blit
182194

0 commit comments

Comments
 (0)