freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] pixel size, hinting and scaling


From: Alexander Gelfenbain
Subject: Re: [Devel] pixel size, hinting and scaling
Date: Fri, 17 Jan 2003 11:13:13 -0800
User-agent: Mutt/1.4i

Hi David,

On Fri, Jan 17, 2003 at 12:35:12PM +0100, David Turner wrote:
> Here's a proposed algorithm:
> 
>   let A be the matrix   | ax  bx  |
>                         | ay  by  |
> 
>   then the scaling factors can be computed as:
> 
>      sx = sqrt( ax*ax + ay*ay )
>      sy = ( ax*by - ay*bx ) / sx

Your method makes Det(A) == Det(Scaling Matrix).

I found that another method, that does not preserve Det(A):

                sx = sqrt(ax*ax + ay*ay)
                sy = sqrt(bx*bx + by*by)

gives better visual results in decomposing complex transformations. 

That's what I am using when I decompose translation matrices in STSF to 
the pair of scale and rotate-and-shear matrices for FreeType.

AG


-- 
Alexander Gelfenbain, Sun Microsystems, Inc.
+1 (408) 635-0612 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]