bugMyPaint - Bugs: bug #20317, [RFC] Implement a 'Preview Window'

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #20317: [RFC] Implement a 'Preview Window'

Submitted by:  Ali Lown <alown>
Submitted on:  Wed 21 Nov 2012 11:19:37 PM UTC  
 
Severity: 1 - WishPriority: 5 - Normal
Status: Ready For TestPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.0Planned Release: None
Operating System: Linux

(Jump to the original submission Jump to the original submission)

Fri 08 Mar 2013 11:41:09 PM UTC, comment #18:

Clearly I don't know how to successfully do monospace text, so just imagine my diagram was monospaced ;)

David Gowers <ion9>
Project Member
Fri 08 Mar 2013 11:38:49 PM UTC, comment #17:
  • I find the general behaviour, displaying and dragging, a lot more predictable
  • Behaviour with frames is also much more helpful.
  • The viewfinder colour is more visible usually.
  • The topleft indicator is quite clear.
  • When the document is zoomed out enough that the viewfinder doesn't show up, even partially, this can be slightly confusing. I think this is okay though, as at that scale, the main window is a better 'preview window' than the preview window could be. If you still want to do an 'offscreen mark', then I personally favor a simple crosshair showing location of view center, with an 'L' to show topleft orientation. (see below)
  • I like the cursor that appears on mouseover.

Diagram of crosshair style:

|
- - , possibly rotated, with an L-shape in whichever corner is appropriate to show topleft.
|

Also:

  • while I was testing, I noticed a bug with the 'recently opened' menus: .gpl files opened in the palette editor recently show up there, and of course fail to load when you select them. IMO they need to just be filtered out.
David Gowers <ion9>
Project Member
Fri 08 Mar 2013 11:38:06 PM UTC, comment #16:

Thanks for taking my proof-of-concept and fixing it up to be suitable for integration into the main branch.

I am quite happy with its current behaviour, and it seems to work fine here.

For the off-screen mark, I think your chevron suggestion pointing to which side of the window you are positioned off is the cleanest approach to this.

Ali Lown <alown>
Fri 08 Mar 2013 04:14:50 PM UTC, comment #15:

The current git master goes with a

look, where * is a dot identifying the top-left corner. I've added a button for turning the "viewfinder" off. I tried arrows, and they looked a bit strange at multiple scales. This look has the advantage that it echoes the view manipulation icons and cursors.

You can now reposition and drag the viewfinder a bit more intuitively, I hope. The preview no longer tries to fit in both the viewfinder and the working canvas - just the canvas.

There's no "offscreen mark" yet; still thinking about that :/

Can you test it and let me know your thoughts, please?

Andrew Chadwick <achadwick>
Project Administrator
Mon 04 Mar 2013 10:15:44 PM UTC, comment #14:

> Do you mean to minimize the frequency of changes in scale in the preview window


Yes. The way this frequently changes when I change the zoom of the main view seems a somewhat perverse behaviour for a preview window. I think I expect it to not draw attention to itself as I'm painting, beyond showing the actual changes in content.

> ◭

and ◮ when X-flipped? This seems like a pretty good, intuitive choice to me :)

>I'm happy with this. Presumably it would make your other objections vanish? :)


Pretty much. I wouldn't be personally effected but I think that the current frequency of zoom changes would still generate visual noise for users who didn't disable the preview rectangle.

> what do you think?


So whichever area of the preview is 'more' offscreen gets chosen as the indicated corner?
I really like this, actually.

> Sorry, but that is not the intent of the preview window, and I don't think we should go there. The preview does not (in theory) ever have a scale which is zoomed in further than that zoom which is necessary to show the document as a whole, and the intent of the frame is of course to allow the user to choose the size of the document as a whole.


Noooope.
What I mean was exactly 'content as defined by the frame'. When I define a frame, I have the expectation that the contents of said frame will be fitted as close as possible to the edges of the preview area.

David Gowers <ion9>
Project Member
Mon 04 Mar 2013 03:31:54 PM UTC, comment #13:

> Unless the picture is highly symmetrical, the orientation seems obvious to me. But a little 3..5 pixel high arrow on the top of the rectangle wouldn't make it much more distracting than it already is.


It's mostly mirroring I'm worried about. That's not really intuitively obvious anyway, at least not to me. If there's no drawing on the canvas, it can be a little tricky to figure out where you are too.

A symbol like ◭ or ↾ somewhere near the top of the preview rectangle might be OK.

Painttool SAI uses an upwards stroke to indicate the top of the main view in its preview tool

http://murz.wordpress.com/2008/01/20/paint-tool-sai-to-retain-or-not-to-retain/
http://gabrielhage.deviantart.com/art/SAI-Screenshot-256052049

but I'm not sure whether SAI does mirroring or not. I also like that the view manipulation buttons are right there next to the preview: that's a nice, intuitive arrangement.

Andrew Chadwick <achadwick>
Project Administrator
Mon 04 Mar 2013 03:20:03 PM UTC, comment #12:

> I'd like to be able to turn off the preview rectangle, personally. It's too distracting.


I'm happy with this. Presumably it would make your other objections vanish? :)

