Commit Graph

79 Commits

Author SHA1 Message Date
Jeff Epler
774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01:00
Jeff Epler
e1af819a91
fix (unused) default for some required args 2023-09-22 13:53:11 -05:00
Dan Halbert
6851faacaa Merge remote-tracking branch 'adafruit/main' into merge-micropython-v1.19.1 2023-08-18 13:29:39 -04:00
Dan Halbert
2171e67c1b merge latest adafruit/main 2023-08-13 19:43:54 -04:00
Melissa LeBlanc-Williams
db23a9c9fe Disable floppyio for feather m4 express + update docstring 2023-08-09 09:15:17 -07:00
Melissa LeBlanc-Williams
ea39d7089f Updated docstring stuff 2023-08-08 14:21:55 -07:00
Melissa LeBlanc-Williams
b25d3131a3 Update doc string 2023-08-08 12:54:14 -07:00
Melissa LeBlanc-Williams
549bbdc31c Alphablend changes 2023-08-08 12:42:48 -07:00
Dan Halbert
0d2c3c3f08 wip: continuing compilation fixes; mp_obj_alloc everywhere 2023-08-07 20:45:57 -04:00
Jeff Epler
16937b8a0d
Fix markup of bitmaptools.blit stubs
this prevented bitmaptools.blit from properly appearing in documentation.
2023-08-02 10:54:47 -05:00
foamyguy
72857994f2 change skip_index to skip_source_index 2023-07-05 17:27:41 -05:00
foamyguy
16d92ddd34 docs fix 2023-07-02 14:57:44 -05:00
foamyguy
96d3e662b3 refactor bitmap.blit into bitmaptools 2023-07-02 14:35:40 -05:00
jposada202020
2f3ea81277 correcting 2023-03-31 20:29:29 -04:00
jposada202020
df46636c5e improving range validation 2023-03-31 20:15:07 -04:00
jposada202020
9a77199f2e
Update shared-bindings/bitmaptools/__init__.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:43:48 -04:00
jposada202020
4e332fb1c4
Update shared-bindings/bitmaptools/__init__.h
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:28:42 -04:00
jposada202020
844ea2f60b
Update shared-bindings/bitmaptools/__init__.c
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:28:15 -04:00
jposada202020
6ad053e403 correcting feedback 2023-03-30 08:51:52 -04:00
jposada202020
f3d85d6932 Merge branch 'main' into adding_circle_bitmaptools 2023-03-30 07:44:07 -04:00
jposada202020
29613c73e1 pre-commit 2023-03-22 19:05:18 -04:00
jposada202020
0b3099a9ff adding bitmaptools circle 2023-03-22 18:44:45 -04:00
hathach
fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
MicroDev
b9e478af39
Merge pull request #7471 from matemaciek/main
Add function for drawing polygons to bitmaptools
2023-03-07 08:28:07 +05:30
foamyguy
812fa2b34b change docstring, add example code. 2023-03-06 16:55:12 -06:00
MicroDev
d9d94eacca
run updated pre-commit 2023-02-01 13:38:41 +05:30
Maciej Sokołowski
e474df3a18 Add function for drawing polygons to bitmaptools 2023-01-20 23:14:38 +01:00
Maciej Sokołowski
483f14b73f Allow lines with ends out of bitmap in bitmaptools_obj_draw_line 2023-01-19 21:37:25 +01:00
Dan Halbert
a974402542 Improve type validation errors messages, especially for pins 2023-01-10 15:02:55 -05:00
Jeff Epler
907c5d387f
Tweak black_bindings
Originally, black_bindings found each contiguous "//|" block and sent
it to black independently. This was slower than it needed to be.

Instead, swap the comment prefix: when running black, take off
"//|" prefixes and put "##|" prefixes on all un-prefixed lines.
Then, after black is run, do the opposite operation

This more than doubles the overall speed of "pre-commit run --all",
from 3m20s to 55s CPU time on my local machine (32.5s to under 10s
"elapsed" time)

