[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-create
Subject:    Re: [CREATE] Multiple viewports (for MyPaint,
From:       Andrew Chadwick <a.t.chadwick () gmail ! com>
Date:       2011-07-21 13:18:53
Message-ID: 4E28273D.7090701 () gmail ! com
[Download RAW message or body]

On 21/07/11 10:06, David Gowers (kampu) wrote:
> On Thu, Jul 21, 2011 at 5:22 PM, Boudewijn Rempt <boud@valdyas.org
> <mailto:boud@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
display, naturally.

> 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.
[snip]

GIMP allows multiple toplevel windows viewing the same document, so it
might be nice to allow it to store their positions and views.

-- 
Andrew Chadwick
_______________________________________________
CREATE mailing list
CREATE@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/create
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic