odin-nanosvg

Odin bindings to nanosvg
Log | Files | Refs | Submodules | README | LICENSE

commit b68c4388608c2f16c65fe48f06fc7c07ff743dff
parent 5585c0908389987509de9a82b06c1c7bfe6fe0ac
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date:   Mon,  7 Jul 2025 12:40:44 -0300

nanosvg: self-documenting types

Use longer field names and the provided enum types where applicable to
make the code more self-documenting.

Diffstat:
Mnanosvg.odin | 40++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/nanosvg.odin b/nanosvg.odin @@ -65,7 +65,7 @@ Gradient :: struct { } Paint :: struct { - type: c.schar, + type: PaintType, using data: PaintData, } @@ -83,25 +83,25 @@ Path :: struct { } Shape :: struct { - id: [64]c.char, - fill: Paint, - stroke: Paint, - opacity: c.float, - stroke_width: c.float, - stroke_dash_offset: c.float, - stroke_dash_array: [8]c.float, - stroke_dash_count: c.char, - stroke_line_join: c.char, - stroke_line_cap: c.char, - miter_limit: c.float, - fill_rule: c.char, - flags: c.uchar, - bounds: [4]c.float, - fill_gradient: [64]c.char, - stroke_gradient: [64]c.char, - xform: [6]c.float, - paths: ^Path, - next: ^Shape, + id: [64]c.char, + fill: Paint, + stroke: Paint, + opacity: c.float, + stroke_width: c.float, + stroke_dash_offset: c.float, + stroke_dash_array: [8]c.float, + stroke_dash_count: c.char, + stroke_line_join: LineJoin, + stroke_line_cap: LineCap, + miter_limit: c.float, + fill_rule: FillRule, + flags: bit_set[Flags], + bounding_box: [4]c.float, + optional_fill_gradient_id: [64]c.char, + optional_stroke_gradient_id: [64]c.char, + root_gradient_transformation: [6]c.float, + paths: ^Path, + next: ^Shape, } Image :: struct {