Solved

Transparent bitmap

Posted on 1997-04-03
6
404 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

734 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