Giter Site home page Giter Site logo

save as png? about httpgd HOT 7 CLOSED

nx10 avatar nx10 commented on August 24, 2024 1
save as png?

from httpgd.

Comments (7)

nx10 avatar nx10 commented on August 24, 2024 1

Thank you for your suggestion.
I designed the server in a way that will allow rendering to different formats. PNG and other raster graphics will be possible as I already depend on cairo to calculate font metrics ahead of time.
But the the focus for the project right now is on reliability and stability as well as making embedding in editors (vscode, atom, ...) possible.

After that "save as PNG" is definitely something I want to implement. "Copy to clipboard" to quickly paste plots anywhere would be interesting as well.

from httpgd.

nx10 avatar nx10 commented on August 24, 2024 1

Great suggestions as always. I will implement it like that soon.

from httpgd.

nx10 avatar nx10 commented on August 24, 2024 1

I implemented the changes a while ago, a full list of all available shortcuts can be found in the readme. Plot scaling is not yet working in the browser rendered PNGs (I opened a new issue for that #35).

from httpgd.

nx10 avatar nx10 commented on August 24, 2024

The client is now able to save PNG plots. You can try it by pressing ctrl+R

from httpgd.

r2evans avatar r2evans commented on August 24, 2024

I appreciate adding the feature, thank you!

Do you think it wise to override a standard shortcut for browsers? I think Ctrl+R is fairly common for reloading the page.

from httpgd.

nx10 avatar nx10 commented on August 24, 2024

You are right, do you have a suggestion for a different shortcut?

from httpgd.

r2evans avatar r2evans commented on August 24, 2024

Thoughts (either or both):

  • add another button next to the download button

    image

  • if you can arbitrarily assign keyboard shortcuts, is there a reason you need to use Ctrl? I know some websites allow non-modified keyboard shortcuts, but that's not a browser-based thing. When I open httpgd::httpgd() in FF or Edge, these are the only unmodified keys that evoke any effect for me:

    • FF 80.0.1: / (quick find); ' (quick find, links only)
    • Edge 85.0.564.51: - and _ (decrease httpgd zoom); = and + (increase httpgd zoom)

    With that, perhaps: save as Svg; save as Png; Delete? (It would be useful to have these as tooltips over the buttons too, for easy just-in-time learning.)

from httpgd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.