/usr/include/wxSVG/SVGLength.h is in libwxsvg-dev 2:1.2~dfsg0-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | //////////////////////////////////////////////////////////////////////////////
// Name: SVGLength.h
// Author: Alex Thuering
// Copyright: (c) 2005 Alex Thuering
// Licence: wxWindows licence
// Notes: generated by generate.py
//////////////////////////////////////////////////////////////////////////////
#ifndef WX_SVG_LENGTH_H
#define WX_SVG_LENGTH_H
#include "String_wxsvg.h"
#include "SVGLengthCalculate.h"
#include "math.h"
enum wxSVG_LENGTHTYPE
{
wxSVG_LENGTHTYPE_UNKNOWN = 0,
wxSVG_LENGTHTYPE_NUMBER = 1,
wxSVG_LENGTHTYPE_PERCENTAGE = 2,
wxSVG_LENGTHTYPE_EMS = 3,
wxSVG_LENGTHTYPE_EXS = 4,
wxSVG_LENGTHTYPE_PX = 5,
wxSVG_LENGTHTYPE_CM = 6,
wxSVG_LENGTHTYPE_MM = 7,
wxSVG_LENGTHTYPE_IN = 8,
wxSVG_LENGTHTYPE_PT = 9,
wxSVG_LENGTHTYPE_PC = 10
};
class wxSVGLength
{
protected:
wxSVG_LENGTHTYPE m_unitType;
double m_value;
double m_valueInSpecifiedUnits;
public:
inline wxSVG_LENGTHTYPE GetUnitType() const { return m_unitType; }
inline void SetUnitType(const wxSVG_LENGTHTYPE& n) { m_unitType = n; }
public:
wxSVGLength() : m_unitType(wxSVG_LENGTHTYPE_UNKNOWN), m_value(0), m_valueInSpecifiedUnits(0) {}
wxSVGLength(double v) : m_unitType(wxSVG_LENGTHTYPE_NUMBER), m_value(v), m_valueInSpecifiedUnits(v) {}
wxSVGLength(wxSVG_LENGTHTYPE unitType, double v): m_unitType(unitType) { SetValueInSpecifiedUnits(v); }
wxSVGLength(const wxSVGLength& l): m_unitType(l.m_unitType), m_value(l.m_value), m_valueInSpecifiedUnits(l.m_valueInSpecifiedUnits) {}
virtual ~wxSVGLength() {}
inline double GetValue() const { return m_value; }
inline void SetValue(double n) { m_unitType = wxSVG_LENGTHTYPE_NUMBER; m_valueInSpecifiedUnits = n; m_value = n; }
inline operator double() const { return GetValue(); }
double GetValueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; }
void SetValueInSpecifiedUnits(double n);
wxString GetValueAsString() const;
void SetValueAsString(const wxString& n);
inline void ToViewportWidth(float viewportWidth) { m_value = m_valueInSpecifiedUnits*viewportWidth/100; }
inline void ToViewportHeight(float viewportHeight) { m_value = m_valueInSpecifiedUnits*viewportHeight/100; }
inline void ToViewportSize(float viewportWidth, float viewportHeight)
{
m_value = m_valueInSpecifiedUnits*
sqrt(viewportWidth*viewportWidth + viewportHeight*viewportHeight)/sqrt(2.0)/100;
}
virtual void NewValueSpecifiedUnits(wxSVG_LENGTHTYPE unitType, double valueInSpecifiedUnits);
virtual void ConvertToSpecifiedUnits(wxSVG_LENGTHTYPE unitType);
};
#endif // WX_SVG_LENGTH_H
|