Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » SVG for tool icon
Re: SVG for tool icon [message #58556 is a reply to message #58554] Sat, 18 June 2022 09:40 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1106
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Sayem,

Here is example of using SVG. You could play with it compiling examples/SVGView. In order to load SVG you need to use RenderSVGImage function provided by Painter package. It will create image for you for a given size. This image can be used to set icon for example in the toolbar. In order to do not call RenderSVGImage too many times, I highly recommend to cache your images in memory.

Here is code responsible from loading SVG, the parameters are size and path to SVG file:
Size sz = Size(64, 64);
Image img = RenderSVGImage(sz, svg);


Klugier


U++ - one framework to rule them all.
 
Read Message
Read Message
Read Message
Previous Topic: The right way to use CoDo with GuiLock?
Next Topic: U++: Why Archive Data?
Goto Forum:
  


Current Time: Sat Aug 23 22:43:46 CEST 2025

Total time taken to generate the page: 0.00629 seconds