Nitro wrote:
> Am 07.08.2008, 01:31 Uhr, schrieb Chris Barker <[EMAIL PROTECTED]>:
>> I've had this kind of request before. While FloatCanvas is really
>> designed for scalable zoomable drawing, it should be easy to do this
>> kind of thing, too. We might want to keep that in mind as we re-factor.
> 
> When you say "this kind of thing", do you mean the task as a whole or  
> specific parts of it?

Well, to support the task as a whole, specific parts need to be 
supported. Those parts are what we should support.

> As far as I can see now it looks like fc can do it  
> all.

with some tweaking, yes. I see two issues that are not well handled:

1) positioning in ways other than centering on a bounding box -- i.e. 
being able to say something like "put this world coord at this pixel 
coord in the window, with this scale factor"

2) having a way to modify layout as a function of the host window 
changing size, shape, etc. At the moment, when the host window changes 
size, Floatcanvas re-centers the image at the same scale. this isn't 
what the OP wants. Also, He wants to change the scaling and layout with 
the size (though he also wants both vertical and horizontal scroll bars, 
  which isn't really compatible.

2b) Scrollbars as a way of moving around the Canvas -- there is nothing 
in fc1 that prevents this, it's just that no one has written a 
"ScrolledCanvas" as a compliment to the NavCanvas that uses panning 
instead. There is one issue here, though. the bounding box of the canvas 
is arbitrary, and changes as objects are added and removed, so the 
scrollbars would need to adjust for that somehow. (or not, I suppose the 
scrollbars could always move the canvas in "bounding box coordinates"...

> fc2 also supports arbitrary camera positions, so you can center the  
> view whereever you want. Right now it's centered by default, but it's as  
> easy as changing 1 line to change this. Maybe 5 lines to have the  
> alignment (tl, br, cc, ...) behaviour. The alignment is not yet part of  
> fc2, but it's on my list of things to do.

good, then we're almost there.

> If you want to use scrollbars, you could create a standalone scrollbar and  
> then link this to the camera position to get scrolling behaviour. ZoomToBB  
> is also working in fc2 (with various settings like you can specify whether  
> the aspect ratio should be kept and a percentual padding around the box).

nice!

also, writing the above, it might be nice to be able to force a 
particular bounding box. It might represent a piece of paper, for 
instance, though I've always been able to fake this by adding an 
invisible rectangle.  That only works if you want a larger BB, not a 
smaller one --would anyone ever want a smaller one?

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to