[Drawkit] Scaling issues
Graham Cox
graham.cox at bigpond.com
Fri May 23 22:19:37 PDT 2008
I've made some changes to DKKnob. Previously it was using
NSInsetRect(...) to adjust the size of some knob types but at very
large zooms that breaks down because it's adding a fixed amount to
each knob's rect, ignoring zoom. The ordinary knobs work OK, but the
rotation and centre anchor target end up huge, obliterating a large
area.
To fix this, I've changed these to scale the rectangle by some
proportion instead, which makes them look the same, but they don't
blow up at huge zooms.
This isn't a complicated change, but relies on a new function
(ScaleRect) in DKGeometryUtilities so you need to update both files
(attached).
The problem of hitting knobs at the other end of the scale remains. I
find them usable down to a very small scale, but your minimum scale
might be much smaller still - what scale are you actually trying to
use? There may come a point where it's just not practical to zoom any
further out - small objects are going to disappear altogether, let
alone be still editable. These are the sorts of "usability issues" I
was alluding to when trying to explain why there is a minimum scale
limit. You might find that drawing your objects smaller in a smaller
drawing area then setting the grid scale to compensate may be the
better approach (I know you did this already once, but maybe the
"sweet spot" is the next factor of 10 down?). It would also help if
you could tell me what sort of dynamic range you *need* for zooming.
10000:1 seems pretty large to me - do you really need more?
cheers, Graham
On 24 May 2008, at 9:05 am, Brad Larson wrote:
> I haven't taken a look at DKKnob yet, but I'll see if I can find
> where things are breaking down.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DKKnob.m
Type: application/octet-stream
Size: 13569 bytes
Desc: not available
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20080524/67566cb5/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DKGeometryUtilities.m
Type: application/octet-stream
Size: 25383 bytes
Desc: not available
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20080524/67566cb5/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DKGeometryUtilities.h
Type: application/octet-stream
Size: 3282 bytes
Desc: not available
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20080524/67566cb5/attachment-0005.obj>
More information about the Drawkit
mailing list