[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
test.c
Description: Text document
- Re: [ft] Determining pixel dimensions for bitmap, Marco Wertz, 2014/11/02
- Re: [ft] Determining pixel dimensions for bitmap, J Decker, 2014/11/02
- Re: [ft] Determining pixel dimensions for bitmap, Marco Wertz, 2014/11/02
- Re: [ft] Determining pixel dimensions for bitmap, Werner LEMBERG, 2014/11/03
- Re: [ft] Determining pixel dimensions for bitmap, Alexei Podtelezhnikov, 2014/11/03
- Re: [ft] Determining pixel dimensions for bitmap, Marco Wertz, 2014/11/03
- Re: [ft] Determining pixel dimensions for bitmap, Dave Arnold, 2014/11/03
- Re: [ft] Determining pixel dimensions for bitmap, Werner LEMBERG, 2014/11/04
- Re: [ft] Determining pixel dimensions for bitmap, Marco Wertz, 2014/11/04
- Re: [ft] Determining pixel dimensions for bitmap, Werner LEMBERG, 2014/11/05
- Re: [ft] Determining pixel dimensions for bitmap,
Marco Wertz <=
- Re: [ft] Determining pixel dimensions for bitmap, Werner LEMBERG, 2014/11/07
- Re: [ft] Determining pixel dimensions for bitmap, Marco Wertz, 2014/11/07