Skip to content

Commit

Permalink
+ commenting out grid rendering - not sure how to display 'long long'…
Browse files Browse the repository at this point in the history
… values.
  • Loading branch information
artemp committed Jan 2, 2013
1 parent 6b7c162 commit f7ad2f1
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions demo/viewer/mapwidget.cpp
Expand Up @@ -533,19 +533,20 @@ void render_grid(mapnik::Map const& map, double scaling_factor, QPixmap & pix)
try
{
ren.apply();
int * imdata = static_cast<int*>(buf.raw_data());

QImage image(width,height,QImage::Format_RGB32);
for (unsigned i = 0 ; i < height ; ++i)
{
for (unsigned j = 0 ; j < width ; ++j)
{
image.setPixel(j,i,qRgb((uint8_t)(imdata[i*width+j]>>8),
(uint8_t)(imdata[i*width+j+1]>>8),
(uint8_t)(imdata[i*width+j+2]>>8)));
}
}
pix = QPixmap::fromImage(image);
mapnik::value_integer * imdata = static_cast<mapnik::value_integer*>(buf.raw_data());

// Not sure how to display long long values ??
//QImage image(width,height,QImage::Format_RGB32);
//for (unsigned i = 0 ; i < height ; ++i)
//{
// for (unsigned j = 0 ; j < width ; ++j)
// {
// image.setPixel(j,i,qRgb((uint8_t)(imdata[i*width+j]>>8),
// (uint8_t)(imdata[i*width+j+1]>>8),
// (uint8_t)(imdata[i*width+j+2]>>8)));
// }
//}
//pix = QPixmap::fromImage(image);
}
catch (mapnik::config_error & ex)
{
Expand Down

2 comments on commit f7ad2f1

@springmeyer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like the most useful thing would be to render a new (random would be fine) color each time a new feature id is encountered.

@artemp
Copy link
Member Author

@artemp artemp commented on f7ad2f1 Jan 2, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.