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
..
2025-05-07 14:56:47 +10:00
2024-03-07 16:25:17 +11:00
2024-03-16 12:19:12 +11:00
2025-06-04 02:21:32 +10:00
2024-09-06 17:14:03 +10:00
2025-05-07 17:03:28 +10:00
2025-02-14 12:32:00 +11:00
2025-02-14 12:55:25 +11:00
2025-06-04 02:21:32 +10:00
2025-05-08 15:32:05 +10:00
2025-03-27 17:51:12 +11:00
2025-05-07 17:03:28 +10:00
2022-05-05 13:30:40 +10:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-08 13:31:02 +11:00
2024-03-15 12:04:34 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-03-15 12:04:25 +11:00
2024-07-12 22:59:31 +10:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2025-04-22 11:29:32 +10:00
2024-03-07 14:20:42 +11:00
2023-12-22 10:26:52 +11:00
2024-06-20 00:11:05 +10:00
2024-03-07 14:20:42 +11:00
2025-06-04 02:21:32 +10:00
2025-06-04 02:21:32 +10:00
2024-07-22 10:42:29 +10:00
2024-03-07 14:20:42 +11:00
2025-03-27 11:58:59 +11:00
2025-06-04 02:40:45 +10:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2025-05-19 02:09:40 +02:00
2025-06-03 12:52:02 +10:00
2025-05-13 10:36:47 +10:00
2025-05-13 10:36:47 +10:00
2025-02-11 16:54:20 +11:00
2024-08-29 23:46:13 +10:00
2024-08-29 23:46:13 +10:00
2024-03-07 14:20:42 +11:00
2024-08-08 17:59:32 +10:00
2024-08-08 17:59:32 +10:00
2024-03-15 18:11:28 +11:00
2024-08-08 18:02:21 +10:00
2024-03-15 18:11:28 +11:00
2024-12-20 21:58:50 +11:00
2024-03-07 14:20:42 +11:00
2024-12-10 12:10:36 +11:00
2024-03-07 14:20:42 +11:00
2024-08-14 12:55:45 +10:00
2024-03-07 14:20:42 +11:00
2025-01-02 13:33:39 +11:00
2024-03-07 14:20:42 +11:00
2023-06-08 17:54:14 +10:00
2025-05-13 10:36:47 +10:00
2025-05-13 10:36:47 +10:00
2025-05-13 10:36:47 +10:00
2025-03-06 12:52:35 +11:00
2024-07-04 15:55:03 +10:00
2024-03-07 14:20:42 +11:00
2023-06-08 17:54:14 +10:00
2020-09-08 11:41:31 +10:00
2025-05-08 15:32:05 +10:00
2025-05-20 23:14:41 +10:00
2019-06-03 16:47:35 +10:00
2024-07-04 15:55:03 +10:00
2024-07-04 15:55:03 +10:00
2024-07-12 01:03:46 +10:00
2025-05-15 11:56:14 +10:00
2024-10-23 16:29:28 +11:00
2024-03-16 10:59:03 +11:00
2024-11-13 14:21:29 +11:00
2024-03-07 14:20:42 +11:00
2024-03-07 14:20:42 +11:00
2024-07-23 11:39:17 +10:00
2019-10-29 12:12:37 +11:00
2024-03-07 14:20:42 +11:00
2019-10-29 14:17:29 +11:00
2024-03-07 14:20:42 +11:00
2025-05-15 13:09:49 +10:00
2024-10-09 15:03:07 +11:00
2024-07-04 15:55:03 +10:00
2018-06-06 14:33:42 +10:00
2024-12-23 13:04:54 +11:00
2024-12-23 13:04:54 +11:00
2025-03-27 17:04:12 +11:00
2024-12-23 13:04:54 +11:00
2025-03-27 16:37:04 +11:00
2025-03-06 12:52:35 +11:00
2022-09-19 19:06:07 +10:00
2017-07-18 11:57:39 +10:00