Print Page | Close Window

Draw transparent bitmap on canvas (Delphi 2007)

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3449
Printed Date: 04 May 24 at 5:23AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Draw transparent bitmap on canvas (Delphi 2007)
Posted By: notfromthisplanet
Subject: Draw transparent bitmap on canvas (Delphi 2007)
Date Posted: 29 Mar 17 at 1:19PM

Hi,

I use quickpdf for a long time and directly draw to quickpdf canvas. Everything works except drawing transparent bitmaps.

I tried so far:

Using bitmap with pf1bit, pf8bit, pf24bit

1. Canvas.StretchDraw: copymode cmSRCAND, cmSRCCOPY will paint a complete black box). Brush is set to bsclear, clwhite. Explicit set transparentcolor has no effect. It works perfect on almost any printer canvas!

2. Using StretchDIBits will paint the bitmap but not transparent. Again, I tried transparentcolor, different brush styles, copymodes.  It works perfect on almost any printer canvas!

3. Using famous Joe Hecht solution for drawing bitmaps on a canvas ignores transparent color. It works perfect on almost any printer canvas!

After so many tries it seems to make no sense to publish source. My hope is, that someone successfully draw transparent bitmaps to quickpdf canvas.

4. One of the many other not working examples: SetBkColor, BitBlt…

Thanks...




Replies:
Posted By: Ingo
Date Posted: 29 Mar 17 at 6:46PM
Hi FromOuterSpace ;-)

this will give you an idea how you can get it to work properly...
Have an eye on the posts from AndrewC (R.I.P.):
http://www.quickpdf.org/forum/displaying-transparent-bmp-files_topic2276.html

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk