我是一個openFrameworks新手。我正在學習基本的2D繪圖,迄今爲止都非常棒。我畫用圓圈:openFrameworks的形狀操作
ofSetColor(0x333333);
ofFill;
ofCircle(100,650,50);
我的問題是我怎麼給圓一個變量名,這樣我可以在方法的mousePressed操縱?我試過ofCircle
theball.ofSetColor(0x333333);
theball.ofFill;
theball.ofCircle(100,650,50);
,但得到我theball「在此範圍錯誤未聲明前添加一個名字。
實際上這是這種情況下的「最佳實踐」,但如果他真的想要,他可以做什麼rykardo寫在其他答案和創建具有相同的名稱,如OF功能的方法。 – ben 2011-10-10 12:51:44