More Related Content
More from Atsushi Tadokoro
More from Atsushi Tadokoro (20)
openFrameworks入門 - 多摩美メディアアートII
- 13. ‣
‣
‣ Mac OSX - XCode
‣ Windows - Code::Blocks Visual Studio 2010
‣ Linux - Code::Blocks
- 27. #pragma once
#include "ofMain.h"
#include "ofxiPhone.h"
#include "ofxiPhoneExtras.h"
class testApp : public ofxiPhoneApp {
!
public:
! void setup();
! void update();
! void draw();
! void exit();
!
! void touchDown(ofTouchEventArgs &touch);
! void touchMoved(ofTouchEventArgs &touch);
! void touchUp(ofTouchEventArgs &touch);
! void touchDoubleTap(ofTouchEventArgs &touch);
! void lostFocus();
! void gotFocus();
! void gotMemoryWarning();
! void deviceOrientationChanged(int newOrientation);
- 28. #pragma once
#include "ofMain.h"
#include "ofxiPhone.h"
#include "ofxiPhoneExtras.h"
class testApp : public ofxiPhoneApp {
!
public:
! void setup();
! void update();
! void draw();
! void exit();
!
! void touchDown(ofTouchEventArgs &touch);
! void touchMoved(ofTouchEventArgs &touch);
! void touchUp(ofTouchEventArgs &touch);
! void touchDoubleTap(ofTouchEventArgs &touch);
! void lostFocus();
! void gotFocus();
! void gotMemoryWarning();
! void deviceOrientationChanged(int newOrientation);
- 29. #pragma once
#include "ofMain.h"
#include "ofxiPhone.h"
#include "ofxiPhoneExtras.h"
class testApp : public ofxiPhoneApp {
!
public:
! void setup();
! void update();
! void draw();
! void exit();
!
! void touchDown(ofTouchEventArgs &touch);
! void touchMoved(ofTouchEventArgs &touch);
! void touchUp(ofTouchEventArgs &touch);
! void touchDoubleTap(ofTouchEventArgs &touch);
! void lostFocus();
! void gotFocus();
! void gotMemoryWarning();
! void deviceOrientationChanged(int newOrientation);
- 36. < >
//--------------------------------------------------------------
void testApp::update(){
}
//--------------------------------------------------------------
void testApp::draw(){
ofCircle(512, 384, 200); Text
}
//--------------------------------------------------------------
void testApp::exit(){
}
< >
- 41. #include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
}
//--------------------------------------------------------------
void testApp::update(){
}
//--------------------------------------------------------------
void testApp::draw(){
ofSetColor(0, 127, 255, 200);
ofCircle(412, 384, 200);
ofSetColor(255, 127, 0, 200);
ofCircle(612, 384, 200);
}
< >
- 43. ‣
‣ ofEnableAlphaBlending();
‣ ofSetCircleResolution( );
‣ ofBackground(R, G, B);
- 44. #include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
! ofEnableAlphaBlending();
! ofSetCircleResolution(64);
! ofBackground(0, 0, 0);
}
//--------------------------------------------------------------
void testApp::update(){
!
}
//--------------------------------------------------------------
void testApp::draw(){
ofSetColor(0, 127, 255, 200);
ofCircle(412, 384, 200);
ofSetColor(255, 127, 0, 200);
ofCircle(612, 384, 200);!
}
< >