[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

Draw Transparency To Memory

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
Yossi
Asked:
Yossi
  • 3
1 Solution
 
jacobkristensenCommented:
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
 
YossiAuthor Commented:
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
 
ct.smithCommented:
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
 
YossiAuthor Commented:
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
 
YossiAuthor Commented:
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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now