Is it possible to handle negative coordinates in a juce::Viewport
? How?
With code like below for instance it is always put at origin.
view_.setBounds (juce::Rectangle<int> (-1000, -1000, 2000, 2000));
port_.setViewedComponent (&view_, false);
addAndMakeVisible (port_);
port_.setViewPosition (-100, -100);
The full sentence (top left) should be “Portez ce vieux whisky au juge blond qui fume”.
Managing negative coordinates is such a pain.
Negative positions are a never ending nightmare.
I can not find a way to render those components properly on screen on demand.
The only workaround i’m thinking of is to add an arbitrary constant offset to everything.
Hi, first I’d like to thank juce team for such an awesome library.
I got some draggable child components which are located freely in the parent component, parent has also to perform panning, zooming and must be able to create childs at runtime with an arbitrary position, every child component has a mouseDown and mouseDrag override, and ones dragged I use setTopLeftCorner to position them relative to parents bounds, the parent also has overrided childBoundsChanged and has to resize when a node g…
I have a graph (ala Max/Pd) that is a bunch of Component all childs of the same Component.
I want to allow the user to Zoom In/Out and Scroll freely the content.
Is the best approach is to use an AffineTransform / setTransform for each of the component?
Is there another obvious approach i didn’t think of?
What are the pitfalls?
[Patch]