[Drawkit] Beta 4 Finally up!

Brad Larson larson at sonoplot.com
Tue Jul 22 13:51:37 PDT 2008


Thanks a lot for this, there look to be a large number of improvements  
under the hood.

However, I'm having some problems with the new way that DKGridLayer  
handles units and spans.  Right now, it equates a single realspace  
unit to the width of a span.  In Beta 3, the two values were  
independent.  This causes a problem in our case, where we have small  
units (microns), but only want to have spans every 100 or 1000  
microns.  Under Beta 4, the drawing grid for our program is solid  
black.  In Beta 3, DKGridLayer would set and read back the  
m_spanDistance instance variable, but now only the DKDrawing's  
unitToPointsConversionFactor is used.

In fact, in DKGridLayer's  
setDistanceForUnitSpan:drawingUnits:span:divisions:majors:rulerSteps:  
the conversion factor is first set by

[[self drawing] setDrawingUnits:units  
unitToPointsConversionFactor:conversionFactor];

then the following is called to set up the spans:

[self setSpanDistance:conversionFactor * span divisions:divs  
majors:majors];

but in setSpanDistance:divisions:majors: the  
unitToPointsConverstionFactor is overwritten by

[[self drawing] setDrawingUnits:[[self drawing] drawingUnits]  
unitToPointsConversionFactor:unitDistance];

where unitDistance was conversionFactor * span from the previous  
call.  It seems to me that this should instead be setting an instance  
variable for the span distance, as was done before.  It's a little odd  
to have the unitToPointsConversionFactor set to two different values  
in a row.

Am I reading this correctly or is there a way to set a span with a  
length other than one unit that I'm missing?


On Jul 22, 2008, at 12:28 AM, Graham Cox wrote:

> Hi all,
>
> After delaying for quite a while, I've released DrawKit beta 4 - as  
> usual download from:
>
> http://apptree.net/drawkitmain.htm
>
> Please read the release notes for a list of changes. In particular  
> I've made another raft of name changes - this time I hope for the  
> last time - which I know is painful but should be worthwhile in  
> terms of making several classes KVC/KVO compliant that weren't  
> before and making things fit in better with normal Cocoa naming  
> conventions.
>
> There are also new versions of the DrawDemo and DK Mini Demo apps  
> built around beta 4.
>
> Let me know straight away if there are any problems.
>
>
> cheers, Graham
> _______________________________________________
> 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