TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/plugin/ofxToGil/point.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_OFXTOGIL_POINT_HPP_
00002 #define _TUTTLE_OFXTOGIL_POINT_HPP_
00003 
00004 #include <ofxCore.h>
00005 
00006 #include <boost/gil/utilities.hpp>
00007 
00008 namespace tuttle {
00009 namespace plugin {
00010 
00011 inline boost::gil::point2<double> ofxToGil( const OfxPointD& p )
00012 {
00013         return boost::gil::point2<double>( p.x, p.y );
00014 }
00015 
00016 inline OfxPointD gilToOfx( const boost::gil::point2<double>& p )
00017 {
00018         OfxPointD r = { p.x, p.y };
00019 
00020         return r;
00021 }
00022 
00023 inline boost::gil::point2<int> ofxToGil( const OfxPointI& p )
00024 {
00025         return boost::gil::point2<int>( p.x, p.y );
00026 }
00027 
00028 inline OfxPointI gilToOfx( const boost::gil::point2<int>& p )
00029 {
00030         OfxPointI r = { p.x, p.y };
00031 
00032         return r;
00033 }
00034 
00035 }
00036 }
00037 
00038 
00039 #endif
00040