Solved

Transparent bitmap

Posted on 1997-04-03
6
402 Views
Last Modified: 2013-12-03
Hi,

I am trying to blit transparent DIB to memory DC of PostScript driver.
No luck yet.

I have seen references to

 bTransSupport = (GetDeviceCaps(hDC, CAPS1) & C1_TRANSPARENT) ? TRUE :
FALSE;

but can't find definitions of CAPS1 & C1_TRANSPARENT.

Does smb know smth about it?

Thank you very much,
Gary Vernikov
gvernikov@documagix.com

P.S.: Pls, make a note that I am asking about Postscript Driver DC. Only. Win32. Only. All the rest doesn't seem to be a problem.

I do have MSDN and checked all stuff there.
0
Comment
Question by:garyv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1334358
If bTransSupport is TRUE, that means you can transparent bitblt that uses the current background color of the DC as the transparent color.

if (GetDeviceCaps(hdcD, CAPS1) & C1_TRANSPARENT)
    {
        WORD w;
        w = SetBkMode(hdcD, TRANSPARENT1);
        f = BitBlt(hdcD,x,y,dx,dy,hdcS,x0,y0,SRCCOPY);
        SetBkMode(hdcD, w);
    }

But you are trying to blit transparent DIB. There are some examples on the Microsoft JumpStart 2.0 CD-ROM/Latestuf/Dibfx. If you cannot get it, let me know, I can send it to you by E-Mail.

0
 

Author Comment

by:garyv
ID: 1334359
Edited text of question
0
 
LVL 23

Expert Comment

by:chensu
ID: 1334360
Since Win32 is a device independent platform, Postscript Driver DC should behave like other DCs.
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:garyv
ID: 1334361
But all DCs have their own characteristics... Try to print transparent bitmap on Postscript and U'll see what I mean.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1334362
If you cannot print transparent bitmap on Postscript DC, you can do it on a general DC and bitblt it to Postscript DC. C1_TRANSPARENT is not defined in Win32.

0
 

Author Comment

by:garyv
ID: 1334363
Just looks like Postscript doesn't support transparency
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question