dfrg / zeno

High performance, low level 2D path rasterization library in pure Rust.
Apache License 2.0
101 stars 9 forks source link

PathBuilder::current_point makes implementations hard #3

Open i509VCB opened 1 year ago

i509VCB commented 1 year ago

One of the functions that PathBuilder requires is a way to query the current point. This is however not possible to implement if PathBuilder was implemented for a library like lyon or femtovg. Some of the path functions however require relative positions to the current point.

Is this something zeno could adjust to or is it expected that libraries should provide the needed info.

https://docs.rs/zeno/latest/zeno/trait.PathBuilder.html

nicoburns commented 3 weeks ago

Can't you just save the most recent point as a field in your wrapper around the underlying library?