@@ -112,48 +112,48 @@ And a C compiler.
112
112
```
113
113
114
114
### Transparency methods
115
- ```
115
+ ``` python
116
116
def make_transparent (image_ : Surface, alpha_ : int )->Surface
117
117
def make_transparent_buffer(image_: Surface, alpha_: int )-> Surface
118
118
def make_array_transparent(rgb_array_: ndarray, alpha_array_: ndarray, alpha_: int )-> Surface
119
119
def transparent_mask(image: pygame.Surface, mask_alpha: numpy.ndarray)
120
120
```
121
121
# ## Opacity methods
122
- ```
122
+ ```python
123
123
def make_opaque(image_:Surface, alpha_: int ) -> Surface
124
124
def make_opaque_buffer(image_:Surface, alpha_: int ) -> Surface
125
125
def make_array_opaque(rgb_array_:ndarray, alpha_array_:ndarray, alpha_: int ) -> Surface
126
126
```
127
127
# ## Blink surface
128
- ```
128
+ ```python
129
129
def blink32(image_: Surface, alpha_: int ) -> Surface
130
130
def blink32_mask(image_: Surface, alpha_: int ) -> Surface
131
131
```
132
132
# ## Filtering RGB values
133
- ```
133
+ ```python
134
134
def low_th_alpha(surface_: Surface, new_alpha_: int , threshold_: int ) -> Surface
135
135
def high_th_alpha(surface_: Surface, new_alpha_: int , threshold_: int ) -> Surface
136
136
```
137
137
# ## Greyscale methods
138
138
```
139
139
# Conserve lightness
140
-
140
+ ```python
141
141
def greyscale_light_alpha(image: Surface)-> Surface
142
142
def greyscale_light(image: Surface)-> Surface
143
-
143
+ ```
144
144
# Conserve luminosity
145
-
145
+ ```python
146
146
def greyscale_lum_alpha(image: Surface)-> Surface
147
147
def greyscale_lum(image: Surface)-> Surface
148
-
148
+ ```
149
149
# Average values
150
-
150
+ ```python
151
151
def make_greyscale_32(image: Surface)-> Surface
152
152
def make_greyscale_24(image: Surface)-> Surface
153
153
def make_greyscale_altern(image: Surface)-> Surface
154
-
154
+ ```
155
155
# greyscale arrays
156
-
156
+ ```python
157
157
# 3d array to surface
158
158
# in : RGB array shape (width, height, 3)
159
159
# out: Greyscale pygame surface
@@ -172,14 +172,14 @@ def greyscale_3d_to_2d(array_: ndarray)->ndarray
172
172
def greyscale_2d_to_3d(array_: ndarray)-> ndarray
173
173
```
174
174
# ## Black and White transform
175
- ```
175
+ ```python
176
176
def bw_surface24(image: pygame.Surface)-> tuple
177
177
def bw_surface32(image: pygame.Surface)-> tuple
178
178
def bw_array(array: numpy.ndarray)-> numpy.ndarray
179
179
```
180
180
181
181
# ## Colorize
182
- ```
182
+ ```python
183
183
# Buffer methods
184
184
def redscale_buffer(image: Surface)-> Surface
185
185
def redscale_alpha_buffer(image: Surface)-> Surface
@@ -197,12 +197,12 @@ def bluescale(image: Surface)->Surface
197
197
def bluescale_alpha(image: Surface)-> Surface
198
198
```
199
199
# ## Loading images with per-pixels transparency
200
- ```
200
+ ```python
201
201
def load_per_pixel(file : str )-> Surface
202
202
def load_image32(path: str )-> tuple
203
203
```
204
204
# ## Loading sprite sheet
205
- ```
205
+ ```python
206
206
def spritesheet_per_pixel(file_: str , chunk_: int ,
207
207
colums_: int , rows_: int )-> list :
208
208
@@ -223,12 +223,12 @@ def spritesheet_new(file_: str, chunk_: int, columns_: int, rows_: int):
223
223
224
224
```
225
225
### Shadow method
226
- ```
226
+ ``` python
227
227
def shadow32 (image : Surface, attenuation : float )->Surface:
228
228
def shadow32buffer (image : Surface, attenuation : float )->Surface:
229
229
```
230
230
### RGB split
231
- ```
231
+ ``` python
232
232
# compatible 24 bit
233
233
def rgb_split (surface_ : Surface)->tuple
234
234
def rgb_split_buffer(surface_: Surface)-> tuple
0 commit comments