Solved

Draw Transparency To Memory

Posted on 2001-08-05
5
197 Views
Last Modified: 2013-12-26
I use Draw to Bitmap in the RAM,
for printing or saving a bmp file.

The code is the same code as used for rendering to the viewport.

But although I have no problems with transparency in the
viewport, The transparent triangles look opaque in the printer's output or in the BMP file created.

- Is it because the blending is not handled corectly for
memory rendering ?
- How can I solve this problem ?
0
Comment
Question by:Yossi
  • 3
5 Comments
 
LVL 1

Expert Comment

by:jacobkristensen
ID: 6353824
bmp's don't support transparency and I quess a printer doesn't either.
You could of cource copy the pixels from your screen, although it is not a very elegant solution...
0
 

Author Comment

by:Yossi
ID: 6403585
Copy screen pixels does not feet my code requirments, since it will copy unwanted graphics such as dialogs or highlited lines with the picture.
0
 
LVL 4

Accepted Solution

by:
ct.smith earned 100 total points
ID: 6634451
I'd try a draw to an offscreen buffer and do a pixel copy from there.  The pixel copy should be reading off the buffer without using any alpha channels.  How you would do this is entirely dependant on the API you use.
0
 

Author Comment

by:Yossi
ID: 6640367
I figured out that it is a driver dependent problem whether alpha is used correctly for memory draw.
Some graphic cards supply driver which does it right, while other have a bug.

0
 

Author Comment

by:Yossi
ID: 6640371
It seems like a good bypass to the driver problem.
I won't test it since I found that some graphic cards have drivers which do it right.

Many Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Global Action Buttons and Action Bars for Windows 2 439
Unity game development advices! 3 267
Any good game free GIF sites? 2 128
RTS - Should I pre-load all possible images? 2 61
Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

27 Experts available now in Live!

Get 1:1 Help Now