| 66 | } |
| 67 | |
| 68 | void EuroMapApp::draw() |
| 69 | { |
| 70 | gl::clear(); |
| 71 | gl::enableAlphaBlending(); |
| 72 | glLineWidth( 2.0f ); |
| 73 | |
| 74 | if( mMapTex ) { |
| 75 | gl::color( Color::white() ); |
| 76 | gl::draw( mMapTex ); |
| 77 | } |
| 78 | |
| 79 | if( mCurrentCountry ) { |
| 80 | // draw the outline |
| 81 | gl::color( 1, 0.5f, 0.25f, mCurrentCountryAlpha ); |
| 82 | gl::draw( mCurrentCountry->getShapeAbsolute() ); |
| 83 | |
| 84 | // draw the name |
| 85 | string countryName = mCurrentCountry->getId(); |
| 86 | vec2 pos = mCurrentCountry->getBoundingBoxAbsolute().getCenter(); |
| 87 | pos.x -= mFont->measureString( countryName ).x / 2; |
| 88 | |
| 89 | gl::color( ColorA( 1, 1, 1, mCurrentCountryAlpha ) ); |
| 90 | mFont->drawString( countryName, pos + vec2( 2, 2 ) ); |
| 91 | gl::color( ColorA( 0, 0, 0, mCurrentCountryAlpha ) ); |
| 92 | mFont->drawString( countryName, pos ); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | |
| 97 | CINDER_APP( EuroMapApp, RendererGl, EuroMapApp::prepareSettings ) |
nothing calls this directly
no test coverage detected