Skip to content

Commit ffca96e

Browse files
committed
fix Surface->surface, Surface-w/h->Surface.w/h
1 parent 351cf76 commit ffca96e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

buildconfig/stubs/pygame/surface.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class Surface:
132132
self,
133133
size: Point,
134134
flags: int = 0,
135-
Surface: Surface = ...,
135+
surface: Surface = ...,
136136
) -> None: ...
137137
def __copy__(self) -> Surface: ...
138138
def __deepcopy__(self, memo) -> Surface: ...
@@ -283,7 +283,7 @@ class Surface:
283283
"""
284284

285285
@overload
286-
def convert(self, Surface: Surface, /) -> Surface: ...
286+
def convert(self, surface: Surface, /) -> Surface: ...
287287
@overload
288288
def convert(self, depth: int, flags: int = 0, /) -> Surface: ...
289289
@overload
@@ -913,22 +913,22 @@ class Surface:
913913
information is given. A ``ValueError`` is raised if the Surface's pixels
914914
are discontinuous.
915915
916-
'1' returns a (Surface-width * Surface-height) array of continuous
916+
'1' returns a (Surface.width * Surface.height) array of continuous
917917
pixels. A ``ValueError`` is raised if the Surface pixels are
918918
discontinuous.
919919
920-
'2' returns a (Surface-width, Surface-height) array of raw pixels.
920+
'2' returns a (Surface.width, Surface.height) array of raw pixels.
921921
The pixels are Surface-bytesize-d unsigned integers. The pixel format is
922922
Surface specific. The 3 byte unsigned integers of 24 bit Surfaces are
923923
unlikely accepted by anything other than other pygame functions.
924924
925-
'3' returns a (Surface-width, Surface-height, 3) array of ``RGB`` color
925+
'3' returns a (Surface.width, Surface.height, 3) array of ``RGB`` color
926926
components. Each of the red, green, and blue components are unsigned
927927
bytes. Only 24-bit and 32-bit Surfaces are supported. The color
928928
components must be in either ``RGB`` or ``BGR`` order within the pixel.
929929
930930
'r' for red, 'g' for green, 'b' for blue, and 'a' for alpha return a
931-
(Surface-width, Surface-height) view of a single color component within a
931+
(Surface.width, Surface.height) view of a single color component within a
932932
Surface: a color plane. Color components are unsigned bytes. Both 24-bit
933933
and 32-bit Surfaces support 'r', 'g', and 'b'. Only 32-bit Surfaces with
934934
``SRCALPHA`` support 'a'.

src_c/doc/surface_doc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Auto generated file: with make_docs.py . Docs go in docs/reST/ref/ . */
2-
#define DOC_SURFACE "Surface(size, flags=0, depth=0, masks=None) -> Surface\nSurface(size, flags=0, Surface=...) -> Surface\nPygame object for representing images."
2+
#define DOC_SURFACE "Surface(size, flags=0, depth=0, masks=None) -> Surface\nSurface(size, flags=0, surface=...) -> Surface\nPygame object for representing images."
33
#define DOC_SURFACE_BLIT "blit(source, dest=(0, 0), area=None, special_flags=0) -> Rect\nDraw another Surface onto this one."
44
#define DOC_SURFACE_BLITS "blits(blit_sequence, doreturn=1) -> Union[list[Rect], None]\nDraw many Surfaces onto this Surface at their corresponding location."
55
#define DOC_SURFACE_FBLITS "fblits(blit_sequence, special_flags=0, /) -> None\nDraw many Surfaces onto this Surface at their corresponding location and with the same special_flags."
6-
#define DOC_SURFACE_CONVERT "convert(Surface, /) -> Surface.convert.Surface\nconvert(depth, flags=0, /) -> Surface\nconvert(masks, flags=0, /) -> Surface\nconvert() -> Surface\nChange the pixel format of a Surface."
6+
#define DOC_SURFACE_CONVERT "convert(surface, /) -> Surface\nconvert(depth, flags=0, /) -> Surface\nconvert(masks, flags=0, /) -> Surface\nconvert() -> Surface\nChange the pixel format of a Surface."
77
#define DOC_SURFACE_CONVERTALPHA "convert_alpha() -> Surface\nChange the pixel format of a Surface including per pixel alphas."
88
#define DOC_SURFACE_COPY "copy() -> Surface\nCreate a new copy of a Surface."
99
#define DOC_SURFACE_FILL "fill(color, rect=None, special_flags=0) -> Rect\nFill Surface with a solid color."

0 commit comments

Comments
 (0)