settings(controlp5) to create and edit grapichs

edited March 2015 in Library Questions

Hi, I'd like to add settings (controlp5) to create and edit grapichs: sliders to the left and the graphic to the right. What is the easiest way to make it?something like that:

Tagged:

Answers

  • and then I'd like to export only the graphic...

  • Render everything to a separate PGraphics. Simple example:

    PGraphics pg;

    in setup:

    pg = createGraphics(width-200, height);

    in draw:

    pg.beginDraw();
    pg.background(0);
    pg.stroke(255,0,0);
    pg.line(20,20,50,50);
    pg.endDraw();
    
    image(pg, 200,0);  //this line displays the PGraphics on the main PGraphics
    

    You can export this PGraphics separately.

  • Hi, to arrange and draw controllers like in the screenshot you posted, have a look at the accordion example that comes with controlP5.

  • thanks a lot! I think that PGraphics could be a good solution... how can I export a vectorial file (pdf, ai, obj) from a PGraphics?! I know that there are several libraries, but how it works with PGraphics? Could you show me a code example?!

Sign In or Register to comment.