Support creating wxBitmapBundle from SVG in application resource
Allow creating wxBitmapBitmap from SVG image stored in an application resource on the platforms where wxHAS_IMAGE_RESOURCES is defined. On Windows, load the bundle from a resource with RT_RCDATA type and on MacOS from a file with an extension "svg" placed in the "Resources" subdirectory of the application bundle. Closes #22061.
This commit is contained in:
parent
3f3561e2c6
commit
5ba37d867c
5 changed files with 80 additions and 3 deletions
|
|
@ -78,6 +78,12 @@ public:
|
|||
|
||||
// Load SVG image from the given file (must be a local file, not an URL).
|
||||
static wxBitmapBundle FromSVGFile(const wxString& path, const wxSize& sizeDef);
|
||||
|
||||
// Create from SVG image stored as an application resource.
|
||||
// On Windows, name must be a resource with RT_RCDATA type.
|
||||
// On MacOS, name must be a file with an extension "svg" placed in the
|
||||
// "Resources" subdirectory of the application bundle.
|
||||
static wxBitmapBundle FromSVGResource(const wxString& name, const wxSize& sizeDef);
|
||||
#endif // wxHAS_SVG
|
||||
|
||||
// Create from the resources: all existing versions of the bitmap of the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue