Bezier-rs: Add iframes to rustdoc (#1036)

* Add iframes examples

* Move TValue selection to bottom

* Remove spaces

* Add background, adjust heights

* Minor lint fix
This commit is contained in:
Hannah Li
2023-02-17 19:09:36 -05:00
committed by Keavon Chambers
parent 9a52cae9b9
commit 98f172414a
9 changed files with 47 additions and 9 deletions
@@ -7,6 +7,7 @@ impl Subpath {
/// Returns either one or two Subpaths that result from splitting the original Subpath at the point corresponding to `t`.
/// If the original Subpath was closed, a single open Subpath will be returned.
/// If the original Subpath was open, two open Subpaths will be returned.
/// <iframe frameBorder="0" width="100%" height="400px" src="https://graphite.rs/bezier-rs-demos#subpath/split/solo" title="Split Demo"></iframe>
pub fn split(&self, t: SubpathTValue) -> (Subpath, Option<Subpath>) {
let (segment_index, t) = self.t_value_to_parametric(t);
let curve = self.get_segment(segment_index).unwrap();