[piccolo2d-dev] Re: Issue 221 in piccolo2d: Cannot draw veritical and horizontal lines of 0 width stroke using PPath

2012-12-08 Thread piccolo2d


Comment #8 on issue 221 by v11...@gmail.com: Cannot draw veritical and  
horizontal lines of 0 width stroke using PPath

http://code.google.com/p/piccolo2d/issues/detail?id=221

The attached java examples draws vertical and horizontal lines with  
BasicStroke(0). It works correctly. I think the problem is not in java  
itself.


Attachments:
ZeroWidthStroke.java  775 bytes

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 221 in piccolo2d: Cannot draw veritical and horizontal lines of 0 width stroke using PPath

2012-08-31 Thread piccolo2d


Comment #6 on issue 221 by heue...@gmail.com: Cannot draw veritical and  
horizontal lines of 0 width stroke using PPath

http://code.google.com/p/piccolo2d/issues/detail?id=221

Adding example

$ svn commit -m Issue 221 ; adding ZeroWidthStrokeBug to examples.issues .
Committed revision 1169.

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 221 in piccolo2d: Cannot draw veritical and horizontal lines of 0 width stroke using PPath

2011-11-01 Thread piccolo2d


Comment #5 on issue 221 by atdi...@gmail.com: Cannot draw veritical and  
horizontal lines of 0 width stroke using PPath

http://code.google.com/p/piccolo2d/issues/detail?id=221

If you need to render the strokes, you could try setting the stroke width  
to zero, which has the effect of always drawing a one-pixel wide stroke.


This is true for the Win7/Java1.6.27 system I've tested it on, but afaik  
Piccolo doesn't have logic that ensures this, so it would be a side effect  
of what the JDK does. If the JDK doesn't document this as a contract, then  
it must be inadvertent or a bug and not to be relied on.


We might want to remove that comment from the developer faq.

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 221 in piccolo2d: Cannot draw veritical and horizontal lines of 0 width stroke using PPath

2011-10-25 Thread piccolo2d


Comment #4 on issue 221 by heue...@gmail.com: Cannot draw veritical and  
horizontal lines of 0 width stroke using PPath

http://code.google.com/p/piccolo2d/issues/detail?id=221

Is this a Piccolo2D bug or an AWT one?  I don't see any mention of 1-pixel  
wide stroke width with BasicStroke(0) in the JDK javadocs.


--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 221 in piccolo2d: Cannot draw veritical and horizontal lines of 0 width stroke using PPath

2011-10-22 Thread piccolo2d


Comment #3 on issue 221 by funny...@gmail.com: Cannot draw veritical and  
horizontal lines of 0 width stroke using PPath

http://code.google.com/p/piccolo2d/issues/detail?id=221

I can confirm the bug with my system

* Piccolo2d.java 1.3.1,
* java version 1.6.0_22
OpenJDK Runtime Environment (IcedTea6 1.10.3) (fedora-59.1.10.3.fc15-i386)
OpenJDK Server VM (build 20.0-b11, mixed mode)
* Fedora 15 2.6.40.6-0.fc15.i686

If x1!=x2 or y1!=y2 then a one pixel width line is drawn in every zoom  
level, for stroke width zero. Attached is a test program to show the issue.


Attachments:
ZeroWidthStrokeBug.java  929 bytes

--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en


[piccolo2d-dev] Re: Issue 221 in piccolo2d: Cannot draw veritical and horizontal lines of 0 width stroke using PPath

2011-07-23 Thread piccolo2d


Comment #2 on issue 221 by v11...@gmail.com: Cannot draw veritical and  
horizontal lines of 0 width stroke using PPath

http://code.google.com/p/piccolo2d/issues/detail?id=221

In the Developer's FAQ http://www.piccolo2d.org/learn/dev-faq.html
section Why is my app so slow?, it states as follows:

, If you need to render the strokes, you could try setting the stroke  
width to zero, which has the effect of always drawing a one-pixel wide  
stroke. 


And it brings very significant performance improvement using BasicStroke(0).

The bug occurs when either x1 == x2, or y1 == y2 in the case of
PPath.createLine(x1, y1, x2, y2);



--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en