ofGraphics
ofTranslate(x, y, z)
=> 先行將座標移至該位置,對於後續的座標做為基準ex:
ofTranslate(100, 100, 0);    // 先移動至 (100,100)ofDrawRectangle(10, 10, 10, 10);    //實際為 (110,110)劃出一個方形ofPushMatrix() 與 ofPopMatrix()
=> 在ofPushMatrix 下的環境變更等 會在 ofPopMatrix 恢復為 ofPushMatrix 前的狀態
ex:
ofPushMatrix();    //儲存當下的環境狀態
ofTranslate(100,100);  // 座標  (100,100)
ofRect(0, 0, 20, 50); // (100,100)  畫出方形
ofPopMatrix();   //還原ofPushMatrix 儲存的環境狀態
ofCircle(0, 0, 10);  // (0,0) 畫出圓形
ofImage and ofPixels and ofTexture -> allocate(w, h, ofImageType);
=>分配所屬的空間數量
type分類為  OF_IMAGE_GRAYSCALE, OF_IMAGE_COLOR, OF_IMAGE_COLOR_ALPHA
 
沒有留言:
張貼留言