Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a number of spelling mistakes #1543

Merged
merged 2 commits into from Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/reST/ref/mouse.rst
Expand Up @@ -62,7 +62,7 @@ configured.
| :sg:`get_pos() -> (x, y)`

Returns the ``X`` and ``Y`` position of the mouse cursor. The position is
relative the the top-left corner of the display. The cursor position can be
relative to the top-left corner of the display. The cursor position can be
located outside of the display window, but is always constrained to the
screen.

Expand Down
2 changes: 1 addition & 1 deletion docs/reST/themes/classic/elements.html
@@ -1,7 +1,7 @@
{%- extends "!layout.html" %}

{%- if not theme_relbar %}
{%- block relbar1 %}{# Do not want bar accross the top #}{% endblock %}
{%- block relbar1 %}{# Do not want bar across the top #}{% endblock %}
{%- endif %}

{#- Classic header with Snakey on the left, page links on the right.
Expand Down
2 changes: 1 addition & 1 deletion examples/mask.py
Expand Up @@ -121,7 +121,7 @@ def update(self, dt):


def main(*args):
"""Display multiple images bounce off each other using collition detection
"""Display multiple images bounce off each other using collision detection

Positional arguments:
one or more image file names.
Expand Down
2 changes: 1 addition & 1 deletion examples/sound_array_demos.py
Expand Up @@ -122,7 +122,7 @@ def sound_from_pos(sound, start_pos, samples_per_second=None, inplace=1):
# figure out the start position in terms of samples.
start_pos_in_samples = int(start_pos * samples_per_second)

# cut the begining off the sound at the start position.
# cut the beginning off the sound at the start position.
a2 = a1[start_pos_in_samples:]

# make the Sound instance from the array.
Expand Down
2 changes: 1 addition & 1 deletion examples/testsprite.py
Expand Up @@ -157,7 +157,7 @@ def main(
use_layered_dirty - Use the FastRenderGroup sprite group (default False)
screen_dims - Pygame window dimensions (default [640, 480])
use_alpha - use alpha blending (default False)
flags - additional display mode flags (default no addiontal flags)
flags - additional display mode flags (default no additional flags)

"""

Expand Down
4 changes: 2 additions & 2 deletions src_c/SDL_gfx/SDL_gfxPrimitives.c
Expand Up @@ -2512,7 +2512,7 @@ This implementation of the Wu antialiasing code is based on Mike Abrash's
DDJ article which was reprinted as Chapter 42 of his Graphics Programming
Black Book, but has been optimized to work with SDL and utilizes 32-bit
fixed-point arithmetic by A. Schiffler. The endpoint control allows the
supression to draw the last pixel useful for rendering continous aa-lines
supression to draw the last pixel useful for rendering continuous aa-lines
with alpha<255.

\param dst The surface to draw on.
Expand Down Expand Up @@ -6031,7 +6031,7 @@ int characterRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8
/*!
\brief Draw a string in the currently set font.

The spacing between consequtive characters in the string is the fixed number of pixels
The spacing between consecutive characters in the string is the fixed number of pixels
of the character width of the current global font.

\param dst The surface to draw on.
Expand Down
4 changes: 2 additions & 2 deletions src_c/camera.h
Expand Up @@ -105,7 +105,7 @@ typedef struct pgCameraObject {
#elif defined(PYGAME_MAC_CAMERA_OLD)
typedef struct pgCameraObject {
PyObject_HEAD
char* device_name; /* unieke name of the device */
char* device_name; /* unique name of the device */
OSType pixelformat;
unsigned int color_out;
SeqGrabComponent component; /* A type used by the Sequence Grabber API */
Expand All @@ -117,7 +117,7 @@ typedef struct pgCameraObject {
int vflip;
short depth;
struct buffer pixels;
//struct buffer tmp_pixels /* place where the flipped image in temporarly stored if hflip or vflip is true.*/
//struct buffer tmp_pixels /* place where the flipped image in temporarily stored if hflip or vflip is true.*/
} pgCameraObject;

#else
Expand Down
6 changes: 3 additions & 3 deletions src_c/camera_mac.m
Expand Up @@ -164,7 +164,7 @@ int mac_init_device(pgCameraObject* self) {
theErr = SGSetChannelBounds(self->channel, &self->boundsRect);
if (theErr != noErr) {
PyErr_Format(PyExc_SystemError,
"Cannot specifie a channel's display boundary rectangle");
"Cannot specify a channel's display boundary rectangle");
return 0;
}

Expand All @@ -180,7 +180,7 @@ int mac_init_device(pgCameraObject* self) {
theErr = SGSetChannelUsage(self->channel, seqGrabPreview);
if (theErr != noErr) {
PyErr_Format(PyExc_SystemError,
"Cannot specifie how a channel is to be used by the sequence grabber componen");
"Cannot specify how a channel is to be used by the sequence grabber componen");
return 0;
}

Expand Down Expand Up @@ -334,7 +334,7 @@ int mac_read_frame(pgCameraObject* self, SDL_Surface* surf) {
}
}

// TODO sometimes it is posible to directly grab the image in the desired pixel format,
// TODO sometimes it is possible to directly grab the image in the desired pixel format,
// but this format needs to be known at the beginning of the initiation of the camera.
int mac_process_image(pgCameraObject* self, const void *image, unsigned int buffer_size, SDL_Surface* surf) {
if (!surf)
Expand Down
2 changes: 1 addition & 1 deletion src_c/font.c
Expand Up @@ -482,7 +482,7 @@ font_render(PyObject *self, PyObject *args)
return RAISE(pgExc_SDLError, TTF_GetError());
}
if (!aa && (bg_rgba_obj != NULL) && !just_return) {
/* turn off transparancy */
/* turn off transparency */
SDL_SetColorKey(surf, 0, 0);
surf->format->palette->colors[0].r = backg.r;
surf->format->palette->colors[0].g = backg.g;
Expand Down
2 changes: 1 addition & 1 deletion src_c/pixelarray_methods.c
Expand Up @@ -18,7 +18,7 @@

*/

/* Simple weighted euclidian distance, which tries to get near to the
/* Simple weighted Euclidean distance, which tries to get near to the
* human eye reception using the weights.
* It receives RGB values in the range 0-255 and returns a distance
* value between 0.0 and 1.0.
Expand Down
2 changes: 1 addition & 1 deletion src_c/pixelcopy.c
Expand Up @@ -972,7 +972,7 @@ map_array(PyObject *self, PyObject *args)
src_strides[dim] - shape[dim + 1] * src_strides[dim + 1];
}

/* Determine souce and destination pixel formats
/* Determine source and destination pixel formats
*/
format = pgSurface_AsSurface(format_surf)->format;
pix_bytesize = format->BytesPerPixel;
Expand Down
8 changes: 4 additions & 4 deletions src_c/rotozoom.c
Expand Up @@ -219,7 +219,7 @@ zoomSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int smooth)

32bit Rotozoomer with optional anti-aliasing by bilinear interpolation.

Rotates and zoomes 32bit RGBA/ABGR 'src' surface to 'dst' surface.
Rotates and zooms 32bit RGBA/ABGR 'src' surface to 'dst' surface.

*/

Expand Down Expand Up @@ -403,7 +403,7 @@ transformSurfaceRGBA(SDL_Surface *src, SDL_Surface *dst, int cx, int cy,

rotozoomSurface()

Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst'
Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst'
surface. 'angle' is the rotation in degrees. 'zoom' a scaling factor. If
'smooth' is 1 then the destination 32bit surface is anti-aliased. If the
surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA
Expand Down Expand Up @@ -450,7 +450,7 @@ rotozoomSurfaceSizeTrig(int width, int height, double angle, double zoom,
*dstheight = 2 * dstheighthalf;
}

/* Publically available rotozoom-size function */
/* Publicly available rotozoom-size function */

void
rotozoomSurfaceSize(int width, int height, double angle, double zoom,
Expand Down Expand Up @@ -500,7 +500,7 @@ zoomSurfaceSize(int width, int height, double zoomx, double zoomy,
}
}

/* Publically available rotozoom function */
/* Publicly available rotozoom function */

SDL_Surface *
rotozoomSurface(SDL_Surface *src, double angle, double zoom, int smooth)
Expand Down
4 changes: 2 additions & 2 deletions src_c/scale_mmx32.c
Expand Up @@ -32,8 +32,8 @@
#endif

#include <stdint.h>
typedef uint8_t Uint8; /* SDL convension */
typedef uint16_t Uint16; /* SDL convension */
typedef uint8_t Uint8; /* SDL convention */
typedef uint16_t Uint16; /* SDL convention */
#include <stdlib.h>
#include <memory.h>
#include "scale.h"
Expand Down
4 changes: 2 additions & 2 deletions src_c/scale_mmx64.c
Expand Up @@ -32,8 +32,8 @@
#endif

#include <stdint.h>
typedef uint8_t Uint8; /* SDL convension */
typedef uint16_t Uint16; /* SDL convension */
typedef uint8_t Uint8; /* SDL convention */
typedef uint16_t Uint16; /* SDL convention */
#include <stdlib.h>
#include <memory.h>
#include "scale.h"
Expand Down
4 changes: 2 additions & 2 deletions src_c/scale_mmx64_gcc.c
Expand Up @@ -32,8 +32,8 @@
#endif

#include <stdint.h>
typedef uint8_t Uint8; /* SDL convension */
typedef uint16_t Uint16; /* SDL convension */
typedef uint8_t Uint8; /* SDL convention */
typedef uint16_t Uint16; /* SDL convention */
#include <stdlib.h>
#include <memory.h>
#include "scale.h"
Expand Down
4 changes: 2 additions & 2 deletions src_c/scale_mmx64_msvc.c
Expand Up @@ -28,8 +28,8 @@
*/

#include <stdint.h>
typedef uint8_t Uint8; /* SDL convension */
typedef uint16_t Uint16; /* SDL convension */
typedef uint8_t Uint8; /* SDL convention */
typedef uint16_t Uint16; /* SDL convention */
#include <stdlib.h>
#include <memory.h>
#include "scale.h"
Expand Down
2 changes: 1 addition & 1 deletion src_py/freetype.py
Expand Up @@ -30,7 +30,7 @@ def SysFont(name, size, bold=0, italic=0, constructor=None):
font you ask for is not available, a reasonable alternative
may be used.

if optional contructor is provided, it must be a function with
if optional constructor is provided, it must be a function with
signature constructor(fontpath, size, bold, italic) which returns
a Font instance. If None, a pygame.freetype.Font object is created.
"""
Expand Down
4 changes: 2 additions & 2 deletions src_py/ftfont.py
Expand Up @@ -110,7 +110,7 @@ def get_underline(self):

def metrics(self, text):
"""metrics(text) -> list
Gets the metrics for each character in the pased string."""
Gets the metrics for each character in the passed string."""

return self.get_metrics(text)

Expand Down Expand Up @@ -170,7 +170,7 @@ def SysFont(name, size, bold=0, italic=0, constructor=None):
font you ask for is not available, a reasonable alternative
may be used.

if optional contructor is provided, it must be a function with
if optional constructor is provided, it must be a function with
signature constructor(fontpath, size, bold, italic) which returns
a Font instance. If None, a pygame.ftfont.Font object is created.
"""
Expand Down
8 changes: 4 additions & 4 deletions src_py/sprite.py
Expand Up @@ -55,7 +55,7 @@
Sprites and Groups manage their relationships with the add() and remove()
methods. These methods can accept a single or multiple group arguments for
membership. The default initializers for these classes also take a
single group or list of groups as argments for initial membership. It is safe
single group or list of groups as arguments for initial membership. It is safe
to repeatedly add and remove the same Sprite from a Group.

While it is possible to design sprite and group classes that don't derive
Expand Down Expand Up @@ -965,7 +965,7 @@ class LayeredDirty(LayeredUpdates):
_use_update: True/False (default is False)
_default_layer: default layer where the sprites without a layer are
added
_time_threshold: treshold time for switching between dirty rect mode
_time_threshold: threshold time for switching between dirty rect mode
and fullscreen mode; defaults to updating at 80 frames per second,
which is equal to 1000.0 / 80.0

Expand All @@ -982,7 +982,7 @@ def __init__(self, *sprites, **kwargs):
_use_update: True/False (default is False)
_default_layer: default layer where the sprites without a layer are
added
_time_threshold: treshold time for switching between dirty rect
_time_threshold: threshold time for switching between dirty rect
mode and fullscreen mode; defaults to updating at 80 frames per
second, which is equal to 1000.0 / 80.0

Expand Down Expand Up @@ -1217,7 +1217,7 @@ def change_layer(self, sprite, new_layer):
sprite.dirty = 1

def set_timing_treshold(self, time_ms):
"""set the treshold in milliseconds
"""set the threshold in milliseconds

set_timing_treshold(time_ms): return None

Expand Down
2 changes: 1 addition & 1 deletion src_py/sysfont.py
Expand Up @@ -312,7 +312,7 @@ def SysFont(name, size, bold=False, italic=False, constructor=None):
font you ask for is not available, a reasonable alternative
may be used.

if optional contructor is provided, it must be a function with
if optional constructor is provided, it must be a function with
signature constructor(fontpath, size, bold, italic) which returns
a Font instance. If None, a pygame.font.Font object is created.
"""
Expand Down
2 changes: 1 addition & 1 deletion test/freetype_test.py
Expand Up @@ -1290,7 +1290,7 @@ def test_freetype_Font_style(self):
with self.assertRaises(ValueError):
font.style = 112

# make assure no assignements happened
# make assure no assignments happened
self.assertEqual(ft.STYLE_NORMAL, font.style)

# test assignement
Expand Down
8 changes: 4 additions & 4 deletions test/math_test.py
Expand Up @@ -357,7 +357,7 @@ def test_normalize(self):
# v1 is unchanged
self.assertEqual(self.v1.x, self.l1[0])
self.assertEqual(self.v1.y, self.l1[1])
# v2 is paralell to v1
# v2 is parallel to v1
self.assertAlmostEqual(self.v1.x * v.y - self.v1.y * v.x, 0.0)
self.assertRaises(ValueError, lambda: self.zeroVec.normalize())

Expand All @@ -369,7 +369,7 @@ def test_normalize_ip(self):
self.assertEqual(v.normalize_ip(), None)
# length is 1
self.assertAlmostEqual(v.x * v.x + v.y * v.y, 1.0)
# v2 is paralell to v1
# v2 is parallel to v1
self.assertAlmostEqual(self.v1.x * v.y - self.v1.y * v.x, 0.0)
self.assertRaises(ValueError, lambda: self.zeroVec.normalize_ip())

Expand Down Expand Up @@ -1512,7 +1512,7 @@ def test_normalize(self):
self.assertEqual(self.v1.x, self.l1[0])
self.assertEqual(self.v1.y, self.l1[1])
self.assertEqual(self.v1.z, self.l1[2])
# v2 is paralell to v1 (tested via cross product)
# v2 is parallel to v1 (tested via cross product)
cross = (
(self.v1.y * v.z - self.v1.z * v.y) ** 2
+ (self.v1.z * v.x - self.v1.x * v.z) ** 2
Expand All @@ -1529,7 +1529,7 @@ def test_normalize_ip(self):
self.assertEqual(v.normalize_ip(), None)
# length is 1
self.assertAlmostEqual(v.x * v.x + v.y * v.y + v.z * v.z, 1.0)
# v2 is paralell to v1 (tested via cross product)
# v2 is parallel to v1 (tested via cross product)
cross = (
(self.v1.y * v.z - self.v1.z * v.y) ** 2
+ (self.v1.z * v.x - self.v1.x * v.z) ** 2
Expand Down
4 changes: 2 additions & 2 deletions test/surface_test.py
Expand Up @@ -2541,10 +2541,10 @@ def test_fill(self):
screen.fill((0, 0, 255), (0, 240, 320, 240))

# Now apply a clip rect, such that only the left side of the
# screen should be effected by blit opperations.
# screen should be effected by blit operations.
screen.set_clip((0, 0, 320, 480))

# Test fills with each special flag, and additionaly without any.
# Test fills with each special flag, and additionally without any.
screen.fill((255, 0, 0, 127), (160, 0, 320, 30), 0)
screen.fill((255, 0, 0, 127), (160, 30, 320, 30), pygame.BLEND_ADD)
screen.fill((0, 127, 127, 127), (160, 60, 320, 30), pygame.BLEND_SUB)
Expand Down
9 changes: 5 additions & 4 deletions test/test_utils/png.py
Expand Up @@ -429,7 +429,7 @@ def __init__(
``zlib`` module is used (which is generally acceptable).

If `interlace` is true then an interlaced image is created
(using PNG's so far only interace method, *Adam7*). This does not
(using PNG's so far only interlace method, *Adam7*). This does not
affect how the pixels should be presented to the encoder, rather
it changes how they are arranged into the PNG file. On slow
connexions interlaced images can be partially decoded by the
Expand Down Expand Up @@ -524,7 +524,8 @@ def check_color(c, which):
bitdepth = int(8 * bytes_per_sample)
del bytes_per_sample
if not isinteger(bitdepth) or bitdepth < 1 or 16 < bitdepth:
raise ValueError("bitdepth (%r) must be a postive integer <= 16" % bitdepth)
raise ValueError("bitdepth (%r) must be a positive integer <= 16"
% bitdepth)

self.rescale = None
if palette:
Expand Down Expand Up @@ -1208,7 +1209,7 @@ def from_array(a, mode=None, info={}):
if dimension in info:
if info[dimension] != info["size"][axis]:
raise Error(
"info[%r] shhould match info['size'][%r]." % (dimension, axis)
"info[%r] should match info['size'][%r]." % (dimension, axis)
)
info["width"], info["height"] = info["size"]
if "height" not in info:
Expand Down Expand Up @@ -1922,7 +1923,7 @@ def iterdecomp(idat):
be an iterator that yields the ``IDAT`` chunk data.
"""

# Currently, with no max_length paramter to decompress, this
# Currently, with no max_length parameter to decompress, this
# routine will do one yield per IDAT chunk. So not very
# incremental.
d = zlib.decompressobj()
Expand Down
4 changes: 2 additions & 2 deletions test/time_test.py
Expand Up @@ -127,7 +127,7 @@ def todo_test_tick_busy_loop(self):
# more than 40 frames per second.
#
# Note that this function uses pygame.time.delay, which uses lots of
# cpu in a busy loop to make sure that timing is more acurate.
# cpu in a busy loop to make sure that timing is more accurate.
#
# New in pygame 1.8.0.

Expand Down Expand Up @@ -157,7 +157,7 @@ def todo_test_get_ticks(self):
# pygame.time.get_ticks(): return milliseconds
# get the time in milliseconds
#
# Return the number of millisconds since pygame.init() was called.
# Return the number of milliseconds since pygame.init() was called.
# Before pygame is initialized this will always be 0.
#

Expand Down