TTprintPreview and picture transparency

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

TTprintPreview and picture transparency

Postby yannick » May 20th, 2006, 2:34 pm

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
yannick
Active Member
Active Member
 
Posts: 17
Joined: May 20th, 2006, 2:03 pm

Postby Kambiz » May 20th, 2006, 4:28 pm

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
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Transparency

Postby yannick » May 20th, 2006, 4:32 pm

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
yannick
Active Member
Active Member
 
Posts: 17
Joined: May 20th, 2006, 2:03 pm

Postby Kambiz » May 20th, 2006, 10:55 pm

Some printer drivers can print only DIB bitmaps.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

DIB Bitmap

Postby yannick » May 21st, 2006, 12:11 am

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
yannick
Active Member
Active Member
 
Posts: 17
Joined: May 20th, 2006, 2:03 pm

Postby Kambiz » May 21st, 2006, 11:54 am

Currently I'm too busy with my other stuffs. But for sure I'll remove this limitation in the next release.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Transparency

Postby yannick » May 21st, 2006, 2:52 pm

thank you very much !!!!
yannick
Active Member
Active Member
 
Posts: 17
Joined: May 20th, 2006, 2:03 pm

Transparency on TPrintPreview

Postby yannick » September 11th, 2006, 9:50 pm

Hello Kambiz

when will you take care of transparents picture in your component ?

best regards

Yannick
yannick
Active Member
Active Member
 
Posts: 17
Joined: May 20th, 2006, 2:03 pm

Postby Kambiz » September 11th, 2006, 10:35 pm

Yannick,

I really don't know. It's a long time that I couldn't find time to spend on my hobbies. :(
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

tprintpreview and gif transparency

Postby yannick » January 13th, 2007, 8:17 pm

hello kambiz !!!

do you plan to add gif transparency in tprintpreview ?

thank you

yannick
yannick
Active Member
Active Member
 
Posts: 17
Joined: May 20th, 2006, 2:03 pm

Postby Johnny_Bit » January 13th, 2007, 9:05 pm

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.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Kambiz » February 2nd, 2007, 8:37 pm

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
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

GIF TRANSPARENCY

Postby yannick » March 18th, 2007, 1:09 pm

Hello kambiz, thank you for all, i m going to include this in my application !!

Thank you

Yannick
yannick
Active Member
Active Member
 
Posts: 17
Joined: May 20th, 2006, 2:03 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron