26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_WORLDDEVICETRANSFORMER_H 27 #define __TERRALIB_MAPTOOLS_INTERNAL_WORLDDEVICETRANSFORMER_H 66 const double& wurx,
const double& wury,
67 int deviceWidth,
int deviceHeight);
91 const double& wurx,
const double& wury,
92 int deviceWidth,
int deviceHeight);
113 void world2Device(
double* line,
unsigned int npoints,
double* pts);
123 void world2Device(
const double& wx,
const double& wy,
double& dx,
double& dy)
const;
143 void device2World(
int dx,
int dy,
double& wx,
double& wy)
const;
166 const double& wurx,
const double& wury,
167 int deviceWidth,
int deviceHeight)
177 const double& wurx,
const double& wury,
178 int deviceWidth,
int deviceHeight)
180 double worldWidth = wurx - wllx;
181 double worldHeight = wury - wlly;
183 double muppX = worldWidth /
static_cast<double>(deviceWidth);
184 double muppY = worldHeight /
static_cast<double>(deviceHeight);
191 double whitespace = ((
static_cast<double>(deviceWidth) *
m_mapUnitsPP) - worldWidth) * 0.5;
192 m_wllx = wllx - whitespace;
193 m_wurx = wurx + whitespace;
200 double whitespace = ((
static_cast<double>(deviceHeight) *
m_mapUnitsPP) - worldHeight) * 0.5;
201 m_wlly = wlly - whitespace;
202 m_wury = wury + whitespace;
215 const unsigned int nstep = 2 * npoints;
217 for(
unsigned int i = 0; i != nstep; i+=2)
225 double& dx,
double& dy)
const 238 double& wx,
double& wy)
const 247 #endif // __TERRALIB_MAPTOOLS_INTERNAL_WORLDDEVICETRANSFORMER_H