|
wxMaxima
|
Reads the size an SVG image says it has. More...
#include <wx/gdicmn.h>#include <wx/string.h>Go to the source code of this file.
Functions | |
| wxSize | wxm::SvgIntrinsicSize (const wxString &svg, double ppi=96) |
| The size an SVG document declares, in pixels. | |
Reads the size an SVG image says it has.
wxBitmapBundle::FromSVG() renders an SVG at whatever size it is asked for, but wxWidgets has no public way to ask the SVG how big it wants to be (its implementations know, but keep it to themselves, in 3.2 and 3.3 alike). An image in the worksheet needs exactly that, as its 100% size, so we read it from the root element ourselves: its width and height attributes, or its viewBox if those are missing or relative.
| wxSize wxm::SvgIntrinsicSize | ( | const wxString & | svg, |
| double | ppi = 96 |
||
| ) |
The size an SVG document declares, in pixels.
| svg | The SVG document as text. |
| ppi | The resolution physical units (in, cm, mm, pt, pc) are converted at. A unitless length or one in px is a pixel at any resolution, as in every SVG renderer. |