diff --git a/README.md b/README.md index 4e7f9e1..f7b53b1 100644 --- a/README.md +++ b/README.md @@ -1755,8 +1755,8 @@ JSON ```python import json - = json.dumps(, ensure_ascii=True, indent=None) - = json.loads() + = json.dumps() # Converts object to JSON string. + = json.loads() # Converts JSON string to object. ``` ### Read Object from JSON File @@ -1780,8 +1780,8 @@ Pickle ```python import pickle - = pickle.dumps() - = pickle.loads() + = pickle.dumps() # Converts object to bytes. + = pickle.loads() # Converts bytes to object. ``` ### Read Object from File @@ -2985,8 +2985,8 @@ while all(event.type != pg.QUIT for event in pg.event.get()): ### Surface **Object for representing images.** ```python - = pg.display.set_mode((width, height)) # Returns display surface. - = pg.Surface((width, height), flags=0) # New RGB surface. RGBA if `flags=pg.SRCALPHA`. + = pg.display.set_mode((width, height)) # Returns a display surface. + = pg.Surface((width, height)) # New RGB surface. RGBA if `flags=pg.SRCALPHA`. = pg.image.load('') # Loads the image. Format depends on source. = .subsurface() # Returns a subsurface. ``` @@ -3007,8 +3007,8 @@ from pygame.transform import scale, ... ```python from pygame.draw import line, ... line(, color, (x1, y1), (x2, y2), width) # Draws a line to the surface. -arc(, color, , from_rad, to_rad) # Also: ellipse(, color, ) -rect(, color, ) # Also: polygon(, color, points) +arc(, color, , from_rad, to_rad) # Also: ellipse(, color, , width=0) +rect(, color, , width=0) # Also: polygon(, color, points, width=0) ``` ### Font diff --git a/index.html b/index.html index 6a01b81..960485f 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -1471,8 +1471,8 @@ CompletedProcess(args=['bc', #JSON

Text file format for storing collections of strings and numbers.

import json
-<str>    = json.dumps(<object>, ensure_ascii=True, indent=None)
-<object> = json.loads(<str>)
+<str>    = json.dumps(<object>)    # Converts object to JSON string.
+<object> = json.loads(<str>)       # Converts JSON string to object.
 
@@ -1487,8 +1487,8 @@ CompletedProcess(args=['bc', #Pickle

Binary file format for storing Python objects.

import pickle
-<bytes>  = pickle.dumps(<object>)
-<object> = pickle.loads(<bytes>)
+<bytes>  = pickle.dumps(<object>)  # Converts object to bytes.
+<object> = pickle.loads(<bytes>)   # Converts bytes to object.
 
@@ -2429,8 +2429,8 @@ rect = pg.Rect(240, 2 <int> = <Rect>.collidelist(<list_of_Rect>) # Returns index of first colliding Rect or -1. <list> = <Rect>.collidelistall(<list_of_Rect>) # Returns indexes of all colliding rectangles. -

Surface

Object for representing images.

<Surf> = pg.display.set_mode((width, height))   # Returns display surface.
-<Surf> = pg.Surface((width, height), flags=0)   # New RGB surface. RGBA if `flags=pg.SRCALPHA`.
+

Surface

Object for representing images.

<Surf> = pg.display.set_mode((width, height))   # Returns a display surface.
+<Surf> = pg.Surface((width, height))            # New RGB surface. RGBA if `flags=pg.SRCALPHA`.
 <Surf> = pg.image.load('<path>')                # Loads the image. Format depends on source.
 <Surf> = <Surf>.subsurface(<Rect>)              # Returns a subsurface.
 
@@ -2447,8 +2447,8 @@ rect = pg.Rect(240, 2
from pygame.draw import line, ...
 line(<Surf>, color, (x1, y1), (x2, y2), width)  # Draws a line to the surface.
-arc(<Surf>, color, <Rect>, from_rad, to_rad)    # Also: ellipse(<Surf>, color, <Rect>)
-rect(<Surf>, color, <Rect>)                     # Also: polygon(<Surf>, color, points)
+arc(<Surf>, color, <Rect>, from_rad, to_rad)    # Also: ellipse(<Surf>, color, <Rect>, width=0)
+rect(<Surf>, color, <Rect>, width=0)            # Also: polygon(<Surf>, color, points, width=0)
 

Font

<Font> = pg.font.SysFont('<name>', size)        # Loads the system font or default if missing.
 <Font> = pg.font.Font('<path>', size)           # Loads the TTF file. Pass None for default.
@@ -2901,7 +2901,7 @@ $ pyinstaller script.py --add-data '<path>:.'