Wires drawing suggestion [REASON][HOBNOX]

Hi everybody,

is anyone has suggestions how making such graphical representation with Juce ?
(I think of wires, and the fact that paint management assumes all is rectangular)

You have to draw it yourself. The rectangle is just the largest region that you can paint in, but as long as your rectangle includes the two points you want your wire to go from (plus any fancy cable swag :wink: you just draw the ‘wire’.

The two obvious approaches are to create a component for each connection, that covers the whole equipment area and draw each one, or to use the either a foreground component that draws all the cable, or use the major component that holds or draws the equipment images and use it’s ‘draw on top’ function to paint the connections.

It’s not bad at all, once you understand that each gear/component can’t draw it’s own connections.


have a look at juce’s audio plugin host which does exactly that with one component per wire and overriding the hitTest() method.

Muchas gracias !

Asair, do you want the wires to “wobble” when you go over them with the mouse? Or do you want them to be just “fixed”?

…them to be fixed.

I dont need to create a dynamic imitation, just static one.

I got it.