Damien George
b15348415e
extmod/modframebuf: Add support for blit'ing read-only data.
...
Currently the `FrameBuffer.blit(buf, x, y)` method requires the `buf`
argument to be another `FrameBuffer`, which is quite restrictive because it
doesn't allow blit'ing read-only memory/data.
This commit extends `blit()` to allow the `buf` argument to be a tuple or
list of the form:
(buffer, width, height, format[, stride])
where `buffer` can be anything with the buffer protocol and may be
read-only, eg `bytes`.
Also, the palette argument to `blit()` may be of the same form.
The form of this tuple/list was chosen to be the same as the signature of
the `FrameBuffer` constructor (that saves quite a bit of code size doing it
that way).
Signed-off-by: Damien George <damien@micropython.org >
2025-06-04 02:40:45 +10:00
..
2017-11-10 00:09:43 +02:00
2025-02-11 16:17:00 +11:00
2024-05-15 14:13:30 +10:00
2024-12-03 22:22:55 +11:00
2024-11-30 13:08:33 +11:00
2022-06-21 00:44:49 +10:00
2025-02-11 16:17:00 +11:00
2017-07-02 15:37:31 +03:00
2024-03-19 10:09:11 +11:00
2021-08-13 22:53:29 +10:00
2023-09-01 12:23:37 +10:00
2021-08-13 22:53:29 +10:00
2025-05-16 16:49:59 +10:00
2023-11-22 16:48:35 +11:00
2025-02-11 16:23:35 +11:00
2025-06-04 02:40:45 +10:00
2023-09-15 12:19:13 +10:00
2023-07-21 19:32:42 +10:00
2021-08-13 22:53:29 +10:00
2021-12-15 11:49:22 +11:00
2025-02-11 16:59:11 +11:00
2023-10-16 23:07:13 +11:00
2021-08-13 22:53:29 +10:00
2021-12-15 11:49:22 +11:00
2023-04-27 18:03:06 +10:00
2024-03-07 16:25:17 +11:00
2021-12-15 11:49:22 +11:00
2023-04-27 18:03:06 +10:00
2023-06-19 18:36:54 +10:00
2025-02-28 16:51:54 +11:00
2025-05-16 12:34:32 +10:00
2024-11-19 10:57:26 +11:00
2024-12-19 16:04:47 +11:00
2024-02-07 13:25:10 +11:00
2025-03-13 12:27:23 +11:00
2020-10-20 17:21:30 +11:00
2023-04-27 18:03:06 +10:00
2023-04-27 18:03:06 +10:00
2024-11-30 13:08:33 +11:00
2025-05-28 12:13:51 +10:00
2024-12-20 14:02:17 +11:00
2023-06-23 15:34:49 +10:00
2025-02-11 16:59:11 +11:00
2024-09-17 11:22:26 +10:00
2024-09-19 18:00:44 +10:00
2024-08-01 12:04:58 +10:00
2025-02-11 12:56:42 +11:00
2025-02-11 16:11:33 +11:00
2024-08-29 23:47:55 +10:00
2025-02-11 12:56:42 +11:00
2025-03-05 16:15:31 +11:00
2024-07-05 16:06:04 +10:00
2024-03-15 18:11:28 +11:00
2024-02-07 13:25:09 +11:00
2023-09-04 22:40:56 +10:00
2022-06-21 14:33:23 +10:00
2022-06-21 14:33:23 +10:00
2025-01-17 12:13:17 +11:00
2022-06-21 14:33:23 +10:00
2022-06-21 14:33:23 +10:00
2024-02-07 13:25:09 +11:00
2023-04-27 18:03:06 +10:00
2022-06-21 14:33:23 +10:00
2022-06-21 14:33:23 +10:00
2022-07-29 12:16:32 +10:00
2024-11-19 10:57:26 +11:00
2022-06-21 14:33:23 +10:00
2022-06-21 14:33:23 +10:00
2022-06-21 14:33:23 +10:00
2022-06-21 14:33:23 +10:00
2024-11-30 13:08:33 +11:00
2022-06-21 14:33:23 +10:00
2022-06-21 14:33:23 +10:00
2022-06-21 14:33:23 +10:00
2023-06-08 17:54:11 +10:00
2021-08-13 22:53:29 +10:00
2024-03-19 17:10:54 +11:00
2024-02-07 13:25:09 +11:00
2024-10-15 12:09:48 +11:00
2025-02-08 12:34:26 +11:00
2024-03-19 17:10:54 +11:00
2021-08-13 22:53:29 +10:00
2025-06-03 12:52:25 +10:00
2025-02-14 12:55:25 +11:00
2023-08-23 11:58:11 +10:00
2024-03-20 14:13:49 +11:00
2025-03-05 12:23:40 +11:00
2025-05-28 12:13:28 +10:00
2021-08-13 22:53:29 +10:00
2025-03-27 16:37:04 +11:00
2015-10-21 15:30:56 +02:00
2025-05-07 15:16:55 +10:00
2024-02-07 13:25:09 +11:00
2024-02-07 13:25:09 +11:00
2025-04-29 23:00:37 +10:00
2021-08-13 20:21:14 +10:00
2023-07-21 19:32:42 +10:00