Phil Howard
5ed7913a2c
MicroPython: Fix errors reporting an errno.
2025-04-25 17:33:53 +01:00
Phil Howard
5aaf5d3608
MicroPython: Add MP_ERROR_TEXT() around errors.
...
This is required for MicroPython error text compression which is
going to be enabled by default for RP2 builds.
We have a lot of error messages, so the potential flash gain here
is worth the effort of making this work.
2025-04-25 17:33:53 +01:00
Phil Howard
9588ee1c26
PicoVector: Make Polygon().path chainable.
2025-04-25 17:33:53 +01:00
Phil Howard
fbe2851eaf
PicoVector: Improve transform handling.
...
* Store a reference to transform, so `set_transform(Transform())` is not GC'd until it is replaced
* Transformations return the transform, allowing chaining: `transform.rotate().scale().translate()`
* A new `get_transform` method for getting the currently set transform.
2025-04-25 17:33:53 +01:00
Phil Howard
a2b91340e2
PicoVector: Don't force iterated points to int().
2025-04-25 17:33:53 +01:00
Phil Howard
2f5ac9b2db
PicoVector: Fix bug in polygon iterator.
...
list(Polygon) should return a list of points, but crashed with non-empty polygons.
We were advancing to the next path and then retriving an invalid point count for building the tuple.
Save the point count before advancing to the next path.
2025-04-25 17:33:53 +01:00
Phil Howard
660a19952b
PicoVector: Add arbitrary matrix transform.
2025-04-25 17:33:52 +01:00
Phil Howard
e1143e80f3
PicoVector: Fix bug in Polygon.regular.
2025-04-25 17:33:52 +01:00
Phil Howard
70a241ebd4
PicoGraphics: Check for out of range layers.
2025-04-25 17:33:52 +01:00
Phil Howard
85c2c659b9
PicoVector: MPY bindings for line and arc.
2025-04-25 17:33:52 +01:00
Mike Bell
650fcf6697
PicoVector: Add optional text max width and max height.
2025-04-25 17:33:52 +01:00
Phil Howard
8f7c1b3c70
PicoVector: Runtime buffer allocation.
2025-04-25 17:33:52 +01:00
Phil Howard
85dee30657
PicoVector: Remove (ifdef guard) debug functions.
2025-04-25 17:33:52 +01:00
Phil Howard
b40818c900
PicoVector: Refactor text multiline support.
...
Drop dependence on null terminated strings, and for a final linebreak.
Bound all text processing using the text length.
2025-04-25 17:33:52 +01:00
Phil Howard
8f7e8d4334
PicoVector: Improve text rendering and control.
2025-04-25 17:33:52 +01:00
Phil Howard
75a01b2fb8
PicoVector: Big refactor, ppp primitives.
...
* Remove Polygon types in favour of primitives .circle, .rectangle etc
* Add a new Transform type for building up transformation matrices
* Add support to set/clear transform on drawing
2025-04-25 17:33:52 +01:00
Phil Howard
1115900443
PicoVector: Rewrite around new linked-lists poly.
2025-04-25 17:33:52 +01:00
Phil Howard
be5315dab3
PicoVector: Support float types in MicroPython bindings.
2025-04-25 17:33:52 +01:00
Phil Howard
ede2bad4f3
PicoVector: Remove malloc from MicroPython bindings.
2025-04-25 17:33:52 +01:00
Phil Howard
116df431fb
PicoVector: Break things until they work.
2025-04-25 17:33:52 +01:00
Phil Howard
9c0e696230
PicoVector: alright-fonts bringup.
2025-04-25 17:33:52 +01:00
Phil Howard
d19971d7e0
PicoVector: Rewrite MicroPython bindings.
2025-04-25 17:33:52 +01:00
Phil Howard
517f8ae1cd
global: Remove the STATIC macro.
...
Reflect the changes proposed in micropython/micropython#13763 .
2024-06-03 13:44:23 +01:00
Phil Howard
47e3aed88f
MicroPython: Switch to mp_obj_malloc_with_finaliser.
2024-06-03 11:40:29 +01:00
Phil Howard
ae7e6e8c6c
PicoVector: Add a bounds method for polygon bounds.
2023-09-12 13:18:33 +01:00
Phil Howard
231ceb70f2
PicoVector: Add basic polygon center of mass function.
2023-09-06 10:12:08 +01:00
Phil Howard
591058fb12
PicoVector: Store pointer to PP mem.
2023-08-22 09:32:28 +01:00
Phil Howard
cfe8b3c096
PicoVector: Text rotation support.
2023-08-22 09:32:28 +01:00
Phil Howard
9d0501a43c
PicoVector: Polygon iter interface.
2023-08-22 09:32:28 +01:00
Phil Howard
7c5ebfce8c
PicoVector: Matrix transforms and polygon type.
2023-08-22 09:32:28 +01:00
Phil Howard
61c9d7e9b6
PicoVector: Experimental matrix transforms.
2023-08-22 09:32:28 +01:00
Phil Howard
c7d9fe411a
PicoVector: Bugfixes and font/aa options.
2023-08-22 09:32:28 +01:00
Phil Howard
9e430fd68c
PicoVector: Better separation of concerns, add Alright Fonts support.
2023-08-22 09:32:28 +01:00
Phil Howard
c9a8d5ef49
PicoVector: Move polygon drawing to a new home.
2023-08-22 09:32:28 +01:00