[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Text drawing
From: |
Fred Kiefer |
Subject: |
Text drawing |
Date: |
Fri, 31 Oct 2003 19:30:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204 |
The clean up of the text layout has been on my list for long now. As I
still dont find time to do it, here are two simple ideas for some of the
problems, where I would like to hear comments on:
1) The layout manager uses the following lines to set a text colour when
non has been specified:
DPSsetgray(ctxt, 0.0);
DPSsetalpha(ctxt, 1.0);
This should of course be replaced by [[NSColor textColor] set] to
respect the colour scheme of the user. Or if we really mind the speed
here by caching this colour and using the cached value.
2) Then there is quite a mess in the direct string drawing. We have a
whole set of different methods the front end could call. I think that we
should remove everything apart from GSShowGlyphs, GSShowText and
DPSshow. The difference between the last one and the other two will be
that this works together with the path, wheras the first ones use the
text position. The text drawing code in NSLayoutManager would than be:
GSSetTextPosition(ctxt, gbuf_point);
GSShowGlyphs(ctxt, gbuf, gbuf_len);
And GSShowGlyphs must of course be changed in all backends to use the
textCtm and to leave the path untouched.
All the other DPSXXXshow methods should be removed. I don't think
anybody has been using them for years now.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Text drawing,
Fred Kiefer <=