import java.util.Arrays;\r
\r
import org.simantics.scenegraph.g2d.G2DNode;\r
+import org.simantics.scenegraph.g2d.G2DPDFRenderingHints;\r
import org.simantics.scenegraph.utils.GeometryUtils;\r
\r
public class FlagNode extends G2DNode {\r
lineDist *= gScaleRecip;\r
double y = startY;\r
double textAreaWidth = textArea.getWidth() * gScaleRecip;\r
+ boolean isRenderingPdf = g.getRenderingHint(G2DPDFRenderingHints.KEY_PDF_WRITER) != null;\r
\r
for (int i = 0; i < flagText.length; ++i) {\r
//String line = flagText[i];\r
if (DEBUG)\r
System.out.println(" DRAW: '" + flagText[i] + "' with " + g.getTransform());\r
\r
- //textLayout[i].draw(g, (float) x, (float) y);\r
- g.drawString(flagText[i], (float) x, (float) y);\r
+ // #6459: render as text in PDF and paths on screen\r
+ if (isRenderingPdf)\r
+ g.drawString(flagText[i], (float) x, (float) y);\r
+ else\r
+ textLayout[i].draw(g, (float) x, (float) y);\r
\r
y += lineDist;\r
y += rect.getHeight();\r