Commit Graph

19 Commits

Author SHA1 Message Date
Patrick Walton 82171088c5 Expose text alignment in the C API 2019-06-24 12:06:05 -07:00
Patrick Walton 2c49a3360e Add Metal support to the C API 2019-06-21 13:37:17 -07:00
Patrick Walton 1c34b12948 Add some font functions to the C API 2019-06-21 13:17:11 -07:00
Patrick Walton 1caad35b46 Use `cbindgen` instead of hand-writing a header file 2019-06-21 11:35:18 -07:00
Patrick Walton 9107f21966 wip 2019-06-21 10:40:32 -07:00
Patrick Walton 431dcf3d2e Rename `pathfinder_geometry::basic` to simply `pathfinder_geometry`, and move
the remaining code in that crate to a new crate, `pathfinder_content`

The old hierarchy was confusing.
2019-06-21 10:06:19 -07:00
Patrick Walton 0012f09eeb Fix examples 2019-06-20 21:43:57 -07:00
Patrick Walton 3f601be08c Add C bindings to fill and stroke styles 2019-06-20 16:57:20 -07:00
Patrick Walton 36db39883c Add C bindings to the canvas text APIs 2019-06-20 16:07:38 -07:00
Patrick Walton 2129e4f2e1 Add missing path methods to the C API 2019-06-20 15:51:25 -07:00
Patrick Walton d2fbb23031 Expose more stroke features in the C API 2019-06-20 13:01:54 -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
Atul Varma 6d41cb4dad
Mention PFCanvasCreate() consumes the font context 2019-06-04 18:00:22 -04:00
Patrick Walton e3112d1a84 Add `PFCanvasFontContextClone()` 2019-06-04 14:55:59 -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 eeaf51ce72 Expose line cap features to C 2019-05-30 21:28:52 -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 e1bcc11ace Change the `F32` and `I32` suffixes to `F` and `I` to match the C API.
They're shorter and less noisy.
2019-05-29 19:17:16 -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