| View previous topic :: View next topic |
| Author |
Message |
yannick Member
Joined: 20 May 2006 Posts: 6
|
Posted: 20/05/06 14:34 Post subject: TTprintPreview and picture transparency |
|
|
Hello,
I am using TPP and all works very fine.
I have only one problem :
i want to use a TImage with transparency,
But when i use the PaintGraphicEx Method, the transparency doen't work
what is the problem ?
Best regards
|
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1113 Location: Tehran, Iran
|
Posted: 20/05/06 16:28 Post subject: |
|
|
I'm sorry, but that method doesn't support transparency.
You have to calculate the target rectangle of the image, and draw it using the Canvas.StretchDraw method.
_________________ Kambiz |
|
| Back to top |
|
 |
yannick Member
Joined: 20 May 2006 Posts: 6
|
Posted: 20/05/06 16:32 Post subject: Transparency |
|
|
Thank you for your very fast response...
do you plan to implement this in future versions ?
thank you
Yannick
//Edit #1
There is a PaintGraphicEx and PaintGraphicEx2 ....
so maybe a PaintGraphicEx3 in next versions ?
//Edit #2
Hello
I have try your method ; the picture appear good for bmp with transparency, but in the print there is nothing.
If i put a gif with transprency into, it fill the transparency zone with black....
so it doesnt solve my problem.
Do you know why ?
Thank you
|
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1113 Location: Tehran, Iran
|
Posted: 20/05/06 22:55 Post subject: |
|
|
Some printer drivers can print only DIB bitmaps.
_________________ Kambiz |
|
| Back to top |
|
 |
yannick Member
Joined: 20 May 2006 Posts: 6
|
Posted: 21/05/06 00:11 Post subject: DIB Bitmap |
|
|
So what is the solution to print a picture with transparency ?
i am not a specialist like you in this domain, i am not use to manipulate bitmap and all sort of draw methods,
so , do you plan to add this in your component ? i think it will be very usefull for including picture like logos on a grayscaled background....
or can you give me few lines to do it ?
thank you !
yannick
|
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1113 Location: Tehran, Iran
|
Posted: 21/05/06 11:54 Post subject: |
|
|
Currently I'm too busy with my other stuffs. But for sure I'll remove this limitation in the next release.
_________________ Kambiz |
|
| Back to top |
|
 |
yannick Member
Joined: 20 May 2006 Posts: 6
|
Posted: 21/05/06 14:52 Post subject: Transparency |
|
|
| thank you very much !!!!
|
|
| Back to top |
|
 |
yannick Member
Joined: 20 May 2006 Posts: 6
|
Posted: 11/09/06 21:50 Post subject: Transparency on TPrintPreview |
|
|
Hello Kambiz
when will you take care of transparents picture in your component ?
best regards
Yannick
|
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1113 Location: Tehran, Iran
|
Posted: 11/09/06 22:35 Post subject: |
|
|
Yannick,
I really don't know. It's a long time that I couldn't find time to spend on my hobbies.
_________________ Kambiz |
|
| Back to top |
|
 |
yannick Member
Joined: 20 May 2006 Posts: 6
|
Posted: 13/01/07 20:17 Post subject: tprintpreview and gif transparency |
|
|
hello kambiz !!!
do you plan to add gif transparency in tprintpreview ?
thank you
yannick
|
|
| Back to top |
|
 |
Johnny_Bit Administrator
Joined: 15 Jun 2003 Posts: 347
|
Posted: 13/01/07 21:05 Post subject: |
|
|
Dude, easy on this. Really, there's no way of Kambiz doing it in no-time, also there are no contributors, because it's Kambiz-only project and he is just a human that needs to work. Currently his work makes it hard for him to find time for DA, so let's not make things worse, OK?
Oh, Kambiz, why don't you change licence for components to LGPL v2? Then set-up some Subversion, get them on this rig, then it would be possible for many people contribute to the project and make things sweet.
|
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1113 Location: Tehran, Iran
|
Posted: 02/02/07 20:37 Post subject: |
|
|
Dear yannick,
I've added image transparency support to the new version of PrintPreview. However, because some printers (drivers) does not support raster operations except SrcCopy, Blackness, and whiteness, it's disabled as default. To enabled it, open Preview.pas and define IMAGE_TRANSPARENCY directive.
Cheers
_________________ Kambiz |
|
| Back to top |
|
 |
|