Phil Howard
a2e6a8838e
PicoVector: AF: Support for 16bit point count.
...
Somewhere in the conversion from C++ to C we lost support for 16-bit point counts.
Raise the internal point count to 16-bit, and check for a flag in the font.
If the flag is set, treat the point count as 16-bits, otherwise fallback to 8 for back compatibility.
2025-01-16 18:12:44 +00:00
Phil Howard
5e2ba8d6cc
PicoVector: Fix fonts not rendering with no transform set.
2025-01-16 16:32:34 +00:00
Mike Bell
974b3ccb6b
PicoVector: Fix ppp arc memory corruption.
2025-01-16 16:32:34 +00:00
Mike Bell
dff55e1789
PicoVector: Fully initialise text metrics.
2025-01-16 16:32:34 +00:00
Phil Howard
219b93c90b
PicoVector: Initialise pp_transform().
...
For some reason this was unset causing drawing to fail.
Reset it to a known good state in the constructor.
2025-01-16 16:32:34 +00:00
Phil Howard
3f2bce2979
PicoVector: Fix bug in Polygon.rectangle.
...
Fix spurious point in top-left corner causing a broken triangular
rectangle when any permutation of corners other than the bottom-left
is rounded.
2025-01-16 16:32:34 +00:00
Phil Howard
bed45f6424
PicoVector: Tweak for C++ compatibility.
2025-01-16 16:32:34 +00:00
Mike Bell
e99a791352
PicoVector: Avoid clipping bottom right AA edges.
2025-01-16 16:32:34 +00:00
Jonathan Williamson
749feb03ea
PicoVector: Add star and line primitives.
2025-01-16 16:32:34 +00:00
Phil Howard
515521c16c
PicoVector: Avoid MicroPython GC.
...
Since we're not using tracked allocation, any memory we don't explicitly
hold a reference to will be assumed unused by MicroPython's GC.
Pass up the pp_nodes and pp_node_counts points (hackily) to fix this.
2025-01-16 16:32:34 +00:00
Phil Howard
93323f4a28
PicoVector: Remove * 4 from pp_nodes lookup.
2025-01-16 16:32:34 +00:00
Mike Bell
4274cd183b
PicoVector: Apply overall transform to text rendering.
2025-01-16 16:32:34 +00:00
Mike Bell
6942bc7329
PicoVector: Add optional text max width and max height.
2025-01-16 16:32:34 +00:00
Phil Howard
cc38cf06fb
PicoVector: Revert the tile buffer to be fixed.
...
Ensure that MicroPython doesn't ever place the tile buffer into PSRAM
and trash performance.
2025-01-16 16:32:34 +00:00
Phil Howard
234ea41f40
PicoVector: Runtime buffer allocation.
2025-01-16 16:32:34 +00:00
Phil Howard
0cd4669f7d
PicoVector: Prefix some pretty-poly variables.
2025-01-16 16:32:34 +00:00
Phil Howard
230d9facab
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-01-16 16:32:34 +00:00
Phil Howard
9989135926
PicoVector: Improve text rendering and control.
2025-01-16 16:32:34 +00:00
Phil Howard
d4e0d660b9
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-01-16 16:32:34 +00:00
Phil Howard
34cd133cd1
PicoVector: Rewrite around new linked-lists poly.
2025-01-16 16:32:34 +00:00
Phil Howard
5c03d8e30a
PicoVector: Use tile renderer for all pens.
2025-01-16 16:32:34 +00:00
Phil Howard
7fd72fe06c
PicoVector: Fix x16 anti-aliasing.
2025-01-16 16:32:34 +00:00
Phil Howard
22850357ef
PicoVector: C++ basic bringup.
2025-01-16 16:32:34 +00:00
Phil Howard
e35678e4c0
PicoVector: render text that doesn't end with a linebreak.
2025-01-16 16:32:34 +00:00
Phil Howard
89fc6256d3
PicoVector: Fix out of bounds drawing.
...
pretty-poly.h is not giving us fully clipped rectangles, so revert to the
slower bounds checked pixel for now.
2025-01-16 16:32:34 +00:00
Phil Howard
26c310fbe4
PicoVector: fix pointer arithmatic in af_load_font_file.
...
Pointers were being incremented as if they were bytes, rather than larger
containers.
2025-01-16 16:32:34 +00:00
Phil Howard
29ee929d14
PicoVector: Break things until they work.
2025-01-16 16:32:34 +00:00
Phil Howard
dc251a42bf
PicoVector: alright-fonts bringup.
2025-01-16 16:32:34 +00:00
Phil Howard
c5af1752ce
PicoVector: Swap rotate translation order.
2025-01-16 16:32:34 +00:00
Phil Howard
1603b64af9
PicoVector: Vendor pretty-poly and tweak rotation.
2025-01-16 16:32:34 +00:00
Phil Howard
6a8a7c4a0c
PicoVector: Suppress errors.
...
Ignore sign compare and narrowing conversion errors in pretty-poly.h.
2025-01-16 16:32:34 +00:00
Phil Howard
f7a33ade4e
PicoVector: Rewrite around new C pretty-poly.h.
2025-01-16 16:32:34 +00:00
Phil Howard
5f730ff400
PicoVector: Pass PicoGraphics clip into Pretty Poly.
2023-09-12 12:03:09 +01:00
Philip Howard
c3919bd648
Merge pull request #840 from MichaelBell/patch-pretty-poly-perf
...
Improve pretty_poly performance
2023-09-11 12:03:25 +01:00
Philip Howard
ed3ce45f00
Merge pull request #842 from MichaelBell/patch-fix-text-newline
...
Fix newlines in rotated text
2023-09-11 11:37:38 +01:00
Philip Howard
1a7deaab71
Merge pull request #841 from MichaelBell/patch-fix-vector-transform
...
Initialize all matrix values
2023-09-11 11:36:52 +01:00
Mike Bell
80e1e16782
Fixes from compiling with gcc 12
2023-09-10 21:02:16 +01:00
Mike Bell
cdd648f3f6
Small improvements to rotated font rendering
2023-09-10 17:20:44 +01:00
Mike Bell
81f42f25b6
Fix newlines in rotated text
2023-09-10 17:20:10 +01:00
Mike Bell
841c141ebf
Interpolators for line segment, and faster transforms
2023-09-10 13:22:21 +01:00
Mike Bell
c812eec432
Initialize all matrix values
2023-09-10 13:18:13 +01:00
Mike Bell
41eb2b503e
Additional improvements to pretty_poly
2023-09-10 00:08:35 +01:00
Mike Bell
581481c2ef
Improve pretty_poly performance
...
(cherry picked from commit 1077a12ff4fd958a7ea6d9e4fa5a86551eba5126)
2023-09-09 01:30:10 +01:00
Mike Bell
e908d5e53e
Allow pen function for fast tile alpha blending
2023-09-08 23:48:16 +01:00
Phil Howard
c443f8d206
PicoVector: Tweak polygon tile rendering loop.
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
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
4671607b3a
PicoVector: Vector anti-aliasing support.
2023-08-22 09:32:28 +01:00