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

Method draw

samples/_svg/SimpleViewer/src/SimpleViewerApp.cpp:73–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void SimpleViewerApp::draw()
74{
75 // clear out the window with black
76 gl::clear( Color::gray( 0.5f ) );
77 gl::enableAlphaBlending();
78
79 if( mDoc ) {
80 gl::color( Color::white() );
81
82 if( mTex ) {
83 if( mUseCairo )
84 gl::draw( mTex );
85 else
86 gl::draw( *mDoc );
87 }
88 }
89 else {
90 gl::drawStringCentered( "Drag & Drop an SVG file", getWindowCenter() );
91 gl::drawStringCentered( "Click to toggle between Cairo & OpenGL", getWindowCenter() + vec2( 0, 20 ) );
92 }
93}
94
95
96CINDER_APP( SimpleViewerApp, RendererGl )

Callers

nothing calls this directly

Calls 8

grayFunction · 0.85
enableAlphaBlendingFunction · 0.85
whiteFunction · 0.85
drawStringCenteredFunction · 0.85
getWindowCenterFunction · 0.85
clearFunction · 0.50
colorFunction · 0.50
drawFunction · 0.50

Tested by

no test coverage detected