| 9 | using namespace std; |
| 10 | |
| 11 | struct Monitor { |
| 12 | public: |
| 13 | Monitor( DisplayRef display, Colorf color, bool mainDisplay ) |
| 14 | : mArea( display->getBounds() ), mColor( color ), mMainDisplay( mainDisplay ) |
| 15 | { |
| 16 | app::console() << display->getName() << ": " << mArea << " contentScale: " << display->getContentScale() << std::endl; |
| 17 | } |
| 18 | |
| 19 | void draw() { |
| 20 | gl::color( mColor * 0.25f ); |
| 21 | Rectf r = Rectf( mArea ).scaledCentered( 0.99f ); |
| 22 | gl::drawSolidRect( r ); |
| 23 | gl::color( mColor ); |
| 24 | gl::drawStrokedRect( r ); |
| 25 | if( mMainDisplay ) |
| 26 | gl::drawSolidRect( Rectf( r.x1, r.y1, r.x2, r.y1 + 40 ) ); |
| 27 | } |
| 28 | |
| 29 | bool mMainDisplay; |
| 30 | Colorf mColor; |
| 31 | Area mArea; |
| 32 | }; |
| 33 | |
| 34 | class DisplayTestApp : public App { |
| 35 | public: |
no outgoing calls