It also causes a small amount of churn in the bindings, because
black now sees enough context to know whether one 'def' follows another
or ends the 'def's in a 'class'. In the latter case, it adds an extra
newline, which becomes a "//|" line.

I'm less sure why a trailing comma was omitted before down in
rp2pio/StateMachine.c but let's roll with it.
2022-09-30 11:18:13 -05:00
Jeff Epler
b2cc8d2aad
run black_bindings across all bindings 2022-09-27 15:21:42 -05:00
TimonPeng
1cc4d63c52 Fix bindings typing 2022-09-16 00:02:17 +08:00
foamyguy
b6c7815f83 improving rotozoom() argument docstrings 2022-06-10 18:01:02 -05:00
Alec Delaney
82810085b5 Add note about display guide to bitmaptools 2022-05-13 11:47:21 -04:00
Jeff Epler
fb79d1c1d1 bitmaptools: add missing types
These diagnostics occurred, but weren't treated as errors:
```
[WARN] Missing return type: alphablend on line 38
[WARN] Missing argument type: dest_bitmap on line 38
[WARN] Missing argument type: source_bitmap_1 on line 38
[WARN] Missing argument type: source_bitmap_2 on line 38
```
2021-12-22 11:16:38 -06:00
Jeff Epler
6191696232
bitmaptools: Fix the DitgherAlorithm.FloydStenberg value 2021-11-24 09:51:19 -06:00
Jeff Epler
711f1f833b
bitmaptools: Fix the case where factor's Python type is int
mp_obj_float_get gets the value of an object, which must be
exactly a float.  mp_obj_get_float gets the float value of
an object of various types, including floats & ints.
2021-11-20 21:15:26 -05:00
Jeff Epler
ee5e7161af
bitmaptools: use stream API
this allows `readinto` to succeed in the unix port, where the VFS
is not FAT
2021-11-20 08:51:40 -05:00
Jeff Epler
06bb6ea5a2
use MP_OBJ_NULL in preference to 0 2021-11-12 13:21:53 -06:00
Jeff Epler
167665f8b7
fix build 2021-11-12 11:03:45 -06:00
Jeff Epler
d55388a17d
Add bitmaptools to unix build 2021-11-12 10:47:18 -06:00
Jeff Epler
ff9b10c7b6 fix doc build problems 2021-11-08 16:46:44 -06:00
Jeff Epler
cbfa41f238 Merge remote-tracking branch 'origin/main' into dither3 2021-11-08 16:46:36 -06:00
Jeff Epler
eaf8bc0abe bitmaptools: add dither
This can convert a BGR565_SWAPPED bitmap to B&W in about 82ms on
esp32-s2.
2021-11-08 10:35:44 -06:00
Jeff Epler
dfafab675f Enable L8 mode for alphablend 2021-11-05 11:26:07 -05:00
Jeff Epler
2ec2761ce0 bitmaptools: add alphablend
This blends two "565"-format bitmaps, including byteswapped ones. All
the bitmaps have to have the same memory format.

The routine takes about 63ms on a Kaluga when operating on 320x240 bitmaps.
Of course, displaying the bitmap also takes time.

There's untested code for the L8 (8-bit greyscale) case. This can be
enabled once gifio is merged.
2021-11-05 08:16:48 -05:00
microDev
1977011cfd
use mp_arg_validate_type for keyword args 2021-10-10 15:28:35 +05:30
James Carr
db936f8a20
bitmaptools.__init__ minor update
Update the error message in bitmaptools_readinto() to match the code.
2021-09-18 21:04:45 +01:00
Rob Capellini
b8f2799609 Convert more modules to use MP_REGISTER_MODULE
Convert bitbangio, bitmaptools, _bleio, board, busio, countio, digitalio, framebufferio, frequencyio, gamepadshift, getpass, keypad, math, microcontroller, and msgpack modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-08-26 21:35:02 -04:00
foamyguy
aeeba3904b changed argument names and make replaced_color_value argument optional 2021-08-21 11:08:25 -05:00