Skip to content

Render to SVG from nightgraph-ui #3

@kneitinger

Description

@kneitinger

Overview

Currently, there is no way to save modified sketches from the UI other than taking a screenshot (lol).

The UI does have access to the resulting Canvas of a given sketch, so instead of calling EguiRenderer::render_egui to render the UI's view of the sketch, we can call SvgRenderer::render_svg.

The currently implementation of render_svg unconditionally saves the resulting SVG as image.svg in the current working directory. render_svg should be modified to either return the SVG as bytes, or take a path arg.

Unknowns

I do not know if egui has any file saving widgets already, and furthermore, if they exist, how they function in a wasm context. Any solution to this issue must work in both native and web apps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions