MCPcopy Create free account
hub / github.com/cinder/Cinder / Monitor

Class Monitor

test/DisplayTest/src/DisplayTestApp.cpp:11–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9using namespace std;
10
11struct 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
34class DisplayTestApp : public App {
35 public:

Callers 1

populateMonitorsMethod · 0.85

Calls

no outgoing calls

Tested by 1

populateMonitorsMethod · 0.68