473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

drawing question with HDC & mask / how to use a gray scale mask bitmap with HDC?

I'm using ScriptTextOut function to do some styled international text
drawing char by char (glyph by glyph dare I say), along a curves or things
like that.

Anyway I just discovered ScriptTextOut only display black glyph, regardless
my current HPEN or HBRUSH.

(Note: I cannot use ExtTextOut as char by char drawing is losing glyph
replacement)

So I have 2 question:
-1. is there a way to select a color for the output of ScriptTextOut?

-2. I was thinking to draw to a gray scaled HBITMAP as a drawing mask, brush
it and then render the result.
Any advice on how to do that using plain GDI / win32 call?
Nov 17 '05 #1
2 1173
"Lloyd Dupont" <net.galador@ld> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I'm using ScriptTextOut function to do some styled international text
drawing char by char (glyph by glyph dare I say), along a curves or things
like that.

Anyway I just discovered ScriptTextOut only display black glyph,
regardless my current HPEN or HBRUSH.


Did you call SetTextColor()?

Regards,
Will
Nov 17 '05 #2
No, I haven't.
Seems like a good idea, hey!
Thanks mate!

"William DePalo [MVP VC++]" <wi***********@mvps.org> wrote in message
news:uu**************@TK2MSFTNGP10.phx.gbl...
"Lloyd Dupont" <net.galador@ld> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I'm using ScriptTextOut function to do some styled international text
drawing char by char (glyph by glyph dare I say), along a curves or
things like that.

Anyway I just discovered ScriptTextOut only display black glyph,
regardless my current HPEN or HBRUSH.


Did you call SetTextColor()?

Regards,
Will

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: WALDO | last post by:
I have an interesting quandary. I have developed a program in VB.Net to extract an icon resource from an exe/dll or from an ico file and enumerate its formats (16x16,256 color;32x32,true...
3
by: Peter Oliphant | last post by:
I'm importing a jpeg via: Bitmap* image = new Bitmap( filename ) ; Then, using the Drawing::Graphics object, I execute DrawImage( image, x, y ). My problem is that the original image was...
6
by: Crirus | last post by:
Strange behaviour: I havea bitmap that I draw and add to an array of bitmaps... Do I have to create a bitmap using New every time? I tried to draw the bitmap in a for loop alike this: Dim...
13
by: Metallicraft | last post by:
I have a vb6 application. On the main form is a picture box with one or two images and several pieces of text displayed in it. These are created on the fly using gdi32 routines that are all in a...
3
by: Lance | last post by:
How do you enable Graphics.InterpolationMode.NearestNeighbor? When I use the following code it does not work (i.e., the image appears to have been drawn using linear interpolation): Const...
2
by: active | last post by:
I find Bitmap.Save works for WMF files but Bitmap.FromFile does not. If I use FromFile on a WMF file that came with VS I get an exception. If I use it on a WMF file created with Bitmap.Save I...
5
by: brix_zx2 | last post by:
vb.net 2k3: I have this code that doesn't work unless I take out the g.DrawString statements. If anyone can look over the code and tell me why I'd appreciate it. Dim g As Graphics Dim...
2
by: allanon76 | last post by:
I need to create an Image with more then 256 gray scale. this is my code, i've some problem setting correctly the pixel value. any idea? There is another way to create an image with more then...
5
by: Stephen Cawood | last post by:
I'm trying to use a C++ .lib from C# (I tried the Interop group will no results). I have a working wrapper DLL (I can get back simple things like int), but I'm having issues dealing with an array...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.