Working with classes
in
Programming Questions
•
2 years ago
I am new in processing and I have written a code but it dont work. I followed a lot of tutorails but I dont know what is wrong with my code.
Can someone look at the code and tell me what I do wrong.
Here is the code:
// DECLARE
tekst1 mijntekst1;
void setup() {
size(600,600);
// INITIALTIE
tekst1 = new tekst1;
}
void draw() {
background(255);
// FUNCTIONALLITY
mijntekst1 runtekst1 ();
}
class tekst1 {
// GLOBAL
int x = 30;
PFont fontA;
// CONSTRUCTORS
tekst1 ();
// FUNCTIONS
void runtekst1() {
// Load de font. Tools > Create Font
fontA = loadFont("Arial-BoldMT-16.vlw");
// de font en de grootte van het lettertype
textFont(fontA, 16);
fill (0);
text("Just a example", x, 60);
text("This is a very long text. dkdkdk jfjsloe skdjf enz it goes on and on and on and the text blabla", x, 200, 540,400);
}
}
1