mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
Prepare Bezier-rs for publishing
This commit is contained in:
parent
9d40539dc7
commit
1bdbcfd9e7
5 changed files with 200 additions and 151 deletions
|
@ -4,11 +4,14 @@ version = "0.1.0"
|
|||
rust-version = "1.65.0"
|
||||
edition = "2021"
|
||||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||
description = "A wide assortment of useful math functions for Bezier segments and shapes."
|
||||
description = "Computational geometry algorithms for Bézier segments and shapes useful in the context of 2D graphics"
|
||||
license = "MIT OR Apache-2.0"
|
||||
readme = "./README.md"
|
||||
homepage = "https://graphite.rs/libraries/bezier-rs"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite/libraries/bezier-rs"
|
||||
readme = "README.md"
|
||||
keywords = ["bezier", "curve", "geometry", "2d", "graphics"]
|
||||
categories = ["graphics", "mathematics"]
|
||||
homepage = "https://github.com/GraphiteEditor/Graphite/tree/master/libraries/bezier-rs"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite/tree/master/libraries/bezier-rs"
|
||||
documentation = "https://graphite.rs/bezier-rs-demos/"
|
||||
|
||||
[dependencies]
|
||||
glam = { version = "0.22", features = ["serde"] }
|
||||
|
|
|
@ -1,3 +1,26 @@
|
|||
# Bezier-rs
|
||||
|
||||
A wide assortment of useful math functions for Bezier segments and shapes.
|
||||
Computational geometry algorithms for Bézier segments and shapes useful in the context of 2D graphics.
|
||||
|
||||
Play with the [interactive documentation](https://graphite.rs/bezier-rs-demos/) which visualizes each API function in a fun manner.
|
||||
|
||||
Bezier-rs is built for the needs of [Graphite](https://graphite.rs), an open source 2D vector graphics editor. We hope it may be useful to others, but presently Graphite is its primary user. Pull requests are welcomed for new features, code cleanup, ergonomics enhancements, performance improvements, and documentation clarifications.
|
||||
|
||||
The library currently provides functions dealing with single Bézier curve segments, as well as open-or-closed multi-segment paths (which we call _subpaths_). In the future, the library will be expanded to include compound paths (multiple subpaths forming a single shape, where the winding order determines inside-or-outside-ness) and operations between paths (e.g. boolean functions).
|
||||
|
||||
Bezier-rs is inspired by [Bezier.js](https://pomax.github.io/bezierjs/) and [_A Primer on Bézier Curves_](https://pomax.github.io/bezierinfo/) by Pomax. Bezier-rs is not a port of Bezier.js so the API for single-segment Bézier curves has some differences, and the intention is to offer a broader scope that provides algorithms beyond single curve segments (as noted above) to eventually service full vector shapes.
|
||||
|
||||
## Terminology
|
||||
|
||||
Graphite and Bezier-rs use the following terminology for vector data. These depictions are given for cubic Bézier curves.
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||

|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue