sivarajankumar / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

using setAlpha seems to produce color defect across whole PDF #88

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Using code such as :

myPDF.setDisplayMode ( Display.FULL_PAGE );
myPDF.addPage();

//top horiz green banner
myPDF.beginFill(new RGBColor( 0x51A025));
myPDF.drawRect(new Rectangle(0,0,210,13.5));
myPDF.endFill();

//bottom horizontal alpha'd banner  
myPDF.setAlpha(.3);
myPDF.beginFill(new RGBColor( 0x51A025));
myPDF.drawRect(new Rectangle(0,222,210,24));
myPDF.endFill();

What is the expected output? What do you see instead?

Meant to produce two green stripes : one solid with colour 0x51A025 and 
one alpha'd out 0x51A025. However it seems (unless I'm using it 
incorrectly) that the setAlpha somehow effects the colours of the entire 
PDF - almost looks as though the colours are shifted to CMYK. After colour 
sampling the green banner in the resulting PDF, instead of getting 
0x51A025 I get 0x509b43 - a dulled down version. It happens across all 
elements I draw and possibly images that I embed. By removing the setAlpha 
line above, the colours work ok but of course I am unable to produce my 
required alpha'd out banner.

What version of the product are you using? On what operating system?

Have tried 0.1.4.5 and 0.1.4.6 on Vista Ultimate

Please provide any additional information below.

Nothing apart from brilliant work Thibault! Many thanks.

Original issue reported on code.google.com by meerkatl...@gmail.com on 12 Oct 2008 at 5:09

GoogleCodeExporter commented 8 years ago
Hi Paul,

Thanks for tracking this behavior. I will take a look at it and see how to fix 
that.

I will let you know here,

Thanks for the kind words ;)

best,

Thibault

Original comment by thibault.imbert on 25 Oct 2008 at 2:19