Tk Source Code

View Ticket
Login
Ticket UUID: 1611359
Title: TIP#119: Rotated text for canvas
Type: Patch Version: TIP Implementation
Submitter: dkf Created on: 2006-12-08 09:08:50
Subsystem: 05. Canvas Items Assigned To: dkf
Priority: 8 Severity:
Status: Closed Last Modified: 2008-11-23 01:16:45
Resolution: Accepted Closed By: dkf
    Closed on: 2008-11-22 18:16:45
Description:
This patch is a partial implementation of TIP#119, being for UNIX/X11 only. Needs Windows and OSX/Aqua implementations.

Thanks to Simon Geard for recovering the patch (which had been lost) and upgrading it to work with 8.5. :-)

Includes copy of xvertext 5.0; I think the license is Tcl/Tk-compatible.
User Comments: dkf added on 2008-11-23 01:16:45:

File Added - 302534: win.patch

See attached patch for Win32 renderer (probably incomplete, but Works On My Machine; remaining issues can be dealt with through bugs reports) which works in principle rather similarly to the Xft renderer (caching rotated system fonts...)

All committed to CVS HEAD now. No chance of a backport though; this is too big, too painful.

Note that this does not touch xvertext; too many bits and pieces from elsewhere were needed.
File Added: win.patch

dkf added on 2008-11-18 08:39:03:

File Deleted - 300619: 



File Added - 301866: rotate.patch

Added a renderer for classic X11 (slow on remote hosts, but works)
File Added: rotate.patch

dkf added on 2008-11-08 06:39:00:

File Deleted - 300273: 

Patch with generic code finished.

Missing:
 * Win renderer (tkWinFont.c)
 * Classic X11 renderer (tkUnixFont.c)
 * tests and docs!

File Added: rotate.patch

dkf added on 2008-11-08 06:38:59:

File Added - 300619: rotate.patch

dkf added on 2008-11-05 22:01:37:

File Deleted - 300271: 



File Added - 300273: rotate.patch

D'oh! Had the order of transforms wrong. Rotated text on OSX now works with the new patch.
File Added: rotate.patch

dkf added on 2008-11-05 21:46:47:

File Added - 300271: rotate_mac.patch

Here's a *highly buggy* version of the rotated text renderer for OSX. No idea what's wrong.
File Added: rotate_mac.patch

dkf added on 2008-11-04 08:21:45:

File Added - 300052: rotate.patch

Adding a partial implementation with some good features over the original.
  1) Not disruptive of any public API.
  2) Uses Xft for doing rotated text.
  3) Does the bounding box properly; animated rotating text works.
  4) Handles the text item's -underline option.

Still to do:
  1) Adaptations for other renderers (should be easy for OSX and Win).
  2) Handle highlighting, the cursor and the caret.
File Added: rotate.patch

hobbs added on 2007-10-31 02:51:16:
Logged In: YES 
user_id=72656
Originator: NO

See also 220784 for old patch

das added on 2006-12-12 14:00:11:
Logged In: YES 
user_id=90580
Originator: NO

a few comments from a quick read through the patch:
- contains two copies of rotated.c and rotated.h in unix and xlib, if the right place for these is unix/ they should be renamed to conform to the tkUnix* pattern.
- tkUnixPort.h includes rotated.h with a relative path which will not work in an install location.
- three routines in the public stubs table are changed to take an additional angle param, this incompatibility is not discussed in the TIP, it might be better to introduce additional API that the originals call through.
- changes tkDecls.h directly instead of tk.decls
- tkCanvText.c contains leftover printf debugging and commented out bits
- no tests or docs, testscript added to unix/

The aqua implementation should be easy, all that should be required is to setup a rotation CTM before the ATSUI quartz text drawing.

dkf added on 2006-12-08 16:08:51:

File Added - 206317: tk8.5a5_atext.patch

Attachments: