[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft] Drawing monochrome pixels into byte buffer
From: |
Marco Wertz |
Subject: |
[ft] Drawing monochrome pixels into byte buffer |
Date: |
Tue, 18 Nov 2014 18:35:49 +0100 |
Hi,
what's the most efficient way to draw non-antialiased pixels into a byte
buffer? I've had a
look at FT_PIXEL_MODE_MONOCHROME but this uses only 1 bit per pixel whereas I
want FreeType
to always plot 1 byte per pixel (255 for visible and 0 for invisible pixels).
Setting "num_grays"
of FT_Bitmap to 2 didn't seem to have any effect with FT_Outline_Render().
So is there an easy way to make FT_Outline_Render() or FT_Outline_Get_Bitmap()
draw monochrome
pixels as bytes instead of bits or do I have to do two passes, i.e. first draw
monochrome
bits into a temporary bitmap and then map them to bytes?
Thanks!
Marco
- [ft] Drawing monochrome pixels into byte buffer,
Marco Wertz <=