|
-
March 29th, 1999, 06:43 PM
#1
How do you draw a transparent hatch brush in NT4?
Is there a way to draw a transparent hatch brush in NT 4? I have tried a variety of things, but can't seem to get it.
I'm trying to draw a circle with a hatch brush which partially covers a green rectangle under it. I need the green to
show through as the background to the brush-filled circle.
Here's the latest attempt:
I receive a ROP mix from another part of the application, containing foreground and background ROPs. This is broken
into its component parts and used in an attempt to set the background mode (m_fgbgRops coming in is 0x00000B0D,
background=:
//these values look OK in the debugger...
UINT rop2Fg = m_fgbgRops & 0xFF;
UINT rop2Bg = (m_fgbgRops >> 8) & 0xFF;
Created brush using CreateHatchBrush; creation works OK...
// Set Bk mode; Not Effective
int nBkRet; //for debugging view
if ( m_fgbgRops == 0x0d0d /*rop2Bg == R2_COPYPEN*/ )//R2_COPYPEN,R2_COPYPEN
nBkRet = SetBkMode(m_diInfo.m_pDC->m_hDC, OPAQUE);
else if ( m_fgbgRops == 0x0b0d /*rop2Bg == R2_NOP*/ ) //R2_NOP,R2_COPYPEN
nBkRet = SetBkMode(m_diInfo.m_pDC->m_hDC, TRANSPARENT );
The SetBkMode call returns successfully, but appears to do nothing!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|