Cosimo Lupo
971bcbff6f
colorLib: allow color stops to be built from list of dicts as well as tuples
2020-03-12 16:03:11 +00:00
Cosimo Lupo
b7f9d8d564
colorLib: minor simplify buildPoint
...
this also allows to build from any sequence or iterable, not just tuple
2020-03-12 15:10:30 +00:00
Cosimo Lupo
4433b29c55
colorLib: fix type hints of 'extend' param in buildColorLine
...
accept either int, str ('pad', 'repeat', 'reflect') or ExtendMode enums
2020-03-11 19:07:14 +00:00
Cosimo Lupo
5a8830ebc9
colorLib_test: add test for buildCORL with automatic or explicit 'version'
2020-03-11 19:01:25 +00:00
Cosimo Lupo
63e2be484e
colorLib: refactor _splitSolidAndGradientGlyphs and add test
2020-03-11 14:22:58 +00:00
Cosimo Lupo
5629d5d8d9
colorLib: allow to build Paint, ColorLine, Color from dict
2020-03-11 13:27:59 +00:00
Cosimo Lupo
2f264bcb76
colorLib: add separate buildLayerV1Record and buildBaseGlyphV1Record functions
2020-03-10 15:33:52 +00:00
Cosimo Lupo
44d729ad3c
colorLib: in buildColorStop accept color tuple as parameter
...
and use Sequence instead of List for input params type hints
2020-03-10 11:49:04 +00:00
Cosimo Lupo
b640897a9a
colorLib: must copy p1 when p2 is None
...
ot.Point is mutable
2020-03-09 19:20:15 +00:00
Cosimo Lupo
1362ba4ba1
colorLib: minor: rename stopOffset parameter to offset
2020-03-09 16:45:56 +00:00
Cosimo Lupo
82c2b3632f
minor: fix type hint
2020-03-09 15:01:50 +00:00
Cosimo Lupo
d098789206
default transparency is 0 (fully opaque)
...
I was confusing 'transparency' with SVG-like 'opacity' which defaults to 1.0.
Here 1.0 means fully transparent, so it makes sense the default to be 0.0 for fully opaque
2020-03-09 14:50:06 +00:00
Cosimo Lupo
0e0254b0de
colorLib: add builder functions for COLRv1 tables
2020-03-06 18:37:30 +00:00
Cosimo Lupo
bb46604ec2
colorLib: allow to build CPAL version=1
2020-02-17 18:25:45 +00:00
Cosimo Lupo
7a2f68a317
colorLib: add type annotations
2020-02-17 12:11:53 +00:00
Cosimo Lupo
191a036f26
colorLib: add buildCOLR and buildCPAL
2020-02-17 12:11:51 +00:00