[Drawkit] DrawKit Beta 3 available for download
Graham Cox
graham.cox at bigpond.com
Wed May 14 21:18:31 PDT 2008
DrawKit B3 is now available - http://apptree.net/drawkitmain.htm
This release includes quite a few further bugfixes, some tightening
and tidying of the code, some worthwhile performance optimisations,
and some new features. This is a much smaller rev than from B1 to B2,
so should be much less grief to drop into existing projects. A few
methods were better named for clarity however.
The DrawKit SDK includes the first draft of the documentation - at
present just an overview but hopefully will help with orientation. To
read this you need Omni Outliner 3 or later (bundled with consumer
Macs).
cheers, Graham
From the release notes:
Release 1.0 beta 3
May 15th, 2008
This is the third major beta release of DrawKit. This may be the last
beta before an actual 1.0 release, or release candidate, depending on
whether any further significant bugs
are found and need to be fixed. While there have been a few
substantial changes from beta 2 to 3, this is a much smaller change
than from 1 to 2, and represents more of a polishing of the API and
framework overall. This also incorporates some useful optimizations so
should show better performance generally.
1. Bugfixes - too many to list, but all of the KVO-related issues have
been addressed (e.g. occasional deallocation of observed objects
without de-observing them, etc).
The KVO-handling methods in DKRasterizer, DKRastGroup, DKStyle and
GCObservableObject have been simplified to make it more obvious how
these work and make them easier
to use by client code.
2. Cleaner ownership/containment of drawable objects - now there is
only "container" which can be a layer, group or other object that
supports the requisite informal protocols.
3. Redesigned hit-testing of graphics now no longer needs to cache
entire bitmaps of objects, but creates far smaller ones on the fly as
needed. This boosts performance and
significantly lowers the memory footprint for large drawings. Bitmaps
are still created lazily and additional optimizations make this "even
lazier" - it is not done for some
cases that were formerly triggering bitmap creation.
4. Optimization of selection marquee (rect) drawing now does far fewer
drawing updates, greatly boosting performance when selecting large
areas or many objects.
5. Select/Edit tool now implements copy on drag (+option key)
6. Demo application has more polished/enhanced interfaces for Layers,
Object Inspector, Style Inspector; fixes numerous bugs with keeping UI
in synch after documuments are closed,
application resumes, undo is invoked and so forth.
7. Selection colour is now used for default info-window background
colour, so reinforcing the colour-coding of layers when objects are
manipulated within them. Other layers
types such as DKGuideLayer also implement the "selection" colour
methods to help provide a unified API for the benefit of UI code. The
demo for example now allows the colour to
be set via its list-based interface. DKKnob now honours a passed-in
colour in its userInfo dict, wich by default is set to the same
selection colour of the layer. Thus knobs
now have the layer's colour for some types.
8. DKDrawingTool now implements a -set method which provides yet
another way to set a tool as current, making this really simple if you
already have a tool object. Reversion to
the "Select" tool now first checks for a tool in the registry called
"Select" allowing you a very easy way to supply a different tool as
the default, if required. DKToolController
is now smarter about calling super's mouseDown/dragged/up methods -
they are NOT called if the active layer is one that can respond to a
tool and there is a tool set. The
view controller thus factors additional methods to allow subclasses to
call them in a more fine-grained manner.
9. DKDrawingTool can now have a keyboard equivalent set, and if the
tool is registered, DKToolController is able to select the tool when
it receives a matching keyboard
sequence. Drawing tools now validate the target layer ahead of any
calls from the tool controller, so can make a decision about whether
they apply in the current active layer
context. Previously this decision was made by the tool controller
which wasn't very flexible. Immediate upshot - zoom tool always works,
even if active layer is hidden, locked
or not even set.
10. DKLayerGroups now store their layers the opposite way around from
earlier versions. This has no effect on the API as such but permits
table-based user interfaces to the
layers to work naturally (i.e. the top layer is at the top of the
list) without extra code being needed to flip it up the other way.
Also, locking a DKLayerGroup prevents
layers from being added, removed or moved. Undo for add and remove now
restores the layer's original Z-position.
11. Object layers can now cache their content offscreen when they're
inactive, which may help speed drawing. This is more beneficial if
your layers are complex or you have
a lot of them - you might need to experiment with rendering times to
see what settings work best for your particular cases. Other
performance-oriented changes include using
less smooth paths and "fake" shadows during low quality rendering. You
can also experiment with performing rendering on a secondary thread
though at present this is highly
experimental and not recommended for production code (it can be turned
on/off with a single flag).
12. You can now drop text directly into an object layer to make a text
object (enhances the existing feature that supports images).
13. Creation tools are now completely accurate when creating shapes -
previously there was a small placement error that only became
noticeable at higher zoom factors, but nevertheless
was real, in that it altered the width by a few fractions of a point.
Now all tools are absolutely spot-on accurate.
14. Added a "concentric duplication" method to the duplication
category. The Demo currently doesn't provide a UI to this.
15. The wedge-style path fixed to actually work (while there's no tool
button in the demo's palette for the wedge, you can still select the
wedge tool by typing 'w').
16. Selection undos changed so that if selection undo is turned OFF,
the selection state is still remembered by undo but only if it
accompanies another action. This is much more
useful than either of the previous two ways of handling this, and is
now the default.
17. DKTextAdornment adds an additional layout mode that flows text
within any arbitrary path or shape. Text angle can be linked to the
object or not (but not independently set
currently) and the vertical placement is ignored in this mode. An
additional parameter controls that inset of the text from the shape
edge.
More information about the Drawkit
mailing list