Patrick Walton
6c996981a3
Fix some transform issues and implement transformed radial gradients in SVG.
...
In particular, this fixes the usvg-to-Pathfinder transform conversion and the
definition of `Transform2F::row_major()`.
Makes `drops.svg` from the MPVG samples work.
2020-04-20 16:40:02 -07:00
Patrick Walton
e598249186
Use column vector length to extract scale from matrices.
...
Closes #298 .
2020-04-10 13:38:25 -07:00
Patrick Walton
895f73096e
Switch back to instanced drawing for tiles.
...
Improves tile build time by something around 2x in the NanoVG demo.
2020-04-08 17:16:54 -07:00
Patrick Walton
794dd55038
Add some implicit conversions between scalars and vectors where appropriate
2020-04-01 17:20:32 -07:00
Patrick Walton
93f5fbc6d2
Add convenience constructors: `vec2f`, `vec2i`, `Vector2F::zero()`,
...
`Vector2I::zero()`
2020-03-31 11:29:21 -07:00
Patrick Walton
0b0c45a49a
Collapse linear gradients down to a single 256x1 sliver instead of a 256x256
...
square
2020-03-05 16:58:26 -08:00
Patrick Walton
5a21557a6d
Implement basic linear gradients.
...
This is not a very efficient implementation yet, but it seems to work.
2020-02-10 16:01:05 -08:00
Patrick Walton
a66ed4c073
Specify tile texture coordinates as an affine transform.
...
Part of the groundwork for gradients.
2020-02-05 13:59:32 -08:00
Patrick Walton
ff212dce36
Add 2D matrix uniform types and a couple more useful geometry methods
2019-11-10 10:28:20 -08:00
Patrick Walton
e9c3fe6f31
Allow overloaded `*` to work between transforms and line segments and
...
transforms and rects
2019-07-12 11:59:04 -07:00
Patrick Walton
437eda96da
Overload `*` between transforms and points
2019-07-12 11:55:01 -07:00
Patrick Walton
2c984de1ea
Add convenience translation, rotation, and scaling methods to `Transform2D`
2019-07-12 11:34:48 -07: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
a8d20cb37f
Add transform support to the C API, and fix build problems
2019-06-24 14:03:26 -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