synfig-core  1.0.3
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
synfig::Distance Class Reference

#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
Distanceoperator= (const Real &rhs)
Distanceoperator= (const synfig::String &rhs)
synfig::String get_string (int digits=4) const
const Systemget_system () const
const Realget () 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 Distanceoperator+= (const Distance &rhs)
const Distanceoperator-= (const Distance &rhs)
const Distanceoperator+= (const float &rhs)
const Distanceoperator-= (const float &rhs)
const Distanceoperator*= (const float &rhs)
const Distanceoperator/= (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)

Member Typedef Documentation

Member Enumeration Documentation

Enumerator:
SYSTEM_UNITS 
SYSTEM_PIXELS 
SYSTEM_POINTS 
SYSTEM_INCHES 
SYSTEM_METERS 
SYSTEM_MILLIMETERS 
SYSTEM_CENTIMETERS 
SYSTEM_END 

Constructor & Destructor Documentation

synfig::Distance::Distance ( )
inline
synfig::Distance::Distance ( const value_type value,
System  system 
)
inline
Distance::Distance ( const synfig::String string)
explicit

Member Function Documentation

synfig::Distance::operator Real ( ) const
inline
Distance& synfig::Distance::operator= ( const Real rhs)
inline
Distance & Distance::operator= ( const synfig::String rhs)

References synfig::error().

synfig::String Distance::get_string ( int  digits = 4) const
const System& synfig::Distance::get_system ( ) const
inline
const Real& synfig::Distance::get ( ) const
inline
Real Distance::get ( Distance::System  target,
const RendDesc rend_desc 
) const
void Distance::convert ( Distance::System  target,
const RendDesc rend_desc 
)
Real Distance::meters ( ) const
Real Distance::meters ( const RendDesc rend_desc) const
Real Distance::units ( const RendDesc rend_desc) const
Real Distance::meters_to_system ( Real  x,
System  target_system 
)
static
Distance::System Distance::ident_system ( const synfig::String str)
static

References synfig::warning().

synfig::String Distance::system_name ( Distance::System  system)
static
synfig::String Distance::system_local_name ( Distance::System  system)
static

References _.

const Distance& synfig::Distance::operator+= ( const Distance rhs)
inline

References meters(), and meters_to_system().

const Distance& synfig::Distance::operator-= ( const Distance rhs)
inline

References meters(), and meters_to_system().

const Distance& synfig::Distance::operator+= ( const float &  rhs)
inline
const Distance& synfig::Distance::operator-= ( const float &  rhs)
inline
const Distance& synfig::Distance::operator*= ( const float &  rhs)
inline
const Distance& synfig::Distance::operator/= ( const float &  rhs)
inline

The documentation for this class was generated from the following files: