Satishpethani92 / alivepdf

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

lineStyle() does not work properly #78

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. set the linestyle to 0 thickness or 0 alpha
2. create a shape using rect, lineto, or any other drawing technique 
3. observe the lines in the result

there should be no visible lines in the result. Opacity will work on the lines 
though.

latest on mac os X 10.5.4

Tried to find out what caused the problem in the source. Couldnt find the 
problem immediately so i 
settled for a temporary workaround.

Original issue reported on code.google.com by tommy.va...@gmail.com on 16 Sep 2008 at 3:38

GoogleCodeExporter commented 8 years ago
Hi tommy,

I just tried the following code :

myPDF.lineStyle( new RGBColor ( 0x990000 ), 1, 0, 0 );

myPDF.drawRect( new Rectangle ( 0, 0, 80, 80 ) );

In the result I see no lines drawn which is the normal behavior. Do you have a
different result ?

Can you paste me the part of your code which causes this behavior ?

let me know,

best,

Thibault

Original comment by thibault.imbert on 16 Sep 2008 at 10:39

GoogleCodeExporter commented 8 years ago
Even with the latest sources (PDF.as, rev. 262) I can't get it to work properly:
 - Setting the thickness to anything less than 1 is ignored.
 - Setting the lineStyle alpha also changes the fill's one.
 - We can't draw rectangles without strokes!

I'd need that badly, please help!

Original comment by quenti...@gmail.com on 20 Mar 2010 at 12:27

GoogleCodeExporter commented 8 years ago
This issue is still not resolved - are there any updates on this ?

Original comment by samuelro...@gmail.com on 29 Jul 2010 at 3:05

GoogleCodeExporter commented 8 years ago
This issue is still present.
Setting the thickness to 0 and the lines still appear.
Setting the alpha to 0 and any fills that are on the shape become transparent.

Thibault any ideas?

Wayne

Original comment by jacobse...@gmail.com on 24 Nov 2010 at 4:52

GoogleCodeExporter commented 8 years ago
Hello,

In PDF.setAlpha(), we have the following implementation-

var graphicState:int = addExtGState( { 'ca' : alpha, 'SA' : true, 'CA' : alpha, 
'BM' : '/' + blendMode } );

setExtGState ( graphicState );

In PDFReference document, what I studied is that graphics state "ca" is 
transparency value for non-stroking operations and "CA" is transparency for 
stroke operations. As both of these states are passed with same value, fill is 
also getting affected when stroke transparency value is set. 

So what I did is passed different values to both the states that is {"ca":1, 
"CA": 0}Now the line is not visibile but the only problem is some transparency 
is set to the fill so as a result the quality of PDF is not 100%. 

Example if i give blue (0,0,255) as fill color, after making the above change, 
the blue value is becomming (53,82,165)

If anyone has found any solution or workaround please share it with me.

I have attached the PDF generated with above change.

Thanks & Regards,

Charly

Original comment by dan...@gmail.com on 24 Aug 2011 at 12:48

Attachments:

GoogleCodeExporter commented 8 years ago
Did any find a solution raised in the above email by Charly. If yes please 
respond.

Original comment by sanjeet...@gmail.com on 12 Oct 2011 at 7:41