freetype
[Top][All Lists]
Advanced

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

Re: [ft] Determining pixel dimensions for bitmap


From: Marco Wertz
Subject: Re: [ft] Determining pixel dimensions for bitmap
Date: Thu, 6 Nov 2014 16:07:03 +0100

> > This calculation gives me an exact fit only if I don't apply any
> > rotation to the shape using FT_Outline_Transform(). As soon as I
> > apply a transformation matrix on my FT_Outline, it happens very
> > often that either the very first row is empty or the very last
> > column is empty.
> 
> Could you provide a compilable sample code that exhibits your problem?

Sure, here you are. I tried to make it as simple as possible. The code draws
a 320x240 filled rectangle applying a transformation matrix that rotates
the rectangle from 0 to 359 degrees.

You can see that the first row or the last column is empty very often.
Here are some excerpts from the debug output:

...
*** NOW CHECKING ROTATION ANGLE: 4
--> EMPTY ROW: 0
*** NOW CHECKING ROTATION ANGLE: 5
--> EMPTY ROW: 0
*** NOW CHECKING ROTATION ANGLE: 6
*** NOW CHECKING ROTATION ANGLE: 7
*** NOW CHECKING ROTATION ANGLE: 8
*** NOW CHECKING ROTATION ANGLE: 9
--> EMPTY ROW: 0
*** NOW CHECKING ROTATION ANGLE: 10
--> EMPTY ROW: 0
*** NOW CHECKING ROTATION ANGLE: 11
--> EMPTY ROW: 0
....
*** NOW CHECKING ROTATION ANGLE: 94
--> EMPTY COLUMN: 262
*** NOW CHECKING ROTATION ANGLE: 95
--> EMPTY COLUMN: 267
*** NOW CHECKING ROTATION ANGLE: 96
*** NOW CHECKING ROTATION ANGLE: 97
*** NOW CHECKING ROTATION ANGLE: 98
*** NOW CHECKING ROTATION ANGLE: 99
--> EMPTY COLUMN: 288
*** NOW CHECKING ROTATION ANGLE: 100
--> EMPTY COLUMN: 292
*** NOW CHECKING ROTATION ANGLE: 101
--> EMPTY COLUMN: 297
....

Tested with freetype 2.5.3.

Marco

Attachment: test.c
Description: Text document


reply via email to

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