[Drawkit] Scaling issues

Brad Larson larson at sonoplot.com
Mon May 26 12:26:18 PDT 2008


I got a couple of compile errors about mScaleRatio being undefined.  I  
assume you meant for it to be an instance variable of DKKnob?  I added  
it as such and things seemed to work.

The knobs scaled properly, but still seemed a little large with  
mScaleRatio = 0.3 in DKKnob's init: method: http://www.sonoplot.com/downloads/KnobScaling-0.3.jpg 
  .  I upped mScaleRatio to equal 0.7 in init: and that seemed to  
provide a more attractive size: http://www.sonoplot.com/downloads/KnobScaling-0.7.jpg 
  .  That might just be a matter of personal taste, though.  Along  
with the recent grid corrections, I think you've nailed the small- 
scale rendering and manipulation operations.


On May 24, 2008, at 12:19 AM, Graham Cox wrote:

> 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.
>
>
>
> < 
> DKKnob 
> .m 
> > 
> < 
> DKGeometryUtilities 
> .m 
> > 
> <DKGeometryUtilities.h>_______________________________________________
> Drawkit mailing list
> Drawkit at lists.apptree.net
> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net

______________________
Brad Larson
SonoPlot, Inc.
3030 Laura Lane, Suite 120
Middleton, WI 53562





More information about the Drawkit mailing list