OF

Screen grabbing

//Grab the screen image to file
if ( key == ' ' ) {
  ofImage image;  //Declare image object

  //Grab contents of the screen
  image.grabScreen( 0, 0, ofGetWidth(), ofGetHeight() ); 

  image.saveImage( "screen.png" );  //Save image
}

Tags: 

hpp to .h in Xcode

The behavior can be changed quite easily by renaming the file ___FILEBASENAME___.hpp to ___FILEBASENAME___.h in this folder:

/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates/Source/C++\ File.xctemplate/WithHeader
Also you have to change all occurences of "hpp" to "h" in both template files in this folder.

Tags: 
Subscribe to RSS - OF