From 3880465899bc5ded9a3ecbe3a9f2ca12f2cfd7f3 Mon Sep 17 00:00:00 2001 From: MeiHui FAN Date: Wed, 5 Jun 2024 11:32:36 +0800 Subject: [PATCH] refined README.md and bump version to v0.1.5 --- Cargo.toml | 2 +- README.md | 35 ++++++++++++++++++++++++++--------- wcnvs/README.md | 42 ++---------------------------------------- 3 files changed, 29 insertions(+), 50 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6f1345d..de793ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "intvg" -version = "0.1.5" +version = "0.1.6" edition = "2021" default-run = "intvg" license = "MIT OR Apache-2.0" diff --git a/README.md b/README.md index d3006d7..ebeeabe 100644 --- a/README.md +++ b/README.md @@ -11,27 +11,45 @@ A library/tool to load/save binary .tvg file, rendering to .png file powered by TinyVG textual representation (.tvgt) is only for debugging/development purposes which can be easily achieved with `#[derive(Debug)]` and `println!("{:?}, commands)` or `dbg!(commands)` in Rust. -## Binding [GPAC/EVG](https://github.com/gpac/gpac/tree/master/src/evg) 2D rendering engine - -Build controlled by feature `"evg"`. - -Built-in seems the only one Rust binding for GPAC/EVG. - ## Binding [Blend2D](https://github.com/blend2d/blend2d) rendering engine Build controlled by feature `"b2d"`. +```bash + cargo r -F b2d -- [] +``` + A built-in Rust binding for Blend2D, simpler than outdated [blend2d-rs](https://github.com/Veykril/blend2d-rs). +## Binding [GPAC/EVG](https://github.com/gpac/gpac/tree/master/src/evg) 2D rendering engine + +Build controlled by feature `"evg"`. + +```bash + cargo r -F evg -- [] +``` + +Built-in seems the only one Rust binding in public for GPAC/EVG. + ## A SVG Renderer/Viewer powered by [Femtovg](https://github.com/Femtovg/Femtovg) Build controlled by feature `"nvg"`. -Refer to the SVG example in Femotovg, updated, rewritten and optimized the code. +```bash + cargo r -F nvg --bin nanovg -- +``` + +Refer to the SVG example in Femotovg, updated, rewritten and optimized the code, added Drag & Drop support. ## Another SVG/TinyVG Viewer based on [HTML5/Web 2D Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) -In the sub-crate `wcnvs`. +Run the following command in the [wcnvs](wcnvs/README.md) sub-crate/project to start the Dioxus dev server: + +```bash +dx serve --hot-reload +``` + +- Open the browser to ## Rendering performance comparison @@ -47,4 +65,3 @@ In the sub-crate `wcnvs`. Test rendering [Ghostscript_Tiger.svg](https://commons.wikimedia.org/wiki/File:Ghostscript_Tiger.svg) on _MacBook Pro_ with _Apple M1 Pro_. * - diff --git a/wcnvs/README.md b/wcnvs/README.md index 6bfde85..e741e81 100644 --- a/wcnvs/README.md +++ b/wcnvs/README.md @@ -1,48 +1,10 @@ + # Development -{% if styling == "Tailwind" %} -1. Install npm: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm -2. Install the tailwind css cli: https://tailwindcss.com/docs/installation -3. Run the following command in the root of the project to start the tailwind CSS compiler: -```bash -npx tailwindcss -i ./input.css -o ./public/tailwind.css --watch -``` -{% endif %} -{% if platform == "desktop" %} -Run the following command in the root of the project to start the Dioxus dev server: - -```bash -dx serve --hot-reload --platform desktop -``` -{% else %} -{% if platform == "TUI" %} -Run the following command in the root of the project to start the Dioxus dev server: - -```bash -dx serve --hot-reload --platform desktop -``` -{% else %} -{% if platform == "web" %} Run the following command in the root of the project to start the Dioxus dev server: ```bash dx serve --hot-reload ``` -- Open the browser to http://localhost:8080 -{% else %} -{% if platform == "Fullstack" %} -Launch the Dioxus Fullstack app: - -```bash -dx build --features web --release -cargo run --features ssr --release -``` -{% else %} -Launch the Dioxus app: - -```bash -cargo run -``` -{% endif %} -{% endif %} \ No newline at end of file +- Open the browser to