Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Printing TDirect2DCanvas Transparency



Permlink Replies: 5 - Last Post: Mar 10, 2016 8:42 AM Last Post By: David Millington
Larry Johnson

Posts: 86
Registered: 6/7/14
Printing TDirect2DCanvas Transparency
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 7, 2016 8:03 PM
I am using CB XE4 32 bit platform.

Using the TDirect2DCanvas I am drawing layered images that include a top transparent area using Brush->SetOpacity(0.25); This allows seeing what is underneath the transparent top layer. I need to print the Direct2DCanvas including the transparent area. I have tried to outsource this and I am being told it is not possible to print transparent areas in Delphi/C++Builder using Direct2DCanvas. Does anyone know if printing transparent areas is possible? Can you recommend a document describing how to do this? Is there a outsource web site that has C++Builder programmers which might be able to create a sample print project?

Thanks
Larry

David Millington

Posts: 257
Registered: 5/29/05
Re: Printing TDirect2DCanvas Transparency
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 8, 2016 3:52 AM   in response to: Larry Johnson in response to: Larry Johnson
On 2016-03-08 04:03:49 +0000, Larry Johnson said:

I am using CB XE4 32 bit platform.

Using the TDirect2DCanvas I am drawing layered images that include a
top transparent area using Brush->SetOpacity(0.25); This allows seeing
what is underneath the transparent top layer. I need to print the
Direct2DCanvas including the transparent area. I have tried to
outsource this and I am being told it is not possible to print
transparent areas in Delphi/C++Builder using Direct2DCanvas. Does
anyone know if printing transparent areas is possible? Can you
recommend a document describing how to do this?
Is there a outsource web site that has C++Builder programmers which
might be able to create a sample print project?

I haven't used the Direct2D canvas for printing. But one option would
be to use the D2D canvas for compositing, and then copy it to a normal
canvas for printing - or copy the resulting image to the printer canvas.
Larry Johnson

Posts: 86
Registered: 6/7/14
Re: Printing TDirect2DCanvas Transparency
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 8, 2016 10:37 AM   in response to: David Millington in response to: David Millington
I haven't used the Direct2D canvas for printing. But one option would
be to use the D2D canvas for compositing, and then copy it to a normal
canvas for printing - or copy the resulting image to the printer canvas.

The older VCL canvas does not have a setting for the transparent brush which is SetOpacity(0.25); This means images can not be drawn on the printer canvas. Printing a bitmap image produces very low quality prints. What is needed is a printer canvas that uses the D2D canvas but there does not appear to be one.
David Millington

Posts: 257
Registered: 5/29/05
Re: Printing TDirect2DCanvas Transparency
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 8, 2016 11:04 AM   in response to: Larry Johnson in response to: Larry Johnson
On 2016-03-08 18:37:26 +0000, Larry Johnson said:


I haven't used the Direct2D canvas for printing. But one option would
be to use the D2D canvas for compositing, and then copy it to a normal
canvas for printing - or copy the resulting image to the printer canvas.

Printing a bitmap image produces very low quality prints.

Why is that? If you mean the resolution, why not draw to the bitmap at
a higher resolution?
Larry Johnson

Posts: 86
Registered: 6/7/14
Re: Printing TDirect2DCanvas Transparency
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 9, 2016 5:05 PM   in response to: David Millington in response to: David Millington

Printing a bitmap image produces very low quality prints.

Why is that? If you mean the resolution, why not draw to the bitmap at
a higher resolution?

If you have had a good result printing bitmap images I would like to know more about how you do it. I have worked with printing bitmap images before and they are all pixels. The screen images must be scaled fit-to-page which makes the bitmap pixel problem very bad. There are no smooth curves or angles and small fonts are illegible. When printing from the Printer->Canvas all curves are smooth. What I need is Printer->D2DCanvas which does not seem to exist.

David Millington

Posts: 257
Registered: 5/29/05
Re: Printing TDirect2DCanvas Transparency
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 10, 2016 8:42 AM   in response to: Larry Johnson in response to: Larry Johnson
On 2016-03-10 01:05:46 +0000, Larry Johnson said:



Printing a bitmap image produces very low quality prints.

Why is that? If you mean the resolution, why not draw to the bitmap at
a higher resolution?

If you have had a good result printing bitmap images I would like to
know more about how you do it. I have worked with printing bitmap
images before and they are all pixels. The screen images must be scaled
fit-to-page which makes the bitmap pixel problem very bad. There are
no smooth curves or angles and small fonts are illegible. When printing
from the Printer->Canvas all curves are smooth. What I need is
Printer->D2DCanvas which does not seem to exist.


Ah. If you scale screen images to the printer, yes, they'll be very pixelated.

What I was thinking was making an offscreen bitmap and drawing to that,
which can be any size you want, then drawing that to the printer.

Cheers,

David
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02