[Drawkit] "not flipped" drawing issues
Graham Cox
graham.cox at bigpond.com
Mon Jun 1 22:32:56 PDT 2009
On 02/06/2009, at 3:17 PM, Allan Daly wrote:
> Now that I'm focusing on text so much I'm unfortunately getting many
> crashes and freezes which I suspect are related to the text origin
> and display in the not-flipped drawings or perhaps also my use of
> offsets outside the bounding box of the DK objects. I need to figure
> out what's causing the crashes and was about to start digging into
> the DK code and thought it would make sense to ask you about your
> updates and changes and schedule first. Would you mind sending out a
> quick update as to what the near future might hold? In particular
> please comment on the text drawing issue in not-flipped drawings.
Hi Alan,
The DXF stuff sounds terrific - this will be a great addition to the
usefulness of DK.
There are lots of changes coming to do with text. I suspect the
crashes you're seeing are due to one of the bugs that has been fixed
for quite a while now in my current version. The main changes are that
all text rendering is concentrated in just two places -
DKTextAdornment for normal text laid out in blocks, and NSBezierPath
+Text category for text laid out on paths. All other text-bearing
objects use these internally. The current beta laid the groundwork for
this change but it's now fully implemented.
One big problem with text is that NSLayoutManager assumes a flipped
context. This may add some headaches when drawing text and so far I
must admit I haven't put any effort into addressing this. However,
recent work has led me a much greater understanding of this class than
before, so I have a chance to create a subclass that can be used for
tackling this.
An update is overdue and I will endeavour to make one this week I
think. The only reason I keep holding off is because there's always
"just one more" issue to deal with, though most of those that have
been on my radar screen lately are now sorted. This includes text-on-a-
path issues (such as superscript and underlining) that may interest you.
--Graham
More information about the Drawkit
mailing list