I find it very awkward that the origin of positions start at top left and increases bottom-rightward.
Is there any coordinate-command to change this to a more conventional coordinate system? With the origin placed in the most bottom left pixel of the window for example with x increasing to the right and y increasing to the top?
It would help much, changes in orientation and signals from equations to the program makes everything more difficult...
Hi, I'm trying to get the meteorologic status of the day into processing analysing the html code on a website.
The thing is, I got the html code into an array of strings type into processing, that was easy, did some search and got it together, but I can't figure out how to compare a string with one of the lines of the array.
for (int n=0; n < 24 /*lines[i].charAt(n) != "\n"*/; n++)
{
try {
cline = lines[i].charAt(n);
cdetect = detect.charAt(n);
}
catch (IOException e) {
lines[i] = null;
}
if (lines[i] == null)
break;
try {
cline = lines[i].charAt(n);
cdetect = detect.charAt(n);
}
catch (IOException e) {
}
println(n);
if (cline != cdetect)
break;
else if (cline == cdetect && n == 23)
println("Event detected on line " +i);
}
}
and it gave me "Unreachable block for IOException. This exception is never thrown from the try statement body" on line 13, but the syntax for the try statement is like this in the reference, what am I doing wrong?
It tells me that size is the size of letters in pixels, and I've read the manual for processing and it tells me the position x and y of text(String,x,y), are the positions of the left side of the bottom line of the text.
So, when I write:
textSize(30);
text("Hello",0,30);
There should be an Hello word at the upper left corner of my display, but it is slightly deviated down.
Then I try:
textSize(30);
text("Hello",0,20);
And that does the job.
My question is: what size does the argument of size in textSize(size) refers to? It is not the font's height in pixels and of course it is not its width, width is smaller than heght, so is it the diagonal lenght? I'm confused.