synfig-core
1.0.3
|
#include <distance.h>
Classes | |
class | BadSystem |
Public Types | |
enum | System { SYSTEM_UNITS, SYSTEM_PIXELS, SYSTEM_POINTS, SYSTEM_INCHES, SYSTEM_METERS, SYSTEM_MILLIMETERS, SYSTEM_CENTIMETERS, SYSTEM_END } |
typedef Real | value_type |
Public Member Functions | |
Distance () | |
Distance (const value_type &value, System system) | |
Distance (const synfig::String &string) | |
operator Real () const | |
Distance & | operator= (const Real &rhs) |
Distance & | operator= (const synfig::String &rhs) |
synfig::String | get_string (int digits=4) const |
const System & | get_system () const |
const Real & | get () const |
Real | get (System system, const RendDesc &rend_desc) const |
void | convert (System system, const RendDesc &rend_desc) |
Real | meters () const |
Real | meters (const RendDesc &rend_desc) const |
Real | units (const RendDesc &rend_desc) const |
const Distance & | operator+= (const Distance &rhs) |
const Distance & | operator-= (const Distance &rhs) |
const Distance & | operator+= (const float &rhs) |
const Distance & | operator-= (const float &rhs) |
const Distance & | operator*= (const float &rhs) |
const Distance & | operator/= (const float &rhs) |
Static Public Member Functions | |
static Real | meters_to_system (Real x, System target_system) |
static System | ident_system (const synfig::String &str) |
static synfig::String | system_name (System system) |
static synfig::String | system_local_name (System system) |
typedef Real synfig::Distance::value_type |
|
inline |
|
inline |
|
explicit |
|
inline |
Distance & Distance::operator= | ( | const synfig::String & | rhs | ) |
References synfig::error().
synfig::String Distance::get_string | ( | int | digits = 4 | ) | const |
|
inline |
|
inline |
Real Distance::get | ( | Distance::System | target, |
const RendDesc & | rend_desc | ||
) | const |
References synfig::RendDesc::get_x_res(), and METERS_PER_UNIT.
void Distance::convert | ( | Distance::System | target, |
const RendDesc & | rend_desc | ||
) |
Real Distance::meters | ( | ) | const |
References CENTIMETERS_PER_METER, INCHES_PER_METER, MILLIMETERS_PER_METER, and POINTS_PER_METER.
Referenced by operator+=(), and operator-=().
References synfig::RendDesc::get_x_res(), and METERS_PER_UNIT.
References synfig::RendDesc::get_x_res(), and METERS_PER_UNIT.
References CENTIMETERS_PER_METER, INCHES_PER_METER, MILLIMETERS_PER_METER, and POINTS_PER_METER.
Referenced by operator+=(), and operator-=().
|
static |
References synfig::warning().
|
static |
|
static |
References _.
References meters(), and meters_to_system().
References meters(), and meters_to_system().
|
inline |
|
inline |
|
inline |
|
inline |