Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RESEARCH] use svg icons and layers to generate weather icons #2

Open
LoveBootCaptain opened this issue May 14, 2020 · 1 comment
Open

Comments

@LoveBootCaptain
Copy link

LoveBootCaptain commented May 14, 2020

hi @miyaichi,

you are maybe the right guy to discuss this creazy idea I had while I was creating all the new weather state icons for weatherbit.io api.

to be as effective as hell in generating all the options: https://www.weatherbit.io/api/codes I used my designer tools like Adobe Illustraor and Affinity Designer to create like 1000 different layers of svg shapes which i can "click together" to have consistent icon sizes and states.

we use this technique quite often in the web and merge different svg layers of curves to generate a downloadable pdf document in one of our customer projects. In the web it is quite common. In pygame it's still a little challange to render svg's from my research.

the idea would be the following:

  • have different shapes for all needed weather state combinations
  • find a way to render a svg shape with specific color
  • layer diffrent svg with their own color
  • render the layered svg as pygame.image maybe

maybe this will create some crazy possibilities in using the ultrasharp icons on every display size or icon size and theming as well for the user.

if you are interested in this "research task" i would share those prepared layers with you and maybe tinker a solution for have all possible options in one layerset (like a sprite of svg's).

i already found a way to render one-color-icons (like my status bar icons) with a color of my choice (or theme definitions). please have a look here: https://github.com/LoveBootCaptain/WeatherPi_TFT/blob/f283ef51a87e4a2b6ea0ce1ca46f9ea7f6081fc3/WeatherPi_TFT.py#L222. I also switched to Image.resize and reduced my Iconset and changed all icons to 200x200px since the exported png's are quite sharp and when you scale them properly the didn't look worse than as I exported them in 100x100, 50x50 or 30x30. thx also for the hint here... (still have to invest time in modularisation and rewrite some 4 years old "beginners code")

what do you think? worth trying to think about that together?

here a little teaser:
test-weather.svg.zip

@miyaichi
Copy link
Owner

miyaichi commented May 15, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants