summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorKevin Matocha <kmatocha@icloud.com>2021-03-16 10:35:40 -0500
committerKevin Matocha <kmatocha@icloud.com>2021-03-16 10:35:40 -0500
commita367e84ceae8e01176da46ee7f43d223376a56c0 (patch)
tree7126be97306bd3ba56b576950d1c4b7015505883 /shared-bindings
parent227ac674639fa9df071ca7c8b2373029cc0b4618 (diff)
update docstrings
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/bitmaptools/__init__.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c
index ab462093c..af30bc9aa 100644
--- a/shared-bindings/bitmaptools/__init__.c
+++ b/shared-bindings/bitmaptools/__init__.c
@@ -361,21 +361,20 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_li
//| def arrayblit(bitmap: display.Bitmap, data: ReadableBuffer, x1: int=0, y1: int=0, x2: Optional[int]=None, y2: Optional[int]=None, skip_index:Optional[int]=None) -> None:
//| """Inserts pixels from ``data`` into the rectangle of width×height pixels with the upper left corner at ``(x,y)``
//|
-//| The values from ``data`` are taken modulo the number of color values
-//| avalable in the destintaion bitmap.
+//| The values from ``data`` are taken modulo the number of color values
+//| avalable in the destintaion bitmap.
//|
-//| If x1 or y1 are not specified, they are taken as 0. If x2 or y2
-//| are not specified, or are given as -1, they are taken as the width
-//| and height of the image.
+//| If x1 or y1 are not specified, they are taken as 0. If x2 or y2
+//| are not specified, or are given as -1, they are taken as the width
+//| and height of the image.
//|
-//| The coordinates affected by the blit are ``x1 <= x < x2`` and ``y1 <
-//| y < y2``.
+//| The coordinates affected by the blit are ``x1 <= x < x2`` and ``y1 <= y < y2``.
//|
-//| ``data`` must contain at least as many elements as required. If it
-//| contains excess elements, they are ignored.
+//| ``data`` must contain at least as many elements as required. If it
+//| contains excess elements, they are ignored.
//|
-//| The blit takes place by rows, so the first elements of ``data`` go
-//| to the first row, the next elements to the next row, and so on.
+//| The blit takes place by rows, so the first elements of ``data`` go
+//| to the first row, the next elements to the next row, and so on.
//|
//| :param displayio.Bitmap bitmap: A writable bitmap
//| :param ReadableBuffer data: Buffer containing the source pixel values
@@ -385,7 +384,6 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_draw_line_obj, 0, bitmaptools_obj_draw_li
//| :param int y2: The bottom corner of the area to blit into (exclusive)
//| :param int skip_index: Bitmap palette index in the source that will not be copied,
//| set to None to copy all pixels"""
-//| """
//| ...
//|
STATIC mp_obj_t bitmaptools_arrayblit(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
@@ -438,12 +436,13 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_arrayblit_obj, 0, bitmaptools_arrayblit);
//| def readinto(bitmap: displayio.Bitmap, file: typing.BinaryIO, bits_per_pixel: int, element_size: int = 1, reverse_pixels_in_element: bool = False, swap_bytes_in_element: bool = False) -> None:
-//| """Read from a binary file into a bitmap
-//| The file must be positioned so that it consists of ``bitmap.height`` rows of pixel data, where each row is the smallest multiple of ``element_size`` bytes that can hold ``bitmap.width`` pixels.
+//| """Reads from a binary file into a bitmap.
//|
-//| The bytes in an element can be optionally swapped, and the pixels in an element can be reversed.
+//| The file must be positioned so that it consists of ``bitmap.height`` rows of pixel data, where each row is the smallest multiple of ``element_size`` bytes that can hold ``bitmap.width`` pixels.
//|
-//| This function doesn't parse image headers, but is useful to speed up loading of uncompressed image formats such as PCF glyph data.
+//| The bytes in an element can be optionally swapped, and the pixels in an element can be reversed.
+//|
+//| This function doesn't parse image headers, but is useful to speed up loading of uncompressed image formats such as PCF glyph data.
//|
//| :param displayio.Bitmap bitmap: A writable bitmap
//| :param typing.BinaryIO file: A file opened in binary mode
@@ -451,7 +450,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_arrayblit_obj, 0, bitmaptools_arrayblit);
//| :param int element_size: Number of bytes per element. Values of 1, 2, and 4 are supported, except that 24 ``bits_per_pixel`` requires 1 byte per element.
//| :param bool reverse_pixels_in_element: If set, the first pixel in a word is taken from the Most Signficant Bits; otherwise, it is taken from the Least Significant Bits.
//| :param bool swap_bytes_in_element: If the ``element_size`` is not 1, then reverse the byte order of each element read.
-//| """
+//| :param bool reverse_rows: Reverse the direction of the row loading."""
//| ...
//|