Path: utzoo!utgpu!watserv1!watmath!att!dptg!ulysses!andante!mit-eddie!wuarchive!bcm!etaylor From: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Newsgroups: comp.windows.x Subject: Re: Vector Fonts Message-ID: <2908@gazette.bcm.tmc.edu> Date: 27 Nov 90 17:48:46 GMT References: <9011271415.AA26954@bruker.com> Sender: usenet@bcm.tmc.edu Reply-To: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Organization: Baylor College of Medicine, Houston, Tx Lines: 29 Nntp-Posting-Host: wilkins.iaims.bcm.tmc.edu Here is a simplistic method for rotating text by an arbitrary angle: First, create a bitmap B and write your text to it. Second, create an XYBitmap image I from B (via XGetImage). Third, create another XYBitmap Image I2. Fourth, for each x,y in I2: I2(x,y) = I(a,b) where a = x * cos(theta) - y * sin(theta) and b = x * sin(theta) + y * cos(theta) Finally, send your image to the screen. The dimensions of I2 should be big enough to handle the transformation. -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bmc.tmc.edu (713) 798-3776