Solved

Transparent bitmap

Posted on 1997-04-03
6
398 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
  • 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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