[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: |
Mon, 3 Nov 2014 23:54:16 +0100 |
> Actually, xMin and and yMin have to be rounded down, and xMax and yMax
> have to rounded up individually *BEFORE* you calculate the pixelwidth
> and pixelheight.
Ok. But what's your exact definition of "rounding up"? Should it be rounded
up whenever the fractional value is != 0? Or should it only be rounded up
in case the fractional value is >= 0.5? (i.e. 32 in 26.6. fixed point format)
> What's the big deal about an empty row or column? When rendering text
> we suggest using lsb_delta and rsb_delta to properly place the
> rendered glyphs.
The problem for me is that I'm not using the glyph API but the FT_Stroker
and FT_Outline APIs directly. Of course I can detect an empty row or
column on my own, but if I want to have a bitmap that doesn't contain
any empty rows or columns, I'm forced to copy the pixels to another
bitmap because the current APIs don't give me the chance to allocate
a bitmap of the *exact* dimensions before drawing to it.
And copying the bitmap without the empty row and column to a new bitmap
is overhead that could be avoided IMHO.
Marco
- 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 <=
- 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, 2014/11/06
- Re: [ft] Determining pixel dimensions for bitmap, Werner LEMBERG, 2014/11/07
- Re: [ft] Determining pixel dimensions for bitmap, Marco Wertz, 2014/11/07