[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Matrix (not the movie) ...
From: |
Scott Long |
Subject: |
Re: [Devel] Matrix (not the movie) ... |
Date: |
Thu, 11 Dec 2003 12:13:26 -0800 |
On Thu, 11 Dec 2003 20:33:58 +0100
"David Schweiger" <address@hidden> wrote:
Newbie question:
I have a matrix [m0 m1 m2 m3] which transforms the "width" and
"height" of a font, result is "transformed_width" and
"transformed_height".
Does Freetype provide any function which takes "transformed_width",
"transformed_height" and the matrix as input and returns the
untransformed "width" and "height"?
Strictly, the matrix doesn't transform a particular dimension such as
width or height. You can transform a vector (0, h) where h is the
height of the glyph. The result is not necessarily going to be of the
form (0, h'), because of possible rotation. But if your question is
simply how to reverse this operation, then you can use:
FT_Matrix_Invert(FT_Matrix* matrix);
Which will invert the matrix in-place. You can then apply the matrix
to the output vectors to recover the input vectors.
Scott Long
SwiftView, Inc. http://www.swiftview.com