Status: New
Owner: ----

New issue 174 by HenningSperr: Printing nested Nodes with PPath as border as PDF will result in different offsets
http://code.google.com/p/piccolo2d/issues/detail?id=174

What steps will reproduce the problem?
1. create a node on a canvas with scale 0.2
2. create a child PPath of that node that is a frame for a square give ppath a small scale like
0.001
3. fill this square by adding a PNode as child to the PPath
4. print the topmost node with .print(); using a PDF printer

hmm anyone get this? I provide sample code below

What is the expected output? What do you see instead?
-The smallest Node  and its PPath wont match anymore

What version of the product are you using? On what operating system?
-Piccolo 1.2.1  on OSX 10.6

Please provide any additional information below.

here is code that reproduces this problem:

public class PiccoloPrintBug extends PFrame {
        public static void main(String[] args) {
                // frame
                PiccoloPrintBug myFrame = new PiccoloPrintBug();
                myFrame.setSize(300, 300);

                // first node
                PNode firstNode = new PNode();
                firstNode.setBounds(50, 50, 100, 100);
                firstNode.setPaint(Color.green);
                firstNode.setScale(0.02);
                myFrame.getCanvas().getLayer().addChild(firstNode);

                // PPath
                PPath ppath = new PPath();
                ppath.setBounds(0, 0, 100, 100);
                ppath.setPathTo(ppath.getBounds().getBounds());
                ppath.setPaint(null);
                ppath.setStrokePaint(Color.red);
                ppath.setStroke(new BasicStroke((float) 3.5, 
BasicStroke.CAP_ROUND,
                                BasicStroke.JOIN_BEVEL));
                // set a small scale here
                ppath.setScale(0.01);
                // PNode filling the Path
                PNode pNode = new PNode();
                pNode.setBounds(0, 0, 100, 100);
                pNode.setPaint(Color.BLUE);

                ppath.addChild(pNode);
                firstNode.addChild(ppath);

                firstNode.print();

        }


}

Attachments:
        Bildschirmfoto 2010-04-03 um 16.56.51.png  6.4 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to