removed unused static gamma member

This commit is contained in:
Artem Pavlenko 2006-03-22 15:57:12 +00:00
parent ac2a286cde
commit ddaa9b5368
4 changed files with 48 additions and 46 deletions

View file

@ -429,7 +429,7 @@ namespace mapnik
ren.set_fill(fill);
ren.set_halo_fill(sym.get_halo_fill());
ren.set_halo_radius(sym.get_halo_radius());
ren.set_angle(angle);
ren.set_angle(float(angle));
std::pair<unsigned,unsigned> dim = ren.prepare_glyphs(text);
Envelope<double> text_box(x - 0.5*dim.first,y - 0.5 * dim.second ,

View file

@ -90,30 +90,30 @@ namespace mapnik
void datasource_cache::register_datasources(const std::string& str)
{
mutex::scoped_lock lock(mapnik::singleton<mapnik::datasource_cache,
mapnik::CreateStatic>::mutex_);
filesystem::path path(str);
filesystem::directory_iterator end_itr;
if (exists(path))
mutex::scoped_lock lock(mapnik::singleton<mapnik::datasource_cache,
mapnik::CreateStatic>::mutex_);
filesystem::path path(str);
filesystem::directory_iterator end_itr;
if (exists(path))
{
for (filesystem::directory_iterator itr(path);itr!=end_itr;++itr )
{
if (!is_directory( *itr ) && itr->leaf()[0]!='.')
for (filesystem::directory_iterator itr(path);itr!=end_itr;++itr )
{
if (!is_directory( *itr ) && itr->leaf()[0]!='.')
{
lt_dlhandle module=lt_dlopenext(itr->string().c_str());
if (module)
{
datasource_name* ds_name = (datasource_name*) lt_dlsym(module, "datasource_name");
if (ds_name && insert(ds_name(),module))
{
std::clog<<"registered datasource : "<<ds_name()<<std::endl;
registered_=true;
}
}
else
{
std::clog<<lt_dlerror()<<std::endl;
}
lt_dlhandle module=lt_dlopenext(itr->string().c_str());
if (module)
{
datasource_name* ds_name = (datasource_name*) lt_dlsym(module, "datasource_name");
if (ds_name && insert(ds_name(),module))
{
std::clog<<"registered datasource : "<<ds_name()<<std::endl;
registered_=true;
}
}
else
{
std::clog<<lt_dlerror()<<std::endl;
}
}
}
}

View file

@ -39,7 +39,7 @@ namespace mapnik
Image32::~Image32() {}
gamma Image32::gammaTable_;
//gamma MAPNIK_DECL Image32::gammaTable_;
const ImageData32& Image32::data() const
{
@ -59,7 +59,7 @@ namespace mapnik
void Image32::saveToFile(const std::string& file,const std::string& format)
{
//TODO: image writer factory
ImageUtils::save_to_file(file,format,*this);
//TODO: image writer factory
ImageUtils::save_to_file(file,format,*this);
}
}

View file

@ -25,6 +25,9 @@
namespace mapnik
{
using std::min;
using std::max;
class TiffReader : public ImageReader
{
private:
@ -181,27 +184,26 @@ namespace mapnik
for (int y=start_y;y<end_y;y+=tile_height_)
{
ty0=std::max(y0,(unsigned)y)-y;
ty1=std::min(height+y0,(unsigned)(y+tile_height_))-y;
ty0 = max(y0,(unsigned)y) - y;
ty1 = min(height+y0,(unsigned)(y+tile_height_)) - y;
int n0=tile_height_-ty1;
int n1=tile_height_-ty0-1;
int n0=tile_height_-ty1;
int n1=tile_height_-ty0-1;
for (int x=start_x;x<end_x;x+=tile_width_)
{
for (int x=start_x;x<end_x;x+=tile_width_)
{
if (!TIFFReadRGBATile(tif,x,y,buf)) break;
if (!TIFFReadRGBATile(tif,x,y,buf)) break;
tx0=std::max(x0,(unsigned)x);
tx1=std::min(width+x0,(unsigned)(x+tile_width_));
row=y+ty0-y0;
for (int n=n1;n>=n0;--n)
{
image.setRow(row,tx0-x0,tx1-x0,(const unsigned*)&buf[n*tile_width_+tx0-x]);
++row;
}
}
tx0=max(x0,(unsigned)x);
tx1=min(width+x0,(unsigned)(x+tile_width_));
row=y+ty0-y0;
for (int n=n1;n>=n0;--n)
{
image.setRow(row,tx0-x0,tx1-x0,(const unsigned*)&buf[n*tile_width_+tx0-x]);
++row;
}
}
}
_TIFFfree(buf);
TIFFClose(tif);
@ -225,12 +227,12 @@ namespace mapnik
int row,tx0,tx1,ty0,ty1;
tx0=x0;
tx1=std::min(width+x0,(unsigned)width_);
tx1=min(width+x0,(unsigned)width_);
for (unsigned y=start_y; y < end_y; y+=rows_per_strip_)
{
ty0=std::max(y0,y)-y;
ty1=std::min(height+y0,y+rows_per_strip_)-y;
ty0 = max(y0,y)-y;
ty1 = min(height+y0,y+rows_per_strip_)-y;
if (!TIFFReadRGBAStrip(tif,y,buf)) break;