void CatMemeMakerApp::setup() { //Ask the user for a cat picture! try { mImage = gl::Texture( loadImage( getOpenFilePath()) ); } //If the user doesn't specify... (and therefore raises an exception) catch (exception) { //Fetch a cat picture! Url url( "http://libcinder.org/docs/v0.8.4/tutorial_part1_01.jpg" ); //Put it on the screen, and then initialize message stringbuffer mImage = gl::Texture( loadImage( loadUrl( url ) ) ); } mMessage = stringstream(stringstream::in | stringstream::out | stringstream::ate); mMessage.put(' '); offset = 1; }
void CatMemeMakerApp::addChar(char ch) { mMessage.put(ch); }