[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft] How to draw FT_Bitmap to the ARGB image?
From: |
John Found |
Subject: |
[ft] How to draw FT_Bitmap to the ARGB image? |
Date: |
Tue, 3 Nov 2015 16:26:42 +0200 |
I need to draw text on a transparent image with format ARGB, pre-multiplied
alpha.
The rendered FT_Bitmap has format FT_PIXEL_MODE_LCD and I want the glyph to be
displayed in some color with transparency.
So, for every pixel I have 3 numbers:
Da, Dr, Dg, Db - destination pixel ARGB (the background image).
Fr, Fg, Fb - FreeType rendered pixel (FT_Bitmap rendered with
FT_RENDER_MODE_LCD)
Ca, Cr, Cg, Cb - The color I want the glyph to be drawn.
So, the question: How to properly combine these 3 numbers in order to get the
result bitmap pixel.
A theory and math are welcome. If I understand the theory, I can write the code.
Best Regards.
--
http://fresh.flatassembler.net
http://asm32.info
John Found <address@hidden>
- [ft] How to draw FT_Bitmap to the ARGB image?,
John Found <=
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, Wojciech Mamrak, 2015/11/03
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, John Found, 2015/11/03
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, Wojciech Mamrak, 2015/11/03
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, John Found, 2015/11/04
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, Wojciech Mamrak, 2015/11/04
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, John Found, 2015/11/05
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, Wojciech Mamrak, 2015/11/05
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, John Found, 2015/11/05
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, Wojciech Mamrak, 2015/11/05
- Re: [ft] How to draw FT_Bitmap to the ARGB image?, John Found, 2015/11/05