freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Problem with text color


From: Dave Williss
Subject: Re: [ft] Problem with text color
Date: Mon, 11 Sep 2006 09:04:12 -0500
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)

I find the best way is to treat the 0-255 as an "alpha" value (opacity actually) with 0 being transparent, 255 being opaque. You can then blend your pink or whatever color into your background using this alpha value (do a Google search on alpha blending if you don't already have code examples of how to do this).


perlamahesh wrote:

Hi All,

With gray-scale font I am getting a buffer . Each byte in the buffer has 0 to 255 levels of gray values. I am doing raster operation using this buffer to my device screen

to draw the font. But the problem is how can I draw different colors using this gray values. I mean rgb( 0, 0, 0 ) gives black and rgb(255, 255, 255) gives white and rgb( 150, 150 ,150) gives some light black or gray color. These 0, 255, 150 are gray values of the buffer. Using the above logic I am able to draw black text, I am not able to draw other text colors. Is there any algorithm to get native color value using gray values. I mean if I want to draw with pink color rgb_new( 0, 0, 0 ) should give pink color, rgb_new( 150, 50,150)

Should give light pink color and rgb_new( 255, 255, 255) should give very light pink color. Then I will get a smooth border for the text with pink color. Please help me how to draw with different colors.

/*/Regards,/*/

/*/   Perla Mahesh/*/

**/This e-mail and attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient's) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!/**

------------------------------------------------------------------------

_______________________________________________
Freetype mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype




reply via email to

[Prev in Thread] Current Thread [Next in Thread]