Hello Bruno,

Thank you for responding.  I adapted your code and found my problem.  I was
misuderstanding the method closePathStroke() and was using it instead of
just stroke().  Just for clarities sake, I am assuming this is true, but
does moveTo() start a new path?  

I was using the closePath() before to guarantee that stroking would not
occur between 2 seperate lines I might draw, but now it makes sense to me
that using the moveTo() would seperate the 2 lines.

Thank you again,

Daniel

-----Original Message-----
From: Bruno Lowagie [mailto:br...@lowagie.com] 
Sent: Sunday, July 19, 2009 2:26 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] setLineDash() not working as expected

Daniel Budde wrote:
> So, I have my trusty iText book in hand and I swear I have read it, 
> looked at the java docs, searched for examples and scoured the mailing 
> list archives, but either this is just not working as it should or my 
> understanding of it is warped.
> 
> Here are 2 lines I have attempted:
> 
> float[] dash1 = {6, 6};
> cb.setLineDash(dash1, 0);
> ...output line...
> 
> 
> float[] dash2 = {12, 8}
> cb.setLineDash(dash2, 0);
> ...output line...
> 
> 
> I would expect with my first example to get a line that starts with a 
> dash 6 long, a space 6 long, a dash 6 long, a space 6 long, etc... 
> continuing to the end of the line. On my second example, I would 
> expect lines 12 long with spaces that are 8 long continuing to the end of
the line.
> 
> Instead I am getting solid lines.  Can anyone shed some light on what 
> I am doing wrong?
> 
> Thank you in advance for your help,

Please adapt the following example: http://1t3xt.be/?X0d1 until it
reproduces the problem.

As you can see, the example contains:
cb.setLineDash(6, 0);
cb.moveTo(40, 470);
cb.lineTo(320, 470);
cb.stroke();
cb.setLineDash(6, 3);
cb.moveTo(40, 460);
cb.lineTo(320, 460);
cb.stroke();

These "line dash" definitions are reflected in this PDF:
http://1t3xt.info/examples/results/in_action/chapter10/line_characteristics.
pdf

As soon as we can reproduce your problem, we can think of a solution.

----------------------------------------------------------------------------
--
Enter the BlackBerry Developer Challenge This is your chance to win up to
$100,000 in prizes! For a limited time, vendors submitting new applications
to BlackBerry App World(TM) will have the opportunity to enter the
BlackBerry Developer Challenge. See full prize details at:
http://p.sf.net/sfu/Challenge
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/ You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/



------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to