SM01-draw
Mon Sep 18 2023 22:18:47 GMT+0000 (Coordinated Universal Time)
Saved by
@yc_lan
void ofApp::draw(){
// for testing whether the image can display correctly.
// image.draw(0, 0);
for (int i = 0; i < gridSize; i++) {
for (int j = 0; j < gridSize; j++) {
if (grid[i][j]) {
ofSetColor(255);
} else {
ofSetColor(0);
}
ofDrawRectangle(i*cellSize , j*cellSize , cellSize, cellSize);
// ofDrawRectangle(i , j , cellSize, cellSize);
}
}
}
content_copyCOPY
Comments