[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] May I render a glyph outline in ft_pixel_mode_grays with FT_
From: |
Vincent Caron |
Subject: |
Re: [Devel] May I render a glyph outline in ft_pixel_mode_grays with FT_Outline_Get_Bitmap? |
Date: |
18 Jul 2002 19:19:17 +0200 |
On Mon, 2002-07-15 at 14:04, net pl wrote:
> Hi,
> I used the FT_Outline_Get_Bitmap to render a glyph outline into a target
> bitmap buffer. In the first time I used it to render the outline only in
> monochrome mode.
> I'd like to know if this function can render the outline in other mode than
> ft_pixel_mode_mono (such as graylevels)? And how to compute the bitmap.picth
> ? I saw that sometime it has the same value than the bitmap.width.
Hi,
Simply provide FT_Outline_Get_Bitmap() with a valid graylevel bitmap
and it'll invoke the AA rasterizer (ie. abitmap->pixel_mode ==
ft_pixel_mode_grays). Other bitmap fields are yours, the rasterizer will
use whatether pitch you defined. You are responsible for building the
FT_Bitmap object.
If you don't want/need to create your own bitmap instance (and setup its
8 fields :)), use FT_Load_Char() with FT_LOAD_RENDER. Of course this
implies that the outline is in a FT_Face ressource, which is maybe not
your case.