Commit Graph

9 Commits

Author SHA1 Message Date
Patrick Walton a2d87a6624 Update the C canvas example 2020-06-23 13:31:53 -07:00
Patrick Walton a8d20cb37f Add transform support to the C API, and fix build problems 2019-06-24 14:03:26 -07:00
Patrick Walton 2c49a3360e Add Metal support to the C API 2019-06-21 13:37:17 -07:00
Patrick Walton 1caad35b46 Use `cbindgen` instead of hand-writing a header file 2019-06-21 11:35:18 -07:00
Patrick Walton 0012f09eeb Fix examples 2019-06-20 21:43:57 -07:00
Patrick Walton 487577a11b Add Metal support.
This commit substantially reworks the `pathfinder_gpu` API to better support
modern APIs like Metal. It should open the door to `gfx-rs`, `wgpu`, Vulkan,
and D3D12 backends relatively straightforwardly.

A new example, `canvas_metal_minimal`, has been added.

Note that the new Metal shaders require a patched version of `spirv-cross` to
build properly. An upstream patch is forthcoming.
2019-06-20 11:47:22 -07:00
Patrick Walton a1b0df0a42 Rename `Point2DF` to `Vector2F`, `Point3DF` to `Vector4F`, and `LineSegmentF`
to `LineSegment2F`.

Straw poll on Twitter suggested that these names were preferred.
2019-06-03 12:39:29 -07:00
Patrick Walton 9138e1e0bb Pass in the font context to the canvas rendering context constructor so that it
can be reused.

Creating a system font source can do I/O on some platforms, so obviously we
don't want to do it every frame.
2019-05-29 21:15:42 -07:00
Patrick Walton e04cc273ee Add enough C bindings to recreate `canvas_minimal` in C.
Closes #12.
2019-05-25 20:21:38 -07:00