Commit Graph

33 Commits

Author SHA1 Message Date
Patrick Walton 2db43797c3 Split colors out into their own crate.
A lot of downstream consumers of `pathfinder_gpu` want to use colors without
the path stuff.
2020-01-31 09:17:04 +01:00
Sebastian K e38e2d800f update usvg to 0.8 2019-12-28 11:46:31 +03:00
Patrick Walton 1eb28a5539 Fix incorrect definition of 2D transform multiplication 2019-07-12 11:26:09 -07:00
Patrick Walton bcac119324 Rename `Transform2DF` to `Transform2F` and `Transform3DF` to `Transform4F` 2019-07-11 14:59:10 -07:00
Patrick Walton b886c157c1 Use 2-lane instead of 4-lane SIMD types for 2D vectors.
Also, this commit rewrites the `add_fill()` method to stop using shuffle
instructions, which can be slow and make the code overly complicated. The
shuffle instructions have been removed from the various SIMD backends.
2019-06-26 16:38:37 -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 010bc66073 Upgrade `resvg` to 0.7 2019-06-20 17:13:15 -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 48f825077c Add new join and cap features to SVG, fixing the demo 2019-05-30 20:55:58 -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 51877426ea Take paths by reference, not by value, in outline stroke-to-fill. 2019-05-29 15:15:40 -07:00
Patrick Walton e282eb57d5 Implement interior miter line joins (not yet endpoints) 2019-05-16 11:10:15 -07:00
Patrick Walton 272b63a017 Implement square line caps 2019-05-16 10:43:43 -07:00
Patrick Walton 0deb12b3a2 Implement `fill-opacity` and `stroke-opacity` in SVG 2019-05-14 18:09:01 -07:00
Patrick Walton c09ef3ae7c Fix SVG and demo compilation errors 2019-05-13 18:19:10 -07:00
Patrick Walton a5d373cb91 Rename "object" to "path" in preparation for image objects 2019-05-10 12:03:38 -07:00
Patrick Walton 9de7d95d33 Start a simple HTML canvas-like API, and add a minimal example to show how to
use it.
2019-05-03 14:15:38 -07:00
Patrick Walton 5c5e4e9313 Factor the scene thread out of the demo and into the renderer proper.
This simplifies Pathfinder's API considerably. Now users get off-main-thread
scene building "for free".
2019-05-01 17:12:25 -07:00
Patrick Walton c49ec850a1 Run `rustfmt` on the SVG crate 2019-04-29 16:58:09 -07:00
Patrick Walton e4b613c2c8 Stroke then transform instead of the reverse. 2019-03-26 19:56:59 -07:00
Patrick Walton 25558c2177 Only emit warnings for non-empty `<defs>` nodes.
Inkscape likes to put empty `<defs>` nodes in the file, which don't do
anything, so we technically support them.
2019-03-07 11:24:20 -08:00
Patrick Walton b80ab2ad25 Only show the "Text Effects" button when a monochrome SVG is loaded 2019-03-06 19:35:57 -08:00
Patrick Walton 40209b6fe8 Show a warning when unsupported SVG features are used 2019-03-06 18:25:08 -08:00
Patrick Walton ad0691c146 Move the generic UI code in the renderer crate to a separate crate 2019-03-05 15:13:55 -08:00
Patrick Walton 0da196aa92 Scale the SVG appropriately in the demo 2019-02-21 20:19:42 -08:00
Patrick Walton fc62e9bc71 Subdivide offset curves to an error bound. 2019-02-20 18:27:27 -08:00
Patrick Walton 3a8478a048 Remove all Lyon dependencies.
We may want to re-merge at a later date, but for now all relevant algorithms
have been appropriately SIMD-ified.
2019-02-20 16:46:50 -08:00
Patrick Walton d75ed71af4 WIP before moving to a segment basis 2019-02-20 12:41:43 -08:00
Patrick Walton 7151d82d76 Stop converting SVG paths to monotonic paths early 2019-02-05 12:23:43 -08:00
Patrick Walton fe410e066f Add a SIMD rect type 2019-02-05 10:03:20 -08:00
Patrick Walton 63b47f1abe Move basic geometry primitives to the `pathfinder_geometry::basic` module 2019-02-04 20:20:32 -08:00
Patrick Walton d98b244bda Fix transforms 2019-01-17 14:16:29 -08:00
Patrick Walton 821b54b8f4 Factor renderer and SVG code out into separate crates 2019-01-14 14:20:36 -08:00