Newsgroups: comp.windows.x
Path: utzoo!sq!lee
From: lee@sq.sq.com (Liam R. E. Quin)
Subject: Re: Vector Fonts
Message-ID: <1990Dec4.233145.6208@sq.sq.com>
Organization: SoftQuad Inc.
References: <9011271415.AA26954@bruker.com> <2908@gazette.bcm.tmc.edu>
Date: Tue, 4 Dec 90 23:31:45 GMT
Lines: 24

etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) writes:
>Here is a simplistic method for rotating text by an arbitrary angle:
> [...]
>	I2(x,y) = I(a,b)
>		where
>		a = x * cos(theta) - y * sin(theta)
>		and
>		b = x * sin(theta) + y * cos(theta)

You will lose bits if you do this, or you will get holes in the result,
depending on how you implement it.

Instead, it is usually better (and much faster!) to use shear transformations.
See any graphics text book -- I won't try and explain, since graphics isn't
my field (moo).

Rob Pike's paper on Bitblt also explains how to use bit-blit() to rotate
an image, but I consider this to be a trifle arcane, and I am not sure that
it will work for angles other than multiples of 90 degrees.

Lee

-- 
Liam R. E. Quin,  lee@sq.com, SoftQuad Inc., Toronto, +1 (416) 963-8337
