We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, sorry for my English) i'm a newby in Processing, i'm trying to make an application with some user friendly interface, so i made a design in Adobe illustrator, but i have no idea how to use it in processing.
I mean - is there any possibilities to import my vector graphics (and customise a ControlP5 library with it, for example).. or i have to create all of the elements by using formulas and coordinates in Processing, any way?
Answers
yes you can customize or extend controllers, what type of controller are you looking for? a button, slider, knob, etc? You can import vector graphics with processing, see the loadShape example.
Thanks! I'm looking for all the types of controllers you listed, and probably such as scrolling bars and cursor icons. I've tried this example from your link and it works)
now i need to understand how i can replace the ControlP5 library shapes on my .svg shapes. And then make it all work)
I've tried to modify the ControlP5Button example, but in .setImages is only accepted to use a png or jpg images, not a vector svg.. So i don't have any idea how to put my vector svg inside of this library.
However, there also a problem with using an image of round button: it is still work as a square one. So you can click in the empty corner, and it will press the button.
Draw your shapes in PGraphics off-line images, then you can use them in ControlP5.
rendering shapes into an PGraphics/PImage element is one option. Another option would be to create a custom controller that extends a default controller, I have included an example for a Button below that renders an svg element and uses a circular intersection. Customizing Controllers based on your needs is possible but not trivial and you need to familiarize yourself with the source code of the library.