chuck@morgan.com (01/21/89)
The request from Kyle Maschmeyer was: > Is there anyone out there who has already written a half-decent routine to > display text within suntools which has been rotated by some number of > degrees? Even if you have a good one which just does multiples of 90 > degrees, I would appreciate it. Below is source for a quick and dirty Sunview raster text warping function. It performs any specified linear warp on text including rotations. The function you should look at is warptext() but the function rotatetext() illustrates how to use warptext() for simple rotations. Let me know if this is useful. If you have received any other (probably better) utilities please forward them to me. If you have suggestions, questions, etc., let me know. Note: No filtering is done to antialias properly so its best to use a large and thick source font like cour.b.24. Also, rotations by 45 degree increments are best accomplished with warptext() rather than rotatetext() since you can represent the up and right vectors more accurately. Chuck Ocheret Sr. Staff Engineer Morgan Stanley & Co., Inc. 1251 Avenue of the Americas New York, N.Y. 10020 (212)703-4474 chuck@morgan.com [[ The c program was too large to be included in a message. It has been placed un the archives under "sun-source" and is called "warptext.c". It is 8834 bytes long. --wnl ]]