Skip to content

Commit 34b33fa

Browse files
committedSep 26, 2014
How did GIS look like in 1990?
Apologies to fellow developers for being silly
1 parent 27abd20 commit 34b33fa

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6749,6 +6749,11 @@ void QgisApp::userCenter()
67496749
else
67506750
mDizzyTimer->start( 100 );
67516751
}
6752+
else if ( mCoordsEdit->text() == "retro" )
6753+
{
6754+
mMapCanvas->setProperty( "retro", !mMapCanvas->property( "retro" ).toBool() );
6755+
refreshMapCanvas();
6756+
}
67526757

67536758
QStringList parts = mCoordsEdit->text().split( ',' );
67546759
if ( parts.size() != 2 )

‎src/gui/qgsmapcanvasmap.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ QgsMapCanvasMap::~QgsMapCanvasMap()
3535
void QgsMapCanvasMap::setContent( const QImage& image, const QgsRectangle& rect )
3636
{
3737
mImage = image;
38+
39+
// For true retro fans: this is approximately how the graphics looked like in 1990
40+
if ( mMapCanvas->property( "retro" ).toBool() )
41+
mImage = mImage.scaled( mImage.width() / 3, mImage.height() / 3 )
42+
.convertToFormat( QImage::Format_Indexed8, Qt::OrderedDither | Qt::OrderedAlphaDither );
43+
3844
setRect( rect );
3945
}
4046

0 commit comments

Comments
 (0)