why the function display does no exist
in
Programming Questions
•
11 months ago
hi,
why there is the error "the function display() does not exist"?
PImage img;
Balle maBalle;
void setup(){
size(800,500);img = loadImage("333.jpg");
}
void draw(){
for (int i = 80 ; i < width; i+=180){
for (int j = 50 ; j< height-50 ; j+=110){
maBalle = new Balle(i,j,color(255),img);
maBalle.display();
}}
}
class Balle {
int x;
int y;
color c;
Balle (int nouvX, int nouvY, color nouvCouleur, PImage nouvImg) {
x = nouvX;
y = nouvY;
c = nouvCouleur;
img = nouvImg;
}
}
void display(){
for (int k = 80 ; k < 80+50; k++){
for (int l = 50 ; l< 50+50 ; l++){
color c = img.get(k,l);
stroke(c);
}}
}
1