my 1st question,
meter draws meters on a white background into a picture, hence background() and fill() has no effect. Only tint() works, but shades the entire picture, not only the background. However I would like to have meters on a black background (or same background as the rest of my App) and I cannot change this.
Any suggestions? This leads me to my 2nd question.
Meters is a lib. I think, I would be able to make the changes in the meter src code, but I don’t know, how to compile it into a new (my) lib.
Could somebody point me at a page, where lib creation for processing is explained.
Thank you
hk
Can you provide the link to the lib?
You can refer to this link: https://github.com/processing/processing/wiki/Library-Overview
If you do not want to use Eclipse, I might be able to help to build it from the command line.
Kf
Hi, it is the “meter” lib you can import through the standard processing ‘import lib’ menu command.
Is there a tutorial, how to move a processing 4 Android App w/ several tabs to eclipse?
Rgds
hk
@lve0200 The meter library you can find here indicates that you can make changes in your actual code. I am quoting this from their repo:
Make any changes immediately following the creation of a Meter class object
in setup()
So I do not think you need to build the library from scratch. If this does not work, please provide an example code indicating what you want to change.
For your question, I do not use Eclipse but I will say it is possible to export your Java project. However, since your project is in Android, I don’t think the Eclipse plugins for Android is receiving any support nowadays. as an alternative, you could export it to Android Studio(AS) following these steps:
After you are done running your multiple tab sketch in Processing and you have a working version, then go to File >> Export Android Project in the Processing Development Editor (PDE). This will create a new folder in your sketch folder called android. Then you open AS, select “Export from Project” and select the “android” folder. After AS loads your project, you click run and choose a device or emulator.
Related to Eclipse, you can find more info here.
Kf
Thank you,
I meanwhile solved my problem, by copying for me relevant parts of the meter src code to my own source. I also exported into AS and find it astonishing, that AS not only copies everything into a loooooooooooong spaghetti source file, but also makes a lot of code changes and produces afterwards hundreds of code warnings and a few errors in code parts, it has created by its own…
But I got it to work, now.
Make any changes immediately following the creation of a Meter class object
in setup()
Yes, but this is related to changes for which code in meter is provided, e.g. color of arc. But for the background color, nothing is provided. Meter draws into an offline buffer using the Pgraphics mechanisms. When you get the control back in setup(), the image is drawn and you cannot change it, and fill() etc. are w/out effect.
@lve0200 ===
“several tabs” does not matter && i have already posted to answer to this question; as for now Eclipse for Android has been killed by AS.You can use it for the lib but not for your app.As for the “spaghetti” it was created by P5 (see the src) not by AS…