wxMaxima
Loading...
Searching...
No Matches
Functions
SvgSize.cpp File Reference

Reads the size an SVG image says it has, see SvgSize.h. More...

#include "SvgSize.h"
#include <algorithm>
#include <map>
#include <optional>
#include <wx/wxcrt.h>
Include dependency graph for SvgSize.cpp:

Functions

wxSize wxm::SvgIntrinsicSize (const wxString &svg, double ppi=96)
 The size an SVG document declares, in pixels.
 

Detailed Description

Reads the size an SVG image says it has, see SvgSize.h.

Function Documentation

◆ SvgIntrinsicSize()

wxSize wxm::SvgIntrinsicSize ( const wxString &  svg,
double  ppi = 96 
)

The size an SVG document declares, in pixels.

Parameters
svgThe SVG document as text.
ppiThe 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.
Returns
The size, or wxDefaultSize if the text has no root svg element or that element gives no usable size.