> Your version effectively connects the main canvas zoom and the preview zoom


Only indirectly, as you correctly surmise it's a result of...

> I believe this is a consequence of forcing the visible area to be large enough that the rectangle fits fully in it, even if there is no content in some parts of the rectangle.


That's true. I tried it without doing this, and found it very confusing when the teal-and-white preview rectangle is bigger than the size of the preview widget - primarily when clicking to position it.

However, not doing this scale forcing is easy enough: you can try it out for yourself by replacing

with

on line 368 of gui/previewwwindow.py.

However if we could come up with a good way of showing where the preview rectangle is when some part of it is offscreen, that would help with my confusion. I'm thinking a little chevron to one of the compass points:

might be enough of a hint? Enough to show "you are lost", at any rate.

If the centre of the preview rectangle is off-screen, it might clear that up too:

what do you think?

> [...] when there is a frame defined, I think the preview needs to try much harder to maximize the amount of space taken up by actual content


Sorry, but that is not the intent of the preview window, and I don't think we should go there. The preview does not (in theory) ever have a scale which is zoomed in further than that zoom which is necessary to show the document as a whole, and the intent of the frame is of course to allow the user to choose the size of the document as a whole.

> ... and minimize changes in scale


Could you clarify what you mean here please? Do you mean to minimize the frequency of changes in scale in the preview window, or to minimize the difference in scale steps between the main view and the preview, or something else?

Andrew Chadwick <achadwick>
Project Administrator
Sun 03 Mar 2013 04:00:23 AM UTC, comment #11:

To be more specific:

  • Updating looks straightforward. I haven't gotten confused about it yet.
  • Especially when there is a frame defined, I think the preview needs to try much harder to maximize the amount of space taken up by actual content, and minimize changes in scale. It seems reasonable to expect that when I have just loaded a picture, its content should fill the entire preview area.
David Gowers <ion9>
Project Member
Sun 03 Mar 2013 12:07:00 AM UTC, comment #10:
  • Icon seems okay; binoculars would not be 'more obvious' to me.
  • I'd like to be able to turn off the preview rectangle, personally. It's too distracting.
  • Unless the picture is highly symmetrical, the orientation seems obvious to me. But a little 3..5 pixel high arrow on the top of the rectangle wouldn't make it much more distracting than it already is.

Also a bug report:

  • Your version effectively connects the main canvas zoom and the preview zoom, meaning I only actually get an overview when zoomed to 150% or more - at other times I get a small thumbnail in the middle of a sea of background color. I find this quite frustrating. I believe this is a consequence of forcing the visible area to be large enough that the rectangle fits fully in it, even if there is no content in some parts of the rectangle.
  • It makes sense to me to limit the preview extents to the area that actually has content, and if the rectangle extends outside this, to show little arrows at the edges of the preview to indicate this.
  • In any case, it would also help to show a crosshairs at the centre of the rectangle; this would make the above fix more intuitive and make using Symmetry require less trial-and-error.
David Gowers <ion9>
Project Member
Sat 02 Mar 2013 11:32:31 PM UTC, comment #9:

I've had some time to work on this and get it integrated, so I fixed up the projection bug, added an icon and tweaked the way it updates a bit. It's rebased onto MyPaint's git master right now. Thanks for the contribution!

Some things it would be good to test:

  • Can the user easily tell which way is "up", and possibly other details of the "preview rectangle", e.g. mirroring.
  • Should we call it "overview" instead? :D I tend to think of a "preview" as being a full-screen presentation or something, or a "print preview".
  • Does clicking around in the preview widget update in an obvious way way?
  • Does the user need a checkbox in the widget for turning the preview rectangle off or on?
  • Is the icon I added indicative, or do we need something more symbolic and indicative of an "overview" or a "full-size preview"? Binoculars, maybe?
Andrew Chadwick <achadwick>
Project Administrator
Tue 04 Dec 2012 05:50:11 PM UTC, comment #8:

I have extended my implementation a bit (based on your changes) to include a 'preview' overlay which indicates the visible screen region.

Follow my branch at https://github.com/alown/mypaint/commits/preview

I seem to have made a slight mistake during the coordinate mapping though because the overlay is too square in comparison to my actual mypaint window, and the rotations don't quite seem to line up.

Anyway, take a look. When I next get some time I will continue work on it.

Ali Lown <alown>
Fri 30 Nov 2012 03:18:34 PM UTC, comment #7:

Greyscale filtering for a tdw isn't too tricky: I made an experimental display-side colour filter hack a while back that could be reused: https://gitorious.org/~achadwick/mypaint/achadwick-mypaint/commits/display-filters (just rebased against current master). Doing it in Python isn't the fastest approach, but it works.

Andrew Chadwick <achadwick>
Project Administrator
Fri 30 Nov 2012 12:49:43 AM UTC, comment #6:

If we're going to have a dedicated preview widget, it would be nice (but by no means necessary) to have a checkbox to show the image in greyscale. This is very helpful for checking that the values in your painting read well (cf. Feng Zha's workflow shown in his videos here http://www.youtube.com/user/FZDSCHOOL/videos , for example)

