Skip to content

Commit

Permalink
pal: don't convert distance from feature, leave it up to caller to sp…
Browse files Browse the repository at this point in the history
…ecify exact distance

git-svn-id: http://svn.osgeo.org/qgis/branches/symbology-ng-branch@11020 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jul 4, 2009
1 parent 0a6dfa1 commit dfd7490
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/core/pal/feature.cpp
Expand Up @@ -189,10 +189,10 @@ namespace pal
//if (nbp==2)
// beta = M_PI/2;

double distlabel = unit_convert( this->distlabel,
/*double distlabel = unit_convert( this->distlabel,
pal::PIXEL,
layer->pal->map_unit,
dpi, scale, delta_width );
dpi, scale, delta_width );*/

double lx, ly; /* label pos */

Expand Down Expand Up @@ -335,10 +335,10 @@ namespace pal
dpi, scale, delta_width );


double distlabel = unit_convert( this->distlabel,
/*double distlabel = unit_convert( this->distlabel,
pal::PIXEL,
layer->pal->map_unit,
dpi, scale, delta_width );
dpi, scale, delta_width );*/


double *d; // segments lengths distance bw pt[i] && pt[i+1]
Expand Down
2 changes: 1 addition & 1 deletion src/core/pal/feature.h
Expand Up @@ -84,7 +84,7 @@ namespace pal
char *uid;
Layer *layer;

int distlabel;
double distlabel;

GEOSGeometry *the_geom;
int currentAccess;
Expand Down
4 changes: 2 additions & 2 deletions src/core/pal/layer.cpp
Expand Up @@ -422,7 +422,7 @@ Cell<Feature*>* Layer::getFeatureIt( const char * geom_id )
return NULL;
}

void Layer::setFeatureDistlabel( const char * geom_id, int distlabel )
void Layer::setFeatureDistlabel( const char * geom_id, double distlabel )
{
int i;

Expand Down Expand Up @@ -459,7 +459,7 @@ void Layer::setFeatureDistlabel( const char * geom_id, int distlabel )
}


int Layer::getFeatureDistlabel( const char *geom_id )
double Layer::getFeatureDistlabel( const char *geom_id )
{
modMutex->lock();
Cell<Feature*>* it = getFeatureIt( geom_id );
Expand Down
4 changes: 2 additions & 2 deletions src/core/pal/layer.h
Expand Up @@ -326,7 +326,7 @@ namespace pal
* @throws PalException::UnknownFeature
* @throws PalException::ValueNotInRange
*/
void setFeatureDistlabel( const char *geom_id, int distlabel );
void setFeatureDistlabel( const char *geom_id, double distlabel );

/**
* \brief get the symbol size (pixel) for a specific feature
Expand All @@ -336,7 +336,7 @@ namespace pal
*
* @throws PalException::UnknownFeature
*/
int getFeatureDistlabel( const char *geom_id );
double getFeatureDistlabel( const char *geom_id );

};

Expand Down

0 comments on commit dfd7490

Please sign in to comment.