[CREATE] Multiple viewports (for MyPaint, but Gimp/Krita/whoever too?)
a.t.chadwick at gmail.com
Thu Jul 21 06:18:53 PDT 2011
On 21/07/11 10:06, David Gowers (kampu) wrote:
> On Thu, Jul 21, 2011 at 5:22 PM, Boudewijn Rempt <boud at valdyas.org
> <mailto:boud at valdyas.org>> wrote:
> I'd be tempted to just save the rect of each subview with its
> rotation, mirror and zoom parameters. Going with the dividers is a
> bit implementation specific, I think.
> Yeah, as long as those rects are proportions of screen space (and
> sufficiently accurate to ensure the exact location of the split+how that
> fits into the overall combinations of hpanes and vpanes). Saving
> absolute pixel positions could result in some stupid/unusable behaviour
> when different people open the same document.
+1 on not storing absolute pixel positions, and I can use a height or a
width done as a proportion in deciding where the divider goes *and* its
orientation if you redefine that 0<n<1 range to mean to mean "portion of
the available space" and use the bigger of the (w, h) pair to decide.
I think a flat list of views in the XML is better than a tree for other
implementations than mine. It's much simpler. However I do need a path
to each view in order to reconstruct the layout accurately and avoid it
turning into a knapsack packing problem each time :) That could be done
by storing the binary tree path in a bitfield integer... but it's better
done using a structured text field (perhaps with a "mypaint:" prefix to
the value?). A parent ID is no help since that doesn't tell you which
side of the divider you are.
Implementations should be free to ignore any view they don't want to
> Mind you, I think that for this kind of usage, floating windows are
> pretty irrelevant. From what I've seen, tiles 'is the only game in
> town'. It's good to support the possibility of floating-windowed
> behaviour, cause it's easier to implement -- it just doesn't perform as
> well in this role as tiling does.
GIMP allows multiple toplevel windows viewing the same document, so it
might be nice to allow it to store their positions and views.
More information about the CREATE