Skip to content

Commit c6c7460

Browse files
committed
Rename rgb_mod to color_mod.
I've decided that this should match SDL names rather than tcod names.
1 parent 45936e5 commit c6c7460

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tcod/sdl/render.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ def blend_mode(self, value: int) -> None:
9494
_check(lib.SDL_SetTextureBlendMode(self.p, value))
9595

9696
@property
97-
def rgb_mod(self) -> Tuple[int, int, int]:
97+
def color_mod(self) -> Tuple[int, int, int]:
9898
"""Texture RGB color modulate values, can be set."""
9999
rgb = ffi.new("uint8_t[3]")
100100
_check(lib.SDL_GetTextureColorMod(self.p, rgb, rgb + 1, rgb + 2))
101101
return int(rgb[0]), int(rgb[1]), int(rgb[2])
102102

103-
@rgb_mod.setter
104-
def rgb_mod(self, rgb: Tuple[int, int, int]) -> None:
103+
@color_mod.setter
104+
def color_mod(self, rgb: Tuple[int, int, int]) -> None:
105105
_check(lib.SDL_SetTextureColorMod(self.p, rgb[0], rgb[1], rgb[2]))
106106

107107

tests/test_sdl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_sdl_render() -> None:
5959
assert rgb.format == tcod.lib.SDL_PIXELFORMAT_RGB24
6060
rgb.alpha_mod = rgb.alpha_mod
6161
rgb.blend_mode = rgb.blend_mode
62-
rgb.rgb_mod = rgb.rgb_mod
62+
rgb.color_mod = rgb.color_mod
6363
rgba = render.upload_texture(np.zeros((8, 8, 4), np.uint8), access=tcod.sdl.render.TextureAccess.TARGET)
6464
with render.set_render_target(rgba):
6565
render.copy(rgb)

0 commit comments

Comments
 (0)