jposada202020
1931b6c042
fixing algorithm and MAX
2023-03-30 18:08:17 -04:00
jposada202020
4986ad6d6b
Update shared-module/bitmaptools/__init__.c
...
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:43:57 -04:00
jposada202020
f6a0fb20f2
Update shared-module/bitmaptools/__init__.c
...
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:29:39 -04:00
jposada202020
533f532ff2
Update shared-module/bitmaptools/__init__.c
...
Co-authored-by: Dan Halbert <halbert@halwitz.org>
2023-03-30 15:29:18 -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
hathach
8c1095b268
Merge branch 'main' into add-codespell
2023-03-23 14:09:57 +07: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
foamyguy
d30b89d8d1
Merge branch 'main' into boundary_fill_background_tasks
2023-03-14 18:24:01 -05:00
foamyguy
7740cbac97
do background tasks and handle interrupt during boundary fill
2023-03-04 13:13:59 -06:00
Maciej Sokołowski
e474df3a18
Add function for drawing polygons to bitmaptools
2023-01-20 23:14:38 +01:00
Maciej Sokołowski
2276254f6c
Fix compilation
2023-01-19 21:50:59 +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
Jeff Epler
34043c2d38
Only store up to 'width' pixels, not 'stride'
...
error detected by clang scan-build static analysis
2023-01-01 16:45:40 -06:00
Tsutomu IKEGAMI
c9aa4527a9
Fix freeze on bitmaptools.dither
2022-03-04 17:06:07 +09:00
Jeff Epler
30c07a772f
bitmaptools: dither: get rid of shifts
...
this happens to make the occasional FS dither artifact disappear.
I guess `a * b >> 8` and `(a * b) / 256` are not identical. I'm not
sure if it was just the parens or not, but write the clearer code and
rely on the compiler to substitute an appropriate shift if possible.
2021-11-24 09:51:24 -06:00
Jeff Epler
9af76a2f03
bitmaptools dither: Fix off-by-one error filling row data
2021-11-24 09:51:23 -06: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
d55388a17d
Add bitmaptools to unix build
2021-11-12 10:47:18 -06:00
Jeff Epler
621953c960
Additional missing-prototypes fixes
...
I think this correctly enables missing-prototypes in atmel-samd
and raspberrypi ports.
2021-11-10 10:55:53 -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
James Carr
56ecdee5a0
Correct the 24bit decoding in bitmaptools.readinto()
2021-09-13 19:50:35 +01:00
foamyguy
80c7a15df7
fix dirty area initial points
2021-08-22 10:52:28 -05:00
foamyguy
0f478d59fe
remove string import. use minimum sized dirty area
2021-08-21 16:15:59 -05:00
foamyguy
aeeba3904b
changed argument names and make replaced_color_value argument optional
2021-08-21 11:08:25 -05:00
foamyguy
6f783060c2
ignore points outside of bitmap
2021-08-15 19:11:15 -05:00
foamyguy
ec8b31e7b4
code format and translations
2021-08-13 10:13:38 -05:00
foamyguy
c1e164e1ff
rename to boundary_fill and clean up comments
2021-08-13 09:52:51 -05:00
foamyguy
fd372cf06c
it works!
2021-08-09 13:15:58 -05:00
foamyguy
87358f81b2
trying to check next pixel
2021-08-09 08:30:12 -05:00
foamyguy
158048e56b
trying to make lists
2021-08-08 14:33:07 -05:00
foamyguy
6d57f43eb3
try adding print
2021-08-08 09:34:52 -05:00
foamyguy
bcfec10552
starting bitmaptools.paint_fill
2021-08-08 09:31:09 -05:00
Jeff Epler
a05aab8304
Merge pull request #4454 from jepler/bitmaptools-readinto-4bit
...
Fix reading 4-bit data
2021-03-21 19:56:23 -05:00
Jeff Epler
c64fccbeee
hex may be more obvious
2021-03-21 13:48:08 -05:00
Jeff Epler
7229fe631d
Fix reading 4-bit data
2021-03-21 13:37:38 -05:00
Jeff Epler
e084a92671
Merge pull request #4432 from jepler/bitmap-dirty-improvements
...
Bitmap dirty improvements
2021-03-20 13:09:59 -05:00
Kevin Matocha
9b188934d1
off by one error in rotozoom dirty_area
2021-03-19 21:23:55 -05:00
Jeff Epler
95ac6c716b
rotozoom: switch to using set_dirty_area + write_pixel
2021-03-19 20:40:23 -05:00
Jeff Epler
d0125617fd
Merge pull request #4428 from kmatch98/bitmap-read-2
...
Add `reverse_rows` to speedy bitmaptools.readinto function
2021-03-18 18:41:35 -05:00
Jeff Epler
f5fd42c393
displayio: Move bitmap read-only checking to displayio_bitmap_set_dirty_area
...
This is a modest code savings, but more importantly it reduces
boilerplate in bitmap-modifying routines.
Callers need only ensure they call displayio_bitmap_set_dirty_area in
advance of the bitmap modifications they perform.
(note that this assumes that no bitmap operation can enter background
tasks. If an operation COULD enter background tasks, it MUST re-dirty
the area it touches when it exits, simply by a fresh call to
set_dirty_area with the same area as before)
2021-03-18 09:20:56 -05:00
Jeff Epler
36d608aa67
displayio_bitmap_set_dirty_area: rewrite in terms of displayio_area
...
.. simplifying code in the process. For instance, now fill_region
uses area routines to order and constrain its coordinates.
Happily, this change also frees a modest amount of code space.
2021-03-18 09:20:56 -05:00
Jeff Epler
47ca792765
arrayblit: mark bitmap area as dirty
2021-03-17 20:25:22 -05:00
Kevin Matocha
c37a1f45f3
ran pre-commit for formatting fixes
2021-03-17 11:00:32 -05:00
Kevin Matocha
580121d46e
minor formatting
2021-03-17 09:38:53 -05:00