If it becomes navigator-like, I'd like some way of hiding the 'main canvas shows' box, as I personally find the current version much more useful than say, the GIMP navigator.. the GIMP navigator's view extents box really obstructs the goal of getting an overall view of the canvas. Without the box overlay, it is so clear what the overall image looks like.

David Gowers <ion9>
Project Member
Tue 27 Nov 2012 02:22:36 AM UTC, comment #5:

Evolving it here with a few of my tweaks: https://gitorious.org/~achadwick/mypaint/achadwick-mypaint/commits/preview-window - let me know if you've a clone somewhere I should be tracking.

A preview rectangle would be useful when zoomed in. It's a commen enough pattern: http://designinginterfaces.com/firstedition/index.php?page=Overview_Plus_Detail

The "Navigator" in Painttool SAI is the sort of thing I mean for an art program: http://alternativeto.net/software/painttool-sai/ (we have angles of rotation and mirroring too). These days we can do such a thing in MyPaint with an Overlay on the TDW in question; the SymmetryOverlay is a recent example that works in "display" space - screen pixels - but which shows the coordinates of things from the underlying model.

Beyond that, allowing the preview rectangle to be dragged within the preview window would be pretty awesome :)

Andrew Chadwick <achadwick>
Project Administrator
Mon 26 Nov 2012 10:49:25 AM UTC, comment #4:

Attached is a patch for adding automatic zoom/centering for the preview window. Apply on top of the previous patch.

It seems to work ok, though I don't think it is particularly efficient given it recalculates and draws for every call of the 'canvas observer' callback.

I am less certain how to go about implementing a preview rectangle for the window. (Is it useful if the window automatically re-centers?)

Ali

(file #16802)

Ali Lown <alown>
Fri 23 Nov 2012 07:16:37 PM UTC, comment #3:

Thanks for the updated patch. It patches cleanly against a15e0215894f91e14d5ff337b149c0dee7724763 now, but it's lacking features I think it needs before it can be released:

  • zoomability/panning, perhaps automatic...?
  • a preview rectangle would be nice

Just remembered some ancient code of mine which did something similar, in a rather different way:
https://gitorious.org/~achadwick/mypaint/achadwick-mypaint/commits/split-view - it kinda got dropped due to lack of enthusiasm, and for being somewhat weird and wonderful D: Your idea looks much more sensible.

(Bear in mind the split-view stuff is ancient fragile archaeology and won't merge with current master's tdws in the slightest, but perhaps we could salvage the preview rectangle transformations and overlay stuff. Just thinking out loud...)

I've tucked your code away on a branch, and I'll try to fix it up to go into master after the 1.1 release, if that's OK. Sorry I won't be able to address it before then :( Hopefully if zoom management is automatic, it won't need a controller.

Andrew Chadwick <achadwick>
Project Administrator
Thu 22 Nov 2012 01:31:55 PM UTC, comment #2:

Find a new patch attached.

This fixes it for git (still no icon).
You can find it in the View Menu, on the tools Toolbar, or at 'Shift+P'.

Ali

PS. It would be good if I could get this in before the feature freeze. :)

(file #16796)

Ali Lown <alown>
Thu 22 Nov 2012 04:34:52 AM UTC, comment #1:

Hi Ali --

Could you update and resend this as a patch against current git master please? Looks like it's against something ancient:

gui/stock.py went away in July: https://gitorious.org/mypaint/mypaint/commit/e3f60355d7d26bf8c6bbec82ec57e32c927f5bfe

Andrew Chadwick <achadwick>
Project Administrator
Wed 21 Nov 2012 11:19:37 PM UTC, original submission:

My workflow involves keeping myself zoomed in quite closely when working on details in the artwork. At times like these having a preview window showing the 'whole' canvas would be convenient.

The attached patch implements a basic preview window showing the (non-editable) contents of the user's canvas zoomed out a bit.

The patch implements a new ToolWidget using the TiledDrawWidget to do the actual display. It also adds a menu and a toolbar item for this. It does not include an icon for the toolbar (icons welcome).

Ali

Ali Lown <alown>

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ion9 (Posted a comment)
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by alown (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 02 Mar 2013 11:32:31 PM UTCachadwickPriority1 - Later=>5 - Normal
      StatusIn Progress=>Ready For Test
    Tue 27 Nov 2012 02:22:36 AM UTCachadwickStatusPostponed=>In Progress
    Mon 26 Nov 2012 10:49:25 AM UTCalownAttached File-=>Added 0002-Implement-auto-center-zoom-for-preview-window.patch, #16802
    Fri 23 Nov 2012 07:16:37 PM UTCachadwickPriority5 - Normal=>1 - Later
      StatusNeed Info=>Postponed
    Thu 22 Nov 2012 01:31:55 PM UTCalownAttached File-=>Added 0001-Implement-Preview-Window-using-TiledDrawWidget.patch, #16796
    Thu 22 Nov 2012 04:34:52 AM UTCachadwickStatusNone=>Need Info
    Wed 21 Nov 2012 11:19:37 PM UTCalownAttached File-=>Added 0001-Implement-Preview-Window-using-TiledDrawWidget.patch, #16795
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup