Solved

Transparent bitmap

Posted on 1997-04-03
6
391 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now