Skip to content

Commit 3ea9831

Browse files
committed
Initial _render.Image implementation.
1 parent 3fc1dbe commit 3ea9831

File tree

4 files changed

+561
-7
lines changed

4 files changed

+561
-7
lines changed

buildconfig/stubs/pygame/_render.pyi

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,25 @@ class Texture:
147147

148148
@final
149149
class Image:
150-
pass
150+
def __init__(
151+
self,
152+
texture_or_image: Union[Texture, Image],
153+
srcrect: Optional[RectLike] = None,
154+
) -> None: ...
155+
def get_rect(self) -> Rect: ...
156+
def draw(
157+
self, srcrect: Optional[RectLike] = None, dstrect: Optional[RectLike] = None
158+
) -> None: ...
159+
angle: float
160+
origin: Optional[Iterable[float]]
161+
flip_x: bool
162+
flip_y: bool
163+
alpha: float
164+
blend_mode: int
165+
texture: Texture
166+
srcrect: Rect
167+
168+
@property
169+
def color(self) -> Color: ...
170+
@color.setter
171+
def color(self, value: ColorLike) -> None: ...

src_c/include/_pygame.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ typedef struct {
570570
SDL_bool flip_x;
571571
SDL_bool flip_y;
572572
SDL_BlendMode blend_mode;
573+
PyObject *weakreflist;
573574
} pgImageObject;
574575

575576
#ifndef PYGAMEAPI_RENDER_INTERNAL

0 commit comments

Comments
 (0)