Move bezier-rs into libraries folder and deploy its interactive docs

This commit is contained in:
Keavon Chambers
2022-08-15 00:17:31 -07:00
parent 44eb83c9b3
commit 763cdbb100
44 changed files with 352 additions and 544 deletions
@@ -0,0 +1,11 @@
// SVG drawing constants
pub const SVG_OPEN_TAG: &str = r#"<svg xmlns="http://www.w3.org/2000/svg" width="200px" height="200px">"#;
pub const SVG_CLOSE_TAG: &str = "</svg>";
// Stylistic constants
pub const BLACK: &str = "black";
/// Helper function to create an SVG text entitty.
pub fn draw_text(text: String, x_pos: f64, y_pos: f64, fill: &str) -> String {
format!(r#"<text x="{x_pos}" y="{y_pos}" fill="{fill}">{text}</text>"#)
}