[latexdraw] 01/01: [svn-upgrade] Tagging new upstream version, latexdraw (2.0.4+1)

Stuart Prescott stuart at debian.org
Thu Nov 24 23:55:18 UTC 2016


This is an automated email from the git hooks/post-receive script.

stuart pushed a commit to tag upstream/2.0.4+1
in repository latexdraw.

commit 454122dd33748381263e6a6b598a221f33e4936a
Author: Stuart Prescott <stuart at debian.org>
Date:   Mon Oct 5 15:59:30 2009 +0000

    [svn-upgrade] Tagging new upstream version, latexdraw (2.0.4+1)
---
 current/.cache/Classic grid.svg.png                |  Bin 0 -> 116 bytes
 current/.cache/Condenser.svg.png                   |  Bin 0 -> 119 bytes
 current/.cache/embrace.svg.png                     |  Bin 0 -> 99 bytes
 current/.cache/man.svg.png                         |  Bin 0 -> 147 bytes
 current/.cache/question.svg.png                    |  Bin 0 -> 150 bytes
 current/.classpath                                 |    9 +
 current/.fbprefs                                   |  148 +
 current/.project                                   |   18 +
 current/.settings/org.eclipse.core.resources.prefs |    4 +
 current/.settings/org.eclipse.jdt.core.prefs       |   96 +
 current/.settings/org.eclipse.jdt.ui.prefs         |    3 +
 .../org.eclipse.ltk.core.refactoring.prefs         |    3 +
 current/META-INF/MANIFEST.MF                       |    4 +
 current/build.xml                                  |   91 +
 current/build_installer.xml                        |   37 +
 current/compile                                    |    8 +
 current/count                                      |    3 +
 current/help/1.9.html                              |   97 +
 current/help/check.html                            |   39 +
 current/help/convert.html                          |   50 +
 current/help/drawProp.html                         |   44 +
 current/help/export.html                           |   52 +
 current/help/features.html                         |   39 +
 current/help/graphFeat.html                        |  187 +
 current/help/images/AutoBorders.png                |  Bin 0 -> 784 bytes
 current/help/images/InFrontSelect.png              |  Bin 0 -> 870 bytes
 current/help/images/Object.gif                     |  Bin 0 -> 787 bytes
 current/help/images/Palette.gif                    |  Bin 0 -> 463 bytes
 current/help/images/akinPoints.jpg                 |  Bin 0 -> 5754 bytes
 current/help/images/arc.jpg                        |  Bin 0 -> 1800 bytes
 current/help/images/arrowToolbar.jpg               |  Bin 0 -> 1695 bytes
 current/help/images/axes.jpg                       |  Bin 0 -> 1872 bytes
 current/help/images/background.png                 |  Bin 0 -> 624 bytes
 current/help/images/behindSelect.png               |  Bin 0 -> 810 bytes
 current/help/images/bezier.jpg                     |  Bin 0 -> 7781 bytes
 current/help/images/borderPos.jpg                  |  Bin 0 -> 4432 bytes
 current/help/images/bordersSel.jpg                 |  Bin 0 -> 3572 bytes
 current/help/images/convert.jpg                    |  Bin 0 -> 9263 bytes
 current/help/images/dbleBord.jpg                   |  Bin 0 -> 918 bytes
 current/help/images/displayBorders.jpg             |  Bin 0 -> 3675 bytes
 current/help/images/drawProp.jpg                   |  Bin 0 -> 7972 bytes
 current/help/images/ellipse.jpg                    |  Bin 0 -> 2498 bytes
 current/help/images/example.jpg                    |  Bin 0 -> 7991 bytes
 current/help/images/foreground.png                 |  Bin 0 -> 666 bytes
 current/help/images/framedBox.jpg                  |  Bin 0 -> 3151 bytes
 current/help/images/grid.jpg                       |  Bin 0 -> 4661 bytes
 current/help/images/insertC.jpg                    |  Bin 0 -> 12607 bytes
 current/help/images/insertP.jpg                    |  Bin 0 -> 8707 bytes
 current/help/images/join.png                       |  Bin 0 -> 440 bytes
 current/help/images/joinedLines.jpg                |  Bin 0 -> 1604 bytes
 current/help/images/kindLines.jpg                  |  Bin 0 -> 1476 bytes
 current/help/images/latexPref.png                  |  Bin 0 -> 14810 bytes
 current/help/images/launchTex.jpg                  |  Bin 0 -> 3293 bytes
 current/help/images/line.jpg                       |  Bin 0 -> 2003 bytes
 current/help/images/magneticGrid.jpg               |  Bin 0 -> 12189 bytes
 current/help/images/mirrors.jpg                    |  Bin 0 -> 6895 bytes
 current/help/images/paramsFrame.jpg                |  Bin 0 -> 16469 bytes
 current/help/images/pkgLatex.png                   |  Bin 0 -> 16391 bytes
 current/help/images/point.jpg                      |  Bin 0 -> 765 bytes
 current/help/images/polygon.jpg                    |  Bin 0 -> 2612 bytes
 current/help/images/rectangle.jpg                  |  Bin 0 -> 2869 bytes
 current/help/images/rectangleMenu.jpg              |  Bin 0 -> 985 bytes
 current/help/images/rotateB.jpg                    |  Bin 0 -> 7263 bytes
 current/help/images/select.png                     |  Bin 0 -> 260 bytes
 current/help/images/separate.png                   |  Bin 0 -> 463 bytes
 current/help/images/shadow.jpg                     |  Bin 0 -> 1164 bytes
 current/help/images/shifting.jpg                   |  Bin 0 -> 1065 bytes
 current/help/images/text.jpg                       |  Bin 0 -> 7317 bytes
 current/help/images/text2.jpg                      |  Bin 0 -> 11760 bytes
 current/help/images/toolbar.jpg                    |  Bin 0 -> 3948 bytes
 current/help/images/triangle.jpg                   |  Bin 0 -> 1799 bytes
 current/help/import.html                           |   81 +
 current/help/index.html                            |   43 +
 current/help/license.html                          |   30 +
 current/help/shapes.html                           |  336 ++
 current/help/start.html                            |   49 +
 current/help/style.css                             |   74 +
 current/help/sysReq.html                           |   44 +
 current/help/template.html                         |   42 +
 current/install_debian_ubuntu                      |    3 +
 current/install_vista.vbs                          |    8 +
 current/junit/test/TestAbstractPstricksParser.java |  774 +++
 current/junit/test/TestButtonIcon.java             |  108 +
 current/junit/test/TestCloseButton.java            |   78 +
 current/junit/test/TestColorButton.java            |   70 +
 current/junit/test/TestCopyPasteMenu.java          |   58 +
 current/junit/test/TestCssColor.java               |  379 ++
 current/junit/test/TestDelimitor.java              |  225 +
 current/junit/test/TestDviPsColors.java            |  306 ++
 current/junit/test/TestLLang.java                  |  119 +
 current/junit/test/TestLaTeXDrawCursor.java        |   68 +
 current/junit/test/TestLaTeXDrawNumber.java        |   71 +
 current/junit/test/TestLaTeXDrawPoint2D.java       |  198 +
 current/junit/test/TestLatexDraw.java              |   34 +
 current/junit/test/TestPSTricksConstants.java      |  108 +
 current/junit/test/TestParserCmdMessage.java       |   69 +
 current/junit/test/TestResources.java              |  195 +
 current/junit/test/TestShape.java                  |  683 +++
 current/junit/test/TestShortcutsFrame.java         |   49 +
 current/junit/test/parser/TestCodeParser.java      |  199 +
 current/junit/test/parser/TestLPSTParser.java      |   33 +
 .../test/parser/pst/TestPSTParametersParser.java   |  873 ++++
 current/junit/test/parser/pst/TestPSTParser.java   |   44 +
 .../parser/svg/parsers/TestCSSStyleParser.java     |  134 +
 .../parser/svg/parsers/TestSVGLengthParser.java    |  354 ++
 .../parser/svg/parsers/TestSVGPointsParser.java    |  194 +
 .../parser/svg/parsers/TestURIReferenceParser.java |   55 +
 .../test/parser/svg/parsers/TestUnitProcessor.java |   47 +
 current/junit/test/svg/AbstractTestSVGElement.java |  115 +
 current/junit/test/svg/TestCSSStyleList.java       |   80 +
 current/junit/test/svg/TestSVGAttr.java            |  299 ++
 current/junit/test/svg/TestSVGCDATASection.java    |   44 +
 current/junit/test/svg/TestSVGCircleElement.java   |  174 +
 current/junit/test/svg/TestSVGComment.java         |   44 +
 current/junit/test/svg/TestSVGDefsElement.java     |   88 +
 current/junit/test/svg/TestSVGDocument.java        |  326 ++
 current/junit/test/svg/TestSVGEllipseElement.java  |  220 +
 current/junit/test/svg/TestSVGImageElement.java    |  220 +
 current/junit/test/svg/TestSVGLength.java          |   60 +
 current/junit/test/svg/TestSVGMatrix.java          |  188 +
 current/junit/test/svg/TestSVGNamedNodeMap.java    |  181 +
 current/junit/test/svg/TestSVGNodeList.java        |   84 +
 current/junit/test/svg/TestSVGPathElement.java     |   76 +
 current/junit/test/svg/TestSVGPathSegArc.java      |   93 +
 .../junit/test/svg/TestSVGPathSegCurvetoCubic.java |   86 +
 .../test/svg/TestSVGPathSegCurvetoCubicSmooth.java |   82 +
 .../test/svg/TestSVGPathSegCurvetoQuadratic.java   |   82 +
 .../svg/TestSVGPathSegCurvetoQuadraticSmooth.java  |   78 +
 current/junit/test/svg/TestSVGPathSegLineto.java   |   78 +
 .../test/svg/TestSVGPathSegLinetoHorizontal.java   |   76 +
 .../test/svg/TestSVGPathSegLinetoVertical.java     |   76 +
 current/junit/test/svg/TestSVGPathSegMoveto.java   |   68 +
 current/junit/test/svg/TestSVGPatternElement.java  |  192 +
 current/junit/test/svg/TestSVGPolygonElement.java  |  184 +
 current/junit/test/svg/TestSVGPolylineElement.java |  186 +
 current/junit/test/svg/TestSVGRectElement.java     |  232 +
 current/junit/test/svg/TestSVGSVGElement.java      |  210 +
 current/junit/test/svg/TestSVGStopElement.java     |  118 +
 current/junit/test/svg/TestSVGText.java            |  139 +
 current/junit/test/svg/TestSVGTransform.java       |  607 +++
 current/junit/test/svg/TestSVGTransformList.java   |  185 +
 current/junit/test/svg/test.svg                    |   47 +
 current/lang/de/1_6.properties                     |   58 +
 current/lang/de/1_7.properties                     |   60 +
 current/lang/de/1_8.properties                     |   57 +
 current/lang/de/1_9.properties                     |   70 +
 current/lang/de/LaTeXDrawFrame.properties          |  207 +
 current/lang/de/dialogFrames.properties            |  116 +
 current/lang/de/others.properties                  |   44 +
 current/lang/en-US/1_6.properties                  |   58 +
 current/lang/en-US/1_7.properties                  |   60 +
 current/lang/en-US/1_8.properties                  |   57 +
 current/lang/en-US/1_9.properties                  |   71 +
 current/lang/en-US/LaTeXDrawFrame.properties       |  207 +
 current/lang/en-US/dialogFrames.properties         |  116 +
 current/lang/en-US/others.properties               |   44 +
 current/lang/en/1_6.properties                     |   58 +
 current/lang/en/1_7.properties                     |   60 +
 current/lang/en/1_8.properties                     |   57 +
 current/lang/en/1_9.properties                     |   70 +
 current/lang/en/LaTeXDrawFrame.properties          |  207 +
 current/lang/en/dialogFrames.properties            |  116 +
 current/lang/en/others.properties                  |   44 +
 current/lang/es/1_6.properties                     |   58 +
 current/lang/es/1_7.properties                     |   60 +
 current/lang/es/1_8.properties                     |   57 +
 current/lang/es/1_9.properties                     |   70 +
 current/lang/es/LaTeXDrawFrame.properties          |  207 +
 current/lang/es/dialogFrames.properties            |  116 +
 current/lang/es/others.properties                  |   44 +
 current/lang/fr/1_6.properties                     |   58 +
 current/lang/fr/1_7.properties                     |   60 +
 current/lang/fr/1_8.properties                     |   57 +
 current/lang/fr/1_9.properties                     |   70 +
 current/lang/fr/LaTeXDrawFrame.properties          |  207 +
 current/lang/fr/dialogFrames.properties            |  116 +
 current/lang/fr/others.properties                  |   44 +
 current/lang/it/1_6.properties                     |   58 +
 current/lang/it/1_7.properties                     |   60 +
 current/lang/it/1_8.properties                     |   57 +
 current/lang/it/1_9.properties                     |   70 +
 current/lang/it/LaTeXDrawFrame.properties          |  207 +
 current/lang/it/dialogFrames.properties            |  116 +
 current/lang/it/others.properties                  |   44 +
 current/lang/pl/1_6.properties                     |   58 +
 current/lang/pl/1_7.properties                     |   60 +
 current/lang/pl/1_8.properties                     |   57 +
 current/lang/pl/1_9.properties                     |   70 +
 current/lang/pl/LaTeXDrawFrame.properties          |  207 +
 current/lang/pl/dialogFrames.properties            |  116 +
 current/lang/pl/others.properties                  |   44 +
 current/latexDraw/figures/AkinPoints.java          |  908 ++++
 current/latexDraw/figures/Arc.java                 | 1477 ++++++
 current/latexDraw/figures/ArrowHead.java           | 1341 +++++
 current/latexDraw/figures/Axe.java                 | 1459 ++++++
 current/latexDraw/figures/BezierCurve.java         | 2695 ++++++++++
 current/latexDraw/figures/Circle.java              |  537 ++
 current/latexDraw/figures/Dot.java                 | 1383 ++++++
 current/latexDraw/figures/Draw.java                | 2124 ++++++++
 current/latexDraw/figures/DrawBorders.java         |  239 +
 current/latexDraw/figures/Ellipse.java             |  982 ++++
 current/latexDraw/figures/Figure.java              | 2839 +++++++++++
 current/latexDraw/figures/FramedBox.java           | 1244 +++++
 current/latexDraw/figures/Grid.java                |  775 +++
 current/latexDraw/figures/GridShape.java           |  511 ++
 current/latexDraw/figures/JoinedLines.java         |  809 +++
 current/latexDraw/figures/LaTeXDrawPolygon.java    | 1498 ++++++
 current/latexDraw/figures/LaTeXDrawRectangle.java  | 1770 +++++++
 current/latexDraw/figures/Line.java                | 1499 ++++++
 current/latexDraw/figures/Picture.java             |  566 +++
 current/latexDraw/figures/Rhombus.java             | 1127 +++++
 current/latexDraw/figures/Square.java              |  910 ++++
 current/latexDraw/figures/Text.java                | 2168 ++++++++
 current/latexDraw/figures/Triangle.java            | 1168 +++++
 .../latexDraw/figures/properties/Arrowable.java    |   48 +
 .../figures/properties/BordersMovable.java         |   36 +
 .../figures/properties/DoubleBoundaryable.java     |   66 +
 current/latexDraw/figures/properties/Drawable.java |   44 +
 current/latexDraw/filters/BMPFilter.java           |   49 +
 current/latexDraw/filters/EPSFilter.java           |   50 +
 current/latexDraw/filters/GIFFilter.java           |   49 +
 current/latexDraw/filters/JPGFilter.java           |   50 +
 current/latexDraw/filters/LaTeXDrawFilter.java     |   49 +
 .../latexDraw/filters/LaTeXDrawTemplateFilter.java |   49 +
 current/latexDraw/filters/PDFFilter.java           |   43 +
 current/latexDraw/filters/PNGFilter.java           |   49 +
 current/latexDraw/filters/PPMFilter.java           |   49 +
 current/latexDraw/filters/PSFilter.java            |   45 +
 current/latexDraw/filters/SVGFilter.java           |   51 +
 current/latexDraw/filters/TeXFilter.java           |   61 +
 .../generators/svg/CSSStylesGenerator.java         |   46 +
 .../latexDraw/generators/svg/LArcSVGGenerator.java |  260 +
 .../generators/svg/LArrowHeadSVGGenerator.java     |  522 ++
 .../latexDraw/generators/svg/LAxeSVGGenerator.java |  788 +++
 .../generators/svg/LBezierCurveSVGGenerator.java   |  397 ++
 .../generators/svg/LCircleSVGGenerator.java        |  152 +
 .../latexDraw/generators/svg/LDotSVGGenerator.java |  345 ++
 .../generators/svg/LDrawingSVGGenerator.java       |  108 +
 .../generators/svg/LEllipseSVGGenerator.java       |  148 +
 .../generators/svg/LFreeHandSVGGenerator.java      |  246 +
 .../generators/svg/LGridSVGGenerator.java          |  506 ++
 .../generators/svg/LLineSVGGenerator.java          |  240 +
 .../generators/svg/LLinesSVGGenerator.java         |  266 +
 .../generators/svg/LPictureSVGGenerator.java       |  137 +
 .../generators/svg/LPolygonSVGGenerator.java       |  192 +
 .../generators/svg/LRectangleSVGGenerator.java     |  186 +
 .../generators/svg/LRhombusSVGGenerator.java       |  160 +
 .../generators/svg/LShapeSVGGenerator.java         | 1151 +++++
 .../generators/svg/LSquareSVGGenerator.java        |  104 +
 .../generators/svg/LTextSVGGenerator.java          |  263 +
 .../generators/svg/LTriangleSVGGenerator.java      |  165 +
 .../generators/svg/SVGDocumentGenerator.java       |  175 +
 .../latexDraw/generators/svg/SVGShapesFactory.java |   76 +
 current/latexDraw/installer/InstallerUI.java       |  773 +++
 current/latexDraw/lang/LaTeXDrawLang.java          |  368 ++
 current/latexDraw/parsers/CodeParser.java          |  330 ++
 .../parsers/FatalErrorParsingException.java        |   62 +
 .../latexDraw/parsers/IgnoreCommandException.java  |   84 +
 .../parsers/InvalidFormatCommandException.java     |   57 +
 .../parsers/NotFullyManagedException.java          |   38 +
 .../latexDraw/parsers/NotYetManagedException.java  |   70 +
 current/latexDraw/parsers/Parser.java              |   38 +
 current/latexDraw/parsers/ParserCmdMessage.java    |  105 +
 current/latexDraw/parsers/ParserMessagesFrame.java |  207 +
 .../parsers/TooManyBracketsException.java          |   45 +
 .../parsers/UnclosedBracketsException.java         |   31 +
 .../parsers/UnexceptedEndOfFileException.java      |   32 +
 .../latexDraw/parsers/UnknownCommandException.java |   93 +
 .../parsers/WillNeverBeManagedException.java       |   73 +
 .../latexDraw/parsers/css/AbstractCSSParser.java   |   93 +
 .../latexDraw/parsers/latexdraw/LPSTParser.java    |  798 +++
 current/latexDraw/parsers/pst/PSTParameters.java   |  621 +++
 .../latexDraw/parsers/pst/PSTParametersParser.java | 1813 +++++++
 current/latexDraw/parsers/pst/PSTParser.java       |  555 +++
 .../pstricks/LaTeXDrawPSTricksParserActions.java   | 1668 +++++++
 .../parsers/pstricks/PSTricksParameters.java       |  631 +++
 .../latexDraw/parsers/pstricks/PSTricksParser.java | 3766 ++++++++++++++
 .../pstricks/PSTricksParserActionsManager.java     | 4046 +++++++++++++++
 current/latexDraw/parsers/svg/CSSColors.java       |  885 ++++
 current/latexDraw/parsers/svg/CSSStyleList.java    |   61 +
 .../parsers/svg/LaTeXDrawFiguresFactory.java       |  132 +
 .../parsers/svg/MalformedSVGDocument.java          |   31 +
 current/latexDraw/parsers/svg/SVGAttr.java         |  283 ++
 current/latexDraw/parsers/svg/SVGAttributes.java   |  281 ++
 current/latexDraw/parsers/svg/SVGCDATASection.java |   40 +
 current/latexDraw/parsers/svg/SVGComment.java      |   45 +
 current/latexDraw/parsers/svg/SVGDocument.java     |  519 ++
 current/latexDraw/parsers/svg/SVGElements.java     |  107 +
 .../latexDraw/parsers/svg/SVGElementsFactory.java  |  115 +
 current/latexDraw/parsers/svg/SVGLength.java       |   88 +
 current/latexDraw/parsers/svg/SVGMatrix.java       |  269 +
 current/latexDraw/parsers/svg/SVGNamedNodeMap.java |  201 +
 current/latexDraw/parsers/svg/SVGNodeList.java     |   80 +
 current/latexDraw/parsers/svg/SVGText.java         |  132 +
 current/latexDraw/parsers/svg/SVGTransform.java    |  547 ++
 .../latexDraw/parsers/svg/SVGTransformList.java    |  140 +
 .../svg/elements/AbstractPointsElement.java        |  114 +
 .../parsers/svg/elements/OtherNSElement.java       |   76 +
 .../parsers/svg/elements/SVGCircleElement.java     |  185 +
 .../parsers/svg/elements/SVGDefsElement.java       |  101 +
 .../latexDraw/parsers/svg/elements/SVGElement.java | 1156 +++++
 .../parsers/svg/elements/SVGEllipseElement.java    |  166 +
 .../parsers/svg/elements/SVGGElement.java          |   77 +
 .../parsers/svg/elements/SVGImageElement.java      |  158 +
 .../parsers/svg/elements/SVGLineElement.java       |  204 +
 .../svg/elements/SVGLinearGradientElement.java     |  309 ++
 .../parsers/svg/elements/SVGMarkerElement.java     |  143 +
 .../parsers/svg/elements/SVGMetadataElement.java   |   73 +
 .../parsers/svg/elements/SVGPathElement.java       |  170 +
 .../parsers/svg/elements/SVGPatternElement.java    |  290 ++
 .../parsers/svg/elements/SVGPolyLineElement.java   |   55 +
 .../parsers/svg/elements/SVGPolygonElement.java    |   53 +
 .../parsers/svg/elements/SVGRectElement.java       |  214 +
 .../parsers/svg/elements/SVGSVGElement.java        |  290 ++
 .../parsers/svg/elements/SVGStopElement.java       |   91 +
 .../parsers/svg/elements/SVGTextElement.java       |  145 +
 .../parsers/svg/elements/path/SVGPathSeg.java      |   79 +
 .../parsers/svg/elements/path/SVGPathSegArc.java   |  251 +
 .../svg/elements/path/SVGPathSegClosePath.java     |   46 +
 .../svg/elements/path/SVGPathSegCurvetoCubic.java  |  156 +
 .../path/SVGPathSegCurvetoCubicSmooth.java         |  120 +
 .../elements/path/SVGPathSegCurvetoQuadratic.java  |  123 +
 .../path/SVGPathSegCurvetoQuadraticSmooth.java     |   91 +
 .../svg/elements/path/SVGPathSegLineto.java        |  102 +
 .../elements/path/SVGPathSegLinetoHorizontal.java  |   61 +
 .../elements/path/SVGPathSegLinetoVertical.java    |   63 +
 .../parsers/svg/elements/path/SVGPathSegList.java  |  202 +
 .../svg/elements/path/SVGPathSegMoveto.java        |   57 +
 .../parsers/svg/parsers/AbstractSVGParser.java     |   84 +
 .../parsers/svg/parsers/CSSStyleHandler.java       |   32 +
 .../parsers/svg/parsers/CSSStyleParser.java        |   97 +
 .../parsers/svg/parsers/SVGLengthParser.java       |  177 +
 .../parsers/svg/parsers/SVGNumberParser.java       |  166 +
 .../parsers/svg/parsers/SVGPathHandler.java        |   33 +
 .../parsers/svg/parsers/SVGPathParser.java         |  470 ++
 .../parsers/svg/parsers/SVGPointsParser.java       |  159 +
 .../parsers/svg/parsers/URIReferenceParser.java    |   85 +
 .../parsers/svg/parsers/UnitProcessor.java         |   81 +
 current/latexDraw/psTricks/DviPsColors.java        |  560 +++
 current/latexDraw/psTricks/PSTricksConstants.java  |  595 +++
 current/latexDraw/ui/CodePanel.java                |  789 +++
 current/latexDraw/ui/DrawContainer.java            | 3259 ++++++++++++
 current/latexDraw/ui/DrawPanel.java                | 2021 ++++++++
 current/latexDraw/ui/LaTeXDraw.java                |   49 +
 current/latexDraw/ui/LaTeXDrawFrame.java           | 4838 ++++++++++++++++++
 current/latexDraw/ui/SplashScreen.java             |  118 +
 .../ui/codeEditorPane/AbstractCodeEditorPane.java  |  211 +
 .../ui/codeEditorPane/PSTricksEditorPane.java      |  181 +
 current/latexDraw/ui/components/ButtonIcon.java    |  129 +
 current/latexDraw/ui/components/CloseButton.java   |   99 +
 current/latexDraw/ui/components/ColorButton.java   |   92 +
 current/latexDraw/ui/components/CopyPasteMenu.java |  183 +
 current/latexDraw/ui/components/Delimitor.java     |  339 ++
 current/latexDraw/ui/components/DisplayCanvas.java |   55 +
 current/latexDraw/ui/components/LMenuBar.java      | 1214 +++++
 current/latexDraw/ui/components/LToolbar.java      |  777 +++
 .../latexDraw/ui/components/LaTeXDrawComboBox.java |   90 +
 .../ui/components/LabelListCellRenderer.java       |   69 +
 .../latexDraw/ui/components/ListJToggleButton.java |  398 ++
 current/latexDraw/ui/components/MagneticGrid.java  |  506 ++
 current/latexDraw/ui/components/MenuTemplate.java  |  462 ++
 current/latexDraw/ui/components/XScale.java        |  339 ++
 current/latexDraw/ui/components/YScale.java        |  199 +
 .../progressbars/AbstractProgressBarManager.java   |  117 +
 .../progressbars/PSTProgressBarManager.java        |  169 +
 .../progressbars/SVGProgressBarManager.java        |   84 +
 .../ui/dialog/AbstractGridShapeFrame.java          |  521 ++
 .../ui/dialog/AbstractParametersFrame.java         | 2310 +++++++++
 current/latexDraw/ui/dialog/AddCommentsFrame.java  |  165 +
 current/latexDraw/ui/dialog/BatchConvertFrame.java |  975 ++++
 .../latexDraw/ui/dialog/DrawPropertiesFrame.java   |  485 ++
 .../latexDraw/ui/dialog/ExceptionFrameDialog.java  |  205 +
 current/latexDraw/ui/dialog/ExportDialog.java      |  102 +
 .../ui/dialog/InsertPSTricksCodeFrame.java         |  149 +
 .../ui/dialog/ParametersAkinPointsFrame.java       |  310 ++
 .../latexDraw/ui/dialog/ParametersArcFrame.java    |  497 ++
 .../latexDraw/ui/dialog/ParametersAxeFrame.java    |  752 +++
 .../ui/dialog/ParametersBezierCurveFrame.java      |  635 +++
 .../ui/dialog/ParametersCircleSquareFrame.java     |  432 ++
 .../latexDraw/ui/dialog/ParametersDotFrame.java    |  339 ++
 .../latexDraw/ui/dialog/ParametersDrawFrame.java   |  320 ++
 .../ui/dialog/ParametersEllipseRectangleFrame.java |  436 ++
 .../latexDraw/ui/dialog/ParametersGridFrame.java   |  542 ++
 .../latexDraw/ui/dialog/ParametersLineFrame.java   |  269 +
 .../dialog/ParametersPolygonJoinedLinesFrame.java  |  326 ++
 .../ui/dialog/ParametersRhombusFrame.java          |  333 ++
 .../latexDraw/ui/dialog/ParametersTextFrame.java   | 1711 +++++++
 .../ui/dialog/ParametersTriangleFrame.java         |  358 ++
 current/latexDraw/ui/dialog/PictureChooser.java    |  263 +
 current/latexDraw/ui/dialog/PreferencesFrame.java  | 1513 ++++++
 current/latexDraw/ui/dialog/ShortcutsFrame.java    |  186 +
 .../latexDraw/ui/listeners/AbstractListener.java   |   42 +
 .../latexDraw/ui/listeners/InstallerListener.java  |  105 +
 current/latexDraw/ui/listeners/MenusListener.java  |  662 +++
 .../ui/listeners/RecentFilesListener.java          |  146 +
 .../latexDraw/ui/listeners/ShortcutsListener.java  |  279 ++
 .../latexDraw/ui/listeners/ToolbarListener.java    |  196 +
 current/latexDraw/util/LaTeXDrawCursor.java        |   58 +
 current/latexDraw/util/LaTeXDrawException.java     |   71 +
 current/latexDraw/util/LaTeXDrawNamespace.java     |  133 +
 current/latexDraw/util/LaTeXDrawNumber.java        |   56 +
 current/latexDraw/util/LaTeXDrawPath.java          |  191 +
 current/latexDraw/util/LaTeXDrawPoint2D.java       |  249 +
 current/latexDraw/util/LaTeXDrawResources.java     |  619 +++
 current/latexDraw/util/StreamExecReader.java       |   78 +
 current/latexDraw/util/UndoRedoManager.java        |  825 +++
 current/latexDraw/util/VersionChecker.java         |  111 +
 current/license.txt                                |  340 ++
 current/readme.txt                                 |   44 +
 current/readme_compile                             |    5 +
 current/release_note.txt                           |  682 +++
 current/res/Arc.png                                |  Bin 0 -> 442 bytes
 current/res/AutoBorders.png                        |  Bin 0 -> 842 bytes
 current/res/BezierCurves/closeCurve.png            |  Bin 0 -> 537 bytes
 current/res/BezierCurves/closeLine.png             |  Bin 0 -> 229 bytes
 current/res/Bold.png                               |  Bin 0 -> 939 bytes
 current/res/Copy.png                               |  Bin 0 -> 725 bytes
 current/res/CopySel.png                            |  Bin 0 -> 645 bytes
 current/res/Cut.png                                |  Bin 0 -> 1177 bytes
 current/res/Draw.png                               |  Bin 0 -> 1746 bytes
 current/res/InFrontSelect.png                      |  Bin 0 -> 870 bytes
 current/res/Italic.png                             |  Bin 0 -> 784 bytes
 current/res/LaTeXDrawIcon.png                      |  Bin 0 -> 1942 bytes
 current/res/LaTeXDrawSmall.png                     |  Bin 0 -> 27162 bytes
 current/res/Magnify.png                            |  Bin 0 -> 617 bytes
 current/res/MagnifyMinus.png                       |  Bin 0 -> 611 bytes
 current/res/MagnifyPlus.png                        |  Bin 0 -> 625 bytes
 current/res/New.png                                |  Bin 0 -> 692 bytes
 current/res/Object.png                             |  Bin 0 -> 819 bytes
 current/res/Paste.png                              |  Bin 0 -> 773 bytes
 current/res/Print.png                              |  Bin 0 -> 869 bytes
 current/res/Redo.png                               |  Bin 0 -> 810 bytes
 current/res/Undo.png                               |  Bin 0 -> 1011 bytes
 current/res/align/alignBottom.png                  |  Bin 0 -> 665 bytes
 current/res/align/alignLeft.png                    |  Bin 0 -> 660 bytes
 current/res/align/alignMiddleHoriz.png             |  Bin 0 -> 782 bytes
 current/res/align/alignMiddleVert.png              |  Bin 0 -> 738 bytes
 current/res/align/alignRight.png                   |  Bin 0 -> 665 bytes
 current/res/align/alignTop.png                     |  Bin 0 -> 680 bytes
 current/res/arrowStyles/line.arc.left.png          |  Bin 0 -> 1117 bytes
 current/res/arrowStyles/line.arc.r.left.png        |  Bin 0 -> 1136 bytes
 current/res/arrowStyles/line.arc.r.right.png       |  Bin 0 -> 1018 bytes
 current/res/arrowStyles/line.arc.right.png         |  Bin 0 -> 1102 bytes
 current/res/arrowStyles/line.arrow.left.png        |  Bin 0 -> 1006 bytes
 current/res/arrowStyles/line.arrow.right.png       |  Bin 0 -> 1004 bytes
 current/res/arrowStyles/line.barEnd.left.png       |  Bin 0 -> 321 bytes
 current/res/arrowStyles/line.barEnd.right.png      |  Bin 0 -> 332 bytes
 current/res/arrowStyles/line.barIn.left.png        |  Bin 0 -> 514 bytes
 current/res/arrowStyles/line.barIn.right.png       |  Bin 0 -> 497 bytes
 current/res/arrowStyles/line.bracket.left.png      |  Bin 0 -> 529 bytes
 current/res/arrowStyles/line.bracket.r.left.png    |  Bin 0 -> 639 bytes
 current/res/arrowStyles/line.bracket.r.right.png   |  Bin 0 -> 657 bytes
 current/res/arrowStyles/line.bracket.right.png     |  Bin 0 -> 644 bytes
 current/res/arrowStyles/line.circle.end.left.png   |  Bin 0 -> 808 bytes
 current/res/arrowStyles/line.circle.end.right.png  |  Bin 0 -> 839 bytes
 current/res/arrowStyles/line.circle.in.left.png    |  Bin 0 -> 862 bytes
 current/res/arrowStyles/line.circle.in.right.png   |  Bin 0 -> 847 bytes
 current/res/arrowStyles/line.dbleArrow.left.png    |  Bin 0 -> 930 bytes
 current/res/arrowStyles/line.dbleArrow.right.png   |  Bin 0 -> 938 bytes
 current/res/arrowStyles/line.disk.end.left.png     |  Bin 0 -> 705 bytes
 current/res/arrowStyles/line.disk.end.right.png    |  Bin 0 -> 699 bytes
 current/res/arrowStyles/line.disk.in.left.png      |  Bin 0 -> 741 bytes
 current/res/arrowStyles/line.disk.in.right.png     |  Bin 0 -> 764 bytes
 current/res/arrowStyles/line.none.left.png         |  Bin 0 -> 281 bytes
 current/res/arrowStyles/line.none.right.png        |  Bin 0 -> 285 bytes
 current/res/arrowStyles/line.rarrow.left.png       |  Bin 0 -> 1212 bytes
 current/res/arrowStyles/line.rarrow.right.png      |  Bin 0 -> 1219 bytes
 current/res/arrowStyles/line.rdbleArrow.left.png   |  Bin 0 -> 1043 bytes
 current/res/arrowStyles/line.rdbleArrow.right.png  |  Bin 0 -> 1043 bytes
 current/res/arrowStyles/line.roundIn.left.png      |  Bin 0 -> 448 bytes
 current/res/arrowStyles/line.roundIn.right.png     |  Bin 0 -> 457 bytes
 current/res/axes.png                               |  Bin 0 -> 438 bytes
 current/res/background.png                         |  Bin 0 -> 624 bytes
 current/res/behindSelect.png                       |  Bin 0 -> 810 bytes
 current/res/bezierCurve.png                        |  Bin 0 -> 429 bytes
 current/res/chord.png                              |  Bin 0 -> 969 bytes
 current/res/circle.png                             |  Bin 0 -> 890 bytes
 current/res/closeIn.png                            |  Bin 0 -> 531 bytes
 current/res/closeOut.png                           |  Bin 0 -> 576 bytes
 current/res/closedBezier.png                       |  Bin 0 -> 706 bytes
 current/res/comment.png                            |  Bin 0 -> 458 bytes
 current/res/cursors/RotCWDown.gif                  |  Bin 0 -> 87 bytes
 current/res/del.png                                |  Bin 0 -> 296 bytes
 current/res/delimitor.png                          |  Bin 0 -> 491 bytes
 current/res/dialog-warning.png                     |  Bin 0 -> 954 bytes
 current/res/displayGrid.png                        |  Bin 0 -> 426 bytes
 current/res/distrib/distHorizEqual.png             |  Bin 0 -> 813 bytes
 current/res/distrib/distHorizLeft.png              |  Bin 0 -> 839 bytes
 current/res/distrib/distHorizMiddle.png            |  Bin 0 -> 896 bytes
 current/res/distrib/distHorizRight.png             |  Bin 0 -> 854 bytes
 current/res/distrib/distVertBottom.png             |  Bin 0 -> 807 bytes
 current/res/distrib/distVertEqual.png              |  Bin 0 -> 752 bytes
 current/res/distrib/distVertMiddle.png             |  Bin 0 -> 866 bytes
 current/res/distrib/distVertTop.png                |  Bin 0 -> 808 bytes
 current/res/document-open.png                      |  Bin 0 -> 1001 bytes
 current/res/document-properties.png                |  Bin 0 -> 688 bytes
 current/res/document-save-as.png                   |  Bin 0 -> 1097 bytes
 current/res/document-save.png                      |  Bin 0 -> 1150 bytes
 current/res/dot.png                                |  Bin 0 -> 555 bytes
 current/res/dotStyles/dot.asterisk.png             |  Bin 0 -> 432 bytes
 current/res/dotStyles/dot.bar.png                  |  Bin 0 -> 183 bytes
 current/res/dotStyles/dot.cross.png                |  Bin 0 -> 287 bytes
 current/res/dotStyles/dot.diamond.png              |  Bin 0 -> 660 bytes
 current/res/dotStyles/dot.diamondF.png             |  Bin 0 -> 625 bytes
 current/res/dotStyles/dot.none.png                 |  Bin 0 -> 374 bytes
 current/res/dotStyles/dot.o.png                    |  Bin 0 -> 524 bytes
 current/res/dotStyles/dot.ocross.png               |  Bin 0 -> 450 bytes
 current/res/dotStyles/dot.oplus.png                |  Bin 0 -> 540 bytes
 current/res/dotStyles/dot.pentagon.png             |  Bin 0 -> 559 bytes
 current/res/dotStyles/dot.pentagonF.png            |  Bin 0 -> 374 bytes
 current/res/dotStyles/dot.plus.png                 |  Bin 0 -> 155 bytes
 current/res/dotStyles/dot.square.png               |  Bin 0 -> 166 bytes
 current/res/dotStyles/dot.squareF.png              |  Bin 0 -> 128 bytes
 current/res/dotStyles/dot.triangle.png             |  Bin 0 -> 487 bytes
 current/res/dotStyles/dot.triangleF.png            |  Bin 0 -> 440 bytes
 .../res/doubleBoundary/double.boundary.inner.png   |  Bin 0 -> 470 bytes
 .../res/doubleBoundary/double.boundary.middle.png  |  Bin 0 -> 458 bytes
 .../res/doubleBoundary/double.boundary.outer.png   |  Bin 0 -> 464 bytes
 current/res/ellipse.png                            |  Bin 0 -> 866 bytes
 current/res/emblem-important.png                   |  Bin 0 -> 1100 bytes
 current/res/emblem-unreadable.png                  |  Bin 0 -> 923 bytes
 current/res/empty.png                              |  Bin 0 -> 1803 bytes
 current/res/foreground.png                         |  Bin 0 -> 666 bytes
 current/res/freehand/curve.png                     |  Bin 0 -> 581 bytes
 current/res/freehand/line.png                      |  Bin 0 -> 539 bytes
 current/res/go-next.png                            |  Bin 0 -> 930 bytes
 current/res/go-previous.png                        |  Bin 0 -> 955 bytes
 current/res/grid.png                               |  Bin 0 -> 1793 bytes
 current/res/gridGap.png                            |  Bin 0 -> 290 bytes
 current/res/hatch/gradient.png                     |  Bin 0 -> 379 bytes
 current/res/hatch/hatch.cross.png                  |  Bin 0 -> 146 bytes
 current/res/hatch/hatch.horiz.png                  |  Bin 0 -> 147 bytes
 current/res/hatch/hatch.none.png                   |  Bin 0 -> 142 bytes
 current/res/hatch/hatch.vert.png                   |  Bin 0 -> 162 bytes
 current/res/help-browser.png                       |  Bin 0 -> 1359 bytes
 current/res/image-x-generic.png                    |  Bin 0 -> 900 bytes
 current/res/join.png                               |  Bin 0 -> 440 bytes
 current/res/joinedLines.png                        |  Bin 0 -> 539 bytes
 current/res/line.png                               |  Bin 0 -> 344 bytes
 current/res/lineStyles/lineStyle.dashed.png        |  Bin 0 -> 351 bytes
 current/res/lineStyles/lineStyle.dotted.png        |  Bin 0 -> 402 bytes
 current/res/lineStyles/lineStyle.none.png          |  Bin 0 -> 219 bytes
 current/res/list-add.png                           |  Bin 0 -> 386 bytes
 current/res/list-remove.png                        |  Bin 0 -> 252 bytes
 current/res/mirrorH.png                            |  Bin 0 -> 557 bytes
 current/res/mirrorV.png                            |  Bin 0 -> 587 bytes
 current/res/ok.png                                 |  Bin 0 -> 1299 bytes
 current/res/parabola.png                           |  Bin 0 -> 1746 bytes
 current/res/pdf.png                                |  Bin 0 -> 352 bytes
 current/res/polygon.png                            |  Bin 0 -> 923 bytes
 current/res/preferences-desktop-theme.png          |  Bin 0 -> 646 bytes
 current/res/preferences-system.png                 |  Bin 0 -> 1151 bytes
 current/res/rectangle.png                          |  Bin 0 -> 396 bytes
 current/res/rhombus.png                            |  Bin 0 -> 825 bytes
 current/res/rotation.png                           |  Bin 0 -> 875 bytes
 current/res/rotation180.png                        |  Bin 0 -> 838 bytes
 current/res/rotation270.png                        |  Bin 0 -> 860 bytes
 current/res/rotation90.png                         |  Bin 0 -> 864 bytes
 current/res/select.png                             |  Bin 0 -> 314 bytes
 current/res/separate.png                           |  Bin 0 -> 463 bytes
 current/res/square.png                             |  Bin 0 -> 402 bytes
 current/res/stop.png                               |  Bin 0 -> 422 bytes
 current/res/system-software-update.png             |  Bin 0 -> 1464 bytes
 current/res/texEditor.png                          |  Bin 0 -> 448 bytes
 current/res/text-x-generic.png                     |  Bin 0 -> 523 bytes
 current/res/text.png                               |  Bin 0 -> 351 bytes
 current/res/thickness.png                          |  Bin 0 -> 164 bytes
 current/res/translators.txt                        |    9 +
 current/res/triangle.png                           |  Bin 0 -> 667 bytes
 current/res/view-refresh.png                       |  Bin 0 -> 1364 bytes
 current/res/wedge.png                              |  Bin 0 -> 904 bytes
 current/shortcutWindows.vbs                        |    6 +
 current/templates/Classic grid.svg                 | 5243 ++++++++++++++++++++
 current/templates/Condenser.svg                    |   26 +
 current/templates/embrace.svg                      |   18 +
 current/templates/man.svg                          |   55 +
 current/templates/question.svg                     |   55 +
 577 files changed, 123458 insertions(+)

diff --git a/current/.cache/Classic grid.svg.png b/current/.cache/Classic grid.svg.png
new file mode 100644
index 0000000..d00d53a
Binary files /dev/null and b/current/.cache/Classic grid.svg.png differ
diff --git a/current/.cache/Condenser.svg.png b/current/.cache/Condenser.svg.png
new file mode 100644
index 0000000..c71a7d4
Binary files /dev/null and b/current/.cache/Condenser.svg.png differ
diff --git a/current/.cache/embrace.svg.png b/current/.cache/embrace.svg.png
new file mode 100644
index 0000000..6c28434
Binary files /dev/null and b/current/.cache/embrace.svg.png differ
diff --git a/current/.cache/man.svg.png b/current/.cache/man.svg.png
new file mode 100644
index 0000000..0096fed
Binary files /dev/null and b/current/.cache/man.svg.png differ
diff --git a/current/.cache/question.svg.png b/current/.cache/question.svg.png
new file mode 100644
index 0000000..025d36e
Binary files /dev/null and b/current/.cache/question.svg.png differ
diff --git a/current/.classpath b/current/.classpath
new file mode 100644
index 0000000..de21191
--- /dev/null
+++ b/current/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry exported="true" kind="lib" path="lib/net.sourceforge.jiu.jar" sourcepath="src lib"/>
+	<classpathentry excluding="lib/|lib/|lib/|lib/|src lib/**/**" kind="src" path=""/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+	<classpathentry kind="lib" path="lib/jlibeps.jar" sourcepath="src lib"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path=""/>
+</classpath>
diff --git a/current/.fbprefs b/current/.fbprefs
new file mode 100644
index 0000000..7b80b10
--- /dev/null
+++ b/current/.fbprefs
@@ -0,0 +1,148 @@
+#FindBugs User Preferences
+#Thu Nov 13 11:18:46 CET 2008
+detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
+detectorBCPMethodReturnCheck=BCPMethodReturnCheck|false
+detectorBadAppletConstructor=BadAppletConstructor|false
+detectorBadResultSetAccess=BadResultSetAccess|true
+detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
+detectorBadUseOfReturnValue=BadUseOfReturnValue|true
+detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
+detectorBooleanReturnNull=BooleanReturnNull|true
+detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true
+detectorCalledMethods=CalledMethods|true
+detectorCheckCalls=CheckCalls|false
+detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
+detectorCheckTypeQualifiers=CheckTypeQualifiers|true
+detectorCloneIdiom=CloneIdiom|false
+detectorComparatorIdiom=ComparatorIdiom|true
+detectorConfusedInheritance=ConfusedInheritance|true
+detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
+detectorCrossSiteScripting=CrossSiteScripting|true
+detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
+detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
+detectorDontUseEnum=DontUseEnum|true
+detectorDroppedException=DroppedException|true
+detectorDumbMethodInvocations=DumbMethodInvocations|true
+detectorDumbMethods=DumbMethods|true
+detectorDuplicateBranches=DuplicateBranches|true
+detectorEmptyZipFileEntry=EmptyZipFileEntry|true
+detectorEqStringTest=EqStringTest|false
+detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
+detectorFinalizerNullsFields=FinalizerNullsFields|true
+detectorFindBadCast=FindBadCast|false
+detectorFindBadCast2=FindBadCast2|true
+detectorFindBadEqualsImplementation=FindBadEqualsImplementation|false
+detectorFindBadForLoop=FindBadForLoop|true
+detectorFindBugsSummaryStats=FindBugsSummaryStats|true
+detectorFindCircularDependencies=FindCircularDependencies|false
+detectorFindDeadLocalStores=FindDeadLocalStores|true
+detectorFindDoubleCheck=FindDoubleCheck|true
+detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
+detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
+detectorFindFinalizeInvocations=FindFinalizeInvocations|true
+detectorFindFloatEquality=FindFloatEquality|true
+detectorFindFloatMath=FindFloatMath|false
+detectorFindHEmismatch=FindHEmismatch|true
+detectorFindInconsistentSync2=FindInconsistentSync2|true
+detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
+detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
+detectorFindMaskedFields=FindMaskedFields|true
+detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
+detectorFindNakedNotify=FindNakedNotify|true
+detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
+detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
+detectorFindNonShortCircuit=FindNonShortCircuit|true
+detectorFindNullDeref=FindNullDeref|true
+detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
+detectorFindOpenStream=FindOpenStream|true
+detectorFindPuzzlers=FindPuzzlers|true
+detectorFindRefComparison=FindRefComparison|true
+detectorFindReturnRef=FindReturnRef|true
+detectorFindRunInvocations=FindRunInvocations|true
+detectorFindSelfComparison=FindSelfComparison|true
+detectorFindSelfComparison2=FindSelfComparison2|true
+detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
+detectorFindSpinLoop=FindSpinLoop|true
+detectorFindSqlInjection=FindSqlInjection|true
+detectorFindTwoLockWait=FindTwoLockWait|true
+detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
+detectorFindUnconditionalWait=FindUnconditionalWait|true
+detectorFindUninitializedGet=FindUninitializedGet|true
+detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
+detectorFindUnreleasedLock=FindUnreleasedLock|true
+detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
+detectorFindUnsyncGet=FindUnsyncGet|true
+detectorFindUselessControlFlow=FindUselessControlFlow|true
+detectorFormatStringChecker=FormatStringChecker|true
+detectorHugeSharedStringConstants=HugeSharedStringConstants|true
+detectorIDivResultCastToDouble=IDivResultCastToDouble|true
+detectorIncompatMask=IncompatMask|true
+detectorInconsistentAnnotations=InconsistentAnnotations|true
+detectorInefficientMemberAccess=InefficientMemberAccess|false
+detectorInefficientToArray=InefficientToArray|true
+detectorInfiniteLoop=InfiniteLoop|true
+detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
+detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|true
+detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
+detectorInitializationChain=InitializationChain|true
+detectorInstantiateStaticClass=InstantiateStaticClass|true
+detectorInvalidJUnitTest=InvalidJUnitTest|true
+detectorIteratorIdioms=IteratorIdioms|true
+detectorLazyInit=LazyInit|true
+detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
+detectorLockedFields=LockedFields|false
+detectorMethodReturnCheck=MethodReturnCheck|true
+detectorMethods=Methods|true
+detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
+detectorMutableLock=MutableLock|true
+detectorMutableStaticFields=MutableStaticFields|true
+detectorNaming=Naming|true
+detectorNoteAnnotationRetention=NoteAnnotationRetention|true
+detectorNoteCheckReturnValue=NoteCheckReturnValue|true
+detectorNoteCheckReturnValueAnnotations=NoteCheckReturnValueAnnotations|true
+detectorNoteJCIPAnnotation=NoteJCIPAnnotation|true
+detectorNoteNonNullAnnotations=NoteNonNullAnnotations|true
+detectorNoteNonnullReturnValues=NoteNonnullReturnValues|true
+detectorNoteSuppressedWarnings=NoteSuppressedWarnings|true
+detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
+detectorNumberConstructor=NumberConstructor|true
+detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
+detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
+detectorPublicSemaphores=PublicSemaphores|false
+detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
+detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
+detectorRedundantInterfaces=RedundantInterfaces|true
+detectorRepeatedConditionals=RepeatedConditionals|true
+detectorResolveAllReferences=ResolveAllReferences|false
+detectorRuntimeExceptionCapture=RuntimeExceptionCapture|false
+detectorSerializableIdiom=SerializableIdiom|true
+detectorStartInConstructor=StartInConstructor|true
+detectorStaticCalendarDetector=StaticCalendarDetector|false
+detectorStringConcatenation=StringConcatenation|true
+detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
+detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
+detectorSwitchFallthrough=SwitchFallthrough|true
+detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
+detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
+detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
+detectorTestASM=TestASM|false
+detectorTestingGround=TestingGround|false
+detectorTrainFieldStoreTypes=TrainFieldStoreTypes|true
+detectorTrainNonNullAnnotations=TrainNonNullAnnotations|true
+detectorTrainUnconditionalDerefParams=TrainUnconditionalDerefParams|true
+detectorURLProblems=URLProblems|true
+detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
+detectorUnnecessaryMath=UnnecessaryMath|true
+detectorUnreadFields=UnreadFields|false
+detectorUseObjectEquals=UseObjectEquals|true
+detectorUselessSubclassMethod=UselessSubclassMethod|true
+detectorVarArgsProblems=VarArgsProblems|true
+detectorVolatileUsage=VolatileUsage|true
+detectorWaitInLoop=WaitInLoop|true
+detectorWrongMapIterator=WrongMapIterator|true
+detectorXMLFactoryBypass=XMLFactoryBypass|true
+detector_threshold=2
+effort=default
+filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,EXPERIMENTAL,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false
+filter_settings_neg=|
+run_at_full_build=true
diff --git a/current/.project b/current/.project
new file mode 100644
index 0000000..9d6e5f1
--- /dev/null
+++ b/current/.project
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>LaTeXDraw2</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>net.sourceforge.metrics.nature</nature>
+	</natures>
+</projectDescription>
diff --git a/current/.settings/org.eclipse.core.resources.prefs b/current/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..ed18c32
--- /dev/null
+++ b/current/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Mon Jul 02 19:55:44 CEST 2007
+eclipse.preferences.version=1
+encoding//lang/en/LaTeXDrawFrame.properties=8859_1
+encoding//lang/en/dialogFrames.properties=8859_1
diff --git a/current/.settings/org.eclipse.jdt.core.prefs b/current/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..fcb4a67
--- /dev/null
+++ b/current/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,96 @@
+#Wed May 27 13:07:05 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeUncheckedExceptions=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=true
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/current/.settings/org.eclipse.jdt.ui.prefs b/current/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..a1ac882
--- /dev/null
+++ b/current/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,3 @@
+#Wed May 27 13:07:05 CEST 2009
+eclipse.preferences.version=1
+formatter_settings_version=11
diff --git a/current/.settings/org.eclipse.ltk.core.refactoring.prefs b/current/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..75b87cc
--- /dev/null
+++ b/current/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Mon Oct 17 18:40:52 CEST 2005
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/current/META-INF/MANIFEST.MF b/current/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3d91273
--- /dev/null
+++ b/current/META-INF/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.6.5
+Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
+
diff --git a/current/build.xml b/current/build.xml
new file mode 100644
index 0000000..0929989
--- /dev/null
+++ b/current/build.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+<project name="Template Buildfile" default="jar" basedir=".">
+	<property name="dir.out" value="out"/>
+	<property name="dir.data" value="out/data"/>
+	<property name="dir.report" value="out/report"/>
+	<property name="dir.doc" location="doc"/>
+	<property name="release.name" value="LaTeXDraw2.0.4" />
+	
+	<!-- Creates the output directories -->
+	<target name="prepare">
+    	<mkdir dir="${dir.out}"/>
+    	<mkdir dir="${dir.report}"/>
+    	<mkdir dir="${dir.data}/.cache"/>
+    	<mkdir dir="${dir.data}/templates"/>
+    	<mkdir dir="${dir.out}/${release.name}_src"/>
+		<mkdir dir="${dir.out}/${release.name}"/>
+	</target>
+		
+	<target name="doc" depends="jar" description="Generation of the documentation.">
+	    <javadoc destdir="${dir.doc}" author="true" version="true" use="true"
+	    	notree="false" nonavbar="false" noindex="false" access="private">
+	      <fileset dir = "">
+	        <include name="**/*.java"/>
+	        <exclude name="**/*Test*"/>
+	      </fileset>
+	    </javadoc>
+	</target>
+		
+		
+		
+	<!-- Creates the jar -->
+	<target name="jar" description="Generates latexdraw.jar">
+		<!-- copies the librairies -->
+		<copy todir="${dir.data}/help/" overwrite="true" failonerror="true">
+					<fileset dir="help/" />
+		</copy>
+		
+		<copy todir="${dir.data}/lib/" overwrite="true" failonerror="true">
+			<fileset dir="lib/" />
+		</copy>
+		
+		<copy todir="${dir.out}/" overwrite="true" failonerror="true">
+			<fileset dir="" includes="license.txt ; release_note.txt ; readme.txt ; install_vista.vbs ; install_debian_ubuntu"/>
+		</copy>
+		
+		<copy todir="${dir.data}/.cache" overwrite="true" failonerror="true">
+			<fileset dir=".cache/"/>
+		</copy>
+		
+		<copy todir="${dir.data}/templates" overwrite="true" failonerror="true">
+			<fileset dir="templates/"/>
+		</copy>
+		
+		<jar jarfile="${dir.data}/LaTeXDraw.jar" manifest="META-INF/MANIFEST.MF">
+			<!-- Creates the manifest -->
+			<manifest>
+				<attribute name="Main-Class" value="latexDraw.ui.LaTeXDraw"/>
+				<attribute name="Class-Path" value="lib/net.sourceforge.jiu.jar lib/jlibeps.jar ./ help/"/>
+			</manifest>
+			
+		 <!-- Filters the files -->
+		 <fileset dir=""
+			 includes="latexDraw/**/*.class ; res/**/* ; lang/**/*"
+			 excludes="latexDraw/**/*.java ; latexDraw/installer/* ; latexDraw/ui/listeners/InstallerListener.*"/>
+		</jar>
+	</target>
+	
+	
+
+	<target name="zip src" depends="jar">
+        <copy todir="out/${release.name}_src">
+                <fileset dir="" includes="**/*" excludes="site/ ; Todo.txt ; graphisme/ ; out/ ; **/*.class"/>
+        </copy>
+		<zip destfile="${dir.out}/${release.name}_src.zip" compress="true">
+			 <fileset dir="out/" includes="${release.name}_src/" />
+		</zip>
+        <delete dir="out/${release.name}_src" />
+    </target>
+	
+	
+   <target name="zip jar" depends="zip src">
+        <copy todir="out/${release.name}">
+            <fileset dir="out/" includes="data/ ; install_vista.vbs ; *.txt ; *.jar ; install_debian_ubuntu" />
+   	    </copy>
+        <zip destfile="${dir.out}/${release.name}.zip" compress="true">
+             <fileset dir="out/" includes="${release.name}/"/>
+        </zip>
+   	<delete dir="out/${release.name}" />
+    </target>
+	
+</project>
diff --git a/current/build_installer.xml b/current/build_installer.xml
new file mode 100644
index 0000000..709e94c
--- /dev/null
+++ b/current/build_installer.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<project name="Template Buildfile" default="jar" basedir=".">
+	<property name="dir.out" value="out"/>
+	 <property name="jar.junit" value="/opt/eclipse/plugins/org.junit4_4.3.1/junit.jar"/>
+	
+	<!-- Creates the output directories -->
+	<target name="prepare">
+	<mkdir dir="${dir.out}"/>
+	</target>
+		
+	<!-- Creates the jar -->
+	<target name="jar" description="Generates installer.jar">
+		
+		<jar jarfile="${dir.out}/installer.jar" manifest="META-INF/MANIFEST.MF">
+			<!-- Creates the manifest -->
+			<manifest>
+				<attribute name="Main-Class" value="latexDraw.installer.InstallerUI"/>
+			</manifest>
+			
+		 <!-- Filters the files -->
+		 <fileset dir=""
+			 includes="latexDraw/installer/*.class ; latexDraw/ui/listeners/InstallerListener.class ; latexDraw/util/LaTeXDrawPath.class ; res/LaTeXDrawIcon.png"
+		 />
+		</jar>
+	</target>
+	
+</project>
+
+
+
+
+
+
+
+
+
+
diff --git a/current/compile b/current/compile
new file mode 100644
index 0000000..deb71ed
--- /dev/null
+++ b/current/compile
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+cp -r src\ lib/net/ .
+cp -r src\ lib/org/ .
+
+javac net/sourceforge/WmfView/*.java org/jibble/epsgraphics/*.java net/sourceforge/jiu/codecs/*.java net/sourceforge/jiu/codecs/jpeg/*.java net/sourceforge/jiu/codecs/tiff/*.java net/sourceforge/jiu/color/*.java net/sourceforge/jiu/color/conversion/*.java net/sourceforge/jiu/data/*.java net/sourceforge/jiu/gui/awt/*.java net/sourceforge/jiu/ops/*.java net/sourceforge/jiu/util/*.java
+
+javac latexDraw/exceptions/*.java latexDraw/figures/*.java latexDraw/figures/properties/*.java latexDraw/filters/*.java latexDraw/lang/*.java latexDraw/parsers/*.java latexDraw/parsers/pstricks/*.java latexDraw/psTricks/*.java latexDraw/ui/*.java latexDraw/ui/components/*.java latexDraw/ui/dialog/*.java latexDraw/ui/listeners/*.java latexDraw/util/*.java 
diff --git a/current/count b/current/count
new file mode 100644
index 0000000..71ca32d
--- /dev/null
+++ b/current/count
@@ -0,0 +1,3 @@
+#tar -c latexDraw/ --exclude=*.class --exclude=CVS | grep -ac [\ -\~] 
+find latexDraw/ -name "*.java" -exec cat {} \; | grep -ac [\ -\~]
+
diff --git a/current/help/1.9.html b/current/help/1.9.html
new file mode 100644
index 0000000..c74b3f2
--- /dev/null
+++ b/current/help/1.9.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><span class="MenuCurrent">LaTeXDraw 1.9</span></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> <tr>
+<td><a class="SubMenu1" href="graphFeat.html">Graphicals
+Features</a></td> </tr> <tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+</tr> <tr> <td><a class="SubMenu1" href="drawProp.html">Drawing properties</a></td>
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+</tr> <tr> <td><a class="SubMenu1" href="template.html">Template</a></td> </tr>
+<tr> <td><a class="SubMenu1" href="check.html">Check Version</a></td></td> </tr> <tr> <td><a class="MenuLink" href="start.html">How to start</a></td>
+</tr> </tbody> </table> </td> <td valign="top"> <table> <tbody> <tr> <td>
+
+<h1>LaTeXDraw 1.9 New and Noteworthy</h1> <br><br>
+
+Here are some of the more noteworthy things available in LaTeXDraw 1.9. 
+See the release note for details about bugs fixed and other changes.
+<br> <br>
+<br> <br> <hr>
+<h3>B�zier curves</h3>
+<hr><br> <br> 
+A B�zier curve can, have more than two points, be open or closed, be equilibrated.<br><br>
+
+<img alt="B�zier curve" title="B�zier curve" src="./images/bezier.jpg">
+<br> <br> <hr>
+
+
+<h3>Free hand</h3>
+<hr><br> <br> 
+
+To smooth this shape, a point is drawn according to an interval (it means that not all the points are drawn but only some of them). Now, this shape can be formed of curves or of lines.<br><br>
+
+
+<img alt="free hand" src="./images/akinPoints.jpg">
+<br> <br>
+<br> <br> <hr>
+
+
+<h3>Shortcuts</h3>
+<hr><br> <br> 
+A panel containing all the shortcuts has been added (in the menu "help"). Moreover, a lot of useful shortcut have been defined.<br><br>
+
+
+<br> <br>
+<br> <br>
+<h3>Recent files manager</h3>
+<hr><br> <br> 
+You can easly reuse your lastest drawings. You can define yourself the number of file you want to see in the historic.<br><br>
+
+<br> <br>
+<br> <br><hr>
+<h3>Minor improvements</h3>
+<hr><br>
+<ul>
+<li>can update the selected figures to the displayed grid</li>
+<li>when the code panel is closed, a button, copying the all the generated code, is visible in the toolbar</li>
+<li>a menu item to set visible all the hidden figures</li>
+<li>can choose the look and feel</li>
+<li>can change the transparency of the delimitors</li>
+<li>a menu to check update</li>
+<li>more cursors</li>
+</ul>
+<br><br>
+
+
+      <hr>
+      <table class="footer" cellpadding="2" cellspacing="3">
+
+        <tbody>
+          <tr>
+
+            <td align="left"><small>Copyright(c) 2005-2007 - Arnaud BLOUIN - last changes : February 4 2007</small></td>
+
+          </tr>
+          <tr>
+            <td align="left"><small>The LaTeXDraw Projet, a PSTricks generator or PSTricks editor for LaTeX</small></td>
+          </tr>
+        </tbody>
+      </table>
+      </td>
+    </tr>
+  </tbody>
+</table>
+</body>
+</html>
diff --git a/current/help/check.html b/current/help/check.html
new file mode 100644
index 0000000..707467e
--- /dev/null
+++ b/current/help/check.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> <tr>
+<td><a class="SubMenu1" href="graphFeat.html">Graphicals
+Features</a></td> </tr> <tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+</tr> <tr> <td><a class="SubMenu1" href="drawProp.html">Drawing properties</a></td>
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+</tr> <tr> <td><a class="SubMenu1" href="template.html">Template</a></td> </tr>
+<tr> <td><span class="SubMenu1Current">Check
+Version</span></td> </tr> <tr> <td><a class="MenuLink" href="start.html">How to start</a></td>
+</tr> </tbody> </table> </td> <td valign="top"> <table> <tbody> <tr> <td>
+<h1>Check New Version</h1> <br><br>
+LaTeXDraw is able to <b>check
+new version</b> of the software at the start-up. If there is a
+new version, a frame, must appeared in order to keep you informed of
+this new version.<br>
+You can disable this feature in the preferences frame you can display
+with the menu item "Preferences" in the menu "File".
+<br><br><br><br><br><br><br><br><br><br><br><br><br>
+</td> </tr> </tbody> </table> <br> <hr>
+<table class="footer" cellpadding="2" cellspacing="3">
+<tbody> <tr> <td align="left"><small>Copyright(c)
+2005-2006 - Arnaud BLOUIN - last changes : February 26 2006</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
\ No newline at end of file
diff --git a/current/help/convert.html b/current/help/convert.html
new file mode 100644
index 0000000..afb49ab
--- /dev/null
+++ b/current/help/convert.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> <tr>
+<td><a class="SubMenu1" href="graphFeat.html">Graphicals
+Features</a></td> </tr> 
+</tr> <tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td> </tr>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="drawProp.html">Drawing
+properties</a></td> </tr> 
+<tr> <td><span class="SubMenu1Current">Convert Pictures</span></td> </tr> 
+<tr> <td><a class="SubMenu1" href="template.html">Template</a></td>
+</tr> <tr> <td><a class="SubMenu1" href="check.html">Check Version</a></td> </tr>
+<tr> <td><a class="MenuLink" href="start.html">How
+to start</a></td> </tr> </tbody> </table>
+</td> <td valign="top"> <table> <tbody>
+
+
+<tr> <td> <h1>Convert Pictures</h1> <br><br>
+LaTeXDraw can now convert pictures from a given format (jpeg|png|wmf|bmp|ppm) to an other
+one (eps|jpeg|png|ppm) with this frame in "file->Convert Pictures":<br><br><br>
+<img alt="line" title="line" src="./images/convert.jpg"><br> 
+<br>
+You can add and delete pictures the the buttons "add" and "remove", choose to ouput format, choose of the
+output picture can overwrite an existing file and choose the destination.<br>
+To launch the convertion, click on the button "Convert: a green icon means that the picture has been successfully converted; in the other case, a red icon will appeared.
+
+
+<br><br><br><br><br><br><br><br><br><br><br><br><br>
+</td> </tr> </tbody> </table> <br> <hr>
+<table class="footer" cellpadding="2" cellspacing="3">
+<tbody> <tr> <td align="left"><small>Copyright(c)
+2005-2006 - Arnaud BLOUIN - last changes : April 25 2006</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
+
+
+
diff --git a/current/help/drawProp.html b/current/help/drawProp.html
new file mode 100644
index 0000000..ba0575b
--- /dev/null
+++ b/current/help/drawProp.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> <tr>
+<td><a class="SubMenu1" href="graphFeat.html">Graphicals
+Features</a></td> </tr>
+ <tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+</tr> <tr> <td><span class="SubMenu1Current">Drawing
+properties</span></td> </tr>
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+ <tr> <td><a class="SubMenu1" href="template.html">Template</a></td>
+</tr> <tr> <td><a class="SubMenu1" href="check.html">Check Version</a></td> </tr>
+<tr> <td><a class="MenuLink" href="start.html">How
+to start</a></td> </tr> </tbody> </table>
+</td> <td valign="top"> <table> <tbody>
+<tr> <td> <h1>Draw properties</h1> <br><br>
+You can change some
+parameters of your drawing by lauching the parameters frame of the draw
+with the menu item "Draw Properties" in the menu "Draw".<br><br>
+<img alt="DrawProperties" src="./images/drawProp.jpg"><br><br>
+With this frame, you can add a <b>label</b>, a <b>caption</b>
+to your drawing. You can also <b>place</b> the figure in
+your LaTeX document and define the <b>resolution</b> of
+your sketch in ppm or in ppm (Pixels Per Cm/Inch).
+<br><br><br><br><br><br><br><br><br><br><br><br><br>
+</td> </tr> </tbody> </table> <br> <hr>
+<table class="footer" cellpadding="2" cellspacing="3">
+<tbody> <tr> <td align="left"><small>Copyright(c)
+2005-2006 - Arnaud BLOUIN - last changes : February 26 2006</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
\ No newline at end of file
diff --git a/current/help/export.html b/current/help/export.html
new file mode 100644
index 0000000..926ad79
--- /dev/null
+++ b/current/help/export.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> <tr>
+<td><a class="SubMenu1" href="graphFeat.html">Graphicals
+Features</a></td> </tr> <tr> <td><span class="SubMenu1Current">Exportation</span></td> </tr>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="drawProp.html">Drawing
+properties</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="template.html">Template</a></td>
+</tr> <tr> <td><a class="SubMenu1" href="check.html">Check Version</a></td> </tr>
+<tr> <td><a class="MenuLink" href="start.html">How
+to start</a></td> </tr> </tbody> </table>
+</td> <td valign="top"> <table> <tbody>
+<tr> <td> <h1>Exportation</h1> <br><br>
+LaTeXDraw can export the
+drawing in several formats with the menu "Export As ..." in the menu
+"File" :
+<ul><li><b>PSTricks</b>; of course, it is the
+main goal of the LaTeXDraw Project</li>
+<li><b>JPG and PNG</b>; thanks to Java</li>
+<li><b>EPS</b>; thanks to the jibble.org Project</li>
+<li><b>BMP and PPM</b>; thanks to the jiu Project</li>
+<li><b>PDF and PS</b>:<br>
+Since latexdraw 2.0.3 you can export your drawings in pdf and ps using your latex distribution: a latex document, containing your drawing, is created and compiled into a pdf or a ps document. You can then insert it into your main latex document as a picture (pstricks packages are no more needed and the pdflatex command can be used).<br>
+To carry out such a task, you may have to define the path where the binaries of your latex distribution are located (it is recommanded for Windows, but for linux the field can be let empty) in the preferences panel, as illustrated in the following screenshot:<br>
+<img alt="latexPref" src="./images/latexPref.png" /><br>
+You can also add some latex packages you regulary use into the text field shown on the above figure. These packages are not directly used to compile your drawing but are saved in order to be easily included into your document, as shown in the following screenshot:<br>
+<img alt="latexPref" src="./images/pkgLatex.png" /><br>
+In the drawing properties panel, you can copy/paste the packages saved in your preferences into the packages that will be used to compile the current drawing. You can also add extra packages.
+</li>
+</ul>
+<br><br><br><br><br><br><br><br><br><br><br><br><br>
+</td> </tr> </tbody> </table> <br> <hr>
+<table class="footer" cellpadding="2" cellspacing="3">
+<tbody> <tr> <td align="left"><small>Copyright(c)
+2005-2006 - Arnaud BLOUIN - last changes : April 25 2006</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
diff --git a/current/help/features.html b/current/help/features.html
new file mode 100644
index 0000000..0b50fd3
--- /dev/null
+++ b/current/help/features.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><span class="MenuCurrent">Features</span></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> <tr>
+<td><a class="SubMenu1" href="graphFeat.html">Graphicals
+Features</a></td> </tr> <tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+</tr> <tr> <td><a class="SubMenu1" href="drawProp.html">Drawing properties</a></td>
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+</tr> <tr> <td><a class="SubMenu1" href="template.html">Template</a></td> </tr>
+<tr> <td><a class="SubMenu1" href="check.html">Check
+Version</a></td> </tr> <tr> <td><a class="MenuLink" href="start.html">How to start</a></td>
+</tr> </tbody> </table> </td> <td valign="top"> <table> <tbody> <tr> <td>
+<h1>The LaTeXDraw Project Features</h1> <br> <br>
+<ul><li><a href="shapes.html">Shapes</a></li>
+<li><a href="graphFeat.html">Graphicals Features</a></li>
+<li><a href="export.html">Exportation</a></li>
+<li><a href="drawProp.html">Drawing Properties</a></li>
+<li><a href="template.html">Template</a></li>
+<li><a href="check.html">Check Version</a></li>
+</ul> <br> <br> <br><br><br><br><br><br><br><br><br><br><br><br><br>
+</td> </tr> </tbody> </table> <br> <hr>
+<table class="footer" cellpadding="2" cellspacing="3">
+<tbody> <tr> <td align="left"><small>Copyright(c)
+2005-2006 - Arnaud BLOUIN - last changes : February 25 2006</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
\ No newline at end of file
diff --git a/current/help/graphFeat.html b/current/help/graphFeat.html
new file mode 100644
index 0000000..3c7b8f2
--- /dev/null
+++ b/current/help/graphFeat.html
@@ -0,0 +1,187 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> <tr>
+<td><span class="SubMenu1Current">Graphicals Features</span></td>
+</tr> <tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td> </tr>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="drawProp.html">Drawing
+properties</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="template.html">Template</a></td>
+</tr> <tr> <td><a class="SubMenu1" href="check.html">Check Version</a></td> </tr>
+<tr> <td><a class="MenuLink" href="start.html">How
+to start</a></td> </tr> </tbody> </table>
+</td> <td valign="top"> <table> <tbody>
+<tr> <td> <h1>Graphicals Features</h1> <br><br>
+<br>In this part,
+we are going to talk about the graphicals features of LaTeXDraw. But
+before that, we must explain what is a <b>delimitor</b> :
+it is a purple, green, red, ... square delimiting a selected figure,
+like show in the following picture :<br>
+<img alt="rectangle" title="rectangle" src="./images/mirrors.jpg"><br>You can move these
+delimitors to change the shape of the figures like explained in these
+following paragraphes.
+
+<br><br><ul> <li><a href="#Select">Select</a></li> 
+<li><a href="#Move">Move</a></li>
+<li><a href="#Rescale">Rescale</a></li>
+<li><a href="#Put">Put in front, behind, ...</a></li> 
+<li><a href="#Rotation">Rotation</a></li> 
+<li><a href="#Join">Join/separate</a></li> 
+<li><a href="#Dimension">Change the dimensions of the drawing</a></li>
+<li><a href="#Mirrors">The mirrors</a></li>
+<li><a href="#Magnet">The magnetic grids</a></li>
+</ul><br>
+
+
+<br><br><br><br><br>
+<a name="Select"> <h2>Select figures</h2>
+</a>
+You can select a figure by :
+<ul><li>Clicking on the borders of a figure</li>
+<li>Clicking in the interior of a filled figure</li>
+<li>Pressing the left button and drag the mouse to the wanted
+figures</li>
+</ul>To select a <b>grid</b> you must use the third
+case. Indeed, it will be annoying if you have a grid in the backgroud
+of your drawing and a rectangle, for example, placed on the grid ; if
+you want to selected the rectangle, the grid will be selected to ...<br><br>
+To <b>unselect</b> figures, click in an empty place in the
+draw panel.<br><br>
+<br><br><br><br>
+<a name="Move"> <h2>Move figures</h2>
+</a>
+To move select figures, you must :
+<ul><li><b>Pressing the left</b> button on the
+borders, or in the interior of a filled figure, or on the delimitors
+and drag the figure ;</li>
+<li>Pressing the right button anywhere in the draw panel and drag
+the figure. Beware, if you do a rigth click, a popup menu will appear.</li>
+</ul>
+<br><br><br><br><a name="Rescale">
+<h2>Rescale figures</h2>
+</a>
+You can rescale a figure by dragging one of the delimitors. If you have
+selected several figures, you can rescale all of them by dragging the
+delimitors which framing all the selected shapes.
+<br><br><br><br>
+<a name="Put"> <h2>Put a figure in front, behind,
+... an other figure</h2>
+</a>
+<img alt="toolbar" title="toolbar" src="./images/toolbar.jpg"><br>With the toolbar you
+can place a figure :
+<ul><li>In the <b>background</b> of the
+drawing with the button : <img alt="background" title="background" src="./images/background.png"></li>
+<li>In the <b>foreground</b> of the drawing with the
+button : <img alt="foreground" title="foreground" src="./images/foreground.png"></li>
+<li><b>Behind</b> an other figure with the button : <img alt="behind" title="behind" src="./images/behindSelect.png">. After have clicked on this
+button, you must click on the figure you to be in front of the selected
+figures.</li>
+<li><b>In front</b> an other figure with the button :
+<img alt="inFrontOf" title="In front of" src="./images/inFrontSelect.png"></li>. After have
+clicked on this button, you must click on the figure you to be behind
+the selected figures.
+</ul>
+
+
+<br><br><br><br><a name="Rotation">
+<h2>Rotate figures</h2>
+</a>
+<img alt="rotation" title="rotation" src="./images/rotateB.jpg"><br><br>
+This mini-toolbar allow to rotate figures:
+<ul>
+<li>The button without arrow allows to rotate a or several figures with the mouse; to do that, you just have to drag
+one of the delimitors (by clicking of this button all the delimitors become green). To come back to the normal mode, you
+must click again on this button (the delimitors will take their original colour);</li>
+<li>The buttons with an arrow allow to rotate immediately a or several figures or 90, 180 and 270�.</li>
+</ul>
+
+
+
+
+<br><br><br><br>
+<a name="Join"> <h2>Join/separate several selected
+figures</h2>
+</a>
+LaTeXDraw can <b>join</b> several selected figures ; for
+that, select several figures and click on the following button <img alt="join" title="join" src="./images/join.png">
+in the toolbar. All these figures will be joined in order to create
+only one figure.<br><br>
+By the same way, you can <b>separate</b> joined figures
+using this button <img alt="separate" title="separate" src="./images/separate.png">.
+<br><br><br><br>
+<a name="Dimension"> <h2>Change the dimensions of
+the drawing</h2>
+</a>
+By default, the dimensions of the drawing are framed by all the
+figures. You can display the borders of the drawing with the following
+button in the "Draw" menu <img alt="borders" title="display borders" src="./images/Object.gif">.
+For example, it can be :<br><br>
+<img alt="borders" title="display borders" src="./images/displayBorders.jpg"><br>Where the
+borders of the drawing is the rectangle framing all the figures.<br><br>
+You can change the dimensions of the drawing by :
+<ul><li>Clicking of the button <img alt="borders" title="display borders" src="./images/Object.gif"> to
+display the borders</li>
+<li>Desactivate the auto update of the borders of the drawing
+using this button in the menu "Draw" : <img alt="autoBorders" title="auto update" src="./images/AutoBorders.png"> </li>
+<li>Clicking on the "selection" button in order to select the
+borders <img alt="select" title="select" src="./images/select.png"></li>
+</ul>Then, the delimitors of the borders of the sketch must be
+displayed like in this picture :<br><br>
+<img alt="borders" title="borders" src="./images/bordersSel.jpg"><br>Now, You can change
+the dimensions of the sketch by dragging these delimitors.<br><br>
+In a LaTeX document a change of the dimensions of the drawing change
+the disposition of the document like show in the following picture :<br><br>
+<img alt="example" title="example" src="./images/example.jpg">
+<br><br>
+
+<br><br><br><br>
+<a name="Mirrors"> <h2>The mirrors</h2></a>
+<img alt="Mirror" title="Mirrors" src="./images/mirrors.jpg">
+<br><br>
+There is two mirrors: vertical an horizontal. It works with an axial symmetry by using the gravity center of the selected figure
+or of the group of selected figures.
+<br><br>
+For the moment, when a picture, a grid or axes are transformed with this feature, their coordinates are moved but
+the shape is not realy changed; in a future release, an option will allow the user to do that (there is the same problem
+for gradient: when you apply a mirror, the gradient is not changed).
+
+
+<br><br><br><br>
+
+
+<a name="Magnet"> <h2>The magnetic grids</h2></a>
+<img alt="Magnet" title="Magnet" src="./images/magneticGrid.jpg">
+<br><br>
+This feature is very usefull when you want to place figures.<br>
+To have a magnetic grid, selected the checkbox; but to display the grid you have to select it in the menu
+"Display"->"Grid"->"Standard grid" or "Personal grid".<br><br>
+<ul>
+<li><b>The standard grid:</b> this grid is define in centimeter or in inch (you can choose it);</li>
+<li><b>The personal grid:</b> this grid allows you to define the interval between the lines of the grid; to
+do that, you can use to field near the "Magnetic checkbox" checkbox. This field is enable only when the 
+personal grid is displayed.</li>
+</ul>
+
+<br><br><br><br>
+
+
+ </td> </tr>
+ </tbody> </table>
+<br> <hr> <table class="footer" cellpadding="2" cellspacing="3"> <tbody> <tr> <td align="left"><small>Copyright(c) 2005-2006 - Arnaud
+BLOUIN - last changes : Septembet 11 2006</small></td> </tr>
+</tbody> </table> </td> </tr> </tbody>
+</table></body></html>
\ No newline at end of file
diff --git a/current/help/images/AutoBorders.png b/current/help/images/AutoBorders.png
new file mode 100644
index 0000000..be1e093
Binary files /dev/null and b/current/help/images/AutoBorders.png differ
diff --git a/current/help/images/InFrontSelect.png b/current/help/images/InFrontSelect.png
new file mode 100644
index 0000000..f1f9ae2
Binary files /dev/null and b/current/help/images/InFrontSelect.png differ
diff --git a/current/help/images/Object.gif b/current/help/images/Object.gif
new file mode 100644
index 0000000..857c426
Binary files /dev/null and b/current/help/images/Object.gif differ
diff --git a/current/help/images/Palette.gif b/current/help/images/Palette.gif
new file mode 100644
index 0000000..35917c2
Binary files /dev/null and b/current/help/images/Palette.gif differ
diff --git a/current/help/images/akinPoints.jpg b/current/help/images/akinPoints.jpg
new file mode 100644
index 0000000..7689c5a
Binary files /dev/null and b/current/help/images/akinPoints.jpg differ
diff --git a/current/help/images/arc.jpg b/current/help/images/arc.jpg
new file mode 100644
index 0000000..0de72e0
Binary files /dev/null and b/current/help/images/arc.jpg differ
diff --git a/current/help/images/arrowToolbar.jpg b/current/help/images/arrowToolbar.jpg
new file mode 100644
index 0000000..85fd143
Binary files /dev/null and b/current/help/images/arrowToolbar.jpg differ
diff --git a/current/help/images/axes.jpg b/current/help/images/axes.jpg
new file mode 100644
index 0000000..caa4783
Binary files /dev/null and b/current/help/images/axes.jpg differ
diff --git a/current/help/images/background.png b/current/help/images/background.png
new file mode 100644
index 0000000..0da9faa
Binary files /dev/null and b/current/help/images/background.png differ
diff --git a/current/help/images/behindSelect.png b/current/help/images/behindSelect.png
new file mode 100644
index 0000000..1a923f2
Binary files /dev/null and b/current/help/images/behindSelect.png differ
diff --git a/current/help/images/bezier.jpg b/current/help/images/bezier.jpg
new file mode 100644
index 0000000..63b17e0
Binary files /dev/null and b/current/help/images/bezier.jpg differ
diff --git a/current/help/images/borderPos.jpg b/current/help/images/borderPos.jpg
new file mode 100644
index 0000000..f2a2656
Binary files /dev/null and b/current/help/images/borderPos.jpg differ
diff --git a/current/help/images/bordersSel.jpg b/current/help/images/bordersSel.jpg
new file mode 100644
index 0000000..920f09a
Binary files /dev/null and b/current/help/images/bordersSel.jpg differ
diff --git a/current/help/images/convert.jpg b/current/help/images/convert.jpg
new file mode 100644
index 0000000..9171c6b
Binary files /dev/null and b/current/help/images/convert.jpg differ
diff --git a/current/help/images/dbleBord.jpg b/current/help/images/dbleBord.jpg
new file mode 100644
index 0000000..2fab13b
Binary files /dev/null and b/current/help/images/dbleBord.jpg differ
diff --git a/current/help/images/displayBorders.jpg b/current/help/images/displayBorders.jpg
new file mode 100644
index 0000000..e83bde4
Binary files /dev/null and b/current/help/images/displayBorders.jpg differ
diff --git a/current/help/images/drawProp.jpg b/current/help/images/drawProp.jpg
new file mode 100644
index 0000000..92e7045
Binary files /dev/null and b/current/help/images/drawProp.jpg differ
diff --git a/current/help/images/ellipse.jpg b/current/help/images/ellipse.jpg
new file mode 100644
index 0000000..8bc9031
Binary files /dev/null and b/current/help/images/ellipse.jpg differ
diff --git a/current/help/images/example.jpg b/current/help/images/example.jpg
new file mode 100644
index 0000000..6ebff61
Binary files /dev/null and b/current/help/images/example.jpg differ
diff --git a/current/help/images/foreground.png b/current/help/images/foreground.png
new file mode 100644
index 0000000..803adce
Binary files /dev/null and b/current/help/images/foreground.png differ
diff --git a/current/help/images/framedBox.jpg b/current/help/images/framedBox.jpg
new file mode 100644
index 0000000..5167bcd
Binary files /dev/null and b/current/help/images/framedBox.jpg differ
diff --git a/current/help/images/grid.jpg b/current/help/images/grid.jpg
new file mode 100644
index 0000000..1731b10
Binary files /dev/null and b/current/help/images/grid.jpg differ
diff --git a/current/help/images/insertC.jpg b/current/help/images/insertC.jpg
new file mode 100644
index 0000000..8cb98a9
Binary files /dev/null and b/current/help/images/insertC.jpg differ
diff --git a/current/help/images/insertP.jpg b/current/help/images/insertP.jpg
new file mode 100644
index 0000000..4a4a396
Binary files /dev/null and b/current/help/images/insertP.jpg differ
diff --git a/current/help/images/join.png b/current/help/images/join.png
new file mode 100644
index 0000000..4e05605
Binary files /dev/null and b/current/help/images/join.png differ
diff --git a/current/help/images/joinedLines.jpg b/current/help/images/joinedLines.jpg
new file mode 100644
index 0000000..c248b28
Binary files /dev/null and b/current/help/images/joinedLines.jpg differ
diff --git a/current/help/images/kindLines.jpg b/current/help/images/kindLines.jpg
new file mode 100644
index 0000000..801e6a6
Binary files /dev/null and b/current/help/images/kindLines.jpg differ
diff --git a/current/help/images/latexPref.png b/current/help/images/latexPref.png
new file mode 100644
index 0000000..815aec7
Binary files /dev/null and b/current/help/images/latexPref.png differ
diff --git a/current/help/images/launchTex.jpg b/current/help/images/launchTex.jpg
new file mode 100644
index 0000000..72032f5
Binary files /dev/null and b/current/help/images/launchTex.jpg differ
diff --git a/current/help/images/line.jpg b/current/help/images/line.jpg
new file mode 100644
index 0000000..386b71d
Binary files /dev/null and b/current/help/images/line.jpg differ
diff --git a/current/help/images/magneticGrid.jpg b/current/help/images/magneticGrid.jpg
new file mode 100644
index 0000000..a9bd80f
Binary files /dev/null and b/current/help/images/magneticGrid.jpg differ
diff --git a/current/help/images/mirrors.jpg b/current/help/images/mirrors.jpg
new file mode 100644
index 0000000..e7cf4ed
Binary files /dev/null and b/current/help/images/mirrors.jpg differ
diff --git a/current/help/images/paramsFrame.jpg b/current/help/images/paramsFrame.jpg
new file mode 100644
index 0000000..09ee438
Binary files /dev/null and b/current/help/images/paramsFrame.jpg differ
diff --git a/current/help/images/pkgLatex.png b/current/help/images/pkgLatex.png
new file mode 100644
index 0000000..614a951
Binary files /dev/null and b/current/help/images/pkgLatex.png differ
diff --git a/current/help/images/point.jpg b/current/help/images/point.jpg
new file mode 100644
index 0000000..9d01d53
Binary files /dev/null and b/current/help/images/point.jpg differ
diff --git a/current/help/images/polygon.jpg b/current/help/images/polygon.jpg
new file mode 100644
index 0000000..a952e86
Binary files /dev/null and b/current/help/images/polygon.jpg differ
diff --git a/current/help/images/rectangle.jpg b/current/help/images/rectangle.jpg
new file mode 100644
index 0000000..4789b4f
Binary files /dev/null and b/current/help/images/rectangle.jpg differ
diff --git a/current/help/images/rectangleMenu.jpg b/current/help/images/rectangleMenu.jpg
new file mode 100644
index 0000000..14963fa
Binary files /dev/null and b/current/help/images/rectangleMenu.jpg differ
diff --git a/current/help/images/rotateB.jpg b/current/help/images/rotateB.jpg
new file mode 100644
index 0000000..7e375a7
Binary files /dev/null and b/current/help/images/rotateB.jpg differ
diff --git a/current/help/images/select.png b/current/help/images/select.png
new file mode 100644
index 0000000..2223541
Binary files /dev/null and b/current/help/images/select.png differ
diff --git a/current/help/images/separate.png b/current/help/images/separate.png
new file mode 100644
index 0000000..3065445
Binary files /dev/null and b/current/help/images/separate.png differ
diff --git a/current/help/images/shadow.jpg b/current/help/images/shadow.jpg
new file mode 100644
index 0000000..c46d9fd
Binary files /dev/null and b/current/help/images/shadow.jpg differ
diff --git a/current/help/images/shifting.jpg b/current/help/images/shifting.jpg
new file mode 100644
index 0000000..bbf8789
Binary files /dev/null and b/current/help/images/shifting.jpg differ
diff --git a/current/help/images/text.jpg b/current/help/images/text.jpg
new file mode 100644
index 0000000..78f1ca8
Binary files /dev/null and b/current/help/images/text.jpg differ
diff --git a/current/help/images/text2.jpg b/current/help/images/text2.jpg
new file mode 100644
index 0000000..4daa9a2
Binary files /dev/null and b/current/help/images/text2.jpg differ
diff --git a/current/help/images/toolbar.jpg b/current/help/images/toolbar.jpg
new file mode 100644
index 0000000..84e1769
Binary files /dev/null and b/current/help/images/toolbar.jpg differ
diff --git a/current/help/images/triangle.jpg b/current/help/images/triangle.jpg
new file mode 100644
index 0000000..747faf9
Binary files /dev/null and b/current/help/images/triangle.jpg differ
diff --git a/current/help/import.html b/current/help/import.html
new file mode 100644
index 0000000..2aaec50
--- /dev/null
+++ b/current/help/import.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> <tr>
+<td><a class="SubMenu1" href="graphFeat.html">Graphicals
+Features</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td></tr>
+<tr> <td><span class="SubMenu1Current">Insert/import</span></td> </tr> 
+<tr> <td><a class="SubMenu1" href="drawProp.html">Drawing properties</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="template.html">Template</a></td>
+</tr> <tr> <td><a class="SubMenu1" href="check.html">Check Version</a></td> </tr>
+<tr> <td><a class="MenuLink" href="start.html">How
+to start</a></td> </tr> </tbody> </table>
+</td> <td valign="top"> <table> <tbody>
+
+<tr> <td>  <h1>Import/Insert</h1> <br><br>
+
+<h4>Import</h4><br>
+LaTeXDraw can import a PSTricks file : PSTricks commands are translated in figures in a drawing.<br>
+To insert a PSTricks drawing, the PSTricks code must be tagged by :<br><br>
+\begin{pspicture}(..)(..)<br>
+..<br>
+\end{pspicture}<br><br>
+
+If there is no pspicture tag, the code will not be imported.<br>
+<br>
+This is the first release of the PSTricks parser, so only a few commands are managed :
+psframe, psellipse, psarc, pswedge, pscircle, psdot, psdots, psgrid, rput, degrees, radians, psline, 
+pspolygon, psbezier, psdoamond, pstriangle and several latex commands.<br>
+<br>
+<b>Important PSTricks commands like uput, specialCoor, ... are yet not managed.</b>
+<br><br>
+<b>When you want to parse a text or a framed box, it must be boxed by the command rput;</b> for instance:
+<br>\psframebox{coucou} mus be inserted as rput(0,0){\psframebox{coucou}}<br>
+Because a text or a framed box has not coordinate and when you insert a text without rput, the drawing is badly
+drawn. So you must use the command rput which define a coordinate for these shapes.
+
+
+
+<br><br><br>
+<h4>Insert a picture</h4><br>
+To insert a picture in a drawing, select the picture with the "Insert->Picture" frame.<br><br>
+<img alt="line" title="line" src="./images/insertP.jpg"><br> 
+A picture can be rotated.<br>
+An eps picture cannot be import but pstricks works only with eps files; so, when you include a jpeg picture, 
+an eps picture is created in order to make the pstricks compilable.<br>
+When you load a latexdraw file with a picture inside, the path of the jpeg, bmp, ... picture is used to load
+the picture NOT THE PATH OF THE EPS PICTURE.
+<br>
+<br>
+<br>
+<br>
+<h4>Insert PSTricks code</h4><br>
+Instead of import PSTricks code, you can insert PSTricks code in a drawing : no new drawing is created, the
+PSTricks figures are included in the current drawing.
+<br>
+<br>
+<img alt="line" title="line" src="./images/insertC.jpg"><br> 
+<br><br><br><br><br>
+</td> </tr> </tbody> </table> <br> <hr>
+<table class="footer" cellpadding="2" cellspacing="3">
+<tbody> <tr> <td align="left"><small>Copyright(c)
+2005-2006 - Arnaud BLOUIN - last changes : April 25 2006</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
+
+
+
diff --git a/current/help/index.html b/current/help/index.html
new file mode 100644
index 0000000..2ff637e
--- /dev/null
+++ b/current/help/index.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<title>The LaTeXDraw Project Manual</title></head>
+
+<body>
+<table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr><td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+
+<tr> <td>
+<span class="MenuCurrent">LaTeXDraw Manual
+</span></td> </tr> 
+<tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> 
+<tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+</tr> 
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+<tr> <td><a class="MenuLink" href="start.html">How to start</a></td> </tr>
+</tbody> 
+	</table> </td> <td valign="top"><table>
+<tbody> <tr> <td> <h1>The
+LaTeXDraw Project Manual</h1> <br> <br> 
+<b>LaTeXDraw</b> is a free PSTricks code generator or PSTricks editor for LateX distributed
+under the <b>GNU GPL</b>. LaTeXDraw is developped in java,
+so it's independent of the OS. It's available in English and in French.<br>
+<br> 
+You can make a <b>donation</b> to the LaTeXDraw project here: <br>
+http://sourceforge.net/donate/index.php?group_id=156523 if you want to
+support its development. For each donation, 5% is given to the
+sourceforge.net project in order to support the hosting of the
+LaTeXDraw project.<br><br>
+For any suggestion, mistake in the orthograph, you can send a mail to
+the LaTeXDraw Project Developper: <br> arno_b 'at'
+users.sourceforge.net<br> <br> <br> <br>
+<br> <br> <br> <br> <br> <br> </td></tr>
+</tbody> </table> <br> <hr> <table class="footer" cellpadding="2" cellspacing="3">
+<tbody> <tr> <td align="left"><small>Copyright(c)
+2005-2007 - Arnaud BLOUIN - last changes : September 11 2006</small></td>
+</tr> <tr> <td align="left"><small>The
+LaTeXDraw Projet, a PSTricks generator or PSTricks editor for LaTeX</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody></table></body></html>
\ No newline at end of file
diff --git a/current/help/license.html b/current/help/license.html
new file mode 100644
index 0000000..71e0863
--- /dev/null
+++ b/current/help/license.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><span class="MenuCurrent">License</span></td>
+</tr> <tr> <td><a class="MenuLink" href="features.html">Features</a></td> </tr>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+<tr> <td><a class="MenuLink" href="start.html">How
+to start</a></td> </tr> </tbody> </table>
+</td> <td valign="top"> <table> <tbody>
+<tr> <td> <h1>License</h1> <br> <br>
+The LaTeXDraw project is
+distributed under the GNU GPL. To learn more informations about this
+license, you can read the file <span style="font-style: italic;">license.txt</span>
+in the root of the LaTeXDraw project folder.<br> <br>
+<br> <br><br><br><br><br><br><br><br><br><br><br><br><br>
+</td> </tr> </tbody> </table> <br> <hr>
+<table class="footer" cellpadding="2" cellspacing="3">
+<tbody> <tr> <td align="left"><small>Copyright(c)
+2005-2006 - Arnaud BLOUIN - last changes : February 25 2006</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
\ No newline at end of file
diff --git a/current/help/shapes.html b/current/help/shapes.html
new file mode 100644
index 0000000..52425b1
--- /dev/null
+++ b/current/help/shapes.html
@@ -0,0 +1,336 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><span class="SubMenu1Current">Shapes</span></td>
+</tr> <tr> <td><a class="SubMenu1" href="graphFeat.html">Graphicals Features</a></td>
+</tr> <tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td> </tr>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="drawProp.html">Drawing
+properties</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="template.html">Template</a></td>
+</tr> <tr> <td><a class="SubMenu1" href="check.html">Check Version</a></td> </tr>
+<tr> <td><a class="MenuLink" href="start.html">How
+to start</a></td> </tr> </tbody> </table>
+</td> <td valign="top"> <table> <tbody>
+<tr> <td> <h1>Shapes</h1> <br><br>
+<h2>The Shapes</h2>
+<ul> <li><a href="#Rectangle">Rectangle
+& Square</a></li> <li><a href="#Line">Line</a></li>
+<li><a href="#Ellipse">Ellipse & Circle</a></li>
+<li><a href="#Bezier">Bézier curve</a></li>
+<li><a href="#Polygon">Polygon</a></li> 
+<li><a href="#Triangle">Triangle & Rhombus</a></li>
+<li><a href="#Grid">Grid</a></li> 
+<li><a href="#Arc">Arc</a></li> 
+<li><a href="#Point">Point</a></li> <li><a href="#Akin">Free hand</a></li> 
+<li><a href="#Text">Text</a></li>
+<li><a href="#JoinedLines">Joined Lines</a></li>
+<li><a href="#Axes">Axes</a></li>
+</ul><br>
+<br><h2>The Parameters of the Shapes</h2>
+<br>You can modify a shape by using the parameters frame that you
+can display by double clicking on the shape or by clicking on this
+button :<img alt="paramsIcon" title="paramsIcon" src="./images/Palette.gif">.
+<br><br>Then, the following frame must be displayed :
+<br><br><br><img alt="paramsFrame" title="paramsFrame" src="./images/paramsFrame.jpg">
+<br><br><br>You can also modify a figure with the
+toolbar of LaTeXDraw :
+<br><br><br><img alt="toolbar" title="toolbar" src="./images/toolbar.jpg">
+<br><br><br>You can especially modify :
+<br><ul> 
+<li><a href="#PositionBorder">The position of the borders</a></li> 
+<li><a href="#Colors">The colors</a></li> 
+<li><a href="#Filled">Filled/hatched</a></li> 
+<li><a href="#Arrows">The Arrows</a></li> <li><a href="#Thickness">The thickness</a></li> 
+<li><a href="#KindBorders">The kind of the borders</a></li>
+<li><a href="#DbleBorders">The double borders</a></li>
+<li><a href="#Shadow">Shadow</a></li>
+<li><a href="#Shifting">Colours shifting</a></li>
+</ul><br><br><br><br>
+<a name="Rectangle"> <h2>Rectangle & Square</h2>
+</a>
+<img alt="rectangle" title="rectangle" src="./images/rectangle.jpg"><br><br>To create a
+rectangle or a square use these button : <img alt="rectButton" title="rectButton" src="./images/rectangleMenu.jpg">.
+Press the left button and drag the mouse to enlarge the rectangle.
+<br><br><ul>
+<li>You can create a <b>round</b> rectangle/square
+by selecting the checkbox "is Round ?" in the parameters frame.</li>
+<li>You can <a href="#PositionBorder">change the
+position of the borders</a> of the rectangle/square and <a href="#DbleBorders">create doubles borders</a>.</li>
+<li>A rectangle/square can be <a href="#Filled">filled
+and hatched</a>.</li>
+<li>Like most of the shapes, you can change the <a href="#Thickness">thickness</a>, the <a href="#Colors">colors</a>, as well as the <a href="#kindBorders">kind of the borders.</a></li>
+</ul>
+<br><br><a name="Line"> <h2>Line</h2>
+</a>
+<img alt="line" title="line" src="./images/line.jpg"><br><br>To
+create a line, press the left button and drag the mouse to enlarge the
+line.
+<br><br><ul>
+<li>You can add <a href="#Arrows">arrows</a>
+to a line.</li>
+<li>You can convert the line into <a href="#DbleBorders">doubles
+lines</a>.</li>
+<li>Like most of the shapes, you can change the <a href="#Thickness">thickness</a>, the <a href="#Colors">color</a>, as well as the <a href="#kindBorders">kind of the line.</a></li>
+</ul>
+<br><br><a name="Ellipse"> <h2>Ellipse
+& Circle</h2>
+</a>
+<img alt="ellipse" title="ellipse" src="./images/ellipse.jpg"><br><br>To create an
+ellipse/circle, press the left button and drag the mouse to enlarge the
+shape.
+<br><br><ul>
+<li>You can <a href="#PositionBorder">change the
+position of the borders</a> of the ellipse/circle and <a href="#DbleBorders">create doubles borders</a>.</li>
+<li>A ellipse/circle can be <a href="#Filled">filled
+and hatched</a>.</li>
+<li>Like most of the shapes, you can change the <a href="#Thickness">thickness</a>, the <a href="#Colors">colors</a>, as well as the <a href="#kindBorders">kind of the borders.</a></li>
+</ul>
+
+
+
+<br><br><a name="Bezier"> <h2>Bézier
+Curve</h2>
+</a>
+<img alt="Bézier curve" title="Bézier curve" src="./images/bezier.jpg"><br><br>To draw a
+Bézier Curve, a left click creates a point and a double left click or a right click stops the creation.
+<br><br>You can move the points of references by selecting
+the figure and move the delimitors.
+<br><br>You can <b>equilibrate</b> a B�zier curve with the button "equilibrate" in its parameters frame; all control points are recomputed in order to form a round shape. The "distance" field define the distance of the control points when they are equilibrate.
+<br><br>
+A B�zier can be <b>closed</b> or <b>open</b>; when closed, a curve or a line joins the two extremities of the curve.
+
+
+
+
+<a name="Polygon"> <h2>Polygon</h2>
+</a>
+<img alt="polygon" title="polygon" src="./images/polygon.jpg"><br><br>To create an
+polygon, click with the rigth button and drag the mouse then click to
+create an other point, etc.
+<br><br><ul>
+<li>A polygon can be <a href="#Filled">filled and
+hatched</a>;</li>
+<li>it can have <a href="#DbleBorders">double borders</a>;
+<li>Like most of the shapes, you can change the <a href="#Thickness">thickness</a>, the <a href="#Colors">colors</a>, as well as the <a href="#kindBorders">kind of the borders.</a></li>
+</ul>
+
+
+
+<br><br><a name="Triangle"> <h2>Triangle
+& Rhombus</h2>
+</a>
+<img alt="triangle" title="triangle" src="./images/triangle.jpg"><br><br>To create a
+triangle/Rhombus, press the left button and drag the mouse to enlarge
+the shape.
+<br><br><ul>
+<li>You can <a href="#PositionBorder">change the
+position of the borders</a> of the triangle/Rhombus and <a href="#DbleBorders">create doubles borders</a>.</li>
+<li>A triangle/Rhombus can be <a href="#Filled">filled
+and hatched</a>.</li>
+<li>Like most of the shapes, you can change the <a href="#Thickness">thickness</a>, the <a href="#Colors">colors</a>, as well as the <a href="#kindBorders">kind of the borders.</a></li>
+</ul>
+<br><br><a name="Grid"> <h2>Grid</h2>
+</a>
+<img alt="grid" title="grid" src="./images/grid.jpg"><br><br>To
+create a grid, do a right click in the draw panel; a frame of the
+parameters of the grid must appeared. A grid has a lots of parameters
+that you can change in this frame.
+<br><br>A grid can not be resized with its delimitors, but
+you can change the parameters "unit" to enlarge each box of the grid.
+<br><br>
+<a name="Arc"> <h2>Arc</h2>
+</a>
+<img alt="arc" title="arc" src="./images/arc.jpg"><br><br>To
+create an arc, press the left button and drag the mouse to enlarge the
+shape.
+<br><br>There is three kind of arcs :
+<ul><li>Arc, which can have <a href="#Arrows">arrows</a></li>
+<li>Chord</li>
+<li>Wedge</li>
+<br>
+<li>All kind of arcs can be <a href="#Filled">filled
+and hatched</a>.</li>
+<li>Like most of the shapes, you can change the <a href="#Thickness">thickness</a>, the <a href="#Colors">colors</a>, as well as the <a href="#kindBorders">kind of the borders.</a></li>
+</ul>
+<br><br><a name="Point"> <h2>Point</h2>
+</a>
+<img alt="point" title="point" src="./images/point.jpg"><br><br>To
+create a point, do a right click in the draw panel. It exists a lots of
+kind of point (crossed dot, square, bar, ...) that you can change in
+the list "dot style".
+<br><br><ul>
+<li>Some kind of points can be <a href="#Filled">filled</a>
+like pentagon.
+</li><li>Like most of the shapes, you can change the <a href="#Thickness">size</a> and the <a href="#Colors">colors</a>.</li>
+</ul>
+<br><br><a name="Akin"> <h2>Free hand</h2>
+</a>
+<img alt="Free hand" title="Free hand" src="./images/akinPoints.jpg"><br><br>To use free hand, press the left button and drag the mouse to create points.
+<br><br>
+Shape, created with free hand, can be either a <b>curve</b> or <b>joined-lines</b>; you can change that in the frame of parameters.<br>
+Only few points are drawn compare to the number of created points; you can define the interval between each points with the field "interval".<br>
+It can be closed or open; when closed a line joins the two extremities.
+
+
+
+
+</a><a name="Text"> <h2>Text</h2>
+</a>
+<img alt="text" title="text" src="./images/text.jpg"><br><br>To
+create a text, do a right click in the draw panel; a frame of the
+parameters of the text must appeared. You can enter the text in the
+field. The text can be bold, in italic and can use severals fonts and
+size.
+<br><br>A text can not be resized with its delimitors.
+<br>A text can be opaque and you can define the colour of the opacity.<br><br>
+<b>A text can be boxed by one or several boxes</b>; a box can be a rectangle, an oval, an circle,
+an diamond or a triangle.<br><br>
+<img alt="FramedBox" title="FramedBox" src="./images/framedBox.jpg"><br>
+The <b>frameSep</b> parameter define the separation between the figure and the box.<br>
+<b>A box can be edited</b>	 like every shape with the button "edit".<br>
+The <b>boxSep</b> parameter is used for several boxes; it define if the size of the current box must be considered
+during the definition of the position and the size of the boxes.<br>
+For several boxes: 
+<ul>
+<li>you can add a box by clicking on the button "add" and by selecting the part of the text you want to box.
+ If the message "Invalid box, ..." occurred, it means that the box can be created because the box you want to create
+overlap another box.</li>
+<li>you can remove or modify a the boxed text by selecting the box in the list; then
+you can delete or modify the selected box;</li>
+</ul>
+<img alt="text2" title="text" src="./images/text2.jpg">
+
+<br><br>
+
+
+
+<a name="JoinedLines"> <h2>Joined Lines</h2>
+</a>
+<img alt="joinedLines" title="joinedLines" src="./images/joinedLines.jpg"><br><br>
+
+To create joined lines, go to the polygon section.<br>
+<ul><li>Joined lines can have <a href="#Arrows">arrows</a></li>
+<li>They have the same properties of polygons</li>
+</ul>
+<br>
+
+
+
+
+<a name="Axes"> <h2>Axes</h2>
+</a>
+<img alt="Axes" title="Axes" src="./images/axes.jpg"><br><br>
+
+Axe is one of the most complex figure of LaTeXDraw; its parameters are fully explain is the PSTricks documentation
+you can found on the LaTeXDraw page.<br><br>
+All its features are no yet implemented; in LaTeXDraw 1.9, you will be able to customize the labels and to choose which
+package (definition of psaxes) you want to use (pst-plot or pstricks-add).
+<br>
+<br>
+
+
+
+
+<br><br>
+<a name="PositionBorder"> <h2>The position of the
+borders</h2>
+</a>
+You can change the position of the borders of some figures :
+<ul><li>outer</li>
+<li>middle</li>
+<li>inner</li>
+</ul>Like show in this picture :<br><br>
+<img alt="text" title="text" src="./images/borderPos.jpg"><br>
+<br><br><a name="Colors"> <h2>The colors</h2>
+</a>
+You can change the color of the borders, the interior of the figure,
+the hatching or of the double seperation with
+the parametres frame or with the toolbar :<br><br>
+<img alt="text" title="text" src="./images/toolbar.jpg"><br>
+<br><br><a name="Filled"> <h2>Filled/hatched</h2>
+</a>
+Some shapes can be filled or hatched, like rectangle, rhombus, ... To
+fill a shape, selected the checkbox "filled", the button to change the
+color of the interior of the shape must appeared.<br><br>
+To hatch a figure, select a kind of hatching in the list in the toolbar
+or in the parameters frame. LaTeXDraw do not manage to angle of the
+hatching so, by default, the angle is 0.
+<br><br><img alt="text" title="text" src="./images/toolbar.jpg"><br>
+<br><br>
+<a name="Arrows"> <h2>The Arrows</h2>
+</a>
+Lines ans arcs can have arrows ; there are a lots of kind of arrows
+listed is the field like shown in the following pictures :
+<br><br><img alt="text" title="text" src="./images/arrowToolbar.jpg"><br>
+<br><br>
+<a name="Thickness"> <h2>The thickness</h2>
+</a>
+You can change the thickness of a figure with the field "thickness :"
+of the toolbar or of the parameters frame. However, points do not have
+thickness but size which can be changed in the same field.
+<br><br>
+<a name="KindBorders"> <h2>The kind of the borders</h2>
+</a>
+There is 3 kind of borders :
+<ul><li>Full</li>
+<li>Dotted</li>
+<li>Dashed</li>
+</ul><br>
+Like show in the following picture :
+<br><br><img alt="text" title="text" src="./images/kindLines.jpg"><br>
+<br><br>
+<a name="DbleBorders"> <h2>The double borders</h2>
+</a>
+Some figures can have double borders like rectangle, circle, ... For
+that, select the checkbox "dle bound.". The double borders are, in
+general, <a href="#PositionBorder">movable</a>
+(inner, outer, middle).
+<br><br><img alt="text" title="text" src="./images/dbleBord.jpg"><br>
+<br>
+
+
+
+<a name="Shadow"> <h2>Shadow</h2>
+</a>
+Now, a shape can have a shadow; a shape is defined by:
+<ul>
+<li>its color;</li>
+<li>its size;</li>
+<li>its angle.</li>
+</ul>
+<img alt="Shadow" title="Shadow" src="./images/shadow.jpg">
+
+
+
+<a name="Shifting"> <h2>Colours shifting</h2>
+</a>
+Two colours can be used to fill a shape; the shifting is defined by:
+<ul>
+<li>its angle;</li>
+<li>its position.</li>
+</ul>
+
+<img alt="Shifting" title="Shifting" src="./images/shifting.jpg">
+<br> <br>
+
+
+
+ </td> </tr> </tbody> </table> <br>
+<hr> <table class="footer" cellpadding="2" cellspacing="3"> <tbody> <tr> <td align="left"><small>Copyright(c) 2005-2006 - Arnaud
+BLOUIN - last changes : September 11 2006</small></td> </tr>
+</tbody> </table> </td> </tr> </tbody>
+</table></body></html>
\ No newline at end of file
diff --git a/current/help/start.html b/current/help/start.html
new file mode 100644
index 0000000..6213859
--- /dev/null
+++ b/current/help/start.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="graphFeat.html">Graphicals Features</a></td>
+</tr> <tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td> </tr>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="drawProp.html">Drawing
+properties</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+<tr> <td><a class="SubMenu1" href="template.html">Template</a></td>
+<tr> <td><a class="SubMenu1" href="check.html">Check
+Version</a></td> </tr> 
+<tr> <td><span class="MenuCurrent">How to start</span></td> </tr>
+</tbody> </table> </td> <td valign="top">
+<table> <tbody> <tr> <td> <h1>How to
+start</h1> <br> <br>
+The following code allows to create a simple drawing :<br><br><br>
+\documentclass[a4paper,11pt]{article}<br><br>
+\usepackage[usenames,dvipsnames]{pstricks}<br>
+\usepackage{epsfig}<br>
+\begin{document}<br><br>
+\begin{pspicture}(0,-1.91)(6.3,1.91)<br>
+\psframe[linewidth=0.04](3.44,0.77)(0.92,-0.77)<br>
+\psframe[linewidth=0.04](4.24,1.07)(2.4,0.09)<br>
+\psline[linewidth=0.04cm](2.76,1.53)(4.06,-0.09)<br>
+\psline[linewidth=0.04cm](6.28,1.19)(0.02,-1.89)<br>
+\psline[linewidth=0.04cm](5.42,1.89)(5.28,-0.07)<br>
+\end{pspicture} <br><br>
+\end{document} <br> <br> If this code does not compile,
+install the pstricks package or reinstall your TeX distribution
+(TeXLive or MikTex). <br> <br> </td> </tr> </tbody>
+</table> <br> <hr> <table class="footer" cellpadding="2" cellspacing="3"> <tbody> <tr>
+<td align="left"><small>Copyright(c) 2005-2006 -
+Arnaud BLOUIN - last changes : April 25 2006</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
\ No newline at end of file
diff --git a/current/help/style.css b/current/help/style.css
new file mode 100644
index 0000000..eec2589
--- /dev/null
+++ b/current/help/style.css
@@ -0,0 +1,74 @@
+body 
+{ 
+  color: black; 
+  background-color: white; 
+  font-family: Verdana, Arial, Helvetica; 
+  font-size: 1em 
+}
+
+.right
+{
+   text-align:right;
+} 
+
+TH { font-size: 100% }
+TD { font-size: 100% }
+H1 { text-align: center; font-size: 140% ; font-family: Verdana, Arial, Helvetica;}
+H2 { text-align: center; font-size: 120% ; font-family: Verdana, Arial, Helvetica;}
+H4 { font-size: 100% ; font-family: Verdana, Arial, Helvetica;}
+
+a.SubMenu1 
+{ 
+  background: inherit;
+  font-family: inherit;
+  text-align: left; 
+  font-weight: bold; 
+  color: green; 
+  font-size: 80%;
+  text-decoration: none 
+}
+
+a.MenuLink 
+{ 
+  background: inherit;
+  font-family: inherit;
+  text-align: left; 
+  font-weight: bold; 
+  color: blue; 
+  text-decoration: none 
+}
+
+a:hover {
+  background: #ccc;
+  font-family: inherit;
+  color: red;
+}
+
+.MenuCurrent { text-align: left; font-weight: bold }
+
+.SubMenu1Current 
+{ 
+  text-align: left; 
+  font-weight: bold;
+  font-size: 80%;
+}
+
+TD.MenuColumn { background-color: #E0E0E0; width: 120px ; font-size: 100%}
+
+TD.Layout { background-color: white ; font-size: 100%}
+TH.Title { background-color: #B6C8F6 ; font-size: 100%}
+TD.Item { background-color: #E8E8E8 ; font-size: 100%}
+TD.SubItem { background-color: #FFFFFF ; font-size: 100%}
+
+span.date
+{
+display: none;
+}
+
+span.summary
+{
+display: none;
+}
+
+
+
diff --git a/current/help/sysReq.html b/current/help/sysReq.html
new file mode 100644
index 0000000..def071b
--- /dev/null
+++ b/current/help/sysReq.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The LaTeXDraw Project Manual</title> 
+</head>
+
+<body>
+<table border="0" cellpadding="23" cellspacing="23" width="100%"> 
+<tbody> 
+<tr>
+<td class="MenuColumn" valign="top"> 
+<table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> 
+<tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw Manual</a></td> </tr> 
+<tr><td><hr></td></tr>
+<tr> <td><span class="MenuCurrent">System<br>  requirements</span></td></tr> 
+<tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="MenuLink" href="start.html">How to start</a></td> </tr>
+</tbody> 
+</table> 
+</td> 
+<td valign="top">
+<table> 
+<tbody> 
+<tr> 
+<td> 
+<h1>System Requirements</h1> 
+<br> <br>
+To launch LaTeXDraw you need, at least, jre 1.5 and 50 Mo of RAM. To create templates, you must the
+rights to write in the folder where LaTeXDraw is installed.<br><br>
+On Ubuntu and Debian, you need to install a package of fonts to be able to change the font of a text; you can get this package in command line with: <b>apt-get install msttcorefonts</b><br>
+<br> <br> <br> <br> <br> <br> <br>
+<br> <br> <br> 
+</td> 
+</tr> 
+</tbody>
+</table> <br> <hr> <table class="footer" cellpadding="2" cellspacing="3"> <tbody> <tr>
+<td align="left"><small>Copyright(c) 2005-2007 - Arnaud BLOUIN - last changes : April 2nd 2007</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
diff --git a/current/help/template.html b/current/help/template.html
new file mode 100644
index 0000000..58f9bc9
--- /dev/null
+++ b/current/help/template.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>
+<meta http-equiv="CONTENT-TYPE" content="TEXT/HTML; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css">
+<meta name="Author" content="arnaud blouin"><title>The
+LaTeXDraw Project Manual</title> </head>
+
+<body><table border="0" cellpadding="23" cellspacing="23" width="100%"> <tbody> <tr>
+<td class="MenuColumn" valign="top"> <table style="z-index: 100; left: 30px; position: absolute; top: 121px;" border="0" cellpadding="2" cellspacing="0"> <tbody>
+<tr> <td><a class="MenuLink" href="index.html">LaTeXDraw
+Manual</a></td> </tr> <tr><td><hr></td></tr>
+<tr> <td><a class="MenuLink" href="sysReq.html">System<br>  requirements</a></td>
+</tr> <tr> <td><a class="MenuLink" href="license.html">License</a></td> </tr>
+<tr> <td><a class="MenuLink" href="features.html">Features</a></td>
+<tr> <td><a class="MenuLink" href="1.9.html">LaTeXDraw 1.9</a></td>
+</tr> 
+</tr> <tr> <td><a class="SubMenu1" href="shapes.html">Shapes</a></td> </tr> <tr>
+<td><a class="SubMenu1" href="graphFeat.html">Graphicals
+Features</a></td> </tr>
+ <tr> <td><a class="SubMenu1" href="export.html">Exportation</a></td>
+<tr> <td><a class="SubMenu1" href="import.html">Insert/import</a></td> </tr> 
+</tr> <tr> <td><a class="SubMenu1" href="drawProp.html">Drawing properties</a></td>
+<tr> <td><a class="SubMenu1" href="convert.html">Convert Pictures</a></td> </tr> 
+</tr> <tr> <td><span class="SubMenu1Current">Template</span></td>
+</tr> <tr> <td><a class="SubMenu1" href="check.html">Check Version</a></td> </tr>
+<tr> <td><a class="MenuLink" href="start.html">How
+to start</a></td> </tr> </tbody> </table>
+</td> <td valign="top"> <table> <tbody>
+<tr> <td> <h1>Template</h1> <br><br>
+With LaTeXDraw, you can
+create <b>templates</b> ; it is figures you have created
+and you want to save in order to insert them in a future drawing. For
+example, if you use a lot condensors in your drawings, you do not want
+to draw at each time the condensor ; so with LaTeXDraw you can create
+your condensor, save it in a template and then, insert it in your
+futures sketches.
+<br><br><br><br><br><br><br><br><br><br><br><br><br>
+</td> </tr> </tbody> </table> <br> <hr>
+<table class="footer" cellpadding="2" cellspacing="3">
+<tbody> <tr> <td align="left"><small>Copyright(c)
+2005-2006 - Arnaud BLOUIN - last changes : February 26 2006</small></td>
+</tr> </tbody> </table> </td> </tr> </tbody>
+</table></body></html>
\ No newline at end of file
diff --git a/current/install_debian_ubuntu b/current/install_debian_ubuntu
new file mode 100644
index 0000000..0ac3204
--- /dev/null
+++ b/current/install_debian_ubuntu
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+gksudo 'java -jar installer.jar'
diff --git a/current/install_vista.vbs b/current/install_vista.vbs
new file mode 100644
index 0000000..2f77b7d
--- /dev/null
+++ b/current/install_vista.vbs
@@ -0,0 +1,8 @@
+
+Set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objFile = objFSO.GetFile("installer.jar")
+Set objShell = CreateObject("Shell.Application")
+
+params = "-jar " & objFSO.GetAbsolutePathName(objFile) & " " & objFSO.GetAbsolutePathName(objFile)
+
+objShell.ShellExecute "javaw", params, "", "runas"
diff --git a/current/junit/test/TestAbstractPstricksParser.java b/current/junit/test/TestAbstractPstricksParser.java
new file mode 100644
index 0000000..d10f699
--- /dev/null
+++ b/current/junit/test/TestAbstractPstricksParser.java
@@ -0,0 +1,774 @@
+/*
+ * TestAbstractPstricksParser.java
+ */
+package junit.test;
+import java.awt.Color;
+import java.awt.geom.Point2D;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.pstricks.PSTricksParserActionsManager;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests to PSTricks parser.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 12/18/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestAbstractPstricksParser extends TestCase
+{
+	@Test
+	public void testGoToNextChar() throws Exception
+	{
+		int[] i = {0};
+		String str = "\n \t         \n \t .dsq";//$NON-NLS-1$
+		PSTricksParserActionsManager.goToNextChar(str, i);
+		assertEquals(str.charAt(i[0]), '.');
+	}
+	
+	
+	
+	@Test
+	public void testConvertCm() throws Exception
+	{
+		assertEquals(PSTricksParserActionsManager.convertInCm(10., "cm"),10.);//$NON-NLS-1$
+		assertEquals(PSTricksParserActionsManager.convertInCm(10., "in"),10.*PSTricksConstants.INCH_VAL_CM);//$NON-NLS-1$
+		assertEquals(PSTricksParserActionsManager.convertInCm(10., "pt"),10./PSTricksConstants.CM_VAL_PT);//$NON-NLS-1$
+		assertEquals(PSTricksParserActionsManager.convertInCm(10., "mm"),1.);//$NON-NLS-1$
+		assertEquals(PSTricksParserActionsManager.convertInCm(10., null),10.);
+		assertEquals(PSTricksParserActionsManager.convertInCm(10., ""),10.);//$NON-NLS-1$
+		try
+		{ 
+			PSTricksParserActionsManager.convertInCm(10., "sddsq"); //$NON-NLS-1$
+			fail("testConvertCm");//$NON-NLS-1$
+		}
+		catch(Exception e) { /**/}
+	}
+	
+	
+	@Test
+	public void testReadOneCoord() throws Exception
+	{
+		PSTricksParserActionsManager.readOneCoordinate("(1,2)", 0, 0, true);//$NON-NLS-1$
+		PSTricksParserActionsManager.readOneCoordinate("(1,)", 0, 0, true); //$NON-NLS-1$
+		PSTricksParserActionsManager.readOneCoordinate("(,2)", 0, 0, true); //$NON-NLS-1$
+		PSTricksParserActionsManager.readOneCoordinate("(,)", 0, 0, true); //$NON-NLS-1$
+		PSTricksParserActionsManager.readOneCoordinate("(\n	,	\n	2)", 0, 0, true);//$NON-NLS-1$
+		PSTricksParserActionsManager.readOneCoordinate("(-0.1,0.2)", 0, 0, true); //$NON-NLS-1$
+		Point2D.Double pt = PSTricksParserActionsManager.readOneCoordinate("(-0.1,0.2)", 0, 0, true);//$NON-NLS-1$
+		assertEquals(-0.1, pt.x);
+		assertEquals(0.2 , pt.y);
+		pt = PSTricksParserActionsManager.readOneCoordinate("(+1,)", 0, 0, true);//$NON-NLS-1$
+		assertEquals(1., pt.x);
+		assertEquals(Double.NaN, pt.y);
+	}
+	
+	
+	
+	@Test
+	public void testReadEqualInteger() throws Exception 
+	{
+		int id[] = {0};
+		assertEquals(PSTricksParserActionsManager.readEqualInteger(id, "=10"), 10);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readEqualInteger(id, "=+10"), 10);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readEqualInteger(id, "=+++++10"), 10);//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualInteger(id, "=10");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualInteger(id, "	=	\n	2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualInteger(id, "     = 	2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualInteger(id, "=20erzrfd");//$NON-NLS-1$
+		try 
+		{ 
+			int id2[] = {-1};
+			PSTricksParserActionsManager.readEqualInteger(id2, "=10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		try 
+		{ 
+			int id2[] = {3};
+			PSTricksParserActionsManager.readEqualInteger(id2, "=10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualInteger(id, "10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualInteger(id, "==10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualInteger(id, "==-10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualInteger(id, "=--10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualInteger(id, "=-1-0");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualInteger(id, "= ");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualInteger(id, null);
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualInteger(id, "");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualInteger(id, "= ezrezr");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+	}
+	
+	
+	
+	@Test
+	public void testReadEqualReal() throws Exception
+	{
+		int id[] = {0};
+		assertEquals(PSTricksParserActionsManager.readEqualReal(id, "=++-+--+-10"), 10.);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readEqualReal(id, "=10"), 10.);//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualReal(id, "=10");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualReal(id, "=0.2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualReal(id, "=.2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualReal(id, "	=	\n	0.2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualReal(id, "     = 	.2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualReal(id, "=-.2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualReal(id, "=-2");//$NON-NLS-1$
+	
+		try 
+		{ 
+			int id2[] = {-1};
+			PSTricksParserActionsManager.readEqualReal(id2, "=10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		try 
+		{ 
+			int id2[] = {3};
+			PSTricksParserActionsManager.readEqualReal(id2, "=10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualReal(id, "10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualReal(id, "==10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualReal(id, "==-10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualReal(id, "=-1-0");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualReal(id, "=..10");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualReal(id, "=.1.0");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualReal(id, "= ");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualReal(id, null);
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualReal(id, "");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+	}
+	
+	@Test
+	public void testReadEqualRealUnit() throws Exception
+	{
+		int id[] = {0};
+		assertEquals(PSTricksParserActionsManager.readEqualRealUnit(id, "=10"), 10.);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readEqualRealUnit(id, "=10cm"), 10.);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readEqualRealUnit(id, "=10mm"), 1.);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readEqualRealUnit(id, "=10 pt"), 10./PSTricksConstants.CM_VAL_PT);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readEqualRealUnit(id, "=10in"), 10.*PSTricksConstants.INCH_VAL_CM);//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=10 pt");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=10 cm");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=10 mm");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=10 in");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=0.2 pt");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=.2 pt");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "	=		0.2\n pt");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "     = 	.2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=.2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=-.2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=-2");//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readEqualRealUnit(id, "=4");//$NON-NLS-1$
+	
+		try 
+		{ 
+			int id2[] = {-1};
+			PSTricksParserActionsManager.readEqualRealUnit(id2, "=10 pt");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		try 
+		{ 
+			int id2[] = {3};
+			PSTricksParserActionsManager.readEqualRealUnit(id2, "=10 pt");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, "10 pt");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, "==10 pt");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, "==-10 pt");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, "=-1-0 pt");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, "=..10 pt");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+	
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, "=.1.0 pt");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, "= cm ");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, "==10 dsd");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, null);
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readEqualRealUnit(id, "");//$NON-NLS-1$
+			fail("testReadEqualRealUnit");//$NON-NLS-1$
+		}catch(Exception e) { /* */}
+	}
+
+	
+	
+	@Test
+	public void testReadRealUnit() throws Exception
+	{
+		int id[] = {0};
+		assertEquals(PSTricksParserActionsManager.readRealUnit(id, ".5", true), .5);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readRealUnit(id, "10", true), 10.);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readRealUnit(id, "10cm", true), 10.);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readRealUnit(id, "10mm", false), 1.);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readRealUnit(id, "10 pt", true), 10./PSTricksConstants.CM_VAL_PT);//$NON-NLS-1$
+		id[0] = 0;
+		assertEquals(PSTricksParserActionsManager.readRealUnit(id, "10in", true), 10.*PSTricksConstants.INCH_VAL_CM);//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "10 pt", true);//$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "10 cm", false); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "10 mm", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "=0 in", false); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "0.2 pt", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, ".2 pt", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "		0.2\n pt", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "     	.2", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, ".2", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "-.2", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "-2", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "4", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "++--+++---+4", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "+++4", true); //$NON-NLS-1$
+		id[0] = 0;
+		PSTricksParserActionsManager.readRealUnit(id, "---4", true); //$NON-NLS-1$
+	
+		try 
+		{ 
+			int id2[] = {-1};
+			PSTricksParserActionsManager.readRealUnit(id2, "10 pt", true); //$NON-NLS-1$
+			fail("testReadEqualRealUnit"); //$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		try 
+		{ 
+			int id2[] = {3};
+			PSTricksParserActionsManager.readRealUnit(id2, "10 pt", true); //$NON-NLS-1$
+			fail("testReadEqualRealUnit"); //$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readRealUnit(id, "-1-0 pt", true); //$NON-NLS-1$
+			fail("testReadEqualRealUnit"); //$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readRealUnit(id, "..10 pt", true); //$NON-NLS-1$
+			fail("testReadEqualRealUnit"); //$NON-NLS-1$
+		}catch(Exception e) { /* */}
+	
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readRealUnit(id, ".1.0 pt", true); //$NON-NLS-1$
+			fail("testReadEqualRealUnit"); //$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readRealUnit(id, " cm ", true); //$NON-NLS-1$
+			fail("testReadEqualRealUnit"); //$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readRealUnit(id, null, true);
+			fail("testReadEqualRealUnit"); //$NON-NLS-1$
+		}catch(Exception e) { /* */}
+		
+		id[0] = 0;
+		try 
+		{ 
+			PSTricksParserActionsManager.readRealUnit(id, "", true); //$NON-NLS-1$
+			fail("testReadEqualRealUnit"); //$NON-NLS-1$
+		}catch(Exception e) { /* */}
+	}
+	
+	
+	
+	
+	@Test
+	public void testParseNewrgbcolorParameters()
+	{
+		try
+		{
+			PSTricksParserActionsManager.parseNewrgbcolorParameters(null);
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewrgbcolorParameters(" ");
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewrgbcolorParameters("newrgbcolor{name}{1 1 1}");
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewrgbcolorParameters("{rgbColourTest}{1 1 0}");
+			assertEquals(DviPsColors.getColour("rgbColourTest"), new Color(255, 255, 0));
+		}
+		catch(Exception e) { fail(); }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewrgbcolorParameters("{  \nrgbColourTest\n }\n  { 1 \n \t 1 \n0 \n  }");
+			assertEquals(DviPsColors.getColour("rgbColourTest"), new Color(255, 255, 0));
+		}
+		catch(Exception e) { fail(); }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewrgbcolorParameters("{rgbColourTest}{0.5, 0.5, 0.5}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewrgbcolorParameters("{test rgbColourTest}{0.5 0.5 0.5}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewrgbcolorParameters("{0.1234}{0.5 0.5 0.5}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+	}
+	
+	
+	
+	
+	
+	@Test
+	public void testParseNewcmykcolorParameters()
+	{
+		try
+		{
+			PSTricksParserActionsManager.parseNewcmykcolorParameters(null);
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewcmykcolorParameters(" ");
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewcmykcolorParameters("newcmykcolor{name}{1 1 1 1}");
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewcmykcolorParameters("{cmykColourTest}{0.5 0.1 0.3 0.6}");
+			assertEquals(DviPsColors.getColour("cmykColourTest"), new Color(51, 92, 71));
+		}
+		catch(Exception e) { fail(); }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewcmykcolorParameters("{  \ncmykColourTest\n }\n  { 0.5 \n \t 0.1 \n0.3 \n  0.6}");
+			assertEquals(DviPsColors.getColour("cmykColourTest"), new Color(51, 92, 71));
+		}
+		catch(Exception e) { fail(); }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewcmykcolorParameters("{cmykColourTest}{0.5, 0.5, 0.5cm 1t}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewcmykcolorParameters("{test cmykColourTest}{0.5 0.5 0.5 1}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewcmykcolorParameters("{0.1234}{0.5 0.5 0.5 1}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+	}
+	
+	
+	
+	
+	@Test
+	public void testParseNewhsbcolorParameters()
+	{
+		try
+		{
+			PSTricksParserActionsManager.parseNewhsbcolorParameters(null);
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewhsbcolorParameters(" ");
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewhsbcolorParameters("newhsbcolor{name}{1 1 1}");
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewhsbcolorParameters("{hsbColourTest}{1 1 0}");
+			assertEquals(DviPsColors.getColour("hsbColourTest"), Color.getHSBColor(1, 1, 0));
+		}
+		catch(Exception e) { fail(); }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewhsbcolorParameters("{  \nhsbColourTest\n }\n  { 1 \n \t 1 \n0 \n  }");
+			assertEquals(DviPsColors.getColour("hsbColourTest"), Color.getHSBColor(1, 1, 0));
+		}
+		catch(Exception e) { fail(); }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewhsbcolorParameters("{hsbColourTest}{0.5, 0.5, 0.5}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewhsbcolorParameters("{test hsbColourTest}{0.5 0.5 0.5}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewhsbcolorParameters("{0.1234}{0.5 0.5 0.5}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+	}
+	
+	
+	
+	
+	@Test
+	public void testParseNewgrayParameters()
+	{
+		try
+		{
+			PSTricksParserActionsManager.parseNewgrayParameters(null);
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewgrayParameters(" ");
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewgrayParameters("newgray{name}{1 1 1}");
+			fail();
+		}
+		catch(Exception e) { /* Good */ }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewgrayParameters("{grayColourTest}{0.5}");
+			assertEquals(DviPsColors.getColour("grayColourTest"), new Color(128, 128, 128));
+		}
+		catch(Exception e) { fail(); }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewgrayParameters("{  \ngrayColourTest\n }\n  { \t \n 0.5 \r}");
+			assertEquals(DviPsColors.getColour("grayColourTest"), new Color(128, 128, 128));
+		}
+		catch(Exception e) { fail(); }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewgrayParameters("{grayColourTest}{0.5cm}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewgrayParameters("{test grayColourTest}{0.5}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+		
+		try
+		{
+			PSTricksParserActionsManager.parseNewgrayParameters("{0.1234}{0.5}");
+			fail();
+		}
+		catch(Exception e) { /* Good */  }
+	}
+	
+	
+	
+	@Test
+	public void testIsCharToIgnore()
+	{
+		assertTrue(PSTricksParserActionsManager.isCharToIgnore(' '));
+		assertTrue(PSTricksParserActionsManager.isCharToIgnore('\t'));
+		assertTrue(PSTricksParserActionsManager.isCharToIgnore('\n'));
+		assertTrue(PSTricksParserActionsManager.isCharToIgnore('\r'));
+		assertFalse(PSTricksParserActionsManager.isCharToIgnore('1'));
+		assertFalse(PSTricksParserActionsManager.isCharToIgnore('a'));
+		assertFalse(PSTricksParserActionsManager.isCharToIgnore('&'));
+		assertFalse(PSTricksParserActionsManager.isCharToIgnore('M'));
+	}
+}
+
+
+
+
+
diff --git a/current/junit/test/TestButtonIcon.java b/current/junit/test/TestButtonIcon.java
new file mode 100644
index 0000000..bfaf0f0
--- /dev/null
+++ b/current/junit/test/TestButtonIcon.java
@@ -0,0 +1,108 @@
+/*
+ * TestButtonIcon.java
+ */
+
+package junit.test;
+
+import java.awt.Color;
+
+import javax.swing.JButton;
+
+import junit.framework.TestCase;
+import latexDraw.ui.components.ButtonIcon;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/** 
+ * This class contains tests the methods on the class <code>ButtonIcon</code>.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 02/14/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestButtonIcon extends TestCase
+{
+	private ButtonIcon	bi;
+
+	private final Color	cNull	= null;
+
+	private final Color	c1		= new Color(100, 100, 100);
+
+	private final Color	c2		= new Color(50, 50, 50);
+
+
+
+
+
+	@Override
+	@Before
+	public void setUp()
+	{
+		bi = new ButtonIcon(c1);
+	}
+	
+	
+	
+	@Test
+	public void testConstructor()
+	{
+		try
+		{
+			new ButtonIcon(cNull);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good */ }
+	}
+	
+	
+	
+	@Test
+	public void testPaintIcon()
+	{
+		JButton b = new JButton();
+		
+		b.setIcon(bi);
+		b.repaint();
+	}
+	
+	
+	
+	@Test
+	public void testGetSetColor()
+	{
+		try
+		{
+			bi.setColor(cNull);
+			fail();
+		}catch(Exception e) { /* Good */ }
+
+		bi.setColor(c2);
+		assertEquals(c2, bi.getColor());
+	}
+
+	
+	
+	@Test
+	public void testGetIconWidthHeight()
+	{
+		assertEquals(bi.getIconWidth(), ButtonIcon.WIDTH);
+		assertEquals(bi.getIconHeight(), ButtonIcon.HEIGHT);
+	}
+}
+
+	
+	
+
diff --git a/current/junit/test/TestCloseButton.java b/current/junit/test/TestCloseButton.java
new file mode 100644
index 0000000..240aea8
--- /dev/null
+++ b/current/junit/test/TestCloseButton.java
@@ -0,0 +1,78 @@
+/*
+ * TestCloseButton.java
+ */
+
+package junit.test;
+
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.JPanel;
+
+import junit.framework.TestCase;
+import latexDraw.ui.components.CloseButton;
+
+import org.junit.Before;
+import org.junit.Test;
+
+
+
+/** 
+ * This class contains tests on the class CloseButton.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 06/26/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestCloseButton extends TestCase
+{
+
+	private CloseButton		cb;
+
+	private final JPanel	panel	= new JPanel();
+
+
+
+
+	@Override
+	@Before
+	public void setUp()
+	{
+		cb = new CloseButton(panel);
+	}
+	
+
+	@Test
+	public void testConstructor()
+	{
+		new CloseButton(null);
+	}
+
+
+
+
+
+	@Test
+	public void testActionPerformed()
+	{
+		ActionEvent e = new ActionEvent(cb, 0, "");
+		cb.actionPerformed(e);
+		System.out.println(panel.isVisible());
+		assertFalse(panel.isVisible());
+	}
+
+}
diff --git a/current/junit/test/TestColorButton.java b/current/junit/test/TestColorButton.java
new file mode 100644
index 0000000..f04c1ec
--- /dev/null
+++ b/current/junit/test/TestColorButton.java
@@ -0,0 +1,70 @@
+/*
+ * TestColorButton.java
+ */
+
+package junit.test;
+
+
+import java.awt.Color;
+
+import junit.framework.TestCase;
+import latexDraw.ui.components.ButtonIcon;
+import latexDraw.ui.components.ColorButton;
+
+import org.junit.Before;
+import org.junit.Test;
+
+
+
+/** 
+ * This class contains tests on the class ColorButton.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 06/26/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestColorButton extends TestCase
+{
+	private ColorButton	cb1;
+
+	private ColorButton	cb2;
+
+	private final Color	c		= new Color(100, 100, 100);
+
+
+	@Override
+	@Before
+	public void setUp()
+	{
+		ButtonIcon bi = new ButtonIcon(c);
+
+		cb1 = new ColorButton("coucou");
+		cb2 = new ColorButton(bi);
+		assertEquals(c, cb2.getColor());
+	}
+
+
+
+	@Test
+	public void testGetSetColor()
+	{
+		cb2.setColor(c);
+		assertEquals(c, cb2.getColor());
+		assertNull(cb1.getColor());
+	}
+
+}
diff --git a/current/junit/test/TestCopyPasteMenu.java b/current/junit/test/TestCopyPasteMenu.java
new file mode 100644
index 0000000..bbca9d5
--- /dev/null
+++ b/current/junit/test/TestCopyPasteMenu.java
@@ -0,0 +1,58 @@
+/*
+ * TestCopyPasteMenu.java
+ */
+
+package junit.test;
+
+
+import javax.swing.JEditorPane;
+
+import junit.framework.TestCase;
+import latexDraw.ui.components.CopyPasteMenu;
+
+import org.junit.Before;
+import org.junit.Test;
+
+
+
+/** 
+ * This class contains tests on the class CopyPasteMenu.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 06/26/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestCopyPasteMenu extends TestCase
+{
+
+	@Before
+	@Test
+	public void testConstructors()
+	{
+		JEditorPane	ep = new JEditorPane();
+		
+		try
+		{
+			new CopyPasteMenu(null);
+			fail();
+		}catch(IllegalArgumentException e)
+		{ /* Good */
+		}
+
+		new CopyPasteMenu(ep);
+	}
+
+}
diff --git a/current/junit/test/TestCssColor.java b/current/junit/test/TestCssColor.java
new file mode 100644
index 0000000..9ac35ee
--- /dev/null
+++ b/current/junit/test/TestCssColor.java
@@ -0,0 +1,379 @@
+/*
+ * TestCaseColor.java
+ */
+
+package junit.test;
+
+import java.awt.Color;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.CSSColors;
+
+import org.junit.Test;
+
+
+/** 
+ * This class contains tests on CSS colours class.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 06/25/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestCssColor extends TestCase
+{
+	@Test
+	public void testGetColour()
+	{
+		assertEquals(CSSColors.getColor(CSSColors.CSS_ALICEBLUE_NAME), CSSColors.CSS_ALICEBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_ANTIQUEWHITE_NAME), CSSColors.CSS_ANTIQUEWHITE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_AQUA_NAME), CSSColors.CSS_AQUA_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_AQUAMARINE_NAME), CSSColors.CSS_AQUAMARINE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_AZURE_NAME), CSSColors.CSS_AZURE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_BEIGE_NAME), CSSColors.CSS_BEIGE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_BISQUE_NAME), CSSColors.CSS_BISQUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_BLACK_NAME), CSSColors.CSS_BLACK_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_BLANCHEDALMOND_NAME), CSSColors.CSS_BLANCHEDALMOND_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_BLUE_NAME), CSSColors.CSS_BLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_BLUEVIOLET_NAME), CSSColors.CSS_BLUEVIOLET_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_BROWN_NAME), CSSColors.CSS_BROWN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_BURLYWOOD_NAME), CSSColors.CSS_BURLYWOOD_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_CADETBLUE_NAME), CSSColors.CSS_CADETBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_CHARTREUSE_NAME), CSSColors.CSS_CHARTREUSE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_CHOCOLATE_NAME), CSSColors.CSS_CHOCOLATE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_CORAL_NAME), CSSColors.CSS_CORAL_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_CORNFLOWERBLUE_NAME), CSSColors.CSS_CORNFLOWERBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_CORNSILK_NAME), CSSColors.CSS_CORNSILK_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_CRIMSON_NAME), CSSColors.CSS_CRIMSON_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_CYAN_NAME), CSSColors.CSS_CYAN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKBLUE_NAME), CSSColors.CSS_DARKBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKCYAN_NAME), CSSColors.CSS_DARKCYAN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKGOLDENROD_NAME), CSSColors.CSS_DARKGOLDENROD_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKGRAY_NAME), CSSColors.CSS_DARKGRAY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKGREEN_NAME), CSSColors.CSS_DARKGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKGREY_NAME), CSSColors.CSS_DARKGREY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKKHAKI_NAME), CSSColors.CSS_DARKKHAKI_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKMAGENTA_NAME), CSSColors.CSS_DARKMAGENTA_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKOLIVEGREEN_NAME), CSSColors.CSS_DARKOLIVEGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKORANGE_NAME), CSSColors.CSS_DARKORANGE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKORCHID_NAME), CSSColors.CSS_DARKORCHID_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKRED_NAME), CSSColors.CSS_DARKRED_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKSALMON_NAME), CSSColors.CSS_DARKSALMON_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKSEAGREEN_NAME), CSSColors.CSS_DARKSEAGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKSLATEBLUE_NAME), CSSColors.CSS_DARKSLATEBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKSLATEGRAY_NAME), CSSColors.CSS_DARKSLATEGRAY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKSLATEGREY_NAME), CSSColors.CSS_DARKSLATEGREY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKTURQUOISE_NAME), CSSColors.CSS_DARKTURQUOISE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DARKVIOLET_NAME), CSSColors.CSS_DARKVIOLET_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DEEPPINK_NAME), CSSColors.CSS_DEEPPINK_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DEEPSKYBLUE_NAME), CSSColors.CSS_DEEPSKYBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DIMGRAY_NAME), CSSColors.CSS_DIMGRAY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DIMGREY_NAME), CSSColors.CSS_DIMGREY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_DODGERBLUE_NAME), CSSColors.CSS_DODGERBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_FIREBRICK_NAME), CSSColors.CSS_FIREBRICK_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_FLORALWHITE_NAME), CSSColors.CSS_FLORALWHITE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_FORESTGREEN_NAME), CSSColors.CSS_FORESTGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_FUCHSIA_NAME), CSSColors.CSS_FUCHSIA_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_GAINSBORO_NAME), CSSColors.CSS_GAINSBORO_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_GHOSTWHITE_NAME), CSSColors.CSS_GHOSTWHITE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_GOLD_NAME), CSSColors.CSS_GOLD_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_GOLDENROD_NAME), CSSColors.CSS_GOLDENROD_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_GRAY_NAME), CSSColors.CSS_GRAY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_GREEN_NAME), CSSColors.CSS_GREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_GREENYELLOW_NAME), CSSColors.CSS_GREENYELLOW_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_GREY_NAME), CSSColors.CSS_GREY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_HONEYDEW_NAME), CSSColors.CSS_HONEYDEW_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_HOTPINK_NAME), CSSColors.CSS_HOTPINK_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_INDIGO_NAME), CSSColors.CSS_INDIGO_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_IVORY_NAME), CSSColors.CSS_IVORY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_INDIANRED_NAME), CSSColors.CSS_INDIANRED_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_KHAKI_NAME), CSSColors.CSS_KHAKI_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LAVENDER_NAME), CSSColors.CSS_LAVENDER_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LAVENDERBLUSH_NAME), CSSColors.CSS_LAVENDERBLUSH_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LAWNGREEN_NAME), CSSColors.CSS_LAWNGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LEMONCHIFFON_NAME), CSSColors.CSS_LEMONCHIFFON_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTBLUE_NAME), CSSColors.CSS_LIGHTBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTCORAL_NAME), CSSColors.CSS_LIGHTCORAL_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTCYAN_NAME), CSSColors.CSS_LIGHTCYAN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTGOLDENRODYELLOW_NAME), CSSColors.CSS_LIGHTGOLDENRODYELLOW_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTGRAY_NAME), CSSColors.CSS_LIGHTGRAY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTGREEN_NAME), CSSColors.CSS_LIGHTGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTGREY_NAME), CSSColors.CSS_LIGHTGREY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTPINK_NAME), CSSColors.CSS_LIGHTPINK_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTSALMON_NAME), CSSColors.CSS_LIGHTSALMON_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTSEAGREEN_NAME), CSSColors.CSS_LIGHTSEAGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTSKYBLUE_NAME), CSSColors.CSS_LIGHTSKYBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTSLATEGRAY_NAME), CSSColors.CSS_LIGHTSLATEGRAY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTSLATEGREY_NAME), CSSColors.CSS_LIGHTSLATEGREY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTSTEELBLUE_NAME), CSSColors.CSS_LIGHTSTEELBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIGHTYELLOW_NAME), CSSColors.CSS_LIGHTYELLOW_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIME_NAME), CSSColors.CSS_LIME_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_LIMEGREEN_NAME), CSSColors.CSS_LIMEGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MAGENTA_NAME), CSSColors.CSS_MAGENTA_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MAROON_NAME), CSSColors.CSS_MAROON_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MEDIUMAQUAMARINE_NAME), CSSColors.CSS_MEDIUMAQUAMARINE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MEDIUMBLUE_NAME), CSSColors.CSS_MEDIUMBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MEDIUMORCHID_NAME), CSSColors.CSS_MEDIUMORCHID_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MEDIUMPURPLE_NAME), CSSColors.CSS_MEDIUMPURPLE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MEDIUMSEAGREEN_NAME), CSSColors.CSS_MEDIUMSEAGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MEDIUMSLATEBLUE_NAME), CSSColors.CSS_MEDIUMSLATEBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MEDIUMSPRINGGREEN_NAME), CSSColors.CSS_MEDIUMSPRINGGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MEDIUMTURQUOISE_NAME), CSSColors.CSS_MEDIUMTURQUOISE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MEDIUMVIOLETRED_NAME), CSSColors.CSS_MEDIUMVIOLETRED_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MIDNIGHTBLUE_NAME), CSSColors.CSS_MIDNIGHTBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MINTCREAM_NAME), CSSColors.CSS_MINTCREAM_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MISTYROSE_NAME), CSSColors.CSS_MISTYROSE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_MOCCASIN_NAME), CSSColors.CSS_MOCCASIN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_NAVAJOWHITE_NAME), CSSColors.CSS_NAVAJOWHITE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_NAVY_NAME), CSSColors.CSS_NAVY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_OLDLACE_NAME), CSSColors.CSS_OLDLACE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_OLIVEDRAB_NAME), CSSColors.CSS_OLIVEDRAB_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_OLIVE_NAME), CSSColors.CSS_OLIVE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_ORANGERED_NAME), CSSColors.CSS_ORANGERED_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_ORANGE_NAME), CSSColors.CSS_ORANGE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_ORCHID_NAME), CSSColors.CSS_ORCHID_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PALEGOLDENROD_NAME), CSSColors.CSS_PALEGOLDENROD_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PALEGREEN_NAME), CSSColors.CSS_PALEGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PALETURQUOISE_NAME), CSSColors.CSS_PALETURQUOISE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PALEVIOLETRED_NAME), CSSColors.CSS_PALEVIOLETRED_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PAPAYAWHIP_NAME), CSSColors.CSS_PAPAYAWHIP_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PEACHPUFF_NAME), CSSColors.CSS_PEACHPUFF_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PERU_NAME), CSSColors.CSS_PERU_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PINK_NAME), CSSColors.CSS_PINK_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PLUM_NAME), CSSColors.CSS_PLUM_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_POWDERBLUE_NAME), CSSColors.CSS_POWDERBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_PURPLE_NAME), CSSColors.CSS_PURPLE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_RED_NAME), CSSColors.CSS_RED_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_ROSYBROWN_NAME), CSSColors.CSS_ROSYBROWN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_ROYALBLUE_NAME), CSSColors.CSS_ROYALBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SADDLEBROWN_NAME), CSSColors.CSS_SADDLEBROWN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SALMON_NAME), CSSColors.CSS_SALMON_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SANDYBROWN_NAME), CSSColors.CSS_SANDYBROWN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SEAGREEN_NAME), CSSColors.CSS_SEAGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SEASHELL_NAME), CSSColors.CSS_SEASHELL_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SIENNA_NAME), CSSColors.CSS_SIENNA_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SILVER_NAME), CSSColors.CSS_SILVER_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SKYBLUE_NAME), CSSColors.CSS_SKYBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SLATEBLUE_NAME), CSSColors.CSS_SLATEBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SLATEGRAY_NAME), CSSColors.CSS_SLATEGRAY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SLATEGREY_NAME), CSSColors.CSS_SLATEGREY_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SNOW_NAME), CSSColors.CSS_SNOW_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_SPRINGGREEN_NAME), CSSColors.CSS_SPRINGGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_STEELBLUE_NAME), CSSColors.CSS_STEELBLUE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_TAN_NAME), CSSColors.CSS_TAN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_TEAL_NAME), CSSColors.CSS_TEAL_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_THISTLE_NAME), CSSColors.CSS_THISTLE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_TOMATO_NAME), CSSColors.CSS_TOMATO_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_TURQUOISE_NAME), CSSColors.CSS_TURQUOISE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_VIOLET_NAME), CSSColors.CSS_VIOLET_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_WHEAT_NAME), CSSColors.CSS_WHEAT_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_WHITESMOKE_NAME), CSSColors.CSS_WHITESMOKE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_WHITE_NAME), CSSColors.CSS_WHITE_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_YELLOWGREEN_NAME), CSSColors.CSS_YELLOWGREEN_RGB_VALUE);
+		assertEquals(CSSColors.getColor(CSSColors.CSS_YELLOW_NAME), CSSColors.CSS_YELLOW_RGB_VALUE);
+
+		assertNull(CSSColors.getColor(null));
+		assertNull(CSSColors.getColor(""));
+		assertNull(CSSColors.getColor("fjdsfijsdofijdsofijertngf"));
+	}
+	
+	
+	@Test
+	public void testGetColorName()
+	{
+		assertNull(CSSColors.getColorName(null, true));
+		assertNull(CSSColors.getColorName(new Color(3, 2, 1), false));
+		assertNotNull(CSSColors.getColorName(new Color(4, 2, 1), true));
+
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_ALICEBLUE_RGB_VALUE, false), CSSColors.CSS_ALICEBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_ANTIQUEWHITE_RGB_VALUE, false), CSSColors.CSS_ANTIQUEWHITE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_AQUAMARINE_RGB_VALUE, false), CSSColors.CSS_AQUAMARINE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_AZURE_RGB_VALUE, false), CSSColors.CSS_AZURE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_BEIGE_RGB_VALUE, false), CSSColors.CSS_BEIGE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_BISQUE_RGB_VALUE, false), CSSColors.CSS_BISQUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_BLACK_RGB_VALUE, false), CSSColors.CSS_BLACK_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_BLANCHEDALMOND_RGB_VALUE, false), CSSColors.CSS_BLANCHEDALMOND_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_BLUE_RGB_VALUE, false), CSSColors.CSS_BLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_BLUEVIOLET_RGB_VALUE, false), CSSColors.CSS_BLUEVIOLET_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_BROWN_RGB_VALUE, false), CSSColors.CSS_BROWN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_BURLYWOOD_RGB_VALUE, false), CSSColors.CSS_BURLYWOOD_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_CADETBLUE_RGB_VALUE, false), CSSColors.CSS_CADETBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_CHARTREUSE_RGB_VALUE, false), CSSColors.CSS_CHARTREUSE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_CHOCOLATE_RGB_VALUE, false), CSSColors.CSS_CHOCOLATE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_CORAL_RGB_VALUE, false), CSSColors.CSS_CORAL_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_CORNFLOWERBLUE_RGB_VALUE, false), CSSColors.CSS_CORNFLOWERBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_CORNSILK_RGB_VALUE, false), CSSColors.CSS_CORNSILK_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_CRIMSON_RGB_VALUE, false), CSSColors.CSS_CRIMSON_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_CYAN_RGB_VALUE, false), CSSColors.CSS_CYAN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKBLUE_RGB_VALUE, false), CSSColors.CSS_DARKBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKCYAN_RGB_VALUE, false), CSSColors.CSS_DARKCYAN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKGOLDENROD_RGB_VALUE, false), CSSColors.CSS_DARKGOLDENROD_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKGRAY_RGB_VALUE, false), CSSColors.CSS_DARKGRAY_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKGREEN_RGB_VALUE, false), CSSColors.CSS_DARKGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKKHAKI_RGB_VALUE, false), CSSColors.CSS_DARKKHAKI_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKMAGENTA_RGB_VALUE, false), CSSColors.CSS_DARKMAGENTA_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKOLIVEGREEN_RGB_VALUE, false), CSSColors.CSS_DARKOLIVEGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKORANGE_RGB_VALUE, false), CSSColors.CSS_DARKORANGE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKORCHID_RGB_VALUE, false), CSSColors.CSS_DARKORCHID_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKRED_RGB_VALUE, false), CSSColors.CSS_DARKRED_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKSALMON_RGB_VALUE, false), CSSColors.CSS_DARKSALMON_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKSEAGREEN_RGB_VALUE, false), CSSColors.CSS_DARKSEAGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKSLATEBLUE_RGB_VALUE, false), CSSColors.CSS_DARKSLATEBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKSLATEGRAY_RGB_VALUE, false), CSSColors.CSS_DARKSLATEGRAY_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKTURQUOISE_RGB_VALUE, false), CSSColors.CSS_DARKTURQUOISE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DARKVIOLET_RGB_VALUE, false), CSSColors.CSS_DARKVIOLET_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DEEPPINK_RGB_VALUE, false), CSSColors.CSS_DEEPPINK_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DEEPSKYBLUE_RGB_VALUE, false), CSSColors.CSS_DEEPSKYBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DIMGRAY_RGB_VALUE, false), CSSColors.CSS_DIMGRAY_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_DODGERBLUE_RGB_VALUE, false), CSSColors.CSS_DODGERBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_FIREBRICK_RGB_VALUE, false), CSSColors.CSS_FIREBRICK_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_FLORALWHITE_RGB_VALUE, false), CSSColors.CSS_FLORALWHITE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_FORESTGREEN_RGB_VALUE, false), CSSColors.CSS_FORESTGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_GAINSBORO_RGB_VALUE, false), CSSColors.CSS_GAINSBORO_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_GHOSTWHITE_RGB_VALUE, false), CSSColors.CSS_GHOSTWHITE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_GOLD_RGB_VALUE, false), CSSColors.CSS_GOLD_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_GOLDENROD_RGB_VALUE, false), CSSColors.CSS_GOLDENROD_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_GRAY_RGB_VALUE, false), CSSColors.CSS_GRAY_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_GREEN_RGB_VALUE, false), CSSColors.CSS_GREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_GREENYELLOW_RGB_VALUE, false), CSSColors.CSS_GREENYELLOW_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_HONEYDEW_RGB_VALUE, false), CSSColors.CSS_HONEYDEW_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_HOTPINK_RGB_VALUE, false), CSSColors.CSS_HOTPINK_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_INDIGO_RGB_VALUE, false), CSSColors.CSS_INDIGO_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_IVORY_RGB_VALUE, false), CSSColors.CSS_IVORY_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_INDIANRED_RGB_VALUE, false), CSSColors.CSS_INDIANRED_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_KHAKI_RGB_VALUE, false), CSSColors.CSS_KHAKI_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LAVENDER_RGB_VALUE, false), CSSColors.CSS_LAVENDER_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LAVENDERBLUSH_RGB_VALUE, false), CSSColors.CSS_LAVENDERBLUSH_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LAWNGREEN_RGB_VALUE, false), CSSColors.CSS_LAWNGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LEMONCHIFFON_RGB_VALUE, false), CSSColors.CSS_LEMONCHIFFON_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTBLUE_RGB_VALUE, false), CSSColors.CSS_LIGHTBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTCORAL_RGB_VALUE, false), CSSColors.CSS_LIGHTCORAL_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTCYAN_RGB_VALUE, false), CSSColors.CSS_LIGHTCYAN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTGOLDENRODYELLOW_RGB_VALUE, false), CSSColors.CSS_LIGHTGOLDENRODYELLOW_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTGRAY_RGB_VALUE, false), CSSColors.CSS_LIGHTGRAY_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTGREEN_RGB_VALUE, false), CSSColors.CSS_LIGHTGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTPINK_RGB_VALUE, false), CSSColors.CSS_LIGHTPINK_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTSALMON_RGB_VALUE, false), CSSColors.CSS_LIGHTSALMON_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTSEAGREEN_RGB_VALUE, false), CSSColors.CSS_LIGHTSEAGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTSKYBLUE_RGB_VALUE, false), CSSColors.CSS_LIGHTSKYBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTSLATEGRAY_RGB_VALUE, false), CSSColors.CSS_LIGHTSLATEGRAY_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTSTEELBLUE_RGB_VALUE, false), CSSColors.CSS_LIGHTSTEELBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIGHTYELLOW_RGB_VALUE, false), CSSColors.CSS_LIGHTYELLOW_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIME_RGB_VALUE, false), CSSColors.CSS_LIME_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_LIMEGREEN_RGB_VALUE, false), CSSColors.CSS_LIMEGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MAGENTA_RGB_VALUE, false), CSSColors.CSS_MAGENTA_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MAROON_RGB_VALUE, false), CSSColors.CSS_MAROON_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MEDIUMAQUAMARINE_RGB_VALUE, false), CSSColors.CSS_MEDIUMAQUAMARINE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MEDIUMBLUE_RGB_VALUE, false), CSSColors.CSS_MEDIUMBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MEDIUMORCHID_RGB_VALUE, false), CSSColors.CSS_MEDIUMORCHID_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MEDIUMPURPLE_RGB_VALUE, false), CSSColors.CSS_MEDIUMPURPLE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MEDIUMSEAGREEN_RGB_VALUE, false), CSSColors.CSS_MEDIUMSEAGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MEDIUMSLATEBLUE_RGB_VALUE, false), CSSColors.CSS_MEDIUMSLATEBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MEDIUMSPRINGGREEN_RGB_VALUE, false), CSSColors.CSS_MEDIUMSPRINGGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MEDIUMTURQUOISE_RGB_VALUE, false), CSSColors.CSS_MEDIUMTURQUOISE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MEDIUMVIOLETRED_RGB_VALUE, false), CSSColors.CSS_MEDIUMVIOLETRED_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MIDNIGHTBLUE_RGB_VALUE, false), CSSColors.CSS_MIDNIGHTBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MINTCREAM_RGB_VALUE, false), CSSColors.CSS_MINTCREAM_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MISTYROSE_RGB_VALUE, false), CSSColors.CSS_MISTYROSE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_MOCCASIN_RGB_VALUE, false), CSSColors.CSS_MOCCASIN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_NAVAJOWHITE_RGB_VALUE, false), CSSColors.CSS_NAVAJOWHITE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_NAVY_RGB_VALUE, false), CSSColors.CSS_NAVY_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_OLDLACE_RGB_VALUE, false), CSSColors.CSS_OLDLACE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_OLIVEDRAB_RGB_VALUE, false), CSSColors.CSS_OLIVEDRAB_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_OLIVE_RGB_VALUE, false), CSSColors.CSS_OLIVE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_ORANGERED_RGB_VALUE, false), CSSColors.CSS_ORANGERED_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_ORANGE_RGB_VALUE, false), CSSColors.CSS_ORANGE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_ORCHID_RGB_VALUE, false), CSSColors.CSS_ORCHID_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PALEGOLDENROD_RGB_VALUE, false), CSSColors.CSS_PALEGOLDENROD_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PALEGREEN_RGB_VALUE, false), CSSColors.CSS_PALEGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PALETURQUOISE_RGB_VALUE, false), CSSColors.CSS_PALETURQUOISE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PALEVIOLETRED_RGB_VALUE, false), CSSColors.CSS_PALEVIOLETRED_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PAPAYAWHIP_RGB_VALUE, false), CSSColors.CSS_PAPAYAWHIP_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PEACHPUFF_RGB_VALUE, false), CSSColors.CSS_PEACHPUFF_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PERU_RGB_VALUE, false), CSSColors.CSS_PERU_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PINK_RGB_VALUE, false), CSSColors.CSS_PINK_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PLUM_RGB_VALUE, false), CSSColors.CSS_PLUM_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_POWDERBLUE_RGB_VALUE, false), CSSColors.CSS_POWDERBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_PURPLE_RGB_VALUE, false), CSSColors.CSS_PURPLE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_RED_RGB_VALUE, false), CSSColors.CSS_RED_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_ROSYBROWN_RGB_VALUE, false), CSSColors.CSS_ROSYBROWN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_ROYALBLUE_RGB_VALUE, false), CSSColors.CSS_ROYALBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SADDLEBROWN_RGB_VALUE, false), CSSColors.CSS_SADDLEBROWN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SALMON_RGB_VALUE, false), CSSColors.CSS_SALMON_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SANDYBROWN_RGB_VALUE, false), CSSColors.CSS_SANDYBROWN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SEAGREEN_RGB_VALUE, false), CSSColors.CSS_SEAGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SEASHELL_RGB_VALUE, false), CSSColors.CSS_SEASHELL_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SIENNA_RGB_VALUE, false), CSSColors.CSS_SIENNA_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SILVER_RGB_VALUE, false), CSSColors.CSS_SILVER_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SKYBLUE_RGB_VALUE, false), CSSColors.CSS_SKYBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SLATEBLUE_RGB_VALUE, false), CSSColors.CSS_SLATEBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SLATEGRAY_RGB_VALUE, false), CSSColors.CSS_SLATEGRAY_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SNOW_RGB_VALUE, false), CSSColors.CSS_SNOW_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_SPRINGGREEN_RGB_VALUE, false), CSSColors.CSS_SPRINGGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_STEELBLUE_RGB_VALUE, false), CSSColors.CSS_STEELBLUE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_TAN_RGB_VALUE, false), CSSColors.CSS_TAN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_TEAL_RGB_VALUE, false), CSSColors.CSS_TEAL_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_THISTLE_RGB_VALUE, false), CSSColors.CSS_THISTLE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_TOMATO_RGB_VALUE, false), CSSColors.CSS_TOMATO_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_TURQUOISE_RGB_VALUE, false), CSSColors.CSS_TURQUOISE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_VIOLET_RGB_VALUE, false), CSSColors.CSS_VIOLET_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_WHEAT_RGB_VALUE, false), CSSColors.CSS_WHEAT_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_WHITESMOKE_RGB_VALUE, false), CSSColors.CSS_WHITESMOKE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_WHITE_RGB_VALUE, false), CSSColors.CSS_WHITE_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_YELLOWGREEN_RGB_VALUE, false), CSSColors.CSS_YELLOWGREEN_NAME);
+		assertEquals(CSSColors.getColorName(CSSColors.CSS_YELLOW_RGB_VALUE, false), CSSColors.CSS_YELLOW_NAME);
+	}
+	
+	
+	
+	@Test
+	public void testGetRGBColour()
+	{
+		assertNull(CSSColors.getRGBColour(null));
+		assertNull(CSSColors.getRGBColour(""));
+		assertNull(CSSColors.getRGBColour("dsqdqsdgfhfdsfs"));
+		assertNull(CSSColors.getRGBColour("#12"));
+		assertNull(CSSColors.getRGBColour("#DHS78EZ7DS"));
+		assertEquals(CSSColors.getRGBColour("#580"), new Color(85, 136, 0));
+		assertEquals(CSSColors.getRGBColour("#ff1493"), CSSColors.CSS_DEEPPINK_RGB_VALUE);
+		assertEquals(CSSColors.getRGBColour("blue"), CSSColors.CSS_BLUE_RGB_VALUE);
+		assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.getRGBColour("rgb(	  0% ,	0%    ,  100%  )"));
+		assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.getRGBColour("rgb(	  0 ,	0    ,  255  )"));
+	}
+	
+	
+	
+	@Test
+	public void testSVGRGBtoRGB()
+	{
+		assertNull(CSSColors.SVGRGBtoRGB(null));
+		assertNull(CSSColors.SVGRGBtoRGB(""));
+		assertNull(CSSColors.SVGRGBtoRGB("dsfdgdui"));
+		assertNull(CSSColors.SVGRGBtoRGB("rgbdf"));
+		assertNull(CSSColors.SVGRGBtoRGB("rgb()"));
+		assertNull(CSSColors.SVGRGBtoRGB("rgb("));
+		assertNull(CSSColors.SVGRGBtoRGB("rgb(a, b, c)"));
+		assertNull(CSSColors.SVGRGBtoRGB("rgb(12, 76, )"));
+		assertNull(CSSColors.SVGRGBtoRGB("rgb(12, )"));
+		assertNull(CSSColors.SVGRGBtoRGB("rgb(,,)"));
+		assertNull(CSSColors.SVGRGBtoRGB("rgb(123,12,98,98)"));
+		assertNull(CSSColors.SVGRGBtoRGB("rgb(98721,-12,0987)"));
+		assertNull(CSSColors.SVGRGBtoRGB("rgb(0%,0,0%)"));
+		assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.SVGRGBtoRGB("rgb(0,0,255)"));
+		assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.SVGRGBtoRGB("rgb(	  0 ,	0    ,  255  )"));
+		assertEquals(CSSColors.CSS_BLUE_RGB_VALUE, CSSColors.SVGRGBtoRGB("rgb(	  0% ,	0%    ,  100%  )"));
+	}
+}
diff --git a/current/junit/test/TestDelimitor.java b/current/junit/test/TestDelimitor.java
new file mode 100644
index 0000000..8e0584f
--- /dev/null
+++ b/current/junit/test/TestDelimitor.java
@@ -0,0 +1,225 @@
+package junit.test;
+
+import java.awt.Point;
+
+import junit.framework.TestCase;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/** 
+ * This class contains tests on the class Delimitor.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 06/26/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestDelimitor extends TestCase
+{
+
+	private final LaTeXDrawPoint2D	p0		= new LaTeXDrawPoint2D(0, 0);
+
+	private final LaTeXDrawPoint2D	p1		= new LaTeXDrawPoint2D(1, 1);
+
+	private final LaTeXDrawPoint2D	pNull	= null;
+
+	private Delimitor				d1;
+
+
+
+	@Override
+	@Before
+	public void setUp()
+	{
+		d1 = new Delimitor();
+	}
+
+
+	@Test
+	public void testConstructors()
+	{
+		Delimitor d = new Delimitor(pNull);
+
+		assertEquals(d.getCenter(), p0);
+
+		d = new Delimitor();
+
+		assertEquals(d.getCenter(), p0);
+
+		d = new Delimitor(new LaTeXDrawPoint2D(0, 0));
+
+		assertEquals(d.getCenter(), p0);
+	}
+
+
+
+	@Test
+	public void getSetCenterXY()
+	{
+		try
+		{
+			d1.setCenter(null);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good */ }
+
+		try { d1.setCenter(p1); }
+		catch(Exception e) { fail(); }
+
+		if(p1 != d1.getCenter())
+			fail();
+
+		assertEquals(p1.x, d1.getX());
+		assertEquals(p1.y, d1.getY());
+	}
+
+
+	@Test
+	public void setColorSet1()
+	{
+		d1.setColorSet1();
+		assertEquals(Delimitor.INTERIOR, d1.getInterior());
+	}
+
+
+	@Test
+	public void setColorSet2()
+	{
+		d1.setColorSet2();
+		assertEquals(Delimitor.INTERIOR_2, d1.getInterior());
+	}
+
+
+	@Test
+	public void setColorSet3()
+	{
+		d1.setColorSet3();
+		assertEquals(Delimitor.INTERIOR_3, d1.getInterior());
+	}
+
+
+
+	@Test
+	public void setColorSet4()
+	{
+		d1.setColorSet4();
+		assertEquals(Delimitor.INTERIOR_4, d1.getInterior());
+	}
+
+
+
+	@Test
+	public void getSetDim()
+	{
+		try
+		{
+			d1.setDim(-1.);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+
+		try
+		{
+			d1.setDim(0.);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+
+		try { d1.setDim(1.); }
+		catch(IllegalArgumentException e) { fail(); }
+
+		assertEquals(d1.getDim(), 1.);
+	}
+
+
+
+	@Test
+	public void setCoordinates()
+	{
+		try
+		{
+			d1.setCoordinates(pNull);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good */ }
+
+		try { d1.setCenter(p1); }
+		catch(Exception e) { fail(); }
+
+		assertEquals(p1, d1.getCenter());
+	}
+
+
+
+	@Test
+	public void isIn()
+	{
+		d1.setCenter(p0);
+		d1.setDim(10);
+		Point tmpPt = null;
+
+		assertFalse(d1.isIn(tmpPt));
+		assertFalse(d1.isIn(pNull));
+		assertFalse(d1.isIn(new LaTeXDrawPoint2D(0, 6)));
+		assertFalse(d1.isIn(new LaTeXDrawPoint2D(0, -6)));
+		assertFalse(d1.isIn(new LaTeXDrawPoint2D(6, 0)));
+		assertFalse(d1.isIn(new LaTeXDrawPoint2D(-6, 0)));
+		assertTrue(d1.isIn(new LaTeXDrawPoint2D(0, 5)));
+		assertTrue(d1.isIn(new LaTeXDrawPoint2D(0, -5)));
+		assertTrue(d1.isIn(new LaTeXDrawPoint2D(5, 0)));
+		assertTrue(d1.isIn(new LaTeXDrawPoint2D(-5, 0)));
+		assertTrue(d1.isIn(p1));
+		assertTrue(d1.isIn(p0));
+	}
+
+
+
+	@Test
+	public void testClone()
+	{
+		try
+		{
+			Delimitor clone = (Delimitor)d1.clone();
+
+			assertEquals(clone.getCenter(), d1.getCenter());
+			assertEquals(clone.getDim(), d1.getDim());
+			assertEquals(clone.getInterior(), d1.getInterior());
+			assertEquals(clone.getX(), d1.getX());
+			assertEquals(clone.getY(), d1.getY());
+		}
+		catch(Exception e) { fail(); }
+	}
+
+
+
+	@Test
+	public void testGetSetOpacity()
+	{
+		try
+		{
+			Delimitor.setOpacity(-2);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good */ }
+
+		try
+		{
+			Delimitor.setOpacity(300);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good */ }
+
+		try { Delimitor.setOpacity(100); }
+		catch(Exception e) { fail(); }
+
+		assertEquals(Delimitor.getOpacity(), 100);
+	}
+}
diff --git a/current/junit/test/TestDviPsColors.java b/current/junit/test/TestDviPsColors.java
new file mode 100644
index 0000000..67a3918
--- /dev/null
+++ b/current/junit/test/TestDviPsColors.java
@@ -0,0 +1,306 @@
+/*
+ * DviPsColorsTest.java
+ */
+
+package junit.test;
+
+
+import java.awt.Color;
+
+import junit.framework.TestCase;
+import latexDraw.psTricks.DviPsColors;
+
+import org.junit.Test;
+
+
+
+/** 
+ * This class contains tests for the {@link DviPsColors} class.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 06/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestDviPsColors extends TestCase
+{
+
+	@Test
+	public void testGetColorName()
+	{
+		Color c2 = new Color(218, 29, 78);
+		String nameColour = "testColour";
+
+		assertNull(DviPsColors.getColourName(null));
+		DviPsColors.addUserColour(c2, nameColour);
+		assertEquals(nameColour, DviPsColors.getColourName(c2));
+		
+		assertEquals(DviPsColors.N_APRICOT, DviPsColors.getColourName(DviPsColors.APRICOT));
+		assertEquals(DviPsColors.N_AQUAMARINE, DviPsColors.getColourName(DviPsColors.AQUAMARINE));
+		assertEquals(DviPsColors.N_BITTERSWEET, DviPsColors.getColourName(DviPsColors.BITTERSWEET));
+		assertEquals(DviPsColors.N_BLUEGREEN, DviPsColors.getColourName(DviPsColors.BLUEGREEN));
+		assertEquals(DviPsColors.N_BLUEVIOLET, DviPsColors.getColourName(DviPsColors.BLUEVIOLET));
+		assertEquals(DviPsColors.N_BRICKRED, DviPsColors.getColourName(DviPsColors.BRICKRED));
+		assertEquals(DviPsColors.N_BURNT_ORANGE, DviPsColors.getColourName(DviPsColors.BURNT_ORANGE));
+		assertEquals(DviPsColors.N_CADETBLUE, DviPsColors.getColourName(DviPsColors.CADETBLUE));
+		assertEquals(DviPsColors.N_CARNATIONPINK, DviPsColors.getColourName(DviPsColors.CARNATIONPINK));
+		assertEquals(DviPsColors.N_CERULEAN, DviPsColors.getColourName(DviPsColors.CERULEAN));
+		assertEquals(DviPsColors.N_CORNFLOWERBLUE, DviPsColors.getColourName(DviPsColors.CORNFLOWERBLUE));
+		assertEquals(DviPsColors.N_DANDELION, DviPsColors.getColourName(DviPsColors.DANDELION));
+		assertEquals(DviPsColors.N_DARK_GRAY, DviPsColors.getColourName(Color.DARK_GRAY));
+		assertEquals(DviPsColors.N_DARKORCHID, DviPsColors.getColourName(DviPsColors.DARKORCHID));
+		assertEquals(DviPsColors.N_EMERALD, DviPsColors.getColourName(DviPsColors.EMERALD));
+		assertEquals(DviPsColors.N_FORESTGREEN, DviPsColors.getColourName(DviPsColors.FORESTGREEN));
+		assertEquals(DviPsColors.N_FUSHIA, DviPsColors.getColourName(DviPsColors.FUSHIA));
+		assertEquals(DviPsColors.N_GOLDEN_ROD, DviPsColors.getColourName(DviPsColors.GOLDEN_ROD));
+		assertEquals(DviPsColors.N_GREEN_YELLOW, DviPsColors.getColourName(DviPsColors.GREEN_YELLOW));
+		assertEquals(DviPsColors.N_JUNGLEGREEN, DviPsColors.getColourName(DviPsColors.JUNGLEGREEN));
+		assertEquals(DviPsColors.N_LAVENDER, DviPsColors.getColourName(DviPsColors.LAVENDER));
+		assertEquals(DviPsColors.N_LIGHT_GRAY, DviPsColors.getColourName(Color.LIGHT_GRAY));
+		assertEquals(DviPsColors.N_LIMEGREEN, DviPsColors.getColourName(DviPsColors.LIMEGREEN));
+		assertEquals(DviPsColors.N_MAHOGANY, DviPsColors.getColourName(DviPsColors.MAHOGANY));
+		assertEquals(DviPsColors.N_MAROON, DviPsColors.getColourName(DviPsColors.MAROON));
+		assertEquals(DviPsColors.N_MELON, DviPsColors.getColourName(DviPsColors.MELON));
+		assertEquals(DviPsColors.N_MIDNIGHTBLUE, DviPsColors.getColourName(DviPsColors.MIDNIGHTBLUE));
+		assertEquals(DviPsColors.N_MULBERRY, DviPsColors.getColourName(DviPsColors.MULBERRY));
+		assertEquals(DviPsColors.N_NAVYBLUE, DviPsColors.getColourName(DviPsColors.NAVYBLUE));
+		assertEquals(DviPsColors.N_OLIVEGREEN, DviPsColors.getColourName(DviPsColors.OLIVEGREEN));
+		assertEquals(DviPsColors.N_ORANGERED, DviPsColors.getColourName(DviPsColors.ORANGERED));
+		assertEquals(DviPsColors.N_ORCHID, DviPsColors.getColourName(DviPsColors.ORCHID));
+		assertEquals(DviPsColors.N_PEACH, DviPsColors.getColourName(DviPsColors.PEACH));
+		assertEquals(DviPsColors.N_PERIWINKLE, DviPsColors.getColourName(DviPsColors.PERIWINKLE));
+		assertEquals(DviPsColors.N_PINEGREEN, DviPsColors.getColourName(DviPsColors.PINEGREEN));
+		assertEquals(DviPsColors.N_PINK, DviPsColors.getColourName(DviPsColors.PINK));
+		assertEquals(DviPsColors.N_PLUM, DviPsColors.getColourName(DviPsColors.PLUM));
+		assertEquals(DviPsColors.N_PROCESSBLUE, DviPsColors.getColourName(DviPsColors.PROCESSBLUE));
+		assertEquals(DviPsColors.N_RAWSIENNA, DviPsColors.getColourName(DviPsColors.RAWSIENNA));
+		assertEquals(DviPsColors.N_RED_ORANGE, DviPsColors.getColourName(DviPsColors.RED_ORANGE));
+		assertEquals(DviPsColors.N_REDVIOLET, DviPsColors.getColourName(DviPsColors.REDVIOLET));
+		assertEquals(DviPsColors.N_RHODAMINE, DviPsColors.getColourName(DviPsColors.RHODAMINE));
+		assertEquals(DviPsColors.N_ROYALBLUE, DviPsColors.getColourName(DviPsColors.ROYALBLUE));
+		assertEquals(DviPsColors.N_ROYALPURPLE, DviPsColors.getColourName(DviPsColors.ROYALPURPLE));
+		assertEquals(DviPsColors.N_RUBINERED, DviPsColors.getColourName(DviPsColors.RUBINERED));
+		assertEquals(DviPsColors.N_SALMON, DviPsColors.getColourName(DviPsColors.SALMON));
+		assertEquals(DviPsColors.N_SEAGREEN, DviPsColors.getColourName(DviPsColors.SEAGREEN));
+		assertEquals(DviPsColors.N_SEPIA, DviPsColors.getColourName(DviPsColors.SEPIA));
+		assertEquals(DviPsColors.N_SKYBLUE, DviPsColors.getColourName(DviPsColors.SKYBLUE));
+		assertEquals(DviPsColors.N_SPRINGGREEN, DviPsColors.getColourName(DviPsColors.SPRINGGREEN));
+		assertEquals(DviPsColors.N_TAN, DviPsColors.getColourName(DviPsColors.TAN));
+		assertEquals(DviPsColors.N_TEALBLUE, DviPsColors.getColourName(DviPsColors.TEALBLUE));
+		assertEquals(DviPsColors.N_THISTLE, DviPsColors.getColourName(DviPsColors.THISTLE));
+		assertEquals(DviPsColors.N_TURQUOISE, DviPsColors.getColourName(DviPsColors.TURQUOISE));
+		assertEquals(DviPsColors.N_VIOLETRED, DviPsColors.getColourName(DviPsColors.VIOLETRED));
+		assertEquals(DviPsColors.N_WILDSTRAWBERRY, DviPsColors.getColourName(DviPsColors.WILDSTRAWBERRY));
+		assertEquals(DviPsColors.N_YELLOW_ORANGE, DviPsColors.getColourName(DviPsColors.YELLOW_ORANGE));
+		assertEquals(DviPsColors.N_YELLOWGREEN, DviPsColors.getColourName(DviPsColors.YELLOWGREEN));
+	}
+
+
+
+
+
+	@Test
+	public void testGetColor()
+	{
+		Color c2 = new Color(218, 29, 78);
+		String nameColour = "testColour";
+		
+		assertEquals(c2, DviPsColors.getColour(nameColour));
+		
+		assertEquals(DviPsColors.APRICOT, DviPsColors.getColour(DviPsColors.N_APRICOT));
+		assertEquals(DviPsColors.AQUAMARINE, DviPsColors.getColour(DviPsColors.N_AQUAMARINE));
+		assertEquals(DviPsColors.BITTERSWEET, DviPsColors.getColour(DviPsColors.N_BITTERSWEET));
+		assertEquals(DviPsColors.BLUEGREEN, DviPsColors.getColour(DviPsColors.N_BLUEGREEN));
+		assertEquals(DviPsColors.BLUEVIOLET, DviPsColors.getColour(DviPsColors.N_BLUEVIOLET));
+		assertEquals(DviPsColors.BRICKRED, DviPsColors.getColour(DviPsColors.N_BRICKRED));
+		assertEquals(DviPsColors.BURNT_ORANGE, DviPsColors.getColour(DviPsColors.N_BURNT_ORANGE));
+		assertEquals(DviPsColors.CADETBLUE, DviPsColors.getColour(DviPsColors.N_CADETBLUE));
+		assertEquals(DviPsColors.CARNATIONPINK, DviPsColors.getColour(DviPsColors.N_CARNATIONPINK));
+		assertEquals(DviPsColors.CERULEAN, DviPsColors.getColour(DviPsColors.N_CERULEAN));
+		assertEquals(DviPsColors.CORNFLOWERBLUE, DviPsColors.getColour(DviPsColors.N_CORNFLOWERBLUE));
+		assertEquals(DviPsColors.DANDELION, DviPsColors.getColour(DviPsColors.N_DANDELION));
+		assertEquals(Color.DARK_GRAY, DviPsColors.getColour(DviPsColors.N_DARK_GRAY));
+		assertEquals(DviPsColors.DARKORCHID, DviPsColors.getColour(DviPsColors.N_DARKORCHID));
+		assertEquals(DviPsColors.EMERALD, DviPsColors.getColour(DviPsColors.N_EMERALD));
+		assertEquals(DviPsColors.FORESTGREEN, DviPsColors.getColour(DviPsColors.N_FORESTGREEN));
+		assertEquals(DviPsColors.FUSHIA, DviPsColors.getColour(DviPsColors.N_FUSHIA));
+		assertEquals(DviPsColors.GOLDEN_ROD, DviPsColors.getColour(DviPsColors.N_GOLDEN_ROD));
+		assertEquals(DviPsColors.GREEN_YELLOW, DviPsColors.getColour(DviPsColors.N_GREEN_YELLOW));
+		assertEquals(DviPsColors.JUNGLEGREEN, DviPsColors.getColour(DviPsColors.N_JUNGLEGREEN));
+		assertEquals(DviPsColors.LAVENDER, DviPsColors.getColour(DviPsColors.N_LAVENDER));
+		assertEquals(Color.LIGHT_GRAY, DviPsColors.getColour(DviPsColors.N_LIGHT_GRAY));
+		assertEquals(DviPsColors.LIMEGREEN, DviPsColors.getColour(DviPsColors.N_LIMEGREEN));
+		assertEquals(DviPsColors.MAHOGANY, DviPsColors.getColour(DviPsColors.N_MAHOGANY));
+		assertEquals(DviPsColors.MAROON, DviPsColors.getColour(DviPsColors.N_MAROON));
+		assertEquals(DviPsColors.MELON, DviPsColors.getColour(DviPsColors.N_MELON));
+		assertEquals(DviPsColors.MIDNIGHTBLUE, DviPsColors.getColour(DviPsColors.N_MIDNIGHTBLUE));
+		assertEquals(DviPsColors.MULBERRY, DviPsColors.getColour(DviPsColors.N_MULBERRY));
+		assertEquals(DviPsColors.NAVYBLUE, DviPsColors.getColour(DviPsColors.N_NAVYBLUE));
+		assertEquals(DviPsColors.OLIVEGREEN, DviPsColors.getColour(DviPsColors.N_OLIVEGREEN));
+		assertEquals(DviPsColors.ORANGERED, DviPsColors.getColour(DviPsColors.N_ORANGERED));
+		assertEquals(DviPsColors.ORCHID, DviPsColors.getColour(DviPsColors.N_ORCHID));
+		assertEquals(DviPsColors.PEACH, DviPsColors.getColour(DviPsColors.N_PEACH));
+		assertEquals(DviPsColors.PERIWINKLE, DviPsColors.getColour(DviPsColors.N_PERIWINKLE));
+		assertEquals(DviPsColors.PINEGREEN, DviPsColors.getColour(DviPsColors.N_PINEGREEN));
+		assertEquals(DviPsColors.PINK, DviPsColors.getColour(DviPsColors.N_PINK));
+		assertEquals(DviPsColors.PLUM, DviPsColors.getColour(DviPsColors.N_PLUM));
+		assertEquals(DviPsColors.PROCESSBLUE, DviPsColors.getColour(DviPsColors.N_PROCESSBLUE));
+		assertEquals(DviPsColors.RAWSIENNA, DviPsColors.getColour(DviPsColors.N_RAWSIENNA));
+		assertEquals(DviPsColors.RED_ORANGE, DviPsColors.getColour(DviPsColors.N_RED_ORANGE));
+		assertEquals(DviPsColors.REDVIOLET, DviPsColors.getColour(DviPsColors.N_REDVIOLET));
+		assertEquals(DviPsColors.RHODAMINE, DviPsColors.getColour(DviPsColors.N_RHODAMINE));
+		assertEquals(DviPsColors.ROYALBLUE, DviPsColors.getColour(DviPsColors.N_ROYALBLUE));
+		assertEquals(DviPsColors.ROYALPURPLE, DviPsColors.getColour(DviPsColors.N_ROYALPURPLE));
+		assertEquals(DviPsColors.RUBINERED, DviPsColors.getColour(DviPsColors.N_RUBINERED));
+		assertEquals(DviPsColors.SALMON, DviPsColors.getColour(DviPsColors.N_SALMON));
+		assertEquals(DviPsColors.SEAGREEN, DviPsColors.getColour(DviPsColors.N_SEAGREEN));
+		assertEquals(DviPsColors.SEPIA, DviPsColors.getColour(DviPsColors.N_SEPIA));
+		assertEquals(DviPsColors.SKYBLUE, DviPsColors.getColour(DviPsColors.N_SKYBLUE));
+		assertEquals(DviPsColors.SPRINGGREEN, DviPsColors.getColour(DviPsColors.N_SPRINGGREEN));
+		assertEquals(DviPsColors.TAN, DviPsColors.getColour(DviPsColors.N_TAN));
+		assertEquals(DviPsColors.TEALBLUE, DviPsColors.getColour(DviPsColors.N_TEALBLUE));
+		assertEquals(DviPsColors.THISTLE, DviPsColors.getColour(DviPsColors.N_THISTLE));
+		assertEquals(DviPsColors.TURQUOISE, DviPsColors.getColour(DviPsColors.N_TURQUOISE));
+		assertEquals(DviPsColors.VIOLETRED, DviPsColors.getColour(DviPsColors.N_VIOLETRED));
+		assertEquals(DviPsColors.WILDSTRAWBERRY, DviPsColors.getColour(DviPsColors.N_WILDSTRAWBERRY));
+		assertEquals(DviPsColors.YELLOW_ORANGE, DviPsColors.getColour(DviPsColors.N_YELLOW_ORANGE));
+		assertEquals(DviPsColors.YELLOWGREEN, DviPsColors.getColour(DviPsColors.N_YELLOWGREEN));
+	}
+
+
+
+
+
+	@Test
+	public void testAddUserColor()
+	{
+		Color c2 = new Color(218, 29, 78);
+		String nameColour = "testColour";
+		
+		DviPsColors.addUserColour(c2, nameColour);
+		assertEquals(nameColour, DviPsColors.getColourName(c2));
+	}
+
+
+
+
+
+	@Test
+	public void testGetUserColorsCode()
+	{
+		Color c = new Color(230, 65, 78);
+		String nameColour = "testColour2";
+		
+		DviPsColors.addUserColour(c, nameColour);
+		
+		assertNotNull(DviPsColors.getUserColoursCode(null));
+		assertNotNull(DviPsColors.getUserColoursCode("coucou"));
+	}
+
+
+
+
+
+	@Test
+	public void testGetUserColorCode()
+	{
+		Color c = new Color(30, 65, 78);
+		String nameColour = "testColour3";
+		
+		assertNull(DviPsColors.getUsercolourCode(-1));
+		assertNull(DviPsColors.getUsercolourCode(10000000));
+		
+		DviPsColors.addUserColour(c, nameColour);
+		
+		assertNotNull(DviPsColors.getUsercolourCode(0));
+	}
+
+	
+	
+	@Test
+	public void testCMYK2RGB()
+	{
+		try
+		{
+			DviPsColors.CMYK2RGB(-1, 0.5, 0.5, 0.5);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		try
+		{
+			DviPsColors.CMYK2RGB(2, 0.5, 0.5, 0.5);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		try
+		{
+			DviPsColors.CMYK2RGB(0.5, -1, 0.5, 0.5);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		try
+		{
+			DviPsColors.CMYK2RGB(0.5, 2, 0.5, 0.5);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		try
+		{
+			DviPsColors.CMYK2RGB(0.5, 0.5, -1, 0.5);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		try
+		{
+			DviPsColors.CMYK2RGB(0.5, 0.5, 2, 0.5);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		try
+		{
+			DviPsColors.CMYK2RGB(0.5, 0.5, 0.5, -1);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		try
+		{
+			DviPsColors.CMYK2RGB(0.5, 0.5, 0.5, 2);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		assertEquals(new Color(51, 92, 71), DviPsColors.CMYK2RGB(0.5, 0.1, 0.3, 0.6));
+	}
+	
+	
+	
+	@Test
+	public void testGray2RBG()
+	{
+		try
+		{
+			DviPsColors.gray2RBG(-10);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		try
+		{
+			DviPsColors.gray2RBG(300);
+			fail();
+		}catch(IllegalArgumentException e) { /* Good. */ }
+		
+		assertEquals(new Color(255, 255, 255), DviPsColors.gray2RBG(1));
+	}
+}
diff --git a/current/junit/test/TestLLang.java b/current/junit/test/TestLLang.java
new file mode 100644
index 0000000..7356ae6
--- /dev/null
+++ b/current/junit/test/TestLLang.java
@@ -0,0 +1,119 @@
+package junit.test;
+
+import junit.framework.TestCase;
+import latexDraw.lang.LaTeXDrawLang;
+import static latexDraw.lang.LaTeXDrawLang.*;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the LLang class.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 12/18/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestLLang extends TestCase
+{
+	@Test
+	public void testGetOthersString()
+	{
+		assertEquals(getOthersString(null), '!' + LaTeXDrawLang.MISSING_KEY + '!');
+		assertEquals(getOthersString("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals(getOthersString(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	@Test
+	public void testGetStringLaTeXDrawFrame()
+	{
+		assertEquals(getStringLaTeXDrawFrame(null), '!' + LaTeXDrawLang.MISSING_KEY + '!');
+		assertEquals(getStringLaTeXDrawFrame("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals(getStringLaTeXDrawFrame(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	@Test
+	public void testGetString1_6()
+	{
+		assertEquals(getString1_6(null), '!' + LaTeXDrawLang.MISSING_KEY + '!');
+		assertEquals(getString1_6("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals(getString1_6(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	@Test
+	public void testGetString1_7()
+	{
+		assertEquals(getString1_7(null), '!' + LaTeXDrawLang.MISSING_KEY + '!');
+		assertEquals(getString1_7("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals(getString1_7(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	@Test
+	public void testGetString1_8()
+	{
+		assertEquals(getString1_8(null), '!' + LaTeXDrawLang.MISSING_KEY + '!');
+		assertEquals(getString1_8("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals(getString1_8(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	@Test
+	public void testGetString1_9()
+	{
+		assertEquals(getString1_9(null), '!' + LaTeXDrawLang.MISSING_KEY + '!');
+		assertEquals(getString1_9("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals(getString1_9(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	@Test
+	public void testGetDialogFrameString()
+	{
+		assertEquals(getDialogFrameString(null), '!' + LaTeXDrawLang.MISSING_KEY + '!');
+		assertEquals(getDialogFrameString("thisisnotavalidkey;)"), "!thisisnotavalidkey;)!"); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals(getDialogFrameString(""), "!!"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	
+	@Test
+	public void testLang()
+	{
+		readLang();
+		getlangCurrent();
+		getTokenLang();
+	}
+	
+	
+	@Test
+	public void testSetLangCurrent()
+	{
+		String former = getlangCurrent();
+		
+		setlangCurrent(null);
+		assertEquals(former, getlangCurrent());
+		setlangCurrent(""); //$NON-NLS-1$
+		assertEquals(former, getlangCurrent());
+		setlangCurrent("dsqdsq"); //$NON-NLS-1$
+		assertEquals(former, getlangCurrent());
+		setlangCurrent(LANG_DE);
+		assertEquals(getlangCurrent(), LANG_DE);
+		setlangCurrent(LANG_ES);
+		assertEquals(getlangCurrent(), LANG_ES);
+		setlangCurrent(LANG_FR);
+		assertEquals(getlangCurrent(), LANG_FR);
+		setlangCurrent(LANG_EN);
+		assertEquals(getlangCurrent(), LANG_EN);
+		setlangCurrent(LANG_EN_US);
+		assertEquals(getlangCurrent(), LANG_EN_US);
+	}
+}
diff --git a/current/junit/test/TestLaTeXDrawCursor.java b/current/junit/test/TestLaTeXDrawCursor.java
new file mode 100644
index 0000000..9536f16
--- /dev/null
+++ b/current/junit/test/TestLaTeXDrawCursor.java
@@ -0,0 +1,68 @@
+/*
+ * TestLaTeXDrawCursor.java
+ */
+
+package junit.test;
+
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.Toolkit;
+import java.awt.image.BufferedImage;
+import java.net.URL;
+
+import javax.swing.ImageIcon;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests the methods of the class <code>TestLaTeXDrawCursor</code>.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 02/14/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestLaTeXDrawCursor extends TestCase
+{
+
+	@Test
+	public void testGetCursor()
+	{
+		try 
+		{//TODO voir pourquoi ca marche pas.
+//			Cursor cursor = LaTeXDrawCursor.getCursor("/res/cursors/RotCWDown.gif", "rotate");//$NON-NLS-1$//$NON-NLS-2$
+	        BufferedImage bi = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
+	        Graphics2D graphic = (Graphics2D)bi.getGraphics();
+	        ImageIcon img;
+	        URL url = getClass().getResource("/res/cursors/RotCWDown.gif");
+			img = new ImageIcon(url);
+			graphic.drawImage(img.getImage(), null, null);
+			
+			assertNotNull(Toolkit.getDefaultToolkit().createCustomCursor(bi,new Point(0,0), "aa"));
+			
+			graphic.dispose();
+			bi.flush();
+		}
+		catch(Exception e)
+		{
+			fail();
+		}
+	}
+}
+
+
diff --git a/current/junit/test/TestLaTeXDrawNumber.java b/current/junit/test/TestLaTeXDrawNumber.java
new file mode 100644
index 0000000..fbda859
--- /dev/null
+++ b/current/junit/test/TestLaTeXDrawNumber.java
@@ -0,0 +1,71 @@
+/*
+ * TestLaTeXDrawNumber.java
+ */
+package junit.test;
+
+import junit.framework.TestCase;
+import latexDraw.util.LaTeXDrawNumber;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests the methods of the class <code>LaTeXDrawNumber</code>.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 12/18/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestLaTeXDrawNumber extends TestCase
+{
+	
+	@Test
+	public void testGetCutNumberFloat()
+	{
+		float value = 0.0001f;
+		
+		assertEquals(value, LaTeXDrawNumber.getCutNumber(value, 0.000001));
+		assertEquals(0f, LaTeXDrawNumber.getCutNumber(value, 0.1));
+		assert(LaTeXDrawNumber.getCutNumber(value, 0.00001)==0f);
+		assert(LaTeXDrawNumber.getCutNumber(value, 0.1)==value);
+		
+		value = -0.001f;
+		assertEquals(value, LaTeXDrawNumber.getCutNumber(value, 0.000001));
+		assertEquals(0f, LaTeXDrawNumber.getCutNumber(value, 1));
+		assert(LaTeXDrawNumber.getCutNumber(value, 0.00001)==0f);
+		assert(LaTeXDrawNumber.getCutNumber(value, 0.1)==value);
+	}
+	
+	
+	
+	@Test
+	public void testGetCutNumberDouble()
+	{
+		double value = 0.0001;
+		
+		assertEquals(value, LaTeXDrawNumber.getCutNumber(value, 0.000001));
+		assertEquals(0., LaTeXDrawNumber.getCutNumber(value, 0.1));
+		assert(LaTeXDrawNumber.getCutNumber(value, 0.00001)==0.);
+		assert(LaTeXDrawNumber.getCutNumber(value, 0.1)==value);
+		
+		value = -0.001;
+		assertEquals(value, LaTeXDrawNumber.getCutNumber(value, 0.000001));
+		assertEquals(0., LaTeXDrawNumber.getCutNumber(value, 1));
+		assert(LaTeXDrawNumber.getCutNumber(value, 0.00001)==0.);
+		assert(LaTeXDrawNumber.getCutNumber(value, 0.1)==value);
+	}
+}
+
+
diff --git a/current/junit/test/TestLaTeXDrawPoint2D.java b/current/junit/test/TestLaTeXDrawPoint2D.java
new file mode 100644
index 0000000..d0f0595
--- /dev/null
+++ b/current/junit/test/TestLaTeXDrawPoint2D.java
@@ -0,0 +1,198 @@
+/*
+ * TestLaTeXDrawPoint2D.java
+ */
+package junit.test;
+
+import junit.framework.TestCase;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests the methods of the class <code>LaTeXDrawPoint2D</code>.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 12/23/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestLaTeXDrawPoint2D extends TestCase
+{
+
+	@Test
+	public void testEquals()
+	{
+		LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D p3 = new LaTeXDrawPoint2D(1,0);
+		LaTeXDrawPoint2D p4 = new LaTeXDrawPoint2D(1,1);
+		
+		assertTrue(p1.equals(p2, 0));
+		assertFalse(p1.equals(p3, 0));
+		assertFalse(p4.equals(p3, 0));
+		assertFalse(p4.equals(null, 0));
+		
+		p1.x = 1./3.;
+		p2.x = 1./3.;
+		
+		assertTrue(p1.equals(p2, 0));
+		
+		p1.x = Math.PI;
+		p2.x = Math.PI;
+		
+		assertTrue(p1.equals(p2, 0));
+	}
+	
+	
+	
+	@Test
+	public void testGetMiddlePoint()
+	{
+		LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D p3 = new LaTeXDrawPoint2D(1,1);
+		LaTeXDrawPoint2D p4 = new LaTeXDrawPoint2D(0.5,0.5);
+		
+		assertTrue(p1.getMiddlePoint(p2).equals(p1, 0));
+		assertTrue(p1.getMiddlePoint(p3).equals(p4, 0));
+		
+		p3.x = 1./3.;
+		p4.x = 1./6.;
+		assertTrue(p1.getMiddlePoint(p3).equals(p4, 0));
+		assertFalse(p1.getMiddlePoint(p4).equals(p1, 0));
+	}
+	
+	
+	
+	@Test
+	public void testMove()
+	{
+		LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D(-12, 65);
+		LaTeXDrawPoint2D p3 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D p4 = new LaTeXDrawPoint2D();
+		
+		p1.move(p2, p3);
+		p4.x = p3.x - p2.x;
+		p4.y = p3.y - p2.y;
+		assertTrue(p1.equals(p4, 0));
+		
+		p1.move(p3, p3);
+		assertTrue(p1.equals(p1));
+		assertFalse(p1.equals(p2));
+	}
+	
+	
+	
+	@Test
+	public void testVerticalSymmetry()
+	{
+		LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D(-1, 0);
+		LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D(-1, 0);
+		LaTeXDrawPoint2D o = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D res;
+		
+		res = new LaTeXDrawPoint2D(p1.verticalSymmetry(o));
+		assertTrue(res.equals(p2, 0));
+		p1.y = 3;
+		p2.y = -3;
+		res = new LaTeXDrawPoint2D(p1.verticalSymmetry(o));
+		assertTrue(res.equals(p2, 0));
+	}
+	
+	
+	
+	@Test
+	public void testHorizontalSymmetry()
+	{
+		LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D(0, 1);
+		LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D(0, 1);
+		LaTeXDrawPoint2D o = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D res;
+		
+		res = new LaTeXDrawPoint2D(p1.horizontalSymmetry(o));
+		assertTrue(res.equals(p2, 0));
+		p1.x = 3;
+		p2.x = -3;
+		res = new LaTeXDrawPoint2D(p1.horizontalSymmetry(o));
+		assertTrue(res.equals(p2, 0));
+	}
+	
+	
+	
+	@Test
+	public void testCentralSymmetry()
+	{
+		LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D(1, 1);
+		LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D(-1, -1);
+		LaTeXDrawPoint2D o = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D res;
+		
+		res = new LaTeXDrawPoint2D(p1.centralSymmetry(o));
+		assertTrue(res.equals(p2, 0));
+		p1.x = 3;
+		p2.x = -3;
+		res = new LaTeXDrawPoint2D(p1.centralSymmetry(o));
+		assertTrue(res.equals(p2, 0));
+	}
+	
+	
+	
+	@Test
+	public void testRotatePoint()
+	{
+		LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D(1, 0);
+		LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D(0, 1);
+		LaTeXDrawPoint2D o = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D res;
+		
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, Math.PI/2.));
+		assertTrue(res.equals(p2, 0));
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, 2*Math.PI+Math.PI/2.));
+		assertTrue(res.equals(p2, 0));
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, -3.*Math.PI/2.));
+		assertTrue(res.equals(p2, 0));
+		p2.x = -1;
+		p2.y = 0;
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, Math.PI));
+		assertTrue(res.equals(p2, 0));
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, 2*Math.PI+Math.PI));
+		assertTrue(res.equals(p2, 0));
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, -Math.PI));
+		assertTrue(res.equals(p2, 0));
+		p2.x = 0;
+		p2.y = -1;
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, 3.*Math.PI/2.));
+		assertTrue(res.equals(p2, 0));
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, 2*Math.PI+3.*Math.PI/2.));
+		assertTrue(res.equals(p2, 0));
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, -Math.PI/2.));
+		assertTrue(res.equals(p2, 0));
+		p2.x = 1;
+		p2.y = 0;
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, 2.*Math.PI));
+		assertTrue(res.equals(p2, 0));
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, 4.*Math.PI));
+		assertTrue(res.equals(p2, 0));
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, 0.));
+		assertTrue(res.equals(p2, 0));
+		res = new LaTeXDrawPoint2D(p1.rotatePoint(o, -2.*Math.PI));
+		assertTrue(res.equals(p2, 0));
+	}
+}
+
+
+
+
diff --git a/current/junit/test/TestLatexDraw.java b/current/junit/test/TestLatexDraw.java
new file mode 100644
index 0000000..a43b88a
--- /dev/null
+++ b/current/junit/test/TestLatexDraw.java
@@ -0,0 +1,34 @@
+package junit.test;
+
+import latexDraw.ui.LaTeXDrawFrame;
+
+/** 
+ * This class contains tests to check the LaTeXDraw methods.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 12/18/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class TestLatexDraw
+{
+	public static final LaTeXDrawFrame frame;
+	
+	static
+	{
+		String[] str = new String[0];
+		frame = new LaTeXDrawFrame(str, false);
+		frame.setVisible(false);
+	}
+}
diff --git a/current/junit/test/TestPSTricksConstants.java b/current/junit/test/TestPSTricksConstants.java
new file mode 100644
index 0000000..fd8d880
--- /dev/null
+++ b/current/junit/test/TestPSTricksConstants.java
@@ -0,0 +1,108 @@
+/*
+ * PSTricksConstantsTest.java
+ */
+
+package junit.test;
+
+
+import junit.framework.TestCase;
+import latexDraw.psTricks.PSTricksConstants;
+
+import org.junit.*;
+
+
+
+/** 
+ * This class contains tests for the {@link PSTricksConstants} class.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 06/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestPSTricksConstants extends TestCase
+{
+
+	@Test
+	public void testIsValidDotStyle()
+	{
+		assertFalse(PSTricksConstants.isValidDotStyle(null));
+		assertFalse(PSTricksConstants.isValidDotStyle("coucou!!"));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.DOT_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.DIAMOND_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.FDIAMOND_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.FPENTAGON_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.PENTAGON_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.FSQUARE_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.SQUARE_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.FTRIANGLE_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.TRIANGLE_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.O_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.OPLUS_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.OTIMES_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.X_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.PLUS_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.BAR_STYLE));
+		assertTrue(PSTricksConstants.isValidDotStyle(PSTricksConstants.ASTERISK_STYLE));
+	}
+
+
+
+
+
+	@Test
+	public void testIsValidFillStyle()
+	{
+		assertFalse(PSTricksConstants.isValidArrowStyle(null));
+		assertFalse(PSTricksConstants.isValidArrowStyle("coucou!!"));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.NONEARROW_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.RARROW_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.RRBRACKET_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.RSBRACKET_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.LARROW_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.LRBRACKET_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.LSBRACKET_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.SQUAREEND_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.ROUNDIN_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.BARIN_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.CIRCLEIN_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.DISKIN_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.BAREND_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.DISKEND_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.CIRCLEEND_STYLE));
+		assertTrue(PSTricksConstants.isValidArrowStyle(PSTricksConstants.ROUNDEND_STYLE));
+	}
+
+	
+
+	
+	@Test
+	public void testIsValidArrowStyle()
+	{
+		assertFalse(PSTricksConstants.isValidFillStyle(null));
+		assertFalse(PSTricksConstants.isValidFillStyle("coucou!!"));
+		assertTrue(PSTricksConstants.isValidFillStyle(PSTricksConstants.TOKEN_FILL_CROSSHATCH));
+		assertTrue(PSTricksConstants.isValidFillStyle(PSTricksConstants.TOKEN_FILL_CROSSHATCH_F));
+		assertTrue(PSTricksConstants.isValidFillStyle(PSTricksConstants.TOKEN_FILL_GRADIENT));
+		assertTrue(PSTricksConstants.isValidFillStyle(PSTricksConstants.TOKEN_FILL_HLINES));
+		assertTrue(PSTricksConstants.isValidFillStyle(PSTricksConstants.TOKEN_FILL_HLINES_F));
+		assertTrue(PSTricksConstants.isValidFillStyle(PSTricksConstants.TOKEN_FILL_NONE));
+		assertTrue(PSTricksConstants.isValidFillStyle(PSTricksConstants.TOKEN_FILL_SOLID));
+		assertTrue(PSTricksConstants.isValidFillStyle(PSTricksConstants.TOKEN_FILL_VLINES));
+		assertTrue(PSTricksConstants.isValidFillStyle(PSTricksConstants.TOKEN_FILL_VLINES_F));
+	}
+
+}
diff --git a/current/junit/test/TestParserCmdMessage.java b/current/junit/test/TestParserCmdMessage.java
new file mode 100644
index 0000000..07c2709
--- /dev/null
+++ b/current/junit/test/TestParserCmdMessage.java
@@ -0,0 +1,69 @@
+package junit.test;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.ParserCmdMessage;
+
+import org.junit.Test;
+
+
+/** 
+ * This class contains tests for the ParserCmdMessage class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/10/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestParserCmdMessage extends TestCase
+{
+	public static final String COMMAND 	= "command";
+	
+	public static final Exception EX 	= new IllegalArgumentException("Test exception");
+	
+	public static final int LINE 		= 10;
+	
+	public static final ParserCmdMessage MSG = new ParserCmdMessage(LINE, EX, COMMAND);
+	
+
+	@Test
+	public void testToString()
+	{
+		ParserCmdMessage m = new ParserCmdMessage(-1, null, null);
+		
+		m.toString();
+		MSG.toString();
+	}
+	
+	
+	@Test
+	public void testGetLine()
+	{
+		assertEquals(LINE, MSG.getNLine());
+	}
+	
+	
+	@Test
+	public void testGetException()
+	{
+		assertEquals(EX, MSG.getException());
+	}
+	
+	
+	@Test
+	public void testGetCommand()
+	{
+		assertEquals(COMMAND, MSG.getCommand());
+	}
+}
diff --git a/current/junit/test/TestResources.java b/current/junit/test/TestResources.java
new file mode 100644
index 0000000..757ce88
--- /dev/null
+++ b/current/junit/test/TestResources.java
@@ -0,0 +1,195 @@
+/*
+ * TestRessources
+ */
+package junit.test;
+
+import java.net.URL;
+
+import javax.swing.ImageIcon;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+
+
+/** 
+ * This class contains tests the ressources.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 02/14/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestResources extends TestCase
+{
+	@Test
+	public void testRessources()
+	{
+		assertNotNull(loadImageIcon("/res/LaTeXDrawIcon.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/LaTeXDrawSmall.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/emblem-important.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/help-browser.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/comment.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/preferences-desktop-theme.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/preferences-system.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/New.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/hatch/hatch.none.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/hatch/hatch.vert.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/hatch/hatch.horiz.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/hatch/hatch.cross.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.arc.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.arc.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.arc.r.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.arc.r.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.arrow.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.arrow.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.barEnd.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.barEnd.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.barIn.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.barIn.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.bracket.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.bracket.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.bracket.r.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.bracket.r.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.circle.end.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.circle.end.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.circle.in.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.circle.in.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.dbleArrow.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.dbleArrow.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.disk.end.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.disk.end.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.disk.in.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.disk.in.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.none.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.none.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.rarrow.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.rarrow.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.rdbleArrow.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.rdbleArrow.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.roundIn.left.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/arrowStyles/line.roundIn.right.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.asterisk.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.none.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.bar.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.o.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.cross.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.diamond.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.diamondF.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.ocross.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.oplus.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.pentagon.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.pentagonF.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.plus.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.square.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.squareF.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.triangle.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dotStyles/dot.triangleF.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/lineStyles/lineStyle.none.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/lineStyles/lineStyle.dashed.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/lineStyles/lineStyle.dotted.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/doubleBoundary/double.boundary.middle.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/doubleBoundary/double.boundary.inner.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/doubleBoundary/double.boundary.outer.png"));//$NON-NLS-1$
+		
+		assertNotNull(loadImageIcon("/res/grid.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/Copy.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/Paste.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/Cut.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/Draw.png"));	//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/text.png"));		//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/polygon.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/rotation.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/InFrontSelect.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/behindSelect.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/background.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/foreground.png"));//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/Undo.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/Redo.png"));	//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/Magnify.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/MagnifyPlus.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/MagnifyMinus.png"));//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/wedge.png"));//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/Arc.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/document-open.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/document-save.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/document-save-as.png"));//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/circle.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/del.png"));		//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/dot.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/ellipse.png"));//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/empty.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/line.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/rectangle.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/rhombus.png"));//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/select.png"));	//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/square.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/triangle.png"));//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/Print.png"));//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/Object.png"));	//$NON-NLS-1$	
+		assertNotNull(loadImageIcon("/res/AutoBorders.png"));//$NON-NLS-1$		
+		assertNotNull(loadImageIcon("/res/go-next.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/join.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/separate.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/view-refresh.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/bezierCurve.png"));//$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/chord.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/CopySel.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/go-previous.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/joinedLines.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/ok.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/emblem-unreadable.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/list-add.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/list-remove.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/stop.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/image-x-generic.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/thickness.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/hatch/gradient.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/displayGrid.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/rotation180.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/rotation90.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/rotation270.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/mirrorH.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/mirrorV.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/axes.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/texEditor.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/delimitor.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/freehand/curve.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/freehand/line.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/BezierCurves/closeCurve.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/BezierCurves/closeLine.png")); //$NON-NLS-1$
+		assertNotNull(loadImageIcon("/res/closedBezier.png")); //$NON-NLS-1$
+	}
+	
+	
+	
+	public ImageIcon loadImageIcon(String path)
+	{
+		URL url;
+		
+		try
+		{
+			url = getClass().getResource(path);
+			
+			if(url==null)
+				return null;
+			
+			return new ImageIcon(url);
+			
+		}catch(Exception e) { return null; }	
+	}
+}
+
+
diff --git a/current/junit/test/TestShape.java b/current/junit/test/TestShape.java
new file mode 100644
index 0000000..1d4d51c
--- /dev/null
+++ b/current/junit/test/TestShape.java
@@ -0,0 +1,683 @@
+/*
+ * TestShape.java
+ */
+
+package junit.test;
+
+import java.awt.Color;
+import java.awt.Point;
+
+import junit.framework.TestCase;
+import latexDraw.figures.*;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+import org.junit.Test;
+
+
+
+/** 
+ * This class contains tests to check the graphical library.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 12/18/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestShape extends TestCase
+{
+	protected static final DrawBorders drawBorders = new DrawBorders(false);
+	
+	
+	
+	@Test
+	public void testFigure()
+	{
+		assertNotNull(Figure.createBordersPositionChoice());
+		assertNotNull(Figure.createBordersPositionChoice());
+	}
+	
+	
+
+	@Test
+	public void testRectangle() throws Exception
+	{
+		LaTeXDrawRectangle rec = new LaTeXDrawRectangle(false);
+		Figure f;
+		
+		assertTrue(rec.canBeFilled());
+		assertTrue(rec.canBeHatched());
+		assertFalse(rec.canHaveArrow());
+		assertTrue(rec.canHaveShadow());
+		assertTrue(rec.isBordersMovable());
+		assertTrue(rec.isCustomizable());
+		assertTrue(rec.isDashableOrDotable());
+		assertTrue(rec.isDoubleBoundaryable());
+		assertTrue(rec.isThicknessable());
+		assertTrue(rec.isResizable());
+		
+		f = (Figure)rec.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(rec, true, true));
+		
+		rec.updateNSEWDelimitors();
+		rec.updateStyleOfDelimitors();
+		rec.updateGravityCenter();
+		rec.updateBorders();
+		rec.updateShape();
+		rec.updateBorders(new LaTeXDrawPoint2D());
+		rec.shift(10, 10);
+		
+		try
+		{
+			rec.shift(new LaTeXDrawPoint2D(), null);
+			fail();
+		}catch(IllegalArgumentException e) { /* */}
+		
+		rec.addRotationAngle(10);
+		rec.updateGravityCenter();
+		rec.addRotationAngle(0.3);
+		rec.updateShape();
+		rec.updateStyleOfDelimitors();
+		rec.updateNSEWDelimitors();
+		
+		rec.onClick(new Point(10,10));
+		rec.isIn(new LaTeXDrawPoint2D());
+		rec.isIn(rec.getGravityCenter());
+		rec.isIn(new Point());
+		
+		f = (Figure)rec.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(rec, true, true));
+		
+		rec.setDotSep(2);
+		rec.setCustomizable(false);
+		rec.setDoubleSep(2);
+		rec.setFirstPoint(3, 3);
+		rec.updateShape();
+		rec.setGradientMidPoint(0.3);
+		rec.setFrameArc(0.2);
+		rec.setGradientAngle(0.5);
+		rec.setDoubleColor(Color.red);
+		rec.setGradientStartColor(Color.yellow);
+		rec.setGradientEndColor(Color.blue);
+		rec.setHasDoubleBoundary(true);
+		
+		f = (Figure)rec.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(rec, true, true));
+		
+		rec.setHasShadow(true);
+		
+		f = (Figure)rec.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(rec, true, true));
+		
+		rec.setHatchingAngle(3);
+		rec.setHatchingColor(Color.gray);
+		rec.setHatchingSep(4);
+		rec.setHatchingStyle(PSTricksConstants.TOKEN_FILL_HLINES);
+		f = (Figure)rec.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(rec, true, true));
+		
+		rec.setHatchingStyle(PSTricksConstants.TOKEN_FILL_GRADIENT);
+		f = (Figure)rec.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(rec, true, true));
+		
+		assertEquals(rec.getWidth(), rec.getTheSEPoint().x-rec.getTheNWPoint().x, 0.005);
+		assertEquals(rec.getHeight(), rec.getTheSEPoint().y-rec.getTheNWPoint().y, 0.005);
+		
+		rec.updateShape();
+		rec.onRelease();
+		rec.onDelimitorRelease();
+		rec.onDragged(new Point(), new Point());
+		rec.createNonRotatedShape2D();
+		rec.createShadowShape();
+		rec.createShape2D();
+		rec.updateShape();
+		assertNotNull(rec.getCodePSTricks(drawBorders, Figure.PPC));
+	}
+	
+	
+	
+	
+	@Test
+	public void testJoinedLines() throws Exception
+	{
+		JoinedLines jl = new JoinedLines(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(3,3), false);
+		Figure f;
+		
+		assertTrue(jl.canBeFilled());
+		assertTrue(jl.canBeHatched());
+		assertTrue(jl.canHaveArrow());
+		assertTrue(jl.canHaveShadow());
+		assertFalse(jl.isBordersMovable());
+		assertTrue(jl.isCustomizable());
+		assertTrue(jl.isDashableOrDotable());
+		assertTrue(jl.isDoubleBoundaryable());
+		assertTrue(jl.isThicknessable());
+		assertTrue(jl.isResizable());
+		
+		f = (Figure)jl.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(jl, true, true));
+		
+		jl.updateBorders();
+		jl.updateShape();
+		jl.updateGravityCenter();
+		
+		jl.addPoint(new LaTeXDrawPoint2D());
+		jl.addPoint(new LaTeXDrawPoint2D(3,3));
+		jl.addPoint(new LaTeXDrawPoint2D(1,3));
+		
+		jl.updateBorders();
+		jl.updateShape();
+		jl.updateGravityCenter();
+		
+		f = (Figure)jl.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(jl, true, true));
+		
+		jl.updateStyleOfDelimitors();
+		jl.updateGravityCenter();
+		jl.updateBorders();
+		jl.updateShape();
+		jl.updateBorders(new LaTeXDrawPoint2D());
+		jl.shift(10, 10);
+		
+		try
+		{
+			jl.shift(new LaTeXDrawPoint2D(), null);
+			fail();
+		}catch(IllegalArgumentException e) { /* */}
+		
+		jl.addRotationAngle(10);
+		jl.updateGravityCenter();
+		jl.addRotationAngle(0.3);
+		jl.updateShape();
+		jl.updateStyleOfDelimitors();
+		
+		jl.onClick(new Point(10,10));
+		jl.isIn(new LaTeXDrawPoint2D());
+		jl.isIn(jl.getGravityCenter());
+		jl.isIn(new Point());
+		
+		f = (Figure)jl.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(jl, true, true));
+		
+		jl.setDotSep(2);
+		jl.setCustomizable(false);
+		jl.setDoubleSep(2);
+		jl.setFirstPoint(3, 3);
+		jl.updateShape();
+		jl.setGradientMidPoint(0.3);
+		jl.setGradientAngle(0.5);
+		jl.setDoubleColor(Color.red);
+		jl.setGradientStartColor(Color.yellow);
+		jl.setGradientEndColor(Color.blue);
+		jl.setHasDoubleBoundary(true);
+		
+		f = (Figure)jl.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(jl, true, true));
+		
+		jl.setHasShadow(true);
+		
+		f = (Figure)jl.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(jl, true, true));
+		
+		jl.setHatchingAngle(3);
+		jl.setHatchingColor(Color.gray);
+		jl.setHatchingSep(4);
+		jl.setHatchingStyle(PSTricksConstants.TOKEN_FILL_HLINES);
+		f = (Figure)jl.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(jl, true, true));
+		
+		jl.setHatchingStyle(PSTricksConstants.TOKEN_FILL_GRADIENT);
+		f = (Figure)jl.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(jl, true, true));
+		
+		jl.updateShape();
+		jl.onRelease();
+		jl.onDelimitorRelease();
+		jl.onDragged(new Point(), new Point());
+		jl.createNonRotatedShape2D();
+		jl.createShadowShape();
+		jl.createShape2D();
+		
+		jl.removePointAt(-1);
+		jl.updateBorders();
+		jl.updateShape();
+		
+		jl.removePointAt(0);
+		jl.updateBorders();
+		jl.updateShape();
+		
+		jl.removePointAt(0);
+		jl.updateBorders();
+		jl.updateShape();
+		
+		jl.setArrow1Style(PSTricksConstants.LRBRACKET_STYLE);
+		jl.setArrow2Style(PSTricksConstants.LARROW_STYLE);
+		jl.shift(20, 10);
+		jl.updateShape();
+		jl.updateBorders();
+		assertNotNull(jl.getCodePSTricks(drawBorders, Figure.PPC));
+	}
+	
+	
+	
+	
+	@Test
+	public void testLine() throws Exception
+	{
+		Line line = new Line(false);
+		Figure f;
+		
+		assertFalse(line.canBeFilled());
+		assertFalse(line.canBeHatched());
+		assertTrue(line.canHaveArrow());
+		assertTrue(line.canHaveShadow());
+		assertFalse(line.isBordersMovable());
+		assertTrue(line.isCustomizable());
+		assertTrue(line.isDashableOrDotable());
+		assertTrue(line.isDoubleBoundaryable());
+		assertTrue(line.isThicknessable());
+		assertTrue(line.isResizable());
+		
+		f = (Figure)line.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(line, true, true));
+		
+		line.updateStyleOfDelimitors();
+		line.updateGravityCenter();
+		line.updateShape();
+		line.shift(10, 10);
+		
+		try
+		{
+			line.shift(new LaTeXDrawPoint2D(), null);
+			fail();
+		}catch(IllegalArgumentException e) { /* */}
+		
+		line.addRotationAngle(10);
+		line.updateGravityCenter();
+		line.addRotationAngle(0.3);
+		line.updateShape();
+		line.updateStyleOfDelimitors();
+		
+		line.onClick(new Point(10,10));
+		line.isIn(new LaTeXDrawPoint2D());
+		line.isIn(line.getGravityCenter());
+		line.isIn(new Point());
+		
+		f = (Figure)line.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(line, true, true));
+		
+		line.setDotSep(2);
+		line.setCustomizable(false);
+		line.setFirstPoint(3, 3);
+		line.updateShape();
+		line.setHasDoubleBoundary(true);
+		
+		f = (Figure)line.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(line, true, true));
+		
+		line.setHasShadow(true);
+		
+		f = (Figure)line.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(line, true, true));
+		
+		line.updateShape();
+		line.onRelease();
+		line.onDelimitorRelease();
+		line.onDragged(new Point(), new Point());
+		line.createNonRotatedShape2D();
+		line.createShadowShape();
+		line.createShape2D();
+		line.updateShape();
+		
+		line.setArrow1Style(PSTricksConstants.LRBRACKET_STYLE);
+		line.setArrow2Style(PSTricksConstants.LARROW_STYLE);
+		line.shift(20, 10);
+		line.updateAandB();
+		line.updateShape();
+		assertNotNull(line.getCodePSTricks(drawBorders, Figure.PPC));
+	}
+	
+	
+	
+	
+	
+	@Test
+	public void testPolygon() throws Exception
+	{
+		LaTeXDrawPolygon pol = new LaTeXDrawPolygon(false);
+		Figure f;
+		
+		assertTrue(pol.canBeFilled());
+		assertTrue(pol.canBeHatched());
+		assertFalse(pol.canHaveArrow());
+		assertTrue(pol.canHaveShadow());
+		assertFalse(pol.isBordersMovable());
+		assertTrue(pol.isCustomizable());
+		assertTrue(pol.isDashableOrDotable());
+		assertTrue(pol.isDoubleBoundaryable());
+		assertTrue(pol.isThicknessable());
+		assertTrue(pol.isResizable());
+		
+		f = (Figure)pol.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(pol, true, true));
+		
+		pol.updateBorders();
+		pol.updateShape();
+		pol.updateGravityCenter();
+		
+		pol.addPoint(new LaTeXDrawPoint2D());
+		pol.addPoint(new LaTeXDrawPoint2D(3,3));
+		pol.addPoint(new LaTeXDrawPoint2D(1,3));
+		
+		pol.updateBorders();
+		pol.updateShape();
+		pol.updateGravityCenter();
+		
+		f = (Figure)pol.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(pol, true, true));
+		
+		pol.updateStyleOfDelimitors();
+		pol.updateGravityCenter();
+		pol.updateBorders();
+		pol.updateShape();
+		pol.updateBorders(new LaTeXDrawPoint2D());
+		pol.shift(10, 10);
+		
+		try
+		{
+			pol.shift(new LaTeXDrawPoint2D(), null);
+			fail();
+		}catch(IllegalArgumentException e) { /* */}
+		
+		pol.addRotationAngle(10);
+		pol.updateGravityCenter();
+		pol.addRotationAngle(0.3);
+		pol.updateShape();
+		pol.updateStyleOfDelimitors();
+		
+		pol.onClick(new Point(10,10));
+		pol.isIn(new LaTeXDrawPoint2D());
+		pol.isIn(pol.getGravityCenter());
+		pol.isIn(new Point());
+		
+		f = (Figure)pol.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(pol, true, true));
+		
+		pol.setDotSep(2);
+		pol.setCustomizable(false);
+		pol.setDoubleSep(2);
+		pol.setFirstPoint(3, 3);
+		pol.updateShape();
+		pol.setGradientMidPoint(0.3);
+		pol.setGradientAngle(0.5);
+		pol.setDoubleColor(Color.red);
+		pol.setGradientStartColor(Color.yellow);
+		pol.setGradientEndColor(Color.blue);
+		pol.setHasDoubleBoundary(true);
+		
+		f = (Figure)pol.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(pol, true, true));
+		
+		pol.setHasShadow(true);
+		
+		f = (Figure)pol.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(pol, true, true));
+		
+		pol.setHatchingAngle(3);
+		pol.setHatchingColor(Color.gray);
+		pol.setHatchingSep(4);
+		pol.setHatchingStyle(PSTricksConstants.TOKEN_FILL_HLINES);
+		f = (Figure)pol.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(pol, true, true));
+		
+		pol.setHatchingStyle(PSTricksConstants.TOKEN_FILL_GRADIENT);
+		f = (Figure)pol.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(pol, true, true));
+		
+		pol.updateShape();
+		pol.onRelease();
+		pol.onDelimitorRelease();
+		pol.onDragged(new Point(), new Point());
+		pol.createNonRotatedShape2D();
+		pol.createShadowShape();
+		pol.createShape2D();
+		
+		pol.removePointAt(-1);
+		pol.updateBorders();
+		pol.updateShape();
+		assertNotNull(pol.getCodePSTricks(drawBorders, Figure.PPC));
+		
+		pol.removePointAt(0);
+		pol.updateBorders();
+		pol.updateShape();
+		
+		pol.removePointAt(0);
+		pol.updateBorders();
+		pol.updateShape();
+		assertNull(pol.getCodePSTricks(drawBorders, Figure.PPC));
+	}
+	
+	
+	
+	@Test
+	public void testDot() throws Exception
+	{
+		Dot d = new Dot(new LaTeXDrawPoint2D(68,-876), true);
+		Figure f;
+		
+		assertFalse(d.canBeFilled());
+		assertFalse(d.canBeHatched());
+		assertFalse(d.canHaveArrow());
+		assertFalse(d.canHaveShadow());
+		assertFalse(d.isBordersMovable());
+		assertTrue(d.isCustomizable());
+		assertFalse(d.isDashableOrDotable());
+		assertFalse(d.isDoubleBoundaryable());
+		assertFalse(d.isThicknessable());
+		assertFalse(d.isResizable());
+		
+		f = (Figure)d.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(d, true, true));
+		
+		d.updateStyleOfDelimitors();
+		d.shift(10, 10);
+		d.updateShape();
+		
+		try
+		{
+			d.shift(new LaTeXDrawPoint2D(), null);
+			fail();
+		}catch(IllegalArgumentException e) { /* */}
+		
+		d.setRotationAngle(0.4);
+		d.updateShape();
+		
+		d.onClick(new Point(10,10));
+		d.isIn(new LaTeXDrawPoint2D());
+		d.isIn(d.getGravityCenter());
+		d.isIn(new Point());
+		
+		f = (Figure)d.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(d, true, true));
+		
+		d.onRelease();
+		d.onDelimitorRelease();
+		d.onDragged(new Point(), new Point());
+		d.createNonRotatedShape2D();
+		d.createShadowShape();
+		d.createShape2D();
+		d.updateShape();
+		assertNotNull(d.getCodePSTricks(drawBorders, Figure.PPC));
+	}
+	
+	
+	
+	
+	
+	@Test
+	public void testAkinPoints() throws Exception
+	{
+		AkinPoints ak = new AkinPoints(new LaTeXDrawPoint2D(12,76), true);
+		Figure f;
+		
+		assertTrue(ak.canBeFilled());
+		assertTrue(ak.canBeHatched());
+		assertFalse(ak.canHaveArrow());
+		assertTrue(ak.canHaveShadow());
+		assertFalse(ak.isBordersMovable());
+		assertTrue(ak.isCustomizable());
+		assertTrue(ak.isDashableOrDotable());
+		assertFalse(ak.isDoubleBoundaryable());
+		assertTrue(ak.isThicknessable());
+		assertTrue(ak.isResizable());
+		
+		f = (Figure)ak.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(ak, true, true));
+		
+		ak.updateBorders();
+		ak.updateShape();
+		ak.updateGravityCenter();
+		
+		ak.addPoint(new LaTeXDrawPoint2D());
+		ak.addPoint(new LaTeXDrawPoint2D(3,3));
+		ak.addPoint(new LaTeXDrawPoint2D(1,3));
+		
+		ak.updateBorders();
+		ak.updateShape();
+		ak.updateGravityCenter();
+		
+		f = (Figure)ak.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(ak, true, true));
+		
+		ak.updateStyleOfDelimitors();
+		ak.updateGravityCenter();
+		ak.updateBorders();
+		ak.updateShape();
+		ak.updateBorders(new LaTeXDrawPoint2D());
+		ak.shift(10, 10);
+		
+		try
+		{
+			ak.shift(new LaTeXDrawPoint2D(), null);
+			fail();
+		}catch(IllegalArgumentException e) { /* */}
+		
+		ak.addRotationAngle(10);
+		ak.updateGravityCenter();
+		ak.addRotationAngle(0.3);
+		ak.updateShape();
+		ak.updateStyleOfDelimitors();
+		
+		ak.onClick(new Point(10,10));
+		ak.isIn(new LaTeXDrawPoint2D());
+		ak.isIn(ak.getGravityCenter());
+		ak.isIn(new Point());
+		
+		f = (Figure)ak.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(ak, true, true));
+		
+		ak.setDotSep(2);
+		ak.setCustomizable(false);
+		ak.setDoubleSep(2);
+		ak.setFirstPoint(3, 3);
+		ak.updateShape();
+		ak.setGradientMidPoint(0.3);
+		ak.setGradientAngle(0.5);
+		ak.setDoubleColor(Color.red);
+		ak.setGradientStartColor(Color.yellow);
+		ak.setGradientEndColor(Color.blue);
+		ak.setHasDoubleBoundary(true);
+		
+		f = (Figure)ak.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(ak, true, true));
+		
+		ak.setHasShadow(true);
+		ak.setType(AkinPoints.TYPE_LINES);
+		ak.setInterval(30);
+		
+		f = (Figure)ak.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(ak, true, true));
+		
+		ak.setHatchingAngle(3);
+		ak.setHatchingColor(Color.gray);
+		ak.setHatchingSep(4);
+		ak.setHatchingStyle(PSTricksConstants.TOKEN_FILL_HLINES);
+		f = (Figure)ak.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(ak, true, true));
+		
+		ak.setHatchingStyle(PSTricksConstants.TOKEN_FILL_GRADIENT);
+		f = (Figure)ak.clone();
+		assertNotNull(f);
+		assertTrue(f.isParametersEquals(ak, true, true));
+		
+		ak.updateShape();
+		ak.onRelease();
+		ak.onDelimitorRelease();
+		ak.onDragged(new Point(), new Point());
+		ak.createNonRotatedShape2D();
+		ak.createShadowShape();
+		ak.createShape2D();
+		
+		ak.removePointAt(-1);
+		ak.updateBorders();
+		ak.updateShape();
+		assertNotNull(ak.getCodePSTricks(drawBorders, Figure.PPC));
+		
+		ak.removePointAt(0);
+		ak.updateBorders();
+		ak.updateShape();
+		
+		ak.removePointAt(0);
+		ak.updateBorders();
+		ak.updateShape();
+		assertNull(ak.getCodePSTricks(drawBorders, Figure.PPC));
+	}
+}
+
+
+
+
diff --git a/current/junit/test/TestShortcutsFrame.java b/current/junit/test/TestShortcutsFrame.java
new file mode 100644
index 0000000..31892f0
--- /dev/null
+++ b/current/junit/test/TestShortcutsFrame.java
@@ -0,0 +1,49 @@
+/*
+ * TestShortcutsFrame.java
+ */
+
+package junit.test;
+
+
+import junit.framework.TestCase;
+import latexDraw.ui.dialog.ShortcutsFrame;
+
+import org.junit.Test;
+
+
+
+/** 
+ * This class contains tests on the class ShortcutsFrame.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ * <br>
+ * 06/26/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestShortcutsFrame extends TestCase
+{
+
+	@Test
+	public void testShortcutsFrame()
+	{
+		try
+		{
+			new ShortcutsFrame();
+		}catch(Exception e)
+		{
+			fail();
+		}
+	}
+}
diff --git a/current/junit/test/parser/TestCodeParser.java b/current/junit/test/parser/TestCodeParser.java
new file mode 100644
index 0000000..c5a8e68
--- /dev/null
+++ b/current/junit/test/parser/TestCodeParser.java
@@ -0,0 +1,199 @@
+package junit.test.parser;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.CodeParser;
+
+public abstract class TestCodeParser extends TestCase
+{
+	protected CodeParser parser;
+	protected CodeParser parser2;
+	
+	
+	public void testInitialise()
+	{
+		parser.setPosition(10);
+		parser.initialise();
+		assertTrue(parser.getPosition()==0);
+	}
+	
+	
+	public void testGetCharAt()
+	{
+		parser.setCode("test");
+		assertEquals(CodeParser.EOC, parser.getCharAt(-2));
+		assertEquals(CodeParser.EOC, parser.getCharAt(10));
+		assertEquals(CodeParser.EOC, parser.getCharAt(4));
+		assertEquals('t', parser.getCharAt(0));
+		assertEquals('e', parser.getCharAt(1));
+		assertEquals('s', parser.getCharAt(2));
+		assertEquals('t', parser.getCharAt(3));
+	}
+	
+	
+	public void testGetCode()
+	{
+		String code = "this is my code";
+		
+		parser.setCode(code);
+		assertEquals(parser.getCode(), code);
+		
+		code = "";
+		
+		parser.setCode(code);
+		assertEquals(parser.getCode(), code);
+	}
+	
+	
+	public void testSetCode()
+	{
+		String code = "a piece of code";
+		
+		parser.setPosition(10);
+		parser.setCode(code);
+		assertTrue(parser.getPosition()==0);
+		parser.setCode(null);
+		assertEquals(parser.getCode(), code);
+	}
+	
+	
+	
+	public void testNextChar()
+	{
+		parser.setCode("code");
+		assertTrue(parser.nextChar()=='o');
+		assertTrue(parser.nextChar()=='d');
+		assertTrue(parser.nextChar()=='e');
+		assertTrue(parser.nextChar()==CodeParser.EOC);
+		assertTrue(parser.nextChar()==CodeParser.EOC);
+		assertTrue(parser.nextChar()==CodeParser.EOC);
+		parser.setPosition(20);
+		assertTrue(parser.nextChar()==CodeParser.EOC);
+	}
+	
+	
+	public void testGetChar()
+	{
+		parser.setCode("my code");
+		assertTrue(parser.getChar()=='m');
+		parser.setPosition(1);
+		assertTrue(parser.getChar()=='y');
+		parser.setPosition(2);
+		assertTrue(parser.getChar()==' ');
+		parser.setPosition(10);
+		assertTrue(parser.getChar()==CodeParser.EOC);
+	}
+	
+	
+	public void testIsEOC()
+	{
+		parser.setCode("");
+		assertTrue(parser.isEOC());
+		parser.setCode("aa");
+		assertFalse(parser.isEOC());
+		parser.nextChar();
+		assertFalse(parser.isEOC());
+		parser.nextChar();
+		assertTrue(parser.isEOC());
+		parser.setPosition(100);
+		assertTrue(parser.isEOC());
+	}
+	
+	
+	public void testGetPosition()
+	{
+		parser.initialise();
+		assertTrue(parser.getPosition()==0);
+		parser.setPosition(10);
+		assertTrue(parser.getPosition()==10);
+		parser.setPosition(100);
+		assertTrue(parser.getPosition()==100);
+	}
+	
+	
+	public abstract void testSkipComment();
+
+	public abstract void testSkipWSP();
+	
+	public abstract void testParse();
+	
+	
+	public void testIsEOL()
+	{
+		parser.setCode("");
+		assertFalse(parser.isEOL());
+		parser.setCode("a");
+		assertFalse(parser.isEOL());
+		parser.nextChar();
+		assertFalse(parser.isEOL());
+		parser.setCode("a\n");
+		assertFalse(parser.isEOL());
+		parser.nextChar();
+		assertTrue(parser.isEOL());
+		parser.setCode("a\r");
+		assertFalse(parser.isEOL());
+		parser.nextChar();
+		assertTrue(parser.isEOL());
+		parser.setCode("a\r\n");
+		assertFalse(parser.isEOL());
+		parser.nextChar();
+		assertTrue(parser.isEOL());
+		assertTrue(parser.getPosition()==2);
+	}
+	
+	
+	public void testSetPosition()
+	{
+		parser.setCode("");
+		parser.setPosition(10);
+		assertEquals(10, parser.getPosition());
+		parser.setPosition(-1);
+		assertEquals(10, parser.getPosition());
+		parser.setPosition(Integer.MAX_VALUE);
+		assertEquals(Integer.MAX_VALUE, parser.getPosition());
+		parser.setPosition(Integer.MIN_VALUE);
+		assertEquals(Integer.MAX_VALUE, parser.getPosition());
+	}
+	
+	
+	public void testIncLinePosition()
+	{
+		parser.setLinePosition(1);
+		parser.incLinePosition();
+		assertEquals(2, parser.getLinePosition());
+		parser.incLinePosition();
+		assertEquals(3, parser.getLinePosition());
+		parser.incLinePosition();
+		assertEquals(4, parser.getLinePosition());
+	}
+	
+	
+	
+	public void testSetLinePosition()
+	{
+		parser.setLinePosition(10);
+		assertEquals(10, parser.getLinePosition());
+		parser.setLinePosition(0);
+		assertEquals(10, parser.getLinePosition());
+		parser.setLinePosition(-10);
+		assertEquals(10, parser.getLinePosition());
+		parser.setLinePosition(20);
+		assertEquals(20, parser.getLinePosition());
+		parser.setLinePosition(Integer.MIN_VALUE);
+		assertEquals(20, parser.getLinePosition());
+		parser.setLinePosition(Integer.MAX_VALUE);
+		assertEquals(Integer.MAX_VALUE, parser.getLinePosition());
+	}
+	
+	
+	public void testGetCoreCode()
+	{
+		assertNotNull(parser.getCodeCore());
+	}
+	
+	
+	public void testSetCodeCore()
+	{
+		parser2.setCodeCore(parser.getCodeCore());
+		assertEquals(parser2.getCodeCore(), parser.getCodeCore());
+	}
+}
diff --git a/current/junit/test/parser/TestLPSTParser.java b/current/junit/test/parser/TestLPSTParser.java
new file mode 100644
index 0000000..7486638
--- /dev/null
+++ b/current/junit/test/parser/TestLPSTParser.java
@@ -0,0 +1,33 @@
+package junit.test.parser;
+
+import junit.test.parser.pst.TestPSTParser;
+import latexDraw.parsers.latexdraw.LPSTParser;
+
+import org.junit.Before;
+
+public class TestLPSTParser extends TestPSTParser
+{
+	@Override
+	@Before
+	public void setUp()
+	{
+		parser  = new LPSTParser("");
+		parser2 = new LPSTParser("");
+	}
+	
+	
+	
+	public void testGetShapes()
+	{
+		assertNotNull(((LPSTParser)parser).getShapes());
+	}
+	
+	
+	
+	@Override
+	public void testParse()
+	{
+		// TODO Auto-generated method stub
+
+	}
+}
diff --git a/current/junit/test/parser/pst/TestPSTParametersParser.java b/current/junit/test/parser/pst/TestPSTParametersParser.java
new file mode 100644
index 0000000..562acde
--- /dev/null
+++ b/current/junit/test/parser/pst/TestPSTParametersParser.java
@@ -0,0 +1,873 @@
+package junit.test.parser.pst;
+
+import java.awt.Color;
+
+import junit.test.parser.TestCodeParser;
+import latexDraw.parsers.pst.PSTParameters;
+import latexDraw.parsers.pst.PSTParametersParser;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+
+import org.junit.Before;
+
+public class TestPSTParametersParser extends TestCodeParser
+{
+	@Override
+	@Before
+	public void setUp()
+	{
+		parser  = new PSTParametersParser("", null);
+		parser2 = new PSTParametersParser("", null);
+	}
+
+	
+	@Override
+	public void testParse()
+	{
+		try {
+			PSTParametersParser pars = (PSTParametersParser)parser;
+			PSTParameters param      = new PSTParameters();
+			
+			pars.setParam(param);
+			pars.setCode("");
+			pars.parse();
+			
+			try {
+				pars.setCode("  [");
+				pars.parse();
+				fail();
+			}catch(Exception e) { e.printStackTrace(); }
+			
+			pars.setCode("[ ]");
+			pars.parse();
+			pars.setCode("[]");
+			pars.parse();
+			pars.setCode("]");
+			pars.parse();
+			pars.setCode("[%comment\n]");
+			pars.parse();
+			pars.setCode("[ \n \t    ]");
+			pars.parse();
+			pars.setCode("[linewidth=0.2, linewwidth=0.2]");
+			pars.parse();
+			pars.setCode("[linewidth=0.2 linewwidth=0.2]");
+			pars.parse();
+			pars.setCode("[linewidth=0.2, ,  linecolor=red]");
+			pars.parse();
+			assertEquals(Color.RED, param.lineColor);
+			pars.setCode("[linewidth=0.2,linewidth=5]");
+			pars.parse();
+			assertEquals(5., param.lineWidth);
+			pars.setCode("[,]");
+			pars.parse();
+			pars.setCode("[=2]");
+			pars.parse();
+			pars.setCode("[fldsjf=fdsf]");
+			pars.parse();
+			pars.setCode("[fldsjf=]");
+			pars.parse();
+			pars.setCode("[fldsjf=,]");
+			pars.parse();
+			pars.setCode("[=,dfs]");
+			pars.parse();
+			
+			parse_linewidth(param);
+			parse_doubleline(param);
+			parse_linecolor(param);
+			parse_boxsep(param);
+			parse_dotsep(param);
+			parse_doublesep(param);
+			parse_doublecolor(param);
+			parse_dimen(param);
+			parse_dash(param);
+			parse_fillcolor(param);
+			parse_fillstyle(param);
+			parse_framearc(param);
+			parse_framesep(param);
+			parse_gradbegin(param);
+			parse_gradend(param);
+			parse_gradlines(param);
+			parse_gradmidpoint(param);
+			parse_gradangle(param);
+			parse_gangle(param);
+			parse_hatchangle(param);
+			parse_hatchwidth(param);
+			parse_hatchsep(param);
+			parse_hatchcolor(param);
+			parse_linestyle(param);
+			parse_shadowsize(param);
+			parse_shadowangle(param);
+			parse_shadowcolor(param);
+		}catch(Exception e) { fail(); }
+	}
+
+	
+	private void parse_shadowcolor(PSTParameters param)
+	{
+		try {
+			Color c = new Color(120,110,120);
+			DviPsColors.addUserColour(c, "mycol4");
+			
+			parser.setCode("[shadowcolor \t=\t white]");
+			parser.parse();
+			assertEquals(Color.WHITE, param.shadowCol);
+			parser.setCode("[shadowcolor\r=\nmycol4]");
+			parser.parse();
+			assertEquals(c, param.shadowCol);
+			parser.setCode("[shadowcolor\t=\tfdsfds]");
+			parser.parse();
+			assertEquals(c, param.shadowCol);
+			parser.setCode("[shadowcolor\r=]");
+			parser.parse();
+			assertEquals(c, param.shadowCol);
+			parser.setCode("[shadowcolor%dfsfds\n\t\r]");
+			parser.parse();
+			assertEquals(c, param.shadowCol);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_shadowangle(PSTParameters param)
+	{
+		try {
+			parser.setCode("[shadowangle \t  %       fds   \n \t   %dfsf\n \t =\t\n\r.4]");
+			parser.parse();
+			assertEquals(.4, param.shadowAngle);
+			parser.setCode("[shadowangle%dsq\n=\t0.8]");
+			parser.parse();
+			assertEquals(.8, param.shadowAngle);
+			parser.setCode("[shadowangle=20..]");
+			parser.parse();
+			assertEquals(0.8, param.shadowAngle);
+			parser.setCode("[shadowangle\t=%dsq\n-20]");
+			parser.parse();
+			assertEquals(-20., param.shadowAngle);
+			parser.setCode("[shadowangle=-.2]");
+			parser.parse();
+			assertEquals(-.2, param.shadowAngle);
+			parser.setCode("[shadowangle\t=\t---+--0.40]");
+			parser.parse();
+			assertEquals(-.4, param.shadowAngle);
+			parser.setCode("[shadowangle\t=\t+++--+0.80]");
+			parser.parse();
+			assertEquals(.8, param.shadowAngle);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_shadowsize(PSTParameters param)
+	{
+		try {
+			parser.setCode("[shadowsize\t=\t \r\n.4]");
+			parser.parse();
+			assertEquals(.4, param.shadowSize);
+			parser.setCode("[shadowsize= .8\r\n\tcm]");
+			parser.parse();
+			assertEquals(.8, param.shadowSize);
+			parser.setCode("[shadowsize=2 cm\t]");
+			parser.parse();
+			assertEquals(2., param.shadowSize);
+			parser.setCode("[shadowsize\r%fdsf\n=\n\t 2.2%comment\r cm]");
+			parser.parse();
+			assertEquals(2.2, param.shadowSize);
+			parser.setCode("[shadowsize=2 in]");
+			parser.parse();
+			assertEquals(2.*PSTricksConstants.INCH_VAL_CM, param.shadowSize);
+			parser.setCode("[%fdfsd\n shadowsize =2pt ]");
+			parser.parse();
+			assertEquals(2./PSTricksConstants.CM_VAL_PT, param.shadowSize);
+			parser.setCode("[shadowsize = 2mm]");
+			parser.parse();
+			assertEquals(0.2, param.shadowSize);
+		}catch(Exception e) { fail(); }
+	}
+
+	
+	
+	private void parse_linestyle(PSTParameters param)
+	{
+		try {
+			parser.setCode("[linestyle = test]");
+			parser.parse();
+			assertEquals("test", param.lineStyle);
+			parser.setCode("[linestyle =]");
+			parser.parse();
+			assertEquals("test", param.lineStyle);
+			parser.setCode("[linestyle =%fdsf\n]");
+			parser.parse();
+			assertEquals("test", param.lineStyle);
+			parser.setCode("[linestyle =1289K3]");
+			parser.parse();
+			assertEquals("test", param.lineStyle);
+			parser.setCode("[linestyle =0.3]");
+			parser.parse();
+			assertEquals("test", param.lineStyle);
+			parser.setCode("[linestyle\t=\taa]");
+			parser.parse();
+			assertEquals("aa", param.lineStyle);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_hatchcolor(PSTParameters param)
+	{
+		try {
+			Color c = new Color(120,110,110);
+			DviPsColors.addUserColour(c, "mycol3");
+			
+			parser.setCode("[hatchcolor \t=\t white]");
+			parser.parse();
+			assertEquals(Color.WHITE, param.hatchCol);
+			parser.setCode("[hatchcolor\r=\nmycol3]");
+			parser.parse();
+			assertEquals(c, param.hatchCol);
+			parser.setCode("[hatchcolor\t=\tfdsfds]");
+			parser.parse();
+			assertEquals(c, param.hatchCol);
+			parser.setCode("[hatchcolor\r=]");
+			parser.parse();
+			assertEquals(c, param.hatchCol);
+			parser.setCode("[hatchcolor%dfsfds\n\t\r]");
+			parser.parse();
+			assertEquals(c, param.hatchCol);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_hatchsep(PSTParameters param)
+	{
+		try {
+			parser.setCode("[hatchsep\t=\t \r\n.4]");
+			parser.parse();
+			assertEquals(.4, param.hatchSep);
+			parser.setCode("[hatchsep= .8\r\n\tcm]");
+			parser.parse();
+			assertEquals(.8, param.hatchSep);
+			parser.setCode("[hatchsep=2 cm\t]");
+			parser.parse();
+			assertEquals(2., param.hatchSep);
+			parser.setCode("[hatchsep\r%fdsf\n=\n\t 2.2%comment\r cm]");
+			parser.parse();
+			assertEquals(2.2, param.hatchSep);
+			parser.setCode("[hatchsep=2 in]");
+			parser.parse();
+			assertEquals(2.*PSTricksConstants.INCH_VAL_CM, param.hatchSep);
+			parser.setCode("[hatchsep = 2 pt ]");
+			parser.parse();
+			assertEquals(2./PSTricksConstants.CM_VAL_PT, param.hatchSep);
+			parser.setCode("[hatchsep = 2mm]");
+			parser.parse();
+			assertEquals(0.2, param.hatchWidth);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_hatchwidth(PSTParameters param)
+	{
+		try {
+			parser.setCode("[hatchwidth\t=\t \r\n.4]");
+			parser.parse();
+			assertEquals(.4, param.hatchWidth);
+			parser.setCode("[hatchwidth= .8\r\ncm]");
+			parser.parse();
+			assertEquals(.8, param.hatchWidth);
+			parser.setCode("[hatchwidth=2 cm]");
+			parser.parse();
+			assertEquals(2., param.hatchWidth);
+			parser.setCode("[hatchwidth\r%fdsf\n=\n\t 2.2%comment\r cm]");
+			parser.parse();
+			assertEquals(2.2, param.hatchWidth);
+			parser.setCode("[hatchwidth=2 in]");
+			parser.parse();
+			assertEquals(2.*PSTricksConstants.INCH_VAL_CM, param.hatchWidth);
+			parser.setCode("[hatchwidth = 2 pt ]");
+			parser.parse();
+			assertEquals(2./PSTricksConstants.CM_VAL_PT, param.hatchWidth);
+			parser.setCode("[hatchwidth = 2mm]");
+			parser.parse();
+			assertEquals(0.2, param.hatchWidth);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	private void parse_hatchangle(PSTParameters param)
+	{
+		try {
+			parser.setCode("[hatchangle \t  %       fds   \n \t   %dfsf\n \t =\t\n\r.4]");
+			parser.parse();
+			assertEquals(.4, param.hatchAngle);
+			parser.setCode("[hatchangle%dsq\n=\t0.8]");
+			parser.parse();
+			assertEquals(.8, param.hatchAngle);
+			parser.setCode("[hatchangle=20..]");
+			parser.parse();
+			assertEquals(0.8, param.hatchAngle);
+			parser.setCode("[hatchangle\t=%dsq\n-20]");
+			parser.parse();
+			assertEquals(-20., param.hatchAngle);
+			parser.setCode("[hatchangle=-.2]");
+			parser.parse();
+			assertEquals(-.2, param.hatchAngle);
+			parser.setCode("[hatchangle\t=\t---+--0.40]");
+			parser.parse();
+			assertEquals(-.4, param.hatchAngle);
+			parser.setCode("[hatchangle\t=\t+++--+0.80]");
+			parser.parse();
+			assertEquals(.8, param.hatchAngle);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	private void parse_gangle(PSTParameters param)
+	{
+		try {
+			parser.setCode("[gangle \t  %       fds   \n \t   %dfsf\n \t =\t\n\r.4]");
+			parser.parse();
+			assertEquals(.4, param.gangle);
+			parser.setCode("[gangle%dsq\n=0.8]");
+			parser.parse();
+			assertEquals(.8, param.gangle);
+			parser.setCode("[gangle=20..]");
+			parser.parse();
+			assertEquals(0.8, param.gangle);
+			parser.setCode("[gangle\t=%dsq\n-20]");
+			parser.parse();
+			assertEquals(-20., param.gangle);
+			parser.setCode("[gangle=-.2]");
+			parser.parse();
+			assertEquals(-.2, param.gangle);
+			parser.setCode("[gangle\t=\t---+--0.40]");
+			parser.parse();
+			assertEquals(-.4, param.gangle);
+			parser.setCode("[gangle\t=\t+++--+0.80]");
+			parser.parse();
+			assertEquals(.8, param.gangle);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	private void parse_gradangle(PSTParameters param)
+	{
+		try {
+			parser.setCode("[gradangle\t%       fds   \r  %fdsfsd\n \t   %dfsf\n \t =\t\n\r.4]");
+			parser.parse();
+			assertEquals(.4, param.gradAngle);
+			parser.setCode("[gradangle%dsq\n=0.8]");
+			parser.parse();
+			assertEquals(.8, param.gradAngle);
+			parser.setCode("[gradangle=20]");
+			parser.parse();
+			assertEquals(20., param.gradAngle);
+			parser.setCode("[gradangle\t=%dsq\n-20]");
+			parser.parse();
+			assertEquals(-20., param.gradAngle);
+			parser.setCode("[gradangle=-.2]");
+			parser.parse();
+			assertEquals(-.2, param.gradAngle);
+			parser.setCode("[gradangle\t=\t---0.40]");
+			parser.parse();
+			assertEquals(-.4, param.gradAngle);
+			parser.setCode("[gradangle\t=\t+0.80]");
+			parser.parse();
+			assertEquals(.8, param.gradAngle);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	private void parse_gradmidpoint(PSTParameters param)
+	{
+		try {
+			parser.setCode("[gradmidpoint\t%       fds   \r  %fdsfsd\n \t   %dfsf\n \t =\t\n\r.4]");
+			parser.parse();
+			assertEquals(.4, param.gradMidPoint);
+			parser.setCode("[gradmidpoint=0.8]");
+			parser.parse();
+			assertEquals(.8, param.gradMidPoint);
+			parser.setCode("[gradmidpoint=2]");
+			parser.parse();
+			assertEquals(0.8, param.gradMidPoint);
+			parser.setCode("[gradmidpoint=20]");
+			parser.parse();
+			assertEquals(0.8, param.gradMidPoint);
+			parser.setCode("[gradmidpoint=-2]");
+			parser.parse();
+			assertEquals(0.8, param.gradMidPoint);
+			parser.setCode("[gradmidpoint\t=\t0.5]");
+			parser.parse();
+			assertEquals(0.5, param.gradMidPoint);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_gradlines(PSTParameters param)
+	{
+		try {
+			parser.setCode("[gradlines\t=\t4]");
+			parser.parse();
+			assertEquals(4, param.gradLines);
+			parser.setCode("[gradlines=.8]");
+			parser.parse();
+			assertEquals(4, param.gradLines);
+			parser.setCode("[gradlines=2]");
+			parser.parse();
+			assertEquals(2, param.gradLines);
+			parser.setCode("[gradlines\t=\t1.4]");
+			parser.parse();
+			assertEquals(1, param.gradLines);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_gradend(PSTParameters param)
+	{
+		try {
+			Color c = new Color(110,110,110);
+			DviPsColors.addUserColour(c, "mycol2");
+			
+			parser.setCode("[gradend \t=\t white]");
+			parser.parse();
+			assertEquals(Color.WHITE, param.gradEnd);
+			parser.setCode("[gradend\r=\nmycol2]");
+			parser.parse();
+			assertEquals(c, param.gradEnd);
+			parser.setCode("[gradend=fdsfds]");
+			parser.parse();
+			assertEquals(c, param.gradEnd);
+			parser.setCode("[gradend=]");
+			parser.parse();
+			assertEquals(c, param.gradEnd);
+			parser.setCode("[gradend%dfsfds\n\t\r]");
+			parser.parse();
+			assertEquals(c, param.gradEnd);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_gradbegin(PSTParameters param)
+	{
+		try {
+			Color c = new Color(100,100,100);
+			DviPsColors.addUserColour(c, "mycol");
+			
+			parser.setCode("[gradbegin \t=\t white]");
+			parser.parse();
+			assertEquals(Color.WHITE, param.gradBegin);
+			parser.setCode("[gradbegin %fdsf\r= \n  mycol]");
+			parser.parse();
+			assertEquals(c, param.gradBegin);
+			parser.setCode("[gradbegin=fdsfds]");
+			parser.parse();
+			assertEquals(c, param.gradBegin);
+			parser.setCode("[gradbegin=]");
+			parser.parse();
+			assertEquals(c, param.gradBegin);
+			parser.setCode("[gradbegin%dfsfds\n\t\r]");
+			parser.parse();
+			assertEquals(c, param.gradBegin);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	private void parse_framearc(PSTParameters param)
+	{
+		try {
+			parser.setCode("[framearc\t=\t.4]");
+			parser.parse();
+			assertEquals(.4, param.frameArc);
+			parser.setCode("[framearc=0.8]");
+			parser.parse();
+			assertEquals(.8, param.frameArc);
+			parser.setCode("[framearc=2]");
+			parser.parse();
+			assertEquals(2., param.frameArc);
+			parser.setCode("[framearc\t=\t4]");
+			parser.parse();
+			assertEquals(4., param.frameArc);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_framesep(PSTParameters param)
+	{
+		try {
+			parser.setCode("[framesep\t=\t \r\n.4]");
+			parser.parse();
+			assertEquals(.4, param.frameSep);
+			parser.setCode("[framesep= .8\r\ncm]");
+			parser.parse();
+			assertEquals(.8, param.frameSep);
+			parser.setCode("[framesep=2 cm]");
+			parser.parse();
+			assertEquals(2., param.frameSep);
+			parser.setCode("[framesep\r%fdsf\n=\n\t 2.2%comment\r cm]");
+			parser.parse();
+			assertEquals(2.2, param.frameSep);
+			parser.setCode("[framesep=2 in]");
+			parser.parse();
+			assertEquals(2.*PSTricksConstants.INCH_VAL_CM, param.frameSep);
+			parser.setCode("[framesep = 2 pt ]");
+			parser.parse();
+			assertEquals(2./PSTricksConstants.CM_VAL_PT, param.frameSep);
+			parser.setCode("[framesep = 2mm]");
+			parser.parse();
+			assertEquals(0.2, param.frameSep);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_fillcolor(PSTParameters param)
+	{
+		try {
+			parser.setCode("[fillcolor=green]");
+			parser.parse();
+			assertEquals(Color.GREEN, param.fillColor);
+			parser.setCode("[\n\r\t  fillcolor\t%fdsf\r=\ncyan]");
+			parser.parse();
+			assertEquals(Color.CYAN, param.fillColor);
+			parser.setCode("[fillcolor=fdsfds]");
+			parser.parse();
+			assertEquals(Color.CYAN, param.fillColor);
+			parser.setCode("[fillcolor =]");
+			parser.parse();
+			assertEquals(Color.CYAN, param.fillColor);
+			parser.setCode("[fillcolor %dfsfds\n]");
+			parser.parse();
+			assertEquals(Color.CYAN, param.fillColor);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	private void parse_fillstyle(PSTParameters param)
+	{
+		try {
+			parser.setCode("[fillstyle = test]");
+			parser.parse();
+			assertEquals("test", param.fillStyle);
+			parser.setCode("[fillstyle = test*]");
+			parser.parse();
+			assertEquals("test*", param.fillStyle);
+			parser.setCode("[fillstyle =]");
+			parser.parse();
+			assertEquals("test*", param.fillStyle);
+			parser.setCode("[fillstyle =%fdsf\n]");
+			parser.parse();
+			assertEquals("test*", param.fillStyle);
+			parser.setCode("[fillstyle =1289K3]");
+			parser.parse();
+			assertEquals("test*", param.fillStyle);
+			parser.setCode("[fillstyle =0.3]");
+			parser.parse();
+			assertEquals("test*", param.fillStyle);
+			parser.setCode("[fillstyle\t=\taa]");
+			parser.parse();
+			assertEquals("aa", param.fillStyle);
+			parser.setCode("[fillstyle\t=*]");
+			parser.parse();
+			assertEquals("aa", param.fillStyle);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_dash(PSTParameters param)
+	{
+		try {
+			parser.setCode("[dash=.4 2]");
+			parser.parse();
+			assertEquals(.4, param.dashBlack);
+			assertEquals(2., param.dashWhite);
+			parser.setCode("[dash=.8 cm \n %cfds %fdsf\n %fdsf \r 4 \t cm ]");
+			parser.parse();
+			assertEquals(.8, param.dashBlack);
+			assertEquals(4., param.dashWhite);
+			parser.setCode("[dash=.8mm \t%fdsf\n %fdsf \r 4mm ]");
+			parser.parse();
+			assertEquals(.08, param.dashBlack);
+			assertEquals(.4, param.dashWhite);
+			parser.setCode("[dash=.9mm mm ]");
+			parser.parse();
+			assertEquals(.08, param.dashBlack);
+			assertEquals(.4, param.dashWhite);
+			parser.setCode("[dash=.9fd ]");
+			parser.parse();
+			assertEquals(.08, param.dashBlack);
+			assertEquals(.4, param.dashWhite);
+			parser.setCode("[dash=.d9fd ]");
+			parser.parse();
+			assertEquals(.08, param.dashBlack);
+			assertEquals(.4, param.dashWhite);
+			parser.setCode("[dash\r=\n.d9fd ]");
+			parser.parse();
+			assertEquals(.08, param.dashBlack);
+			assertEquals(.4, param.dashWhite);
+			parser.setCode("[dash=.9cm0.1cm]");
+			parser.parse();
+			assertEquals(.9, param.dashBlack);
+			assertEquals(.1, param.dashWhite);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_dimen(PSTParameters param)
+	{
+		try {
+			parser.setCode("[dimen = outer]");
+			parser.parse();
+			assertEquals(PSTricksConstants.BORDERS_INSIDE, param.borderPos);
+			parser.setCode("[dimen % fdsjif % fds\r = middle]");
+			parser.parse();
+			assertEquals(PSTricksConstants.BORDERS_MIDDLE, param.borderPos);
+			parser.setCode("[\n %fdsfd \n \t dimen = %fds \n \n \n inner]");
+			parser.parse();
+			assertEquals(PSTricksConstants.BORDERS_OUTSIDE, param.borderPos);
+			parser.setCode("[dimen = ]");
+			parser.parse();
+			assertEquals(PSTricksConstants.BORDERS_OUTSIDE, param.borderPos);
+			parser.setCode("[dimen = %fdsfds \n ]");
+			parser.parse();
+			assertEquals(PSTricksConstants.BORDERS_OUTSIDE, param.borderPos);
+			parser.setCode("[dimen = fdsfds ]");
+			parser.parse();
+			assertEquals(PSTricksConstants.BORDERS_OUTSIDE, param.borderPos);
+			parser.setCode("[dimen = 124 ]");
+			parser.parse();
+			assertEquals(PSTricksConstants.BORDERS_OUTSIDE, param.borderPos);
+			parser.setCode("[dimen = éà ]");
+			parser.parse();
+			assertEquals(PSTricksConstants.BORDERS_OUTSIDE, param.borderPos);
+			parser.setCode("[dimen %dfsf \n=]");
+			parser.parse();
+			assertEquals(PSTricksConstants.BORDERS_OUTSIDE, param.borderPos);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_doublecolor(PSTParameters param)
+	{
+		try {
+			parser.setCode("[doublecolor = green]");
+			parser.parse();
+			assertEquals(Color.GREEN, param.dbleColor);
+			parser.setCode("[doublecolor %fdsf\r= \n  cyan]");
+			parser.parse();
+			assertEquals(Color.CYAN, param.dbleColor);
+			parser.setCode("[doublecolor=fdsfds]");
+			parser.parse();
+			assertEquals(Color.CYAN, param.dbleColor);
+			parser.setCode("[doublecolor =]");
+			parser.parse();
+			assertEquals(Color.CYAN, param.dbleColor);
+			parser.setCode("[doublecolor %dfsfds\n]");
+			parser.parse();
+			assertEquals(Color.CYAN, param.dbleColor);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_doublesep(PSTParameters param)
+	{
+		try {
+			parser.setCode("[doublesep=.4]");
+			parser.parse();
+			assertEquals(.4, param.dbleSep);
+			parser.setCode("[doublesep=0.8cm]");
+			parser.parse();
+			assertEquals(.8, param.dbleSep);
+			parser.setCode("[doublesep=2 cm]");
+			parser.parse();
+			assertEquals(2., param.dbleSep);
+			parser.setCode("[doublesep \r %fdsf\n\t=\n\t 2.2\n%comment\r cm]");
+			parser.parse();
+			assertEquals(2.2, param.dbleSep);
+			parser.setCode("[doublesep=2 in]");
+			parser.parse();
+			assertEquals(2.*PSTricksConstants.INCH_VAL_CM, param.dbleSep);
+			parser.setCode("[doublesep = 2 pt ]");
+			parser.parse();
+			assertEquals(2./PSTricksConstants.CM_VAL_PT, param.dbleSep);
+			parser.setCode("[doublesep = 2mm]");
+			parser.parse();
+			assertEquals(0.2, param.dbleSep);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	private void parse_dotsep(PSTParameters param)
+	{
+		try {
+			parser.setCode("[dotsep=2]");
+			parser.parse();
+			assertEquals(2., param.dotStep);
+			parser.setCode("[dotsep=2cm]");
+			parser.parse();
+			assertEquals(2., param.dotStep);
+			parser.setCode("[dotsep=2 cm]");
+			parser.parse();
+			assertEquals(2., param.dotStep);
+			parser.setCode("[dotsep\r\t=2.2\n%comment\r cm]");
+			parser.parse();
+			assertEquals(2.2, param.dotStep);
+			parser.setCode("[dotsep=2 in]");
+			parser.parse();
+			assertEquals(2.*PSTricksConstants.INCH_VAL_CM, param.dotStep);
+			parser.setCode("[dotsep=2 pt]");
+			parser.parse();
+			assertEquals(2./PSTricksConstants.CM_VAL_PT, param.dotStep);
+			parser.setCode("[dotsep=2 mm]");
+			parser.parse();
+			assertEquals(0.2, param.dotStep);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	private void parse_boxsep(PSTParameters param)
+	{
+		try {
+			parser.setCode("[boxsep=true]");
+			parser.parse();
+			assertTrue(param.boxSep);
+			parser.setCode("[boxsep=false]");
+			parser.parse();
+			assertFalse(param.boxSep);
+			parser.setCode("[boxsep=]");
+			parser.parse();
+			assertFalse(param.boxSep);
+			parser.setCode("[boxsep=fdsfds]");
+			parser.parse();
+			assertFalse(param.boxSep);
+			parser.setCode("[boxsep=%fdjsf\n \t true]");
+			parser.parse();
+			assertTrue(param.boxSep);
+			parser.setCode("[boxsep= \t %fdjsf\n\r \t false]");
+			parser.parse();
+			assertFalse(param.boxSep);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_linecolor(PSTParameters param)
+	{
+		try {
+			parser.setCode("[linecolor=blue]");
+			parser.parse();
+			assertEquals(Color.BLUE, param.lineColor);
+			parser.setCode("[linecolor=yellow]");
+			parser.parse();
+			assertEquals(Color.YELLOW, param.lineColor);
+			parser.setCode("[linecolor=fdsfds]");
+			parser.parse();
+			assertEquals(Color.YELLOW, param.lineColor);
+			parser.setCode("[linecolor=]");
+			parser.parse();
+			assertEquals(Color.YELLOW, param.lineColor);
+			parser.setCode("[linecolor]");
+			parser.parse();
+			assertEquals(Color.YELLOW, param.lineColor);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	private void parse_doubleline(PSTParameters param)
+	{
+		try {
+			parser.setCode("[doubleline=true]");
+			parser.parse();
+			assertTrue(param.dbleLine);
+			parser.setCode("[doubleline=false]");
+			parser.parse();
+			assertFalse(param.dbleLine);
+			parser.setCode("[doubleline=fdsfds]");
+			parser.parse();
+			assertFalse(param.dbleLine);
+			parser.setCode("[doubleline=]");
+			parser.parse();
+			assertFalse(param.dbleLine);
+			parser.setCode("[doubleline]");
+			parser.parse();
+			assertFalse(param.dbleLine);
+			parser.setCode("[doubleline==_è-é]");
+			parser.parse();
+			assertFalse(param.dbleLine);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	private void parse_linewidth(PSTParameters param)
+	{
+		try {
+			parser.setCode("[linewidth=0.2cm]");
+			parser.parse();
+			assertEquals(0.2, param.lineWidth);
+			parser.setCode("[linewidth=0.2mm]");
+			parser.parse();
+			assertEquals(0.02, param.lineWidth);
+			parser.setCode("[linewidth=0.2]");
+			parser.parse();
+			assertEquals(0.2, param.lineWidth);
+			parser.setCode("[linewidth=0.2 pt]");
+			parser.parse();
+			assertEquals(0.2/PSTricksConstants.CM_VAL_PT, param.lineWidth);
+			parser.setCode("[linewidth=0.2 in]");
+			parser.parse();
+			assertEquals(0.2*PSTricksConstants.INCH_VAL_CM, param.lineWidth);
+			parser.setCode("[linewidth=0.2 in]");
+			parser.parse();
+			assertEquals(0.2*PSTricksConstants.INCH_VAL_CM, param.lineWidth);
+			parser.setCode("[linewidth= aa ]");
+			parser.parse();
+			assertEquals(0.2*PSTricksConstants.INCH_VAL_CM, param.lineWidth);
+			parser.setCode("[linewidth= aa in]");
+			parser.parse();
+			assertEquals(0.2*PSTricksConstants.INCH_VAL_CM, param.lineWidth);
+			parser.setCode("[linewidth= in]");
+			parser.parse();
+			assertEquals(0.2*PSTricksConstants.INCH_VAL_CM, param.lineWidth);
+		}catch(Exception e) { fail(); }
+	}
+	
+	
+	@Override
+	public void testSkipComment()
+	{
+		parser.setCode("%comment\na");
+		assertEquals(parser.skipComment(), "comment");
+		assertEquals(parser.getPosition(), 9);
+		assertEquals(parser.getLinePosition(), 2);
+		parser.setCode("\\%not a comment\na");
+		assertNull(parser.skipComment());
+		assertEquals(parser.getPosition(), 0);
+		assertEquals(parser.getLinePosition(), 1);
+		parser.setCode("%comment");
+		assertEquals(parser.skipComment(), "comment");
+		assertEquals(parser.getPosition(), 9);
+		assertEquals(parser.getLinePosition(), 2);
+	}
+
+	
+	
+	@Override
+	public void testSkipWSP()
+	{
+		parser.setCode("   test");
+		parser.skipWSP();
+		assertEquals('t', parser.getChar());
+		parser.skipWSP();
+		assertEquals('t', parser.getChar());
+		parser.setCode("");
+		parser.skipWSP();
+		assertTrue(parser.isEOC());
+		parser.setCode(" \n \t \r  test");
+		parser.skipWSP();
+		assertEquals('t', parser.getChar());
+		parser.skipWSP();
+		assertEquals('t', parser.getChar());
+	}
+}
diff --git a/current/junit/test/parser/pst/TestPSTParser.java b/current/junit/test/parser/pst/TestPSTParser.java
new file mode 100644
index 0000000..626ab33
--- /dev/null
+++ b/current/junit/test/parser/pst/TestPSTParser.java
@@ -0,0 +1,44 @@
+package junit.test.parser.pst;
+
+import junit.test.parser.TestCodeParser;
+
+public abstract class TestPSTParser extends TestCodeParser
+{
+	@Override
+	public void testSkipComment()
+	{
+		parser.setCode("%comment\na");
+		assertEquals(parser.skipComment(), "comment");
+		assertEquals(parser.getPosition(), 9);
+		assertEquals(parser.getLinePosition(), 2);
+		parser.setCode("\\%not a comment\na");
+		assertNull(parser.skipComment());
+		assertEquals(parser.getPosition(), 0);
+		assertEquals(parser.getLinePosition(), 1);
+		parser.setCode("%comment");
+		assertEquals(parser.skipComment(), "comment");
+		assertEquals(parser.getPosition(), 9);
+		assertEquals(parser.getLinePosition(), 2);
+	}
+
+
+
+
+	@Override
+	public void testSkipWSP()
+	{
+		parser.setCode("   test");
+		parser.skipWSP();
+		assertEquals('t', parser.getChar());
+		parser.skipWSP();
+		assertEquals('t', parser.getChar());
+		parser.setCode("");
+		parser.skipWSP();
+		assertTrue(parser.isEOC());
+		parser.setCode(" \n \t \r  test");
+		parser.skipWSP();
+		assertEquals('t', parser.getChar());
+		parser.skipWSP();
+		assertEquals('t', parser.getChar());
+	}
+}
diff --git a/current/junit/test/parser/svg/parsers/TestCSSStyleParser.java b/current/junit/test/parser/svg/parsers/TestCSSStyleParser.java
new file mode 100644
index 0000000..554e87c
--- /dev/null
+++ b/current/junit/test/parser/svg/parsers/TestCSSStyleParser.java
@@ -0,0 +1,134 @@
+package junit.test.parser.svg.parsers;
+
+import java.text.ParseException;
+
+import junit.test.parser.TestCodeParser;
+import latexDraw.parsers.svg.parsers.CSSStyleHandler;
+import latexDraw.parsers.svg.parsers.CSSStyleParser;
+
+import org.junit.Before;
+
+public class TestCSSStyleParser extends TestCodeParser implements CSSStyleHandler
+{
+	protected String name;
+	
+	protected String value;
+	
+	
+	@Override
+	@Before
+	public void setUp()
+	{
+		parser  = new CSSStyleParser("", this);
+		parser2 = new CSSStyleParser("", this);
+	}
+	
+	
+	@Override
+	public void testParse()
+	{
+		try {
+			name = null;
+			value = null;
+			parser.setCode("");
+			parser.parse();
+			assertNull(name);
+			assertNull(value);
+		}catch(ParseException e) {fail();}
+		try {
+			name = null;
+			value = null;
+			parser.setCode("\t \n/**/ \n\r \t /* fldijfsd */ \n");
+			parser.parse();
+			assertNull(name);
+			assertNull(value);
+		}catch(ParseException e) {fail();}
+		try {
+			parser.setCode("stroke\t \n/**/ :\n\r \t red/* fldijfsd */ \n");
+			parser.parse();
+			assertEquals(name, "stroke");
+			assertEquals(value, "red");
+		}catch(ParseException e) {fail();}
+		try {
+			parser.setCode("stroke\t \n/**/ :\n\r \t red/* fldijfsd */ ;\nstroke-width : 2cm");
+			parser.parse();
+			assertEquals(name, "stroke-width");
+			assertEquals(value, "2cm");
+		}catch(ParseException e) {fail();}
+	}
+
+	
+	
+	
+	@Override
+	public void testSkipComment()
+	{
+		try {
+			parser.setCode("fill:/*test*/green");
+			parser.parse();
+			assertEquals(name, "fill");
+			assertEquals(value, "green");
+		}catch(ParseException e) {fail();}
+		
+		try {
+			parser.setCode(" /* fksduh fdssd \n \t fdsf d */ stroke : blue");
+			parser.parse();
+			assertEquals(name, "stroke");
+			assertEquals(value, "blue");
+		}catch(ParseException e) {fail();}
+		
+		try {
+			parser.setCode("fill:green /* fkdhf fss */  ");
+			parser.parse();
+			assertEquals(name, "fill");
+			assertEquals(value, "green");
+		}catch(ParseException e) {fail();}
+		
+		try {
+			parser.setCode("stroke: /**/ blue   ");
+			parser.parse();
+			assertEquals(name, "stroke");
+			assertEquals(value, "blue");
+		}catch(ParseException e) {fail();}
+		
+		try {
+			parser.setCode("stroke:/**/blue;");
+			parser.parse();
+			assertEquals(name, "stroke");
+			assertEquals(value, "blue");
+		}catch(ParseException e) {fail();}
+		
+		try {
+			parser.setCode("fill:green /* fkdhf fss */;/*f*/stroke/*fds fsd*/:/**/blue/*fgdds */");
+			parser.parse();
+			assertEquals(name, "stroke");
+			assertEquals(value, "blue");
+		}catch(ParseException e) {fail();}
+	}
+
+	
+	
+	@Override
+	public void testSkipWSP()
+	{
+		try {
+			parser.setCode("fill:green ;stroke:blue");
+			parser.parse();
+			assertEquals(name, "stroke");
+			assertEquals(value, "blue");
+		}catch(ParseException e) {fail();}
+		try {
+			parser.setCode(" \n \t \r stroke\t\n \r: \r \t\n blue \r\t \n \t ;\t\t\n\r fill\t\r :\n green \r \t ");
+			parser.parse();
+			assertEquals(name, "fill");
+			assertEquals(value, "green");
+		}catch(ParseException e) {fail();}
+	}
+
+
+	public void onCSSStyle(String n, String v)
+	{
+		name = n;
+		value = v;
+	}
+}
diff --git a/current/junit/test/parser/svg/parsers/TestSVGLengthParser.java b/current/junit/test/parser/svg/parsers/TestSVGLengthParser.java
new file mode 100644
index 0000000..a268021
--- /dev/null
+++ b/current/junit/test/parser/svg/parsers/TestSVGLengthParser.java
@@ -0,0 +1,354 @@
+package junit.test.parser.svg.parsers;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGLength;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+import latexDraw.parsers.svg.parsers.UnitProcessor;
+
+import org.junit.Test;
+
+/** 
+ * Tests the class SVGLengthParser.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGLengthParser extends TestCase
+{
+	@Test
+	public void testParseLength()
+	{
+		SVGLengthParser p;
+		SVGLength l;
+		
+		try
+		{
+			new SVGLengthParser(null);
+			fail();
+		}
+		catch(IllegalArgumentException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("");
+			l = p.parseLength();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1m");
+			l = p.parseLength();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("m");
+			l = p.parseLength();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1p");
+			l = p.parseLength();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1e1i");
+			l = p.parseLength();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1ci");
+			l = p.parseLength();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1 c ");
+			l = p.parseLength();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1mm");
+			l = p.parseLength();
+			
+			assertEquals(l.getValueAsString(), "1");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.MM);
+			assertEquals(UnitProcessor.toUserUnit(1, SVGLength.LengthType.MM), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("0.65 cm");
+			l = p.parseLength();
+			
+			assertEquals(l.getValueAsString(), "0.65");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.CM);
+			assertEquals(UnitProcessor.toUserUnit(0.65, SVGLength.LengthType.CM), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("\t -10.65  \t \n pc");
+			l = p.parseLength();
+			
+			assertEquals(l.getValueAsString(), "-10.65");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.PC);
+			assertEquals(UnitProcessor.toUserUnit(-10.65, SVGLength.LengthType.PC), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("\t -10.65e2  \t \n px \t   ");
+			l = p.parseLength();
+			
+			assertEquals(l.getValueAsString(), "-10.65e2");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
+			assertEquals(UnitProcessor.toUserUnit(-10.65e2, SVGLength.LengthType.PX), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("\t -10.65e0pt \t   ");
+			l = p.parseLength();
+			
+			assertEquals(l.getValueAsString(), "-10.65e0");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.PT);
+			assertEquals(UnitProcessor.toUserUnit(-10.65e0, SVGLength.LengthType.PT), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("\t -1.in \t   ");
+			l = p.parseLength();
+			
+			assertEquals(l.getValueAsString(), "-1.");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.IN);
+			assertEquals(UnitProcessor.toUserUnit(-1., SVGLength.LengthType.IN), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("-1.");
+			l = p.parseLength();
+			
+			assertEquals(l.getValueAsString(), "-1.");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.NUMBER);
+			assertEquals(UnitProcessor.toUserUnit(-1., SVGLength.LengthType.NUMBER), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testParseNumberOrPercent()
+	{
+		SVGLengthParser p;
+		SVGLength l;
+		
+		try
+		{
+			p = new SVGLengthParser("1mm");
+			l = p.parseNumberOrPercent();
+			
+			assertEquals(l.getValueAsString(), "1");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.NUMBER);
+			assertEquals(UnitProcessor.toUserUnit(1, SVGLength.LengthType.NUMBER), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("0.876");
+			l = p.parseNumberOrPercent();
+			
+			assertEquals(l.getValueAsString(), "0.876");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.NUMBER);
+			assertEquals(UnitProcessor.toUserUnit(0.876, SVGLength.LengthType.NUMBER), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testParseCoordinate()
+	{
+		SVGLengthParser p;
+		SVGLength l;
+		
+		try
+		{
+			p = new SVGLengthParser("");
+			l = p.parseCoordinate();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1m");
+			l = p.parseCoordinate();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("m");
+			l = p.parseCoordinate();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1p");
+			l = p.parseCoordinate();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1e1i");
+			l = p.parseCoordinate();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1ci");
+			l = p.parseCoordinate();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1 c ");
+			l = p.parseCoordinate();
+			fail();
+		}
+		catch(ParseException e){ /* */ }
+		
+		try
+		{
+			p = new SVGLengthParser("1mm");
+			l = p.parseCoordinate();
+			
+			assertEquals(l.getValueAsString(), "1");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.MM);
+			assertEquals(UnitProcessor.toUserUnit(1, SVGLength.LengthType.MM), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("0.65 cm");
+			l = p.parseCoordinate();
+			
+			assertEquals(l.getValueAsString(), "0.65");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.CM);
+			assertEquals(UnitProcessor.toUserUnit(0.65, SVGLength.LengthType.CM), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("\t -10.65  \t \n pc");
+			l = p.parseCoordinate();
+			
+			assertEquals(l.getValueAsString(), "-10.65");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.PC);
+			assertEquals(UnitProcessor.toUserUnit(-10.65, SVGLength.LengthType.PC), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("\t -10.65e2  \t \n px \t   ");
+			l = p.parseCoordinate();
+			
+			assertEquals(l.getValueAsString(), "-10.65e2");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
+			assertEquals(UnitProcessor.toUserUnit(-10.65e2, SVGLength.LengthType.PX), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("\t -10.65e0pt \t   ");
+			l = p.parseCoordinate();
+			
+			assertEquals(l.getValueAsString(), "-10.65e0");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.PT);
+			assertEquals(UnitProcessor.toUserUnit(-10.65e0, SVGLength.LengthType.PT), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("\t -1.in \t   ");
+			l = p.parseCoordinate();
+			
+			assertEquals(l.getValueAsString(), "-1.");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.IN);
+			assertEquals(UnitProcessor.toUserUnit(-1., SVGLength.LengthType.IN), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+		
+		try
+		{
+			p = new SVGLengthParser("-1.");
+			l = p.parseCoordinate();
+			
+			assertEquals(l.getValueAsString(), "-1.");
+			assertEquals(l.getLengthType(), SVGLength.LengthType.NUMBER);
+			assertEquals(UnitProcessor.toUserUnit(-1., SVGLength.LengthType.NUMBER), l.getValue());
+		}
+		catch(ParseException e){ fail(); }
+	}
+}
diff --git a/current/junit/test/parser/svg/parsers/TestSVGPointsParser.java b/current/junit/test/parser/svg/parsers/TestSVGPointsParser.java
new file mode 100644
index 0000000..7dc05b9
--- /dev/null
+++ b/current/junit/test/parser/svg/parsers/TestSVGPointsParser.java
@@ -0,0 +1,194 @@
+package junit.test.parser.svg.parsers;
+
+import java.awt.geom.Point2D;
+import java.text.ParseException;
+
+import junit.test.parser.TestCodeParser;
+import latexDraw.parsers.svg.parsers.SVGPointsParser;
+
+import org.junit.Before;
+
+public class TestSVGPointsParser extends TestCodeParser
+{
+	@Override
+	@Before
+	public void setUp()
+	{
+		parser  = new SVGPointsParser("");
+		parser2 = new SVGPointsParser("");
+	}
+	
+	
+	
+	@Override
+	public void testParse()
+	{
+		try {
+			parser.setCode(" 1, 2, \t 3\n 4 \r ,5 6  \n \t ");
+			parser.parse();
+			assertNotNull(((SVGPointsParser)parser).getPoints());
+			assertEquals(((SVGPointsParser)parser).getPoints().firstElement(), new Point2D.Double(1., 2.));
+			assertEquals(((SVGPointsParser)parser).getPoints().elementAt(1),   new Point2D.Double(3., 4.));
+			assertEquals(((SVGPointsParser)parser).getPoints().lastElement(),  new Point2D.Double(5., 6.));
+		}
+		catch(ParseException e) { fail(); }
+		
+		try {
+			parser.setCode("dsf");
+			parser.parse();
+		}catch(ParseException e) { /* */ }
+		
+		try {
+			parser.setCode("10 10 10");
+			parser.parse();
+		}catch(ParseException e) { /* */ }
+		
+		try {
+			parser.setCode("10,, 10 10 10");
+			parser.parse();
+		}catch(ParseException e) { /* */ }
+		try {
+			parser.setCode(",10 10 10 10");
+			parser.parse();
+		}catch(ParseException e) { /* */ }
+		try {
+			parser.setCode("10 10 10,");
+			parser.parse();
+		}catch(ParseException e) { /* */ }
+		try {
+			parser.setCode("10 10 aa 10");
+			parser.parse();
+		}catch(ParseException e) { /* */ }
+		try {
+			parser.setCode("10 10 10e 10");
+			parser.parse();
+		}catch(ParseException e) { /* */ }
+		try {
+			parser.setCode("10 10E 10 10");
+			parser.parse();
+		}catch(ParseException e) { /* */ }
+	}
+
+	@Override
+	public void testSkipComment()
+	{
+		// No comment allowed.
+	}
+
+	@Override
+	public void testSkipWSP()
+	{
+		parser.setCode(" \r  \t \n 10 10");
+		parser.skipWSP();
+		assertEquals(parser.getChar(), '1');
+	}
+	
+	
+	public void testIsWSP()
+	{
+		parser.setCode(" \r\t\na");
+		assertTrue(parser.isWSP());
+		parser.nextChar();
+		assertTrue(parser.isWSP());
+		parser.nextChar();
+		assertTrue(parser.isWSP());
+		parser.nextChar();
+		assertTrue(parser.isWSP());
+		parser.nextChar();
+		assertFalse(parser.isWSP());
+		parser.nextChar();
+		assertFalse(parser.isWSP());
+	}
+	
+	
+	public void testSkipWSPComma()
+	{
+		parser.setCode(" \r , \t \n 10 10");
+		((SVGPointsParser)parser).skipWSPComma();
+		assertEquals(parser.getChar(), '1');
+		parser.setCode(" \r , \t \n , 10 10");
+		((SVGPointsParser)parser).skipWSPComma();
+		assertEquals(parser.getChar(), ',');
+	}
+	
+	
+	public void testReadNumber()
+	{
+		SVGPointsParser p = (SVGPointsParser)parser;
+		
+		try {
+			p.setCode("10");
+			assertEquals(p.readNumber(), 10.);
+			p.setCode("+10");
+			assertEquals(p.readNumber(), 10.);
+			p.setCode("-10");
+			assertEquals(p.readNumber(), -10.);
+			p.setCode("-10.");
+			assertEquals(p.readNumber(), -10.);
+			p.setCode("-.1");
+			assertEquals(p.readNumber(), -.1);
+			p.setCode("10e2");
+			assertEquals(p.readNumber(), 1000.);
+			p.setCode("10e-2");
+			assertEquals(p.readNumber(), 0.1);
+			p.setCode("10e+2");
+			assertEquals(p.readNumber(), 1000.);
+			p.setCode("10E2");
+			assertEquals(p.readNumber(), 1000.);
+			p.setCode("10E-2");
+			assertEquals(p.readNumber(), 0.1);
+			p.setCode("10E+2");
+			assertEquals(p.readNumber(), 1000.);
+			p.setCode("0.E+2");
+			assertEquals(p.readNumber(), 0.);
+		}
+		catch(ParseException e) { e.printStackTrace(); fail(); }
+		
+		try {
+			p.setCode(".E+2");
+			assertEquals(p.readNumber(), 0.);
+		} catch(ParseException e) { /* */}
+		try {
+			p.setCode(".Efd+2");
+			assertEquals(p.readNumber(), 0.);
+		} catch(ParseException e) { /* */}
+		try {
+			p.setCode("");
+			assertEquals(p.readNumber(), 0.);
+		} catch(ParseException e) { /* */}
+		try {
+			p.setCode(" \t");
+			assertEquals(p.readNumber(), 0.);
+		} catch(ParseException e) { /* */}
+		try {
+			p.setCode("aa");
+			assertEquals(p.readNumber(), 0.);
+		} catch(ParseException e) { /* */}
+		try {
+			p.setCode(".");
+			assertEquals(p.readNumber(), 0.);
+		} catch(ParseException e) { /* */}
+		try {
+			p.setCode("--10");
+			assertEquals(p.readNumber(), 0.);
+		} catch(ParseException e) { /* */}
+		try {
+			p.setCode("+-10");
+			assertEquals(p.readNumber(), 0.);
+		} catch(ParseException e) { /* */}
+	}
+	
+	
+	public void testGetPoints()
+	{
+		try {
+			parser.setCode(" 1, 2,3 4 5,6");
+			parser.parse();
+			assertNotNull(((SVGPointsParser)parser).getPoints());
+			assertEquals(((SVGPointsParser)parser).getPoints().firstElement(), new Point2D.Double(1., 2.));
+			assertEquals(((SVGPointsParser)parser).getPoints().elementAt(1),   new Point2D.Double(3., 4.));
+			assertEquals(((SVGPointsParser)parser).getPoints().lastElement(),  new Point2D.Double(5., 6.));
+		}
+		catch(ParseException e) { fail(); }
+	}
+}
diff --git a/current/junit/test/parser/svg/parsers/TestURIReferenceParser.java b/current/junit/test/parser/svg/parsers/TestURIReferenceParser.java
new file mode 100644
index 0000000..6d1166a
--- /dev/null
+++ b/current/junit/test/parser/svg/parsers/TestURIReferenceParser.java
@@ -0,0 +1,55 @@
+package junit.test.parser.svg.parsers;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.parsers.URIReferenceParser;
+
+import org.junit.Test;
+
+ at SuppressWarnings("nls")
+public class TestURIReferenceParser extends TestCase
+{
+	@Test
+	public void testConstructor()
+	{
+		try 
+		{ 
+			new URIReferenceParser(null);
+			fail();
+		}
+		catch(IllegalArgumentException e) { /* */ }
+		
+		new URIReferenceParser("test");
+	}
+	
+	
+	
+	@Test
+	public void testGetURI()
+	{
+		URIReferenceParser p = new URIReferenceParser("url(#id)");
+		
+		assertEquals(p.getURI(), "id");
+		p.setCode("");
+		assertEquals(p.getURI(), "");
+		p.setCode("url(#id");
+		assertEquals(p.getURI(), "");
+		p.setCode("url#id)");
+		assertEquals(p.getURI(), "");
+		p.setCode("url(id)");
+		assertEquals(p.getURI(), "");
+		p.setCode(null);
+		assertEquals(p.getURI(), "");
+		p.setCode("u");
+		assertEquals(p.getURI(), "");
+		p.setCode("ur");
+		assertEquals(p.getURI(), "");
+		p.setCode("url");
+		assertEquals(p.getURI(), "");
+		p.setCode("url(");
+		assertEquals(p.getURI(), "");
+		p.setCode("url()");
+		assertEquals(p.getURI(), "");
+		p.setCode("url(#)");
+		assertEquals(p.getURI(), "");
+	}
+}
diff --git a/current/junit/test/parser/svg/parsers/TestUnitProcessor.java b/current/junit/test/parser/svg/parsers/TestUnitProcessor.java
new file mode 100644
index 0000000..74032c0
--- /dev/null
+++ b/current/junit/test/parser/svg/parsers/TestUnitProcessor.java
@@ -0,0 +1,47 @@
+package junit.test.parser.svg.parsers;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGLength;
+import latexDraw.parsers.svg.parsers.UnitProcessor;
+
+import org.junit.Test;
+
+/** 
+ * Tests the class UnitProcessor.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+public class TestUnitProcessor extends TestCase
+{
+	@Test
+	public void testToUserUnit()
+	{
+		try
+		{
+			UnitProcessor.toUserUnit(1, null);
+			fail();
+		}
+		catch(IllegalArgumentException e){ /* */ }
+		
+		assertEquals(UnitProcessor.toUserUnit(1., SVGLength.LengthType.CM), 35.43307);
+		assertEquals(UnitProcessor.toUserUnit(1., SVGLength.LengthType.MM), 3.543307);
+		assertEquals(UnitProcessor.toUserUnit(1., SVGLength.LengthType.PT), 1.25);
+		assertEquals(UnitProcessor.toUserUnit(1., SVGLength.LengthType.PC), 15.);
+		assertEquals(UnitProcessor.toUserUnit(1., SVGLength.LengthType.IN), 90.);
+	}
+}
diff --git a/current/junit/test/svg/AbstractTestSVGElement.java b/current/junit/test/svg/AbstractTestSVGElement.java
new file mode 100644
index 0000000..98f3a24
--- /dev/null
+++ b/current/junit/test/svg/AbstractTestSVGElement.java
@@ -0,0 +1,115 @@
+package junit.test.svg;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGAttr;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGNodeList;
+import latexDraw.parsers.svg.elements.SVGElement;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+
+public abstract class AbstractTestSVGElement extends TestCase
+{
+	protected SVGElement node;
+	protected SVGDocument doc = new SVGDocument();
+	
+	
+	public abstract String getNameNode();
+	
+	
+	@Override
+	@Before
+	public void setUp()
+	{
+		doc = new SVGDocument();
+        node = (SVGElement)doc.createElement(getNameNode());
+	}
+	
+	
+	@Test
+	public void testGetNodeName()
+	{
+		assertEquals(getNameNode(), node.getNodeName());
+	}
+	
+	
+	@Test
+	public void testSetNodeName()
+	{
+		node.setNodeName("test");
+		assertEquals("test", node.getNodeName());
+		node.setNodeName(getNameNode());
+		assertEquals(getNameNode(), node.getNodeName());
+	}
+	
+	
+	@Test
+	public void testSetParent()
+	{
+		SVGElement elt = (SVGElement)doc.createElement("elt");
+		
+		node.setParent(null);
+		assertNull(node.getParent());
+		node.setParent(elt);
+		assertEquals(elt, node.getParent());
+		SVGNodeList list = elt.getChildren(getNameNode());
+		assertEquals(1, list.getLength());
+		node.setParent(null);
+		list = elt.getChildren(getNameNode());
+		assertEquals(0, list.getLength());
+	}
+	
+	
+	@Test
+	public void testGetAttribute()
+	{
+		assertNull(node.getAttribute(null));
+		assertNull(node.getAttribute(""));
+		node.setAttribute("testAttr", "valAttr");
+		assertEquals(node.getAttribute("testAttr"), "valAttr");
+	}
+	
+	
+	@Test
+	public void testGetAttributeNode()
+	{
+		assertNull(node.getAttributeNode(null));
+		assertNull(node.getAttributeNode(""));
+		node.setAttribute("testAttr2", "valAttr2");
+		assertEquals(node.getAttributeNode("testAttr2").getNodeValue(), "valAttr2");
+	}
+	
+	
+	@Test
+	public void testGetTagName()
+	{
+		assertEquals(node.getNodeName(), node.getTagName());
+	}
+	
+	
+	
+	@Test
+	public void testAppendChild()
+	{
+		try
+		{
+			node.appendChild(null);
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		try
+		{
+			node.appendChild(new SVGAttr("", "", node));
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		
+		SVGElement elt = (SVGElement)doc.createElement("eltAppendChild");
+		assertEquals(node.appendChild(elt), elt);
+		assertEquals(node.getChildren("eltAppendChild").getLength(), 1);
+	}
+}
diff --git a/current/junit/test/svg/TestCSSStyleList.java b/current/junit/test/svg/TestCSSStyleList.java
new file mode 100644
index 0000000..8017832
--- /dev/null
+++ b/current/junit/test/svg/TestCSSStyleList.java
@@ -0,0 +1,80 @@
+package junit.test.svg;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.CSSStyleList;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests on CSSStyleList class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 03/29/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestCSSStyleList extends TestCase
+{
+	protected CSSStyleList list = new CSSStyleList();
+	
+	@Test
+	public void testAddCSSStyle()
+	{
+		list.clear();
+		list.addCSSStyle(null, null);
+		assertEquals(0, list.size());
+		list.addCSSStyle("", null);
+		assertEquals(0, list.size());
+		list.addCSSStyle(null, "");
+		assertEquals(0, list.size());
+		list.addCSSStyle("name", "value");
+		assertEquals(1, list.size());
+		assertEquals("value", list.getCSSValue("name"));
+		list.clear();
+	}
+	
+	
+	@Test
+	public void testGetCSSValue()
+	{
+		list.clear();
+		assertNull(list.getCSSValue(null));
+		assertNull(list.getCSSValue(""));
+		assertNull(list.getCSSValue("test"));
+		list.addCSSStyle("name", "value");
+		assertEquals(1, list.size());
+		assertEquals("value", list.getCSSValue("name"));
+		assertNull(list.getCSSValue(null));
+		assertNull(list.getCSSValue(""));
+		assertNull(list.getCSSValue("test"));
+		list.clear();
+	}
+	
+	
+	@Test
+	public void testOnCSSStyle()
+	{
+		list.clear();
+		list.addCSSStyle(null, null);
+		assertEquals(0, list.size());
+		list.addCSSStyle("", null);
+		assertEquals(0, list.size());
+		list.addCSSStyle(null, "");
+		assertEquals(0, list.size());
+		list.addCSSStyle("name", "value");
+		assertEquals(1, list.size());
+		assertEquals("value", list.getCSSValue("name"));
+		list.clear();
+	}
+}
diff --git a/current/junit/test/svg/TestSVGAttr.java b/current/junit/test/svg/TestSVGAttr.java
new file mode 100644
index 0000000..b06e471
--- /dev/null
+++ b/current/junit/test/svg/TestSVGAttr.java
@@ -0,0 +1,299 @@
+package junit.test.svg;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGAttr;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Node;
+
+/** 
+ * This class contains tests for the SVGAttr class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 03/29/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGAttr extends TestCase
+{
+	protected SVGElement node;
+	
+	
+	@Override
+	@Before
+	public void setUp()
+	{
+		SVGDocument doc = new SVGDocument();
+        node = (SVGElement)doc.createElement("tag1");
+	}
+	
+	
+	
+	@Test
+	public void testConstructor()
+	{
+		try 
+		{ 
+			new SVGAttr(null, null, null);
+			fail();
+		}
+		catch(IllegalArgumentException e) { /* ok */ }
+		
+		try 
+		{ 
+			new SVGAttr("", "", null);
+			fail();
+		}
+		catch(IllegalArgumentException e) { /* ok */ }
+		
+		try 
+		{ 
+			new SVGAttr(null, "", node);
+			fail();
+		}
+		catch(IllegalArgumentException e) { /* ok */ }
+		
+		try 
+		{ 
+			new SVGAttr("", null, node);
+			fail();
+		}
+		catch(IllegalArgumentException e) { /* ok */ }
+		
+		new SVGAttr("", "", node);
+	}
+	
+	
+	@Test
+	public void testGetName()
+	{
+		SVGAttr attr = new SVGAttr("attrName", "", node);
+		assertEquals("attrName", attr.getName());
+	}
+	
+	
+	@Test
+	public void testGetElementOwner()
+	{
+		SVGAttr attr = new SVGAttr("", "", node);
+		assertEquals(node, attr.getOwnerElement());
+	}
+	
+	
+	
+	@Test
+	public void testGetValue()
+	{
+		SVGAttr attr = new SVGAttr("", "attrValue", node);
+		assertEquals("attrValue", attr.getValue());
+	}
+	
+	
+	@Test
+	public void testIsId()
+	{
+		SVGAttr attr = new SVGAttr("id", "", node);
+		
+		assertTrue(attr.isId());
+		attr = new SVGAttr("", "", node);
+		assertFalse(attr.isId());
+	}
+	
+	
+	@Test
+	public void testSetValue()
+	{
+		SVGAttr attr = new SVGAttr("", "", node);
+		
+		try
+		{
+			attr.setValue(null);
+			fail();
+		}
+		catch(DOMException e) { /* Ok */ }
+		
+		attr.setValue("val");
+		assertEquals("val", attr.getValue());
+	}
+	
+	
+	@Test
+	public void testCloneNode()
+	{
+		SVGAttr attr = new SVGAttr("n", "v", node);
+		SVGAttr attr2 = (SVGAttr)attr.cloneNode(false);
+		
+		assertNotNull(attr2);
+		assertEquals(attr.getName(), attr2.getName());
+		assertEquals(attr.getValue(), attr2.getValue());
+		assertEquals(attr.getOwnerElement(), attr2.getOwnerElement());
+	}
+	
+	
+	@Test
+	public void testGetNodeName()
+	{
+		SVGAttr attr = new SVGAttr("attrNodeName", "", node);
+		assertEquals("attrNodeName", attr.getNodeName());
+	}
+	
+	
+	@Test
+	public void testGetNodeType()
+	{
+		SVGAttr attr = new SVGAttr("", "", node);
+		assertEquals(Node.ATTRIBUTE_NODE, attr.getNodeType());
+	}
+	
+	
+	@Test
+	public void testGetNodeValue()
+	{
+		SVGAttr attr = new SVGAttr("", "attrValue", node);
+		assertEquals("attrValue", attr.getNodeValue());
+	}
+	
+	
+	@Test
+	public void testGetParentNode()
+	{
+		SVGAttr attr = new SVGAttr("", "", node);
+		assertEquals(node, attr.getParentNode());
+	}
+	
+	
+	@Test
+	public void testHasAttribute()
+	{
+		SVGAttr attr = new SVGAttr("", "", node);
+		assertFalse(attr.hasAttributes());
+	}
+	
+	
+	@Test
+	public void testChildNodes()
+	{
+		SVGAttr attr = new SVGAttr("", "", node);
+		assertFalse(attr.hasChildNodes());
+	}
+	
+	
+	@Test
+	public void testIsEqualNode()
+	{
+		SVGAttr attr = new SVGAttr("n", "v", node);
+		SVGAttr attr2 = (SVGAttr)attr.cloneNode(false);
+		
+		assertTrue(attr.isEqualNode(attr2));
+		attr2 = new SVGAttr("n", "", node);
+		assertFalse(attr.isEqualNode(attr2));
+		attr2 = new SVGAttr("", "v", node);
+		assertFalse(attr.isEqualNode(attr2));
+		assertFalse(attr.isEqualNode(null));
+	}
+	
+	
+	@Test
+	public void testIsSameNode()
+	{
+		SVGAttr attr = new SVGAttr("n", "v", node);
+		SVGAttr attr2 = (SVGAttr)attr.cloneNode(false);
+		
+		assertTrue(attr.isSameNode(attr));
+		assertFalse(attr.isSameNode(null));
+		assertFalse(attr.isSameNode(attr2));
+	}
+	
+	
+	@Test
+	public void testSetNodeValue()
+	{
+		SVGAttr attr = new SVGAttr("", "", node);
+		
+		try
+		{
+			attr.setNodeValue(null);
+			fail();
+		}
+		catch(DOMException e) { /* Ok */ }
+		
+		attr.setNodeValue("val");
+		assertEquals("val", attr.getValue());
+		assertEquals("val", attr.getNodeValue());
+	}
+	
+	
+	@Test
+	public void testGetPrefix()
+	{
+		SVGAttr attr = new SVGAttr("", "", node);
+		
+		assertNull(attr.getPrefix());
+		attr = new SVGAttr("pref:", "", node);
+		assertEquals("pref", attr.getPrefix());
+		attr = new SVGAttr(":", "", node);
+		assertEquals("", attr.getPrefix());
+	}
+	
+	
+	@Test
+	public void testGetNamespaceURI()
+	{
+		SVGAttr attr   = new SVGAttr("pref:n", "", node);
+		SVGElement elt = (SVGElement)node.getOwnerDocument().createElement("tag2");
+		
+		assertNull(attr.getNamespaceURI());
+		elt.setAttribute("xmlns:pref", "namespace");
+		elt.appendChild(node);
+		assertEquals(attr.getNamespaceURI(), "namespace");
+	}
+	
+	
+	@Test
+	public void testLookupNamespaceURI()
+	{
+		SVGAttr attr   = new SVGAttr("pref:n", "", node);
+		SVGElement elt = (SVGElement)node.getOwnerDocument().createElement("tag2");
+		
+		assertNull(attr.getNamespaceURI());
+		elt.setAttribute("xmlns:pref", "namespace");
+		elt.appendChild(node);
+		assertEquals(attr.getNamespaceURI(), "namespace");
+	}
+	
+	
+	@Test
+	public void testGetLocalName()
+	{
+		SVGAttr attr = new SVGAttr("attrNodeName", "", node);
+		assertEquals("attrNodeName", attr.getLocalName());
+	}
+	
+	
+	@Test
+	public void testUselessMethods()
+	{
+		SVGAttr attr = new SVGAttr("", "", node);
+		assertNull(attr.removeChild(null));
+		assertNull(attr.insertBefore(null, null));
+		assertNull(attr.getAttributes());
+		assertNull(attr.getFirstChild());
+		assertNull(attr.getLastChild());
+		assertNull(attr.appendChild(null));
+	}
+}
diff --git a/current/junit/test/svg/TestSVGCDATASection.java b/current/junit/test/svg/TestSVGCDATASection.java
new file mode 100644
index 0000000..1a02014
--- /dev/null
+++ b/current/junit/test/svg/TestSVGCDATASection.java
@@ -0,0 +1,44 @@
+package junit.test.svg;
+
+import latexDraw.parsers.svg.SVGCDATASection;
+import latexDraw.parsers.svg.SVGDocument;
+
+import org.junit.Test;
+import org.w3c.dom.Node;
+
+/** 
+ * This class contains tests for the SVGCDATASection class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 03/30/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGCDATASection extends TestSVGText
+{
+	@Override
+	@Test
+	public void testGetNodeType()
+	{
+		SVGCDATASection cdata = createSVGText("test", doc);
+		assertEquals(Node.CDATA_SECTION_NODE, cdata.getNodeType());
+	}
+	
+	
+	@Override
+	protected SVGCDATASection createSVGText(String txt, SVGDocument document) throws IllegalArgumentException
+	{
+		return new SVGCDATASection(txt, document);
+	}
+}
diff --git a/current/junit/test/svg/TestSVGCircleElement.java b/current/junit/test/svg/TestSVGCircleElement.java
new file mode 100644
index 0000000..15e1542
--- /dev/null
+++ b/current/junit/test/svg/TestSVGCircleElement.java
@@ -0,0 +1,174 @@
+package junit.test.svg;
+
+import latexDraw.parsers.svg.*;
+import latexDraw.parsers.svg.elements.SVGCircleElement;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.parsers.UnitProcessor;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGCircleElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 02/02/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGCircleElement extends AbstractTestSVGElement
+{
+	@Override
+	@Before
+	public void setUp()
+	{
+		doc = new SVGDocument();
+        node = (SVGElement)doc.createElement(SVGElements.SVG_CIRCLE);
+	}
+	
+	
+	
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGCircleElement(null, null);
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try
+		{ 
+			new SVGCircleElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_R, "dsd"); //$NON-NLS-1$
+			new SVGCircleElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_R, "-1"); //$NON-NLS-1$
+			new SVGCircleElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_R, "10"); //$NON-NLS-1$
+			new SVGCircleElement(node, null);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetCy()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_R, "10"); //$NON-NLS-1$
+			SVGCircleElement e = new SVGCircleElement(node, null);
+			assertEquals(e.getCy(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_CY, "40"); //$NON-NLS-1$
+			e = new SVGCircleElement(node, null);
+			assertEquals(e.getCy(), 40.);
+			
+			node.setAttribute(SVGAttributes.SVG_CY, "40px "); //$NON-NLS-1$
+			e = new SVGCircleElement(node, null);
+			assertEquals(e.getCy(), 40.);
+			
+			node.setAttribute(SVGAttributes.SVG_CY, " 40 cm "); //$NON-NLS-1$
+			e = new SVGCircleElement(node, null);
+			assertEquals(e.getCy(), UnitProcessor.toUserUnit(40, SVGLength.LengthType.CM));
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetCx()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_R, "10"); //$NON-NLS-1$
+			SVGCircleElement e = new SVGCircleElement(node, null);
+			assertEquals(e.getCx(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_CX, "76.987"); //$NON-NLS-1$
+			e = new SVGCircleElement(node, null);
+			assertEquals(e.getCx(), 76.987);
+			
+			node.setAttribute(SVGAttributes.SVG_CX, "40px "); //$NON-NLS-1$
+			e = new SVGCircleElement(node, null);
+			assertEquals(e.getCx(), 40.);
+			
+			node.setAttribute(SVGAttributes.SVG_CX, " 30.5 mm "); //$NON-NLS-1$
+			e = new SVGCircleElement(node, null);
+			assertEquals(e.getCx(), UnitProcessor.toUserUnit(30.5, SVGLength.LengthType.MM));
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_R, "0"); //$NON-NLS-1$
+			SVGCircleElement e = new SVGCircleElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_R, "10"); //$NON-NLS-1$
+			e = new SVGCircleElement(node, null);
+			assertTrue(e.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetR()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_R, "20"); //$NON-NLS-1$
+			SVGCircleElement e = new SVGCircleElement(node, null);
+			assertEquals(e.getR(), 20.);
+			node.setAttribute(SVGAttributes.SVG_R, "20 pt"); //$NON-NLS-1$
+			e = new SVGCircleElement(node, null);
+			assertEquals(e.getR(), UnitProcessor.toUserUnit(20, SVGLength.LengthType.PT));
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+
+
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_CIRCLE;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGComment.java b/current/junit/test/svg/TestSVGComment.java
new file mode 100644
index 0000000..96442f6
--- /dev/null
+++ b/current/junit/test/svg/TestSVGComment.java
@@ -0,0 +1,44 @@
+package junit.test.svg;
+
+import latexDraw.parsers.svg.SVGComment;
+import latexDraw.parsers.svg.SVGDocument;
+
+import org.junit.Test;
+import org.w3c.dom.Node;
+
+/** 
+ * This class contains tests for the SVGComment class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 03/31/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGComment extends TestSVGText
+{
+	@Override
+	@Test
+	public void testGetNodeType()
+	{
+		SVGComment cdata = createSVGText("test", doc);
+		assertEquals(Node.COMMENT_NODE, cdata.getNodeType());
+	}
+	
+	
+	@Override
+	protected SVGComment createSVGText(String txt, SVGDocument document) throws IllegalArgumentException
+	{
+		return new SVGComment(txt, document);
+	}
+}
diff --git a/current/junit/test/svg/TestSVGDefsElement.java b/current/junit/test/svg/TestSVGDefsElement.java
new file mode 100644
index 0000000..6e8662f
--- /dev/null
+++ b/current/junit/test/svg/TestSVGDefsElement.java
@@ -0,0 +1,88 @@
+package junit.test.svg;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGDefsElement;
+import latexDraw.parsers.svg.elements.SVGMarkerElement;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGDefsElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 02/02/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGDefsElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			SVGDefsElement defs = new SVGDefsElement(node, null);
+			assertFalse(defs.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetDef()
+	{
+		try
+		{
+			SVGDefsElement defs = new SVGDefsElement(node, null);
+			SVGMarkerElement mark = new SVGMarkerElement(node.getOwnerDocument());
+			
+			mark.setAttribute(SVGAttributes.SVG_ID, SVGAttributes.SVG_ID);
+			defs.appendChild(mark);
+			
+			assertNull(defs.getDef(null));
+			assertNull(defs.getDef("")); //$NON-NLS-1$
+			assertNull(defs.getDef("dsqd")); //$NON-NLS-1$
+			assertEquals(mark, defs.getDef("id")); //$NON-NLS-1$
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGDefsElement(null, null);
+			fail();
+		}
+		catch(Exception e){/**/}
+
+		try
+		{
+			new SVGDefsElement(node, null);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_DEFS;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGDocument.java b/current/junit/test/svg/TestSVGDocument.java
new file mode 100644
index 0000000..429662a
--- /dev/null
+++ b/current/junit/test/svg/TestSVGDocument.java
@@ -0,0 +1,326 @@
+package junit.test.svg;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.*;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGSVGElement;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Node;
+
+/** 
+ * This class contains tests for the SVGDocument class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 03/31/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGDocument extends TestCase
+{
+	protected SVGDocument doc1;
+	protected SVGDocument doc2;
+	
+	
+	@Override
+	@Before
+	public void setUp()
+	{
+		doc1 = new SVGDocument();
+		
+		try { doc2 = new SVGDocument(new URI("junit/test/svg/test.svg")); }
+		catch(MalformedSVGDocument e){ fail(); }
+		catch(URISyntaxException e){ fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testSVGDocument()
+	{
+		try
+		{
+			new SVGDocument(null);
+			fail();
+		}
+		catch(IllegalArgumentException e){ /* ok */ }
+		catch(MalformedSVGDocument e){ fail(); }
+		
+		try
+		{
+			new SVGDocument(new URI("dfqsfg"));
+			fail();
+		}
+		catch(MalformedSVGDocument e){ /* ok */ }
+		catch(URISyntaxException e){ fail(); }
+		
+		try
+		{
+			SVGDocument doc = new SVGDocument(new URI("junit/test/svg/test.svg"));
+			assertNotNull(doc.getFirstChild());
+			assertNotNull(doc.getLastChild());
+		}
+		catch(MalformedSVGDocument e){ fail(); }
+		catch(URISyntaxException e){ fail(); }
+	}
+	
+	
+	@Test
+	public void testSVGDocument2()
+	{
+		SVGDocument doc = new SVGDocument();
+		
+		assertNotNull(doc.getFirstChild());
+		assertNotNull(doc.getLastChild());
+		assertNull(doc.getDocumentURI());
+	}
+	
+	
+	@Test
+	public void testToLaTeXDraw()
+	{
+//		LShape shape;
+//		
+//		shape = doc1.toLaTeXDraw(null);
+//		shape = doc2.toLaTeXDraw(null);//TODO
+	}
+	
+	
+	@Test
+	public void testAdoptNode()
+	{
+		SVGSVGElement elt = new SVGSVGElement(doc2);
+		
+		try
+		{
+			doc1.adoptNode(null);
+			fail();
+		}
+		catch(DOMException e){ /* ok */ }
+		
+		try
+		{
+			doc1.adoptNode(new SVGComment("", doc2));
+			fail();
+		}
+		catch(DOMException e){ /* ok */ }
+		
+		doc1.adoptNode(elt);
+		assertEquals(doc1, elt.getOwnerDocument());
+		assertEquals(doc1.getFirstChild(), elt);
+	}
+	
+	
+	@Test
+	public void testGetDocumentElement()
+	{
+		assertNotNull(doc1.getDocumentElement());
+	}
+	
+	
+	@Test
+	public void testSetDocumentURI()
+	{
+		doc1.setDocumentURI(null);
+		assertNull(doc1.getDocumentURI());
+		doc1.setDocumentURI("coucou");
+		assertEquals("coucou", doc1.getDocumentURI());
+	}
+	
+	
+	@Test
+	public void testSetXmlStandalone()
+	{
+		doc1.setXmlStandalone(false);
+		assertFalse(doc1.getXmlStandalone());
+		doc1.setXmlStandalone(true);
+		assertTrue(doc1.getXmlStandalone());
+	}
+	
+	
+	@Test
+	public void testSetXmlVersion()
+	{
+		doc1.setXmlVersion(null);
+		assertNull(doc1.getXmlVersion());
+		doc1.setXmlVersion("coucou");
+		assertEquals("coucou", doc1.getXmlVersion());
+	}
+	
+	
+	@Test
+	public void testUselessMethods()
+	{
+		assertNull(doc1.getAttributes());
+		assertNull(doc1.getChildNodes());
+		assertNull(doc1.getNextSibling());
+		assertNull(doc1.getPreviousSibling());
+		assertNull(doc2.getAttributes());
+		assertNull(doc2.getChildNodes());
+		assertNull(doc2.getNextSibling());
+		assertNull(doc2.getPreviousSibling());
+		assertNull(doc2.getNodeValue());
+		assertNull(doc2.getOwnerDocument());
+		assertNull(doc2.getParentNode());
+		assertNull(doc1.getNodeValue());
+		assertNull(doc1.getOwnerDocument());
+		assertNull(doc1.getParentNode());
+		assertFalse(doc2.hasAttributes());
+		assertFalse(doc1.hasAttributes());
+		assertNull(doc1.getDoctype());
+	}
+	
+	
+	@Test
+	public void testGetFirstChild()
+	{
+		assertNotNull(doc1.getFirstChild());
+		assertNotNull(doc2.getFirstChild());
+	}
+	
+	
+	@Test
+	public void testGetLastChild()
+	{
+		assertNotNull(doc1.getLastChild());
+		assertNotNull(doc2.getLastChild());
+		assertEquals(doc1.getLastChild(), doc1.getFirstChild());
+		assertEquals(doc2.getLastChild(), doc2.getFirstChild());
+	}
+	
+	
+	@Test
+	public void testGetNodeName()
+	{
+		assertEquals("#document", doc1.getNodeName());
+		assertEquals("#document", doc2.getNodeName());
+	}
+	
+	
+	@Test
+	public void testGetNodeType()
+	{
+		assertEquals(Node.DOCUMENT_NODE, doc1.getNodeType());
+		assertEquals(Node.DOCUMENT_NODE, doc2.getNodeType());
+	}
+	
+	
+	@Test
+	public void testHasChildNode()
+	{
+		assertTrue(doc1.hasChildNodes());
+		assertTrue(doc2.hasChildNodes());
+	}
+	
+	
+	@Test
+	public void testIsEqualNode()
+	{
+		SVGDocument doc = new SVGDocument();
+		assertTrue(doc1.isEqualNode(doc));
+		assertFalse(doc1.isEqualNode(null));
+		assertFalse(doc1.isEqualNode(doc2));
+		try 
+		{ 
+			doc = new SVGDocument(new URI("junit/test/svg/test.svg"));
+			assertTrue(doc2.isEqualNode(doc));
+			assertFalse(doc2.isEqualNode(null));
+			assertFalse(doc2.isEqualNode(doc1));
+		}
+		catch(MalformedSVGDocument e){ fail(); }
+		catch(URISyntaxException e){ fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testIsSameNode()
+	{
+		assertTrue(doc1.isEqualNode(doc1));
+		assertTrue(doc2.isEqualNode(doc2));
+		assertFalse(doc1.isEqualNode(null));
+		assertFalse(doc2.isEqualNode(null));
+		assertFalse(doc1.isEqualNode(doc2));
+		assertFalse(doc2.isEqualNode(doc1));
+	}
+	
+	
+	@Test
+	public void testCreateElement()
+	{
+		try
+		{
+			doc1.createElement(null);
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		SVGElement elt = (SVGElement)doc1.createElement("test");
+		assertEquals(elt.getNodeName(), "test");
+		assertEquals(doc1, elt.getOwnerDocument());
+	}
+	
+	
+	@Test
+	public void testCreateTextNode()
+	{
+		try
+		{
+			doc1.createTextNode(null);
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		SVGText elt = (SVGText)doc1.createTextNode("test");
+		assertEquals(elt.getData(), "test");
+		assertEquals(doc1, elt.getOwnerDocument());
+	}
+	
+	
+	@Test
+	public void testCreateComment()
+	{
+		try
+		{
+			doc1.createComment(null);
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		SVGComment elt = (SVGComment)doc1.createComment("test");
+		assertEquals(elt.getData(), "test");
+		assertEquals(doc1, elt.getOwnerDocument());
+	}
+	
+	
+	@Test
+	public void testCreateCDATASection()
+	{
+		try
+		{
+			doc1.createCDATASection(null);
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		SVGCDATASection elt = (SVGCDATASection)doc1.createCDATASection("test");
+		assertEquals(elt.getData(), "test");
+		assertEquals(doc1, elt.getOwnerDocument());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGEllipseElement.java b/current/junit/test/svg/TestSVGEllipseElement.java
new file mode 100644
index 0000000..7744f32
--- /dev/null
+++ b/current/junit/test/svg/TestSVGEllipseElement.java
@@ -0,0 +1,220 @@
+package junit.test.svg;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.SVGLength;
+import latexDraw.parsers.svg.elements.SVGEllipseElement;
+import latexDraw.parsers.svg.parsers.UnitProcessor;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGEllipseElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/12/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGEllipseElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGEllipseElement(null, null);
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try
+		{ 
+			new SVGEllipseElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_RX, "dsd");
+			node.setAttribute(SVGAttributes.SVG_RY, "dsd");
+			new SVGEllipseElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_RX, "1");
+			new SVGEllipseElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_RX, "-1");
+			node.setAttribute(SVGAttributes.SVG_RY, "10");
+			new SVGEllipseElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_RX, "10");
+			node.setAttribute(SVGAttributes.SVG_RY, "-1");
+			new SVGEllipseElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_RX, "10");
+			node.setAttribute(SVGAttributes.SVG_RY, "20");
+			new SVGEllipseElement(node, null);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetCy()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_RX, "10");
+			node.setAttribute(SVGAttributes.SVG_RY, "20");
+			SVGEllipseElement e = new SVGEllipseElement(node, null);
+			assertEquals(e.getCy(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_CY, "40");
+			e = new SVGEllipseElement(node, null);
+			assertEquals(e.getCy(), 40.);
+			
+			node.setAttribute(SVGAttributes.SVG_CY, "40px");
+			e = new SVGEllipseElement(node, null);
+			assertEquals(e.getCy(), 40.);
+			
+			node.setAttribute(SVGAttributes.SVG_CY, "40 cm");
+			e = new SVGEllipseElement(node, null);
+			assertEquals(e.getCy(), UnitProcessor.toUserUnit(40, SVGLength.LengthType.CM));
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetCx()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_RX, "10");
+			node.setAttribute(SVGAttributes.SVG_RY, "20");
+			SVGEllipseElement e = new SVGEllipseElement(node, null);
+			assertEquals(e.getCx(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_CX, "30");
+			e = new SVGEllipseElement(node, null);
+			assertEquals(e.getCx(), 30.);
+			
+			node.setAttribute(SVGAttributes.SVG_CX, "40px");
+			e = new SVGEllipseElement(node, null);
+			assertEquals(e.getCx(), 40.);
+			
+			node.setAttribute(SVGAttributes.SVG_CX, "40 cm");
+			e = new SVGEllipseElement(node, null);
+			assertEquals(e.getCx(), UnitProcessor.toUserUnit(40, SVGLength.LengthType.CM));
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_RX, "0");
+			node.setAttribute(SVGAttributes.SVG_RY, "0");
+			SVGEllipseElement e = new SVGEllipseElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_RX, "10");
+			node.setAttribute(SVGAttributes.SVG_RY, "0");
+			e = new SVGEllipseElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_RX, "0");
+			node.setAttribute(SVGAttributes.SVG_RY, "10");
+			e = new SVGEllipseElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_RX, "10");
+			node.setAttribute(SVGAttributes.SVG_RY, "10");
+			e = new SVGEllipseElement(node, null);
+			assertTrue(e.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetRy()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_RX, "10");
+			node.setAttribute(SVGAttributes.SVG_RY, "20");
+			SVGEllipseElement e = new SVGEllipseElement(node, null);
+			assertEquals(e.getRy(), 20.);
+			node.setAttribute(SVGAttributes.SVG_RY, "20 pt");
+			e = new SVGEllipseElement(node, null);
+			assertEquals(e.getRy(), UnitProcessor.toUserUnit(20, SVGLength.LengthType.PT));
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetRx()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_RX, "10");
+			node.setAttribute(SVGAttributes.SVG_RY, "20");
+			SVGEllipseElement e = new SVGEllipseElement(node, null);
+			assertEquals(e.getRx(), 10.);
+			node.setAttribute(SVGAttributes.SVG_RX, "10mm");
+			e = new SVGEllipseElement(node, null);
+			assertEquals(e.getRx(), UnitProcessor.toUserUnit(10, SVGLength.LengthType.MM));
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_ELLIPSE;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGImageElement.java b/current/junit/test/svg/TestSVGImageElement.java
new file mode 100644
index 0000000..dafe4c3
--- /dev/null
+++ b/current/junit/test/svg/TestSVGImageElement.java
@@ -0,0 +1,220 @@
+package junit.test.svg;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGImageElement;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGImageElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/15/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGImageElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGImageElement(null, "");
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try 
+		{ 
+			new SVGImageElement(node, null); 
+			fail(); 
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "dsd");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "dsd");
+			new SVGImageElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "1");
+			new SVGImageElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "-1");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "10");
+			new SVGImageElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "-1");
+			new SVGImageElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			new SVGImageElement(node, null);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	
+	@Test
+	public void testGetHeight()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGImageElement e = new SVGImageElement(node, null);
+			assertEquals(e.getHeight(), 20.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetWidth()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGImageElement e = new SVGImageElement(node, null);
+			assertEquals(e.getWidth(), 10.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetURI()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGImageElement e = new SVGImageElement(node, null);
+			assertNull(e.getURI());
+			
+			node.setAttribute("xlink:href", "/dir/file");
+			e = new SVGImageElement(node, null);
+			assertEquals(e.getURI(), "/dir/file");
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGImageElement e = new SVGImageElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute("xlink:href", "/rerzerojcsf/dsqdsdfgdre");
+			e = new SVGImageElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute("xlink:href", "build.xml");
+			e = new SVGImageElement(node, null);
+			assertTrue(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "0");
+			e = new SVGImageElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "0");
+			e = new SVGImageElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "20");
+			e = new SVGImageElement(node, null);
+			assertFalse(e.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetY()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGImageElement e = new SVGImageElement(node, null);
+			assertEquals(e.getY(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_Y, "1");
+			e = new SVGImageElement(node, null);
+			assertEquals(1., e.getY());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetX()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGImageElement e = new SVGImageElement(node, null);
+			assertEquals(e.getX(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_X, "1");
+			e = new SVGImageElement(node, null);
+			assertEquals(1., e.getX());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_IMAGE;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGLength.java b/current/junit/test/svg/TestSVGLength.java
new file mode 100644
index 0000000..871f551
--- /dev/null
+++ b/current/junit/test/svg/TestSVGLength.java
@@ -0,0 +1,60 @@
+package junit.test.svg;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGLength;
+import latexDraw.parsers.svg.SVGLength.LengthType;
+
+import org.junit.Test;
+
+/** 
+ * Tests the class SVGLength.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGLength extends TestCase
+{
+	@Test
+	public void testConsctrutor()
+	{
+		try
+		{
+			new SVGLength(1, null, "1");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /* */ }
+		
+		try
+		{
+			new SVGLength(1, LengthType.CM, null);
+			fail();
+		}
+		catch(IllegalArgumentException e){ /* */ }
+	}
+	
+	
+	@Test
+	public void testGetters()
+	{
+		SVGLength l = new SVGLength(1, LengthType.MM, "1");
+		
+		assertEquals(l.getValue(), 1.);
+		assertEquals(l.getLengthType(), LengthType.MM);
+		assertEquals(l.getValueAsString(), "1");
+	}
+}
diff --git a/current/junit/test/svg/TestSVGMatrix.java b/current/junit/test/svg/TestSVGMatrix.java
new file mode 100644
index 0000000..d0eff9c
--- /dev/null
+++ b/current/junit/test/svg/TestSVGMatrix.java
@@ -0,0 +1,188 @@
+package junit.test.svg;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGMatrix;
+
+import org.junit.Test;
+
+/** 
+ * Tests the class SVGMatrix.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/17/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+public class TestSVGMatrix extends TestCase
+{
+	@Test
+	public void testConstructor()
+	{
+		SVGMatrix m = new SVGMatrix();
+		
+		assertEquals(m.getA(), 1.);
+		assertEquals(m.getD(), 1.);
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getB(), 0.);
+		assertEquals(m.getC(), 0.);
+		assertEquals(m.getF(), 0.);
+	}
+	
+	
+	@Test
+	public void testInitMatrix()
+	{
+		SVGMatrix m = new SVGMatrix();
+		m.initMatrix();
+		
+		assertEquals(m.getA(), 1.);
+		assertEquals(m.getD(), 1.);
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getB(), 0.);
+		assertEquals(m.getC(), 0.);
+		assertEquals(m.getF(), 0.);
+	}
+	
+	
+	@Test
+	public void testRotate()
+	{
+		SVGMatrix m = new SVGMatrix();
+		double angle = 0.14;
+		
+		m.rotate(angle);
+		assertEquals(m.getA(), Math.cos(angle));
+		assertEquals(m.getB(), Math.sin(angle));
+		assertEquals(m.getC(), -Math.sin(angle));
+		assertEquals(m.getD(), Math.cos(angle));
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getF(), 0.);
+	}
+	
+	
+	@Test
+	public void testTranslate()
+	{
+		SVGMatrix m = new SVGMatrix();
+		double tx = 1.4, ty = -0.4;
+		
+		m.translate(tx, ty);
+		assertEquals(m.getA(), 1.);
+		assertEquals(m.getB(), 0.);
+		assertEquals(m.getC(), 0.);
+		assertEquals(m.getD(), 1.);
+		assertEquals(m.getE(), tx);
+		assertEquals(m.getF(), ty);
+	}
+	
+	
+	@Test
+	public void testScaleNonUniform()
+	{
+		SVGMatrix m = new SVGMatrix();
+		double sx = 5.877423, sy = -0.04;
+		
+		m.scaleNonUniform(sx, sy);
+		assertEquals(m.getA(), sx);
+		assertEquals(m.getB(), 0.);
+		assertEquals(m.getC(), 0.);
+		assertEquals(m.getD(), sy);
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getF(), 0.);
+	}
+	
+	
+	@Test
+	public void testScale()
+	{
+		SVGMatrix m = new SVGMatrix();
+		double s = 5.877423;
+		
+		m.scale(s);
+		assertEquals(m.getA(), s);
+		assertEquals(m.getB(), 0.);
+		assertEquals(m.getC(), 0.);
+		assertEquals(m.getD(), s);
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getF(), 0.);
+	}
+	
+	
+	@Test
+	public void testSkewX()
+	{
+		SVGMatrix m = new SVGMatrix();
+		double angle = 1.92837;
+		
+		m.skewX(angle);
+		assertEquals(m.getA(), 1.);
+		assertEquals(m.getB(), 0.);
+		assertEquals(m.getC(), Math.tan(angle));
+		assertEquals(m.getD(), 1.);
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getF(), 0.);
+	}
+	
+	
+	@Test
+	public void testSkewY()
+	{
+		SVGMatrix m = new SVGMatrix();
+		double angle = -7.7283;
+		
+		m.skewY(angle);
+		assertEquals(m.getA(), 1.);
+		assertEquals(m.getB(), Math.tan(angle));
+		assertEquals(m.getC(), 0.);
+		assertEquals(m.getD(), 1.);
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getF(), 0.);
+	}
+	
+	
+	@Test
+	public void testSetMatrix()
+	{
+		SVGMatrix m = new SVGMatrix();
+		
+		m.setMatrix(2, 3, 4, 5, 6, 7);
+		assertEquals(m.getA(), 2.);
+		assertEquals(m.getB(), 3.);
+		assertEquals(m.getC(), 4.);
+		assertEquals(m.getD(), 5.);
+		assertEquals(m.getE(), 6.);
+		assertEquals(m.getF(), 7.);
+	}
+	
+	
+	@Test
+	public void testMultiply()
+	{
+		SVGMatrix m1 = new SVGMatrix();
+		SVGMatrix m2 = new SVGMatrix();
+		SVGMatrix m3;
+		
+		m1.setMatrix(1, 2, 3, 4, 5, 6);
+		m2.setMatrix(7, 8, 9, 10, 11, 12);
+		m3 = m1.multiply(m2);
+		
+		assertEquals(m3.getA(), 31.);
+		assertEquals(m3.getB(), 46.);
+		assertEquals(m3.getC(), 39.);
+		assertEquals(m3.getD(), 58.);
+		assertEquals(m3.getE(), 52.);
+		assertEquals(m3.getF(), 76.);
+	}
+}
diff --git a/current/junit/test/svg/TestSVGNamedNodeMap.java b/current/junit/test/svg/TestSVGNamedNodeMap.java
new file mode 100644
index 0000000..51c29f1
--- /dev/null
+++ b/current/junit/test/svg/TestSVGNamedNodeMap.java
@@ -0,0 +1,181 @@
+package junit.test.svg;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGAttr;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGNamedNodeMap;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.DOMException;
+
+/** 
+ * This class contains tests for the SVGNamedNodeMap class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 03/29/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGNamedNodeMap extends TestCase
+{
+	protected SVGNamedNodeMap map;
+	protected SVGDocument doc;
+	
+	@Override
+	@Before
+	public void setUp()
+	{
+		doc = new SVGDocument();
+		map = new SVGNamedNodeMap();
+	}
+	
+	
+	@Test
+	public void testSVGNamedNodeMap()
+	{
+		assertNotNull(map.getAttributes());
+	}
+	
+	
+	@Test
+	public void testGetLength()
+	{
+		map.getAttributes().clear();
+		assertEquals(0, map.getLength());
+		map.getAttributes().add(new SVGAttr("", "", doc.createElement("elt")));
+		assertEquals(1, map.getLength());
+		map.getAttributes().clear();
+	}
+	
+	
+	@Test
+	public void testGetNamedItem()
+	{
+		map.getAttributes().clear();
+		assertNull(map.getNamedItem(null));
+		assertNull(map.getNamedItem(""));
+		assertNull(map.getNamedItem("test"));
+		map.getAttributes().add(new SVGAttr("test", "", doc.createElement("elt")));
+		assertNull(map.getNamedItem(null));
+		assertNull(map.getNamedItem(""));
+		assertNotNull(map.getNamedItem("test"));
+		map.getAttributes().clear();
+	}
+	
+	
+	@Test
+	public void testItem()
+	{
+		SVGAttr attr = new SVGAttr("test", "", doc.createElement("elt"));
+		
+		map.getAttributes().clear();
+		assertNull(map.item(0));
+		assertNull(map.item(-1));
+		assertNull(map.item(1));
+		map.getAttributes().add(attr);
+		assertNull(map.item(-1));
+		assertNull(map.item(1));
+		assertEquals(map.item(0), attr);
+		map.getAttributes().clear();
+	}
+	
+	
+	@Test
+	public void testRemoveNamedItem()
+	{
+		SVGAttr attr = new SVGAttr("test", "", doc.createElement("elt"));
+		
+		map.getAttributes().clear();
+		
+		try
+		{
+			map.removeNamedItem(null);
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		try
+		{
+			map.removeNamedItem("");
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		try
+		{
+			map.removeNamedItem("test");
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		map.getAttributes().add(attr);
+		assertEquals(attr, map.removeNamedItem("test"));
+		
+		try
+		{
+			map.removeNamedItem("test");
+			fail();
+		}
+		catch(DOMException e) { /* ok */ }
+		
+		map.getAttributes().clear();
+	}
+	
+	
+	@Test
+	public void testSetNamedItem()
+	{
+		SVGAttr attr1 = new SVGAttr("test1", "v1", doc.createElement("elt1"));
+		SVGAttr attr2 = new SVGAttr("test2", "v2", doc.createElement("elt2"));
+		SVGAttr attr3 = new SVGAttr("test1", "v1b", doc.createElement("elt1b"));
+		
+		map.getAttributes().clear();
+		assertNull(map.setNamedItem(null));
+		assertNull(map.setNamedItem(attr1));
+		assertEquals(attr1, map.getNamedItem("test1"));
+		assertNull(map.setNamedItem(attr2));
+		assertEquals(attr1, map.getNamedItem("test1"));
+		assertEquals(attr2, map.getNamedItem("test2"));
+		assertEquals(attr1, map.setNamedItem(attr3));
+		assertEquals(attr3, map.getNamedItem("test1"));
+		assertEquals(attr2, map.getNamedItem("test2"));
+		map.getAttributes().clear();
+	}
+	
+	
+	@Test
+	public void testClone()
+	{
+		SVGAttr attr1 = new SVGAttr("test1", "v1", doc.createElement("elt1"));
+		SVGAttr attr2 = new SVGAttr("test2", "v2", doc.createElement("elt2"));
+		SVGNamedNodeMap map2;
+		
+		map.getAttributes().clear();
+		assertNull(map.setNamedItem(attr1));
+		assertNull(map.setNamedItem(attr2));
+		map2 = (SVGNamedNodeMap)map.clone();
+		assertEquals(map.getLength(), map2.getLength());
+		assertTrue(map.getNamedItem("test1").isEqualNode(map2.getNamedItem("test1")));
+		assertTrue(map.getNamedItem("test2").isEqualNode(map2.getNamedItem("test2")));
+		map.getAttributes().clear();
+	}
+	
+	
+	@Test
+	public void testGetAttributes()
+	{
+		assertNotNull(map.getAttributes());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGNodeList.java b/current/junit/test/svg/TestSVGNodeList.java
new file mode 100644
index 0000000..2c3a236
--- /dev/null
+++ b/current/junit/test/svg/TestSVGNodeList.java
@@ -0,0 +1,84 @@
+package junit.test.svg;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGNodeList;
+import latexDraw.parsers.svg.elements.SVGElement;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGNodeList class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 03/29/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGNodeList extends TestCase
+{
+	protected SVGNodeList list;
+	protected SVGDocument doc;
+	
+	
+	@Override
+	@Before
+	public void setUp()
+	{
+		doc  = new SVGDocument();
+		list = new SVGNodeList();
+	}
+	
+	
+	@Test
+	public void testSVGNodeList()
+	{
+		assertNotNull(list.getNodes());
+	}
+	
+	
+	@Test
+	public void testGetLength()
+	{
+		list.getNodes().clear();
+		assertEquals(0, list.getLength());
+		list.getNodes().add((SVGElement)doc.createElement("elt"));
+		assertEquals(1, list.getLength());
+		list.getNodes().clear();
+	}
+	
+	
+	@Test
+	public void testItem()
+	{
+		SVGElement elt = (SVGElement)doc.createElement("elt");
+		
+		list.getNodes().clear();
+		assertNull(list.item(0));
+		assertNull(list.item(-1));
+		assertNull(list.item(1));
+		list.getNodes().add(elt);
+		assertNull(list.item(-1));
+		assertNull(list.item(1));
+		assertEquals(list.item(0), elt);
+	}
+	
+	
+	@Test
+	public void testGetNodes()
+	{
+		assertNotNull(list.getNodes());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathElement.java b/current/junit/test/svg/TestSVGPathElement.java
new file mode 100644
index 0000000..ca6f119
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathElement.java
@@ -0,0 +1,76 @@
+package junit.test.svg;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGPathElement;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/14/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPathElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGPathElement(null, null);
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try 
+		{ 
+			new SVGPathElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){ /**/ }
+		
+		try 
+		{ 
+			node.setAttribute(SVGAttributes.SVG_D, "test");
+			new SVGPathElement(node, null);
+		}
+		catch(MalformedSVGDocument e){  fail(); }
+	}
+	
+	
+	@Test
+	public void testGetPathData()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_D, "M 0 0 L 10 10");
+			SVGPathElement e = new SVGPathElement(node, null);
+			assertEquals(e.getPathData(), "M 0 0 L 10 10");
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_PATH;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathSegArc.java b/current/junit/test/svg/TestSVGPathSegArc.java
new file mode 100644
index 0000000..5f11c39
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathSegArc.java
@@ -0,0 +1,93 @@
+package junit.test.svg;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+import latexDraw.parsers.svg.elements.path.SVGPathSegArc;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathSegArc class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/22/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPathSegArc extends TestCase implements SVGPathHandler
+{
+	protected final SVGPathSegArc seg = new SVGPathSegArc(1, 2, 3, 4, 5, true, false, true);
+	protected int cpt = 0;
+	
+	@Test
+	public void testGetters()
+	{
+		SVGPathSegArc seg2 = new SVGPathSegArc(1, 2, 3, 4, 5, false, true, false);
+		
+		assertEquals(seg.getAngle(), 5.);
+		assertEquals(seg.getRX(), 3.);
+		assertEquals(seg.getRY(), 4.);
+		assertEquals(seg.getX(), 1.);
+		assertEquals(seg.getY(), 2.);
+		assertTrue(seg.isLargeArcFlag());
+		assertFalse(seg.isSweepFlag());
+		assertTrue(seg.isRelative());
+		assertFalse(seg2.isLargeArcFlag());
+		assertTrue(seg2.isSweepFlag());
+		assertFalse(seg2.isRelative());
+		assertEquals(seg.getType(), PathSeg.ARC_REL);
+		assertEquals(seg2.getType(), PathSeg.ARC_ABS);
+	}
+	
+	
+	@Test
+	public void testToString()
+	{
+		SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false);
+		SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this);
+		
+		try { parser.parse(); }
+		catch(ParseException e) { fail(); }
+	}
+
+
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		if((pathSeg instanceof SVGPathSegMoveto) && cpt==0)
+		{
+			cpt++;
+			return ;
+		}
+		
+		assertTrue(pathSeg instanceof SVGPathSegArc);
+		
+		SVGPathSegArc seg2 = (SVGPathSegArc)pathSeg;
+		
+		assertEquals(seg.getAngle(), seg2.getAngle());
+		assertEquals(seg.getRX(), seg2.getRX());
+		assertEquals(seg.getRY(), seg2.getRY());
+		assertEquals(seg.getX(), seg2.getX());
+		assertEquals(seg.getY(), seg2.getY());
+		assertEquals(seg.isLargeArcFlag(), seg2.isLargeArcFlag());
+		assertEquals(seg.isRelative(), seg2.isRelative());
+		assertEquals(seg.isSweepFlag(), seg2.isSweepFlag());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathSegCurvetoCubic.java b/current/junit/test/svg/TestSVGPathSegCurvetoCubic.java
new file mode 100644
index 0000000..6e08835
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathSegCurvetoCubic.java
@@ -0,0 +1,86 @@
+package junit.test.svg;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+import latexDraw.parsers.svg.elements.path.SVGPathSegCurvetoCubic;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathSegCurvetoCubic class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/22/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPathSegCurvetoCubic extends TestCase implements SVGPathHandler
+{
+	protected final SVGPathSegCurvetoCubic seg = new SVGPathSegCurvetoCubic(-1, -2, 3e1, 4e-1, -5e1, 6.5, true);
+	protected int cpt = 0;
+	
+	@Test
+	public void testGetters()
+	{
+		assertEquals(seg.getX(), -1.);
+		assertEquals(seg.getX1(), 3e1);
+		assertEquals(seg.getX2(), -5e1);
+		assertEquals(seg.getY(), -2.);
+		assertEquals(seg.getY1(), 4e-1);
+		assertEquals(seg.getY2(), 6.5);
+		assertTrue(seg.isRelative());
+		assertEquals(seg.getType(), PathSeg.CURVETO_CUBIC_REL);
+	}
+	
+	
+	@Test
+	public void testToString()
+	{
+		SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false);
+		SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this);
+		
+		try { parser.parse(); }
+		catch(ParseException e) { fail(); }
+	}
+
+
+	
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		if((pathSeg instanceof SVGPathSegMoveto) && cpt==0)
+		{
+			cpt++;
+			return ;
+		}
+		
+		assertTrue(pathSeg instanceof SVGPathSegCurvetoCubic);
+		
+		SVGPathSegCurvetoCubic seg2 = (SVGPathSegCurvetoCubic)pathSeg;		
+		
+		assertEquals(seg.getX(), seg2.getX());
+		assertEquals(seg.getX1(), seg2.getX1());
+		assertEquals(seg.getX2(), seg2.getX2());
+		assertEquals(seg.getY(), seg2.getY());
+		assertEquals(seg.getY1(), seg2.getY1());
+		assertEquals(seg.getY2(), seg2.getY2());
+		assertEquals(seg.isRelative(), seg2.isRelative());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathSegCurvetoCubicSmooth.java b/current/junit/test/svg/TestSVGPathSegCurvetoCubicSmooth.java
new file mode 100644
index 0000000..5727599
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathSegCurvetoCubicSmooth.java
@@ -0,0 +1,82 @@
+package junit.test.svg;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+import latexDraw.parsers.svg.elements.path.SVGPathSegCurvetoCubicSmooth;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathSegCurvetoCubicSmooth class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/22/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPathSegCurvetoCubicSmooth extends TestCase implements SVGPathHandler
+{
+	protected final SVGPathSegCurvetoCubicSmooth seg = new SVGPathSegCurvetoCubicSmooth(0.8E2, -2., -5.e-1, .5, false);
+	protected int cpt = 0;
+	
+	@Test
+	public void testGetters()
+	{
+		assertEquals(seg.getX(), 0.8E2);
+		assertEquals(seg.getX2(), -5.e-1);
+		assertEquals(seg.getY(), -2.);
+		assertEquals(seg.getY2(), .5);
+		assertFalse(seg.isRelative());
+		assertEquals(seg.getType(), PathSeg.CURVETO_CUBIC_SMOOTH_ABS);
+	}
+	
+	
+	@Test
+	public void testToString()
+	{
+		SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false);
+		SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this);
+		
+		try { parser.parse(); }
+		catch(ParseException e) { fail(); }
+	}
+
+
+	
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		if((pathSeg instanceof SVGPathSegMoveto) && cpt==0)
+		{
+			cpt++;
+			return ;
+		}
+		
+		assertTrue(pathSeg instanceof SVGPathSegCurvetoCubicSmooth);
+		
+		SVGPathSegCurvetoCubicSmooth seg2 = (SVGPathSegCurvetoCubicSmooth)pathSeg;		
+		
+		assertEquals(seg.getX(), seg2.getX());
+		assertEquals(seg.getX2(), seg2.getX2());
+		assertEquals(seg.getY(), seg2.getY());
+		assertEquals(seg.getY2(), seg2.getY2());
+		assertEquals(seg.isRelative(), seg2.isRelative());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathSegCurvetoQuadratic.java b/current/junit/test/svg/TestSVGPathSegCurvetoQuadratic.java
new file mode 100644
index 0000000..72c1aa6
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathSegCurvetoQuadratic.java
@@ -0,0 +1,82 @@
+package junit.test.svg;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+import latexDraw.parsers.svg.elements.path.SVGPathSegCurvetoQuadratic;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathSegCurvetoQuadratic class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/23/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPathSegCurvetoQuadratic extends TestCase implements SVGPathHandler
+{
+	protected final SVGPathSegCurvetoQuadratic seg = new SVGPathSegCurvetoQuadratic(3e1, 4e-1, -5e1, 6.5, true);
+	protected int cpt = 0;
+	
+	@Test
+	public void testGetters()
+	{
+		assertEquals(seg.getX1(), -5e1);
+		assertEquals(seg.getY1(), 6.5);
+		assertEquals(seg.getX(), 3e1);
+		assertEquals(seg.getY(), 4e-1);
+		assertTrue(seg.isRelative());
+		assertEquals(seg.getType(), PathSeg.CURVETO_QUADRATIC_REL);
+	}
+	
+	
+	@Test
+	public void testToString()
+	{
+		SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false);
+		SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this);
+		
+		try { parser.parse(); }
+		catch(ParseException e) { fail(); }
+	}
+
+
+	
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		if((pathSeg instanceof SVGPathSegMoveto) && cpt==0)
+		{
+			cpt++;
+			return ;
+		}
+		
+		assertTrue(pathSeg instanceof SVGPathSegCurvetoQuadratic);
+		
+		SVGPathSegCurvetoQuadratic seg2 = (SVGPathSegCurvetoQuadratic)pathSeg;		
+		
+		assertEquals(seg.getX(), seg2.getX());
+		assertEquals(seg.getX1(), seg2.getX1());
+		assertEquals(seg.getY(), seg2.getY());
+		assertEquals(seg.getY1(), seg2.getY1());
+		assertEquals(seg.isRelative(), seg2.isRelative());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathSegCurvetoQuadraticSmooth.java b/current/junit/test/svg/TestSVGPathSegCurvetoQuadraticSmooth.java
new file mode 100644
index 0000000..fe79283
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathSegCurvetoQuadraticSmooth.java
@@ -0,0 +1,78 @@
+package junit.test.svg;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+import latexDraw.parsers.svg.elements.path.SVGPathSegCurvetoQuadraticSmooth;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathSegCurvetoQuadraticSmooth class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/23/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPathSegCurvetoQuadraticSmooth extends TestCase implements SVGPathHandler
+{
+	protected final SVGPathSegCurvetoQuadraticSmooth seg = new SVGPathSegCurvetoQuadraticSmooth(-5.23e-10, 6.5, false);
+	protected int cpt = 0;
+	
+	@Test
+	public void testGetters()
+	{
+		assertEquals(seg.getX(), -5.23e-10);
+		assertEquals(seg.getY(), 6.5);
+		assertFalse(seg.isRelative());
+		assertEquals(seg.getType(), PathSeg.CURVETO_QUADRATIC_SMOOTH_ABS);
+	}
+	
+	
+	@Test
+	public void testToString()
+	{
+		SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false);
+		SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this);
+		
+		try { parser.parse(); }
+		catch(ParseException e) { fail(); }
+	}
+
+
+	
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		if((pathSeg instanceof SVGPathSegMoveto) && cpt==0)
+		{
+			cpt++;
+			return ;
+		}
+		
+		assertTrue(pathSeg instanceof SVGPathSegCurvetoQuadraticSmooth);
+		
+		SVGPathSegCurvetoQuadraticSmooth seg2 = (SVGPathSegCurvetoQuadraticSmooth)pathSeg;		
+		
+		assertEquals(seg.getX(), seg2.getX());
+		assertEquals(seg.getY(), seg2.getY());
+		assertEquals(seg.isRelative(), seg2.isRelative());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathSegLineto.java b/current/junit/test/svg/TestSVGPathSegLineto.java
new file mode 100644
index 0000000..d378b92
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathSegLineto.java
@@ -0,0 +1,78 @@
+package junit.test.svg;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+import latexDraw.parsers.svg.elements.path.SVGPathSegLineto;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathSegLineto class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/23/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPathSegLineto extends TestCase implements SVGPathHandler
+{
+	protected final SVGPathSegLineto seg = new SVGPathSegLineto(-1, -2, true);
+	protected int cpt = 0;
+	
+	@Test
+	public void testGetters()
+	{
+		assertEquals(seg.getX(), -1.);
+		assertEquals(seg.getY(), -2.);
+		assertTrue(seg.isRelative());
+		assertEquals(seg.getType(), PathSeg.LINETO_REL);
+	}
+	
+	
+	@Test
+	public void testToString()
+	{
+		SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false);
+		SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this);
+		
+		try { parser.parse(); }
+		catch(ParseException e) { fail(); }
+	}
+
+
+	
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		if((pathSeg instanceof SVGPathSegMoveto) && cpt==0)
+		{
+			cpt++;
+			return ;
+		}
+		
+		assertTrue(pathSeg instanceof SVGPathSegLineto);
+		
+		SVGPathSegLineto seg2 = (SVGPathSegLineto)pathSeg;		
+		
+		assertEquals(seg.getX(), seg2.getX());
+		assertEquals(seg.getY(), seg2.getY());
+		assertEquals(seg.isRelative(), seg2.isRelative());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathSegLinetoHorizontal.java b/current/junit/test/svg/TestSVGPathSegLinetoHorizontal.java
new file mode 100644
index 0000000..40d8346
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathSegLinetoHorizontal.java
@@ -0,0 +1,76 @@
+package junit.test.svg;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+import latexDraw.parsers.svg.elements.path.SVGPathSegLinetoHorizontal;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathSegLinetoHorizontal class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/23/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPathSegLinetoHorizontal extends TestCase implements SVGPathHandler
+{
+	protected final SVGPathSegLinetoHorizontal seg = new SVGPathSegLinetoHorizontal(-1, false);
+	protected int cpt = 0;
+	
+	@Test
+	public void testGetters()
+	{
+		assertEquals(seg.getX(), -1.);
+		assertFalse(seg.isRelative());
+		assertEquals(seg.getType(), PathSeg.LINETO_HORIZONTAL_ABS);
+	}
+	
+	
+	@Test
+	public void testToString()
+	{
+		SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false);
+		SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this);
+		
+		try { parser.parse(); }
+		catch(ParseException e) { fail(); }
+	}
+
+
+	
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		if((pathSeg instanceof SVGPathSegMoveto) && cpt==0)
+		{
+			cpt++;
+			return ;
+		}
+		
+		assertTrue(pathSeg instanceof SVGPathSegLinetoHorizontal);
+		
+		SVGPathSegLinetoHorizontal seg2 = (SVGPathSegLinetoHorizontal)pathSeg;		
+		
+		assertEquals(seg.getX(), seg2.getX());
+		assertEquals(seg.isRelative(), seg2.isRelative());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathSegLinetoVertical.java b/current/junit/test/svg/TestSVGPathSegLinetoVertical.java
new file mode 100644
index 0000000..aa09ebf
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathSegLinetoVertical.java
@@ -0,0 +1,76 @@
+package junit.test.svg;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+import latexDraw.parsers.svg.elements.path.SVGPathSegLinetoVertical;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathSegLinetoVertical class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/23/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPathSegLinetoVertical extends TestCase implements SVGPathHandler
+{
+	protected final SVGPathSegLinetoVertical seg = new SVGPathSegLinetoVertical(-1, false);
+	protected int cpt = 0;
+	
+	@Test
+	public void testGetters()
+	{
+		assertEquals(seg.getY(), -1.);
+		assertFalse(seg.isRelative());
+		assertEquals(seg.getType(), PathSeg.LINETO_VERTICAL_ABS);
+	}
+	
+	
+	@Test
+	public void testToString()
+	{
+		SVGPathSegMoveto m = new SVGPathSegMoveto(0, 0, false);
+		SVGPathParser parser = new SVGPathParser(m.toString() + " " + seg.toString(), this);
+		
+		try { parser.parse(); }
+		catch(ParseException e) { fail(); }
+	}
+
+
+	
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		if((pathSeg instanceof SVGPathSegMoveto) && cpt==0)
+		{
+			cpt++;
+			return ;
+		}
+		
+		assertTrue(pathSeg instanceof SVGPathSegLinetoVertical);
+		
+		SVGPathSegLinetoVertical seg2 = (SVGPathSegLinetoVertical)pathSeg;		
+		
+		assertEquals(seg.getY(), seg2.getY());
+		assertEquals(seg.isRelative(), seg2.isRelative());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPathSegMoveto.java b/current/junit/test/svg/TestSVGPathSegMoveto.java
new file mode 100644
index 0000000..0784352
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPathSegMoveto.java
@@ -0,0 +1,68 @@
+package junit.test.svg;
+
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPathSegMoveto class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/23/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGPathSegMoveto extends TestCase implements SVGPathHandler
+{
+	protected final SVGPathSegMoveto seg = new SVGPathSegMoveto(-1, -2, false);
+	
+	@Test
+	public void testGetters()
+	{
+		assertEquals(seg.getX(), -1.);
+		assertEquals(seg.getY(), -2.);
+		assertFalse(seg.isRelative());
+		assertEquals(seg.getType(), PathSeg.MOVETO_ABS);
+	}
+	
+	
+	@Test
+	public void testToString()
+	{
+		SVGPathParser parser = new SVGPathParser(seg.toString(), this);
+		
+		try { parser.parse(); }
+		catch(ParseException e) { fail(); }
+	}
+
+
+	
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		assertTrue(pathSeg instanceof SVGPathSegMoveto);
+		
+		SVGPathSegMoveto seg2 = (SVGPathSegMoveto)pathSeg;		
+		
+		assertEquals(seg.getX(), seg2.getX());
+		assertEquals(seg.getY(), seg2.getY());
+		assertEquals(seg.isRelative(), seg2.isRelative());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPatternElement.java b/current/junit/test/svg/TestSVGPatternElement.java
new file mode 100644
index 0000000..7ec64f5
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPatternElement.java
@@ -0,0 +1,192 @@
+package junit.test.svg;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGPatternElement;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPatternElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/12/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPatternElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGPatternElement(null, null);
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try { new SVGPatternElement(node, null); }
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetHeight()
+	{
+		try
+		{
+			SVGPatternElement e = new SVGPatternElement(node, null);
+			assertEquals(e.getHeight(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			e = new SVGPatternElement(node, null);
+			assertEquals(e.getHeight(), 20.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetWidth()
+	{
+		try
+		{
+			SVGPatternElement e = new SVGPatternElement(node, null);
+			assertEquals(e.getWidth(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "30");
+			e = new SVGPatternElement(node, null);
+			assertEquals(e.getWidth(), 30.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetPatternUnits()
+	{
+		try
+		{
+			SVGPatternElement e = new SVGPatternElement(node, null);
+			assertEquals(e.getPatternUnits(), SVGAttributes.SVG_UNITS_VALUE_OBJ);
+			
+			node.setAttribute(SVGAttributes.SVG_PATTERN_UNITS, SVGAttributes.SVG_UNITS_VALUE_USR);
+			e = new SVGPatternElement(node, null);
+			assertEquals(e.getPatternUnits(), SVGAttributes.SVG_UNITS_VALUE_USR);
+			
+			node.setAttribute(SVGAttributes.SVG_PATTERN_UNITS, SVGAttributes.SVG_UNITS_VALUE_OBJ);
+			e = new SVGPatternElement(node, null);
+			assertEquals(e.getPatternUnits(), SVGAttributes.SVG_UNITS_VALUE_OBJ);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetPatternContentUnits()
+	{
+		try
+		{
+			SVGPatternElement e = new SVGPatternElement(node, null);
+			assertEquals(e.getPatternContentUnits(), SVGAttributes.SVG_UNITS_VALUE_USR);
+			
+			node.setAttribute(SVGAttributes.SVG_PATTERN_CONTENTS_UNITS, SVGAttributes.SVG_UNITS_VALUE_USR);
+			e = new SVGPatternElement(node, null);
+			assertEquals(e.getPatternContentUnits(), SVGAttributes.SVG_UNITS_VALUE_USR);
+			
+			node.setAttribute(SVGAttributes.SVG_PATTERN_CONTENTS_UNITS, SVGAttributes.SVG_UNITS_VALUE_OBJ);
+			e = new SVGPatternElement(node, null);
+			assertEquals(e.getPatternContentUnits(), SVGAttributes.SVG_UNITS_VALUE_OBJ);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "0");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "0");
+			SVGPatternElement e = new SVGPatternElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "0");
+			e = new SVGPatternElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "0");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "10");
+			e = new SVGPatternElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "10");
+			e = new SVGPatternElement(node, null);
+			assertTrue(e.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetY()
+	{
+		try
+		{
+			SVGPatternElement e = new SVGPatternElement(node, null);
+			assertEquals(e.getY(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_Y, "1");
+			e = new SVGPatternElement(node, null);
+			assertEquals(1., e.getY());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetX()
+	{
+		try
+		{
+			SVGPatternElement e = new SVGPatternElement(node, null);
+			assertEquals(e.getX(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_X, "2");
+			e = new SVGPatternElement(node, null);
+			assertEquals(2., e.getX());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_PATTERN;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPolygonElement.java b/current/junit/test/svg/TestSVGPolygonElement.java
new file mode 100644
index 0000000..0342668
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPolygonElement.java
@@ -0,0 +1,184 @@
+package junit.test.svg;
+
+import java.awt.geom.Point2D;
+import java.text.ParseException;
+import java.util.Vector;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGPolygonElement;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPolygonElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/10/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPolygonElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20");
+			SVGPolygonElement pl = new SVGPolygonElement(node, null);
+			assertTrue(pl.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	@Test
+	public void testSetPoints()
+	{
+		try
+		{
+			String path = "10,10 20,20";
+			node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20");
+			SVGPolygonElement pl = new SVGPolygonElement(node, null);
+			
+			assertEquals(pl.getPoints(), path);
+			pl.setPoints("10,10 20,20");
+			assertEquals(2, pl.getPoints2D().size());
+			assertEquals(new Point2D.Double(10, 10), pl.getPoints2D().firstElement());
+			assertEquals(new Point2D.Double(20, 20), pl.getPoints2D().lastElement());
+			
+			try { 
+				pl.setPoints("10,,20fdsf"); 
+				fail(); 
+			}
+			catch(ParseException e) { /* */ }
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetPoints()
+	{
+		try
+		{
+			String path = "10,10 20,20";
+			node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20");
+			SVGPolygonElement pl = new SVGPolygonElement(node, null);
+			
+			assertEquals(pl.getPoints(), path);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetPoints2D()
+	{
+		try
+		{
+			String path = "	  10\t ,\n	10 	\t 	20 \t\n\t\r,	\n20 	\r30,30	\n";
+			
+			node.setAttribute(SVGAttributes.SVG_POINTS, path);
+			SVGPolygonElement pl = new SVGPolygonElement(node, null);
+			Vector<Point2D> pts;
+			
+			pts = pl.getPoints2D();
+			assertNotNull(pts);
+			assertEquals(3, pts.size());
+			assertEquals(new Point2D.Double(10, 10), pts.firstElement());
+			assertEquals(new Point2D.Double(20, 20), pts.elementAt(1));
+			assertEquals(new Point2D.Double(30, 30), pts.lastElement());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGPolygonElement(null, null);
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try
+		{ 
+			new SVGPolygonElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		catch(ParseException e)      {/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "");
+			new SVGPolygonElement(node, null);
+		}
+		catch(MalformedSVGDocument e){fail();}
+		catch(ParseException e)      {fail();}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "dsqdgfd");
+			new SVGPolygonElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		catch(ParseException e)      {/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "10,10");
+			new SVGPolygonElement(node, null);
+		}
+		catch(MalformedSVGDocument e){fail();}
+		catch(ParseException e)      {fail();}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, ",");
+			new SVGPolygonElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		catch(ParseException e)      {/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20");
+			new SVGPolygonElement(node, null);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_POLYGON;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGPolylineElement.java b/current/junit/test/svg/TestSVGPolylineElement.java
new file mode 100644
index 0000000..df69ab8
--- /dev/null
+++ b/current/junit/test/svg/TestSVGPolylineElement.java
@@ -0,0 +1,186 @@
+package junit.test.svg;
+
+import java.awt.geom.Point2D;
+import java.text.ParseException;
+import java.util.Vector;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGPolyLineElement;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGPolylineElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/10/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGPolylineElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testGetPoints()
+	{
+		try
+		{
+			String path = "10,10 20,20";
+			node.setAttribute(SVGAttributes.SVG_POINTS, path);
+			SVGPolyLineElement pl = new SVGPolyLineElement(node, null);
+			
+			assertEquals(pl.getPoints(), path);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20");
+			SVGPolyLineElement pl = new SVGPolyLineElement(node, null);
+			assertTrue(pl.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testSetPoints()
+	{
+		try
+		{
+			String path = "10,10 20,20";
+			node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20");
+			SVGPolyLineElement pl = new SVGPolyLineElement(node, null);
+			
+			assertEquals(pl.getPoints(), path);
+			pl.setPoints("10,10 20,20");
+			assertEquals(2, pl.getPoints2D().size());
+			assertEquals(new Point2D.Double(10, 10), pl.getPoints2D().firstElement());
+			assertEquals(new Point2D.Double(20, 20), pl.getPoints2D().lastElement());
+			
+			try { 
+				pl.setPoints("10,,20fdsf"); 
+				fail(); 
+			}
+			catch(ParseException e) { /* */ }
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetPoints2D()
+	{
+		try
+		{
+			String path = "	  10\t ,\n	10 	\t 	20 \t\n\t\r,	\n20 	\r30,30	\n";
+			
+			node.setAttribute(SVGAttributes.SVG_POINTS, path);
+			SVGPolyLineElement pl = new SVGPolyLineElement(node, null);
+			Vector<Point2D> pts;
+			
+			pts = pl.getPoints2D();
+			assertNotNull(pts);
+			assertEquals(3, pts.size());
+			assertEquals(new Point2D.Double(10, 10), pts.firstElement());
+			assertEquals(new Point2D.Double(20, 20), pts.elementAt(1));
+			assertEquals(new Point2D.Double(30, 30), pts.lastElement());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGPolyLineElement(null, null);
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try
+		{ 
+			new SVGPolyLineElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		catch(ParseException e)      {/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "");
+			new SVGPolyLineElement(node, null);
+		}
+		catch(MalformedSVGDocument e){fail();}
+		catch(ParseException e)      {fail();}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "dsqdgfd");
+			new SVGPolyLineElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		catch(ParseException e)      {/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "10,10");
+			new SVGPolyLineElement(node, null);
+		}
+		catch(MalformedSVGDocument e){fail();}
+		catch(ParseException e)      {fail();}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, ",");
+			new SVGPolyLineElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		catch(ParseException e)      {/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_POINTS, "10,10 20,20");
+			new SVGPolyLineElement(node, null);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+		catch(ParseException e)       { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_POLY_LINE;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGRectElement.java b/current/junit/test/svg/TestSVGRectElement.java
new file mode 100644
index 0000000..563c75c
--- /dev/null
+++ b/current/junit/test/svg/TestSVGRectElement.java
@@ -0,0 +1,232 @@
+package junit.test.svg;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGRectElement;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGRectElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/10/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGRectElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGRectElement(null, null);
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try
+		{ 
+			new SVGRectElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "dsd");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "dsd");
+			new SVGRectElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "1");
+			new SVGRectElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "-1");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "10");
+			new SVGRectElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "-1");
+			new SVGRectElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			new SVGRectElement(node, null);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "0");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "0");
+			SVGRectElement e = new SVGRectElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "0");
+			e = new SVGRectElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "0");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "10");
+			e = new SVGRectElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "10");
+			e = new SVGRectElement(node, null);
+			assertTrue(e.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetHeight()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGRectElement r = new SVGRectElement(node, null);
+			assertEquals(r.getHeight(), 20.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetWidth()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGRectElement r = new SVGRectElement(node, null);
+			assertEquals(r.getWidth(), 10.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetRy()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGRectElement r = new SVGRectElement(node, null);
+			assertEquals(r.getRy(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_RY, "1");
+			r = new SVGRectElement(node, null);
+			assertEquals(1., r.getRy());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetRx()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGRectElement r = new SVGRectElement(node, null);
+			assertEquals(r.getRx(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_RX, "1");
+			r = new SVGRectElement(node, null);
+			assertEquals(1., r.getRx());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetY()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGRectElement r = new SVGRectElement(node, null);
+			assertEquals(r.getY(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_Y, "1");
+			r = new SVGRectElement(node, null);
+			assertEquals(1., r.getY());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetX()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "20");
+			SVGRectElement r = new SVGRectElement(node, null);
+			assertEquals(r.getX(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_X, "1");
+			r = new SVGRectElement(node, null);
+			assertEquals(1., r.getX());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_RECT;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGSVGElement.java b/current/junit/test/svg/TestSVGSVGElement.java
new file mode 100644
index 0000000..b5dca22
--- /dev/null
+++ b/current/junit/test/svg/TestSVGSVGElement.java
@@ -0,0 +1,210 @@
+package junit.test.svg;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGSVGElement;
+
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/** 
+ * This class contains tests for the SVGSVGElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/12/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGSVGElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGSVGElement(null);
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try { new SVGSVGElement(node, null); }
+		catch(MalformedSVGDocument e){ fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetDefs()
+	{
+		try
+		{
+			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+	        DocumentBuilder builder = factory.newDocumentBuilder();
+	        Document document = builder.newDocument();
+			Element elt, n;
+	        SVGSVGElement e = new SVGSVGElement(node, null);
+			
+			assertNull(e.getMeta());
+
+			n = document.createElement(SVGElements.SVG_SVG);
+			n.setAttribute("xmlns", SVGDocument.SVG_NAMESPACE);
+			elt = document.createElement(SVGElements.SVG_DEFS);
+			n.appendChild(elt);
+			e = new SVGSVGElement(n, null);
+			assertNotNull(e.getDefs());
+		}
+		catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetMeta()
+	{
+		try
+		{
+			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+	        DocumentBuilder builder = factory.newDocumentBuilder();
+	        Document document = builder.newDocument();
+			Element elt, n;
+	        SVGSVGElement e = new SVGSVGElement(node, null);
+			
+			assertNull(e.getMeta());
+
+			n = document.createElement(SVGElements.SVG_SVG);
+			n.setAttribute("xmlns", SVGDocument.SVG_NAMESPACE);
+			elt = document.createElement(SVGElements.SVG_METADATA);
+			n.appendChild(elt);
+			e = new SVGSVGElement(n, null);
+			assertNotNull(e.getMeta());
+		}
+		catch(Exception e) { fail(); }
+	}
+	
+	
+	
+	
+	@Test
+	public void testGetHeight()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "200");
+			SVGSVGElement e = new SVGSVGElement(node, null);
+			assertEquals(e.getHeight(), 200.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			SVGSVGElement e = new SVGSVGElement(node, null);
+			assertTrue(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "0");
+			e = new SVGSVGElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "0");
+			e = new SVGSVGElement(node, null);
+			assertFalse(e.enableRendering());
+			
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "10");
+			node.setAttribute(SVGAttributes.SVG_HEIGHT, "10");
+			e = new SVGSVGElement(node, null);
+			assertTrue(e.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetY()
+	{
+		try
+		{
+			SVGSVGElement e = new SVGSVGElement(node, null);
+			assertEquals(e.getY(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_Y, "-10");
+			e = new SVGSVGElement(node, null);
+			assertEquals(e.getY(), -10.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetX()
+	{
+		try
+		{
+			SVGSVGElement e = new SVGSVGElement(node, null);
+			assertEquals(e.getX(), 0.);
+			
+			node.setAttribute(SVGAttributes.SVG_X, "10");
+			e = new SVGSVGElement(node, null);
+			assertEquals(e.getX(), 10.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetWidth()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_WIDTH, "100");
+			SVGSVGElement e = new SVGSVGElement(node, null);
+			assertEquals(e.getWidth(), 100.);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testVersion()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_VERSION, "1.1");
+			SVGSVGElement e = new SVGSVGElement(node, null);
+			assertEquals(e.getVersion(), "1.1");
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_SVG;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGStopElement.java b/current/junit/test/svg/TestSVGStopElement.java
new file mode 100644
index 0000000..4415563
--- /dev/null
+++ b/current/junit/test/svg/TestSVGStopElement.java
@@ -0,0 +1,118 @@
+package junit.test.svg;
+
+import java.awt.Color;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGStopElement;
+
+import org.junit.Test;
+
+/** 
+ * This class contains tests for the SVGEllipseElement class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/12/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGStopElement extends AbstractTestSVGElement
+{
+	@Test
+	public void testContructor()
+	{
+		try
+		{ 
+			new SVGStopElement(null, null);
+			fail();
+		}
+		catch(Exception e){/**/}
+		
+		try
+		{ 
+			new SVGStopElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+
+		try
+		{ 
+			node.setAttribute(SVGAttributes.SVG_OFFSET, "dsd");
+			new SVGStopElement(node, null);
+			fail();
+		}
+		catch(MalformedSVGDocument e){/**/}
+		
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5");
+			new SVGStopElement(node, null);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testGetStopColor()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5");
+			SVGStopElement e = new SVGStopElement(node, null);
+			assertEquals(e.getStopColor(), Color.BLACK);
+			
+			node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5");
+			node.setAttribute(SVGAttributes.SVG_STOP_COLOR, "blue");
+			e = new SVGStopElement(node, null);
+			assertEquals(e.getStopColor(), Color.BLUE);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	
+	@Test
+	public void testGetOffset()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5");
+			SVGStopElement e = new SVGStopElement(node, null);
+			assertEquals(e.getOffset(), 0.5);
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Test
+	public void testEnableRendering()
+	{
+		try
+		{
+			node.setAttribute(SVGAttributes.SVG_OFFSET, "0.5");
+			SVGStopElement s = new SVGStopElement(node, null);
+			assertTrue(s.enableRendering());
+		}
+		catch(MalformedSVGDocument e) { fail(); }
+	}
+	
+	
+	@Override
+	public String getNameNode()
+	{
+		return SVGElements.SVG_STOP;
+	}
+}
diff --git a/current/junit/test/svg/TestSVGText.java b/current/junit/test/svg/TestSVGText.java
new file mode 100644
index 0000000..1a24569
--- /dev/null
+++ b/current/junit/test/svg/TestSVGText.java
@@ -0,0 +1,139 @@
+package junit.test.svg;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGText;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.w3c.dom.Node;
+
+/** 
+ * This class contains tests for the SVGText class.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 03/30/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TestSVGText extends TestCase
+{
+	protected SVGDocument doc;
+	
+	
+	@Override
+	@Before
+	public void setUp()
+	{
+		doc = new SVGDocument();
+	}
+	
+	
+	@Test
+	public void testConstructors()
+	{
+		SVGText txt;
+		
+		try
+		{
+			txt = createSVGText(null, null);
+			fail();
+		}
+		catch(IllegalArgumentException e) { /* ok */ }
+		
+		try
+		{
+			txt = createSVGText(null, doc);
+			fail();
+		}
+		catch(IllegalArgumentException e) { /* ok */ }
+		
+		txt = createSVGText("a", null);
+		assertEquals("a", txt.getData());
+		assertNull(txt.getOwnerDocument());
+		
+		txt = createSVGText("test", doc);
+		assertEquals("test", txt.getData());
+		assertEquals(txt.getOwnerDocument(), doc);
+	}
+	
+	
+	@Test
+	public void testGetNodeValue()
+	{
+		SVGText txt = createSVGText("test", doc);
+		assertEquals("test", txt.getNodeValue());
+		txt = createSVGText("", doc);
+		assertEquals("", txt.getNodeValue());
+	}
+	
+	
+	@Test
+	public void testAppendData()
+	{
+		SVGText txt = createSVGText("test", doc);
+		txt.appendData(null);
+		assertEquals("test", txt.getData());
+		txt.appendData("coucou");
+		assertEquals("testcoucou", txt.getData());
+		txt.appendData("");
+		assertEquals("testcoucou", txt.getData());
+	}
+	
+	
+	@Test
+	public void testGetData()
+	{
+		SVGText txt = createSVGText("test", doc);
+		assertEquals("test", txt.getData());
+		txt = createSVGText("", doc);
+		assertEquals("", txt.getData());
+	}
+	
+	
+	@Test
+	public void testGetLength()
+	{
+		SVGText txt = createSVGText("test", doc);
+		assertEquals("text".length(), txt.getLength());
+		txt = createSVGText("", doc);
+		assertEquals("".length(), txt.getLength());
+	}
+	
+	
+	@Test
+	public void testGetNodeType()
+	{
+		SVGText txt = createSVGText("test", doc);
+		assertEquals(Node.TEXT_NODE, txt.getNodeType());
+	}
+	
+	
+	@Test
+	public void testSetData()
+	{
+		SVGText txt = createSVGText("test", doc);
+		txt.setData("");
+		assertEquals(txt.getData(), "");
+		txt.setData("coucou");
+		assertEquals(txt.getData(), "coucou");
+	}
+	
+	
+	protected SVGText createSVGText(String txt, SVGDocument document) throws IllegalArgumentException
+	{
+		return new SVGText(txt, document);
+	}
+}
+
diff --git a/current/junit/test/svg/TestSVGTransform.java b/current/junit/test/svg/TestSVGTransform.java
new file mode 100644
index 0000000..249e0f5
--- /dev/null
+++ b/current/junit/test/svg/TestSVGTransform.java
@@ -0,0 +1,607 @@
+package junit.test.svg;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGMatrix;
+import latexDraw.parsers.svg.SVGTransform;
+
+import org.junit.Test;
+
+/** 
+ * Tests the class SVGTransform.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/17/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGTransform extends TestCase
+{
+	@Test
+	public void testConstructors()
+	{
+		SVGTransform t = new SVGTransform();
+		
+		assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_UNKNOWN);
+		assertNotNull(t.getMatrix());
+
+		try
+		{
+			new SVGTransform(null);
+			fail();
+		}
+		catch(IllegalArgumentException e){ /* */ }
+		
+		try
+		{
+			new SVGTransform("");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /* */ }
+	}
+	
+	
+	@Test
+	public void testSetTransformation()
+	{
+		SVGTransform t = new SVGTransform();
+		SVGMatrix m;
+		
+		try
+		{
+			t.setTransformation(null);
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("iueozi");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t translate (		2\n \n\t	 4     )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_TRANSLATE);
+			assertTrue(t.isTranslation());
+			assertEquals(t.getTX(), 2.);
+			assertEquals(t.getTY(), 4.);
+			
+			t.setTransformation("\n \t translate (		2\n \n\t ,	 4     )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_TRANSLATE);
+			assertTrue(t.isTranslation());
+			assertEquals(t.getTX(), 2.);
+			assertEquals(t.getTY(), 4.);
+			
+			t.setTransformation("\n \t translate (		2\n \n\t )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_TRANSLATE);
+			assertTrue(t.isTranslation());
+			assertEquals(t.getTX(), 2.);
+			assertEquals(t.getTY(), 2.);
+		}
+		catch(IllegalArgumentException e){ fail(); }
+		
+		try
+		{
+			t.setTransformation("\n \t translate");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t translate(");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t translate(ds");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t translate(2 ");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t translate(2 ,");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t translate(2 , ds");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t translate(2 , 2");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t scale (		2\n \n\t	 4     )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SCALE);
+			assertTrue(t.isScale());
+			assertEquals(t.getXScaleFactor(), 2.);
+			assertEquals(t.getYScaleFactor(), 4.);
+			
+			t.setTransformation("\n \t scale (		2\n \n\t ,	 4     )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SCALE);
+			assertTrue(t.isScale());
+			assertEquals(t.getXScaleFactor(), 2.);
+			assertEquals(t.getYScaleFactor(), 4.);
+			
+			t.setTransformation("\n \t scale (		2\n \n\t )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SCALE);
+			assertTrue(t.isScale());
+			assertEquals(t.getXScaleFactor(), 2.);
+			assertEquals(t.getYScaleFactor(), 2.);
+		}
+		catch(IllegalArgumentException e){ fail(); }
+		
+		try
+		{
+			t.setTransformation("\n \t scale");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t scale(");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t scale(ds");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t scale(2 ");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t scale(2 ,");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t scale(2 , ds");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t scale(2 , 2");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix (	2\n \n\t	 4  \t 5 \n 6 	7 	8    )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_MATRIX);
+			m = t.getMatrix();
+			assertEquals(m.getA(), 2.);
+			assertEquals(m.getB(), 4.);
+			assertEquals(m.getC(), 5.);
+			assertEquals(m.getD(), 6.);
+			assertEquals(m.getE(), 7.);
+			assertEquals(m.getF(), 8.);
+			
+			t.setTransformation("\n \t matrix (	2 ,\n \n\t	 4   \t 5 ,\n 6  	7 ,	8     )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_MATRIX);
+			m = t.getMatrix();
+			assertEquals(m.getA(), 2.);
+			assertEquals(m.getB(), 4.);
+			assertEquals(m.getC(), 5.);
+			assertEquals(m.getD(), 6.);
+			assertEquals(m.getE(), 7.);
+			assertEquals(m.getF(), 8.);
+		}
+		catch(IllegalArgumentException e){ fail(); }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(ds");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(2 ");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(2 ,");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(2 , ds");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(2 , 2");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(2 , 2 3");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(2 , 2 3 5");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(2 , 2 3  , 5  7");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t matrix(2 , 2 3 5  7 9");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t skewX (		2\n \n\t  )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SKEWX);
+			assertTrue(t.isXSkew());
+			assertEquals(t.getXSkewAngle(), 2.);
+		}
+		catch(IllegalArgumentException e){ fail(); }
+		
+		try
+		{
+			t.setTransformation("\n \t skewX");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t skewX(");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t skewX(ds");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t skewX(2 ");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t skewY (		3\n \n\t  )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_SKEWY);
+			assertTrue(t.isYSkew());
+			assertEquals(t.getYSkewAngle(), 3.);
+		}
+		catch(IllegalArgumentException e){ fail(); }
+		
+		try
+		{
+			t.setTransformation("\n \t skewY");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t skewY(");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t skewY(ds");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t skewY(2 ");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t rotate (		3\n \n\t  )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_ROTATE);
+			assertTrue(t.isRotation());
+			assertEquals(t.getRotationAngle(), 3.);
+			
+			t.setTransformation("\n \t rotate (		1\n \n\t , 4 	\n 6 \n \t )   \n");
+			assertEquals(t.getType(), SVGTransform.SVG_TRANSFORM_ROTATE);
+			assertTrue(t.isRotation());
+			assertEquals(t.getRotationAngle(), 1.);
+			m = t.getMatrix();
+		}
+		catch(IllegalArgumentException e){ fail(); }
+		
+		try
+		{
+			t.setTransformation("\n \t rotate");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t rotate(");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t rotate(ds");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t rotate(2 ");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+		
+		try
+		{
+			t.setTransformation("\n \t rotate(2 4 ");
+			fail();
+		}
+		catch(IllegalArgumentException e){ /**/ }
+	}
+	
+	
+	@Test
+	public void testSetTranslate()
+	{
+		SVGTransform t = new SVGTransform();
+		SVGMatrix m = t.getMatrix();
+		
+		t.setTranslate(1, 2);
+		assertEquals(m.getE(), 1.);
+		assertEquals(m.getF(), 2.);
+		assertTrue(t.isTranslation());
+		assertFalse(t.isYSkew());
+		assertFalse(t.isXSkew());
+		assertFalse(t.isRotation());
+		assertFalse(t.isScale());
+		assertEquals(1., t.getTX());
+		assertEquals(2., t.getTY());
+		assertEquals(Double.NaN, t.getXScaleFactor());
+		assertEquals(Double.NaN, t.getYScaleFactor());
+		assertEquals(Double.NaN, t.getXSkewAngle());
+		assertEquals(Double.NaN, t.getYSkewAngle());
+		assertEquals(Double.NaN, t.getRotationAngle());
+		assertEquals(SVGTransform.SVG_TRANSFORM_TRANSLATE, t.getType());
+	}
+	
+	
+	@Test
+	public void testSetScale()
+	{
+		SVGTransform t = new SVGTransform();
+		SVGMatrix m = t.getMatrix();
+		
+		t.setScale(3, 4);
+		assertEquals(m.getA(), 3.);
+		assertEquals(m.getD(), 4.);
+		assertTrue(t.isScale());
+		assertFalse(t.isYSkew());
+		assertFalse(t.isXSkew());
+		assertFalse(t.isRotation());
+		assertFalse(t.isTranslation());
+		assertEquals(Double.NaN, t.getTX());
+		assertEquals(Double.NaN, t.getTY());
+		assertEquals(3., t.getXScaleFactor());
+		assertEquals(4., t.getYScaleFactor());
+		assertEquals(Double.NaN, t.getXSkewAngle());
+		assertEquals(Double.NaN, t.getYSkewAngle());
+		assertEquals(Double.NaN, t.getRotationAngle());
+		assertEquals(SVGTransform.SVG_TRANSFORM_SCALE, t.getType());
+	}
+	
+	
+	@Test
+	public void testSetXSkew()
+	{
+		SVGTransform t = new SVGTransform();
+		SVGMatrix m = t.getMatrix();
+		
+		t.setSkewX(30);
+		assertEquals(m.getC(), Math.tan(Math.toRadians(30)));
+		assertEquals(t.getXSkewAngle(), 30.);
+		assertTrue(t.isXSkew());
+		assertFalse(t.isScale());
+		assertFalse(t.isYSkew());
+		assertFalse(t.isRotation());
+		assertFalse(t.isTranslation());
+		assertEquals(Double.NaN, t.getTX());
+		assertEquals(Double.NaN, t.getTY());
+		assertEquals(Double.NaN, t.getXScaleFactor());
+		assertEquals(Double.NaN, t.getYScaleFactor());
+		assertEquals(Double.NaN, t.getYSkewAngle());
+		assertEquals(Double.NaN, t.getRotationAngle());
+		assertEquals(SVGTransform.SVG_TRANSFORM_SKEWX, t.getType());
+	}
+	
+	
+	@Test
+	public void testSetYSkew()
+	{
+		SVGTransform t = new SVGTransform();
+		SVGMatrix m = t.getMatrix();
+		
+		t.setSkewY(30);
+		assertEquals(m.getB(), Math.tan(Math.toRadians(30)));
+		assertEquals(t.getYSkewAngle(), 30.);
+		assertTrue(t.isYSkew());
+		assertFalse(t.isScale());
+		assertFalse(t.isXSkew());
+		assertFalse(t.isRotation());
+		assertFalse(t.isTranslation());
+		assertEquals(Double.NaN, t.getTX());
+		assertEquals(Double.NaN, t.getTY());
+		assertEquals(Double.NaN, t.getXScaleFactor());
+		assertEquals(Double.NaN, t.getYScaleFactor());
+		assertEquals(Double.NaN, t.getXSkewAngle());
+		assertEquals(Double.NaN, t.getRotationAngle());
+		assertEquals(SVGTransform.SVG_TRANSFORM_SKEWY, t.getType());
+	}
+	
+	
+	@Test
+	public void testSetRotate()
+	{
+		SVGTransform t = new SVGTransform();
+		SVGMatrix m;
+		
+		t.setRotate(2, 0, 0);
+		assertTrue(t.isRotation());
+		assertFalse(t.isScale());
+		assertFalse(t.isXSkew());
+		assertFalse(t.isYSkew());
+		assertFalse(t.isTranslation());
+		assertEquals(Double.NaN, t.getTX());
+		assertEquals(Double.NaN, t.getTY());
+		assertEquals(Double.NaN, t.getXScaleFactor());
+		assertEquals(Double.NaN, t.getYScaleFactor());
+		assertEquals(Double.NaN, t.getXSkewAngle());
+		assertEquals(Double.NaN, t.getYSkewAngle());
+		assertEquals(SVGTransform.SVG_TRANSFORM_ROTATE, t.getType());
+		m = t.getMatrix();
+		assertEquals(t.getRotationAngle(), 2.);
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getF(), 0.);
+		t.setRotate(2, 3, 4);
+		assertEquals(t.getRotationAngle(), 2.);
+		m = t.getMatrix();
+		assertEquals(m.getE(), 3.);
+		assertEquals(m.getF(), 4.);
+	}
+	
+	
+	public void testSetMatrix()
+	{
+		SVGTransform t = new SVGTransform();
+		SVGMatrix m = t.getMatrix();
+		
+		t.setMatrix(2, 3, 4, 5, 6, 7);
+		assertEquals(m.getA(), 2.);
+		assertEquals(m.getB(), 3.);
+		assertEquals(m.getC(), 4.);
+		assertEquals(m.getD(), 5.);
+		assertEquals(m.getE(), 6.);
+		assertEquals(m.getF(), 7.);
+		assertEquals(SVGTransform.SVG_TRANSFORM_MATRIX, t.getType());
+		assertEquals(Double.NaN, t.getTX());
+		assertEquals(Double.NaN, t.getTY());
+		assertEquals(Double.NaN, t.getXScaleFactor());
+		assertEquals(Double.NaN, t.getYScaleFactor());
+		assertEquals(Double.NaN, t.getXSkewAngle());
+		assertEquals(Double.NaN, t.getYSkewAngle());
+		assertEquals(Double.NaN, t.getRotationAngle());
+		assertFalse(t.isRotation());
+		assertFalse(t.isScale());
+		assertFalse(t.isXSkew());
+		assertFalse(t.isYSkew());
+		assertFalse(t.isTranslation());
+	}
+}
diff --git a/current/junit/test/svg/TestSVGTransformList.java b/current/junit/test/svg/TestSVGTransformList.java
new file mode 100644
index 0000000..a09f799
--- /dev/null
+++ b/current/junit/test/svg/TestSVGTransformList.java
@@ -0,0 +1,185 @@
+package junit.test.svg;
+
+import java.awt.geom.Point2D;
+
+import junit.framework.TestCase;
+import latexDraw.parsers.svg.SVGMatrix;
+import latexDraw.parsers.svg.SVGTransformList;
+
+import org.junit.Test;
+
+/** 
+ * Tests the class SVGTransformList.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/18/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+ at SuppressWarnings("nls")
+public class TestSVGTransformList extends TestCase
+{
+	@Test
+	public void testContructors()
+	{
+		SVGTransformList t = new SVGTransformList();
+		assertTrue(t.isEmpty());
+		
+		t = new SVGTransformList(null);
+		assertTrue(t.isEmpty());
+		
+		t = new SVGTransformList("");
+		assertTrue(t.isEmpty());
+		
+		t = new SVGTransformList("translate(2,2)");
+		assertFalse(t.isEmpty());
+	}
+	
+	
+	@Test
+	public void testAddTransformations()
+	{
+		SVGTransformList t = new SVGTransformList();
+		
+		t.addTransformations(null);
+		assertTrue(t.isEmpty());
+
+		t.addTransformations("");
+		assertTrue(t.isEmpty());
+		
+		t.addTransformations("dsqdsq");
+		assertTrue(t.isEmpty());
+		
+		t.addTransformations("translate");
+		assertTrue(t.isEmpty());
+		
+		t.addTransformations("translate(,)");
+		assertTrue(t.isEmpty());
+		
+		t.addTransformations("translate( )");
+		assertTrue(t.isEmpty());
+		
+		t.addTransformations("scale( 3");
+		assertTrue(t.isEmpty());
+		
+		t.addTransformations("rotate(a)");
+		assertTrue(t.isEmpty());
+		
+		t.addTransformations("rotate(1)");
+		assertFalse(t.isEmpty());
+		t.clear();
+		
+		t.addTransformations("rotate(1 , 2 4)");
+		assertFalse(t.isEmpty());
+		t.clear();
+		
+		t.addTransformations("skewY(	1)");
+		assertFalse(t.isEmpty());
+		t.clear();
+		
+		t.addTransformations("skewX(1)");
+		assertFalse(t.isEmpty());
+		t.clear();
+		
+		t.addTransformations("scale(1 1)");
+		assertFalse(t.isEmpty());
+		t.clear();
+		
+		t.addTransformations("translate(1 ,1)");
+		assertFalse(t.isEmpty());
+		t.clear();
+		
+		t.addTransformations("translate(1 1) ,");
+		assertFalse(t.isEmpty());
+		t.clear();
+		
+		t.addTransformations("matrix(1 2 3)");
+		assertTrue(t.isEmpty());
+		
+		t.addTransformations("matrix(1 2 3 ,4 ,5 ,6)");
+		assertFalse(t.isEmpty());
+		t.clear();
+		
+		t.addTransformations("matrix(1 2 3 ,4 ,5 ,6) translate(2 2)");
+		assertEquals(2, t.size());
+		t.clear();
+		
+		t.addTransformations("rotate ( 2, 3 5), \n skewX( 2	\n)");
+		assertEquals(2, t.size());
+		t.clear();
+		
+		t.addTransformations("rotate ( 2, 3 5)scale( 2)");
+		assertEquals(2, t.size());
+		t.clear();
+		
+		t.addTransformations("rotate ( 2, 3 5), \n skewX( 2	\n)");
+		t.addTransformations("rotate ( 2, 3 5)scale( 2)");
+		assertEquals(4, t.size());
+	}
+	
+	
+	@Test
+	public void testTransformPoint()
+	{
+		SVGTransformList t = new SVGTransformList();
+		Point2D pt1 = new Point2D.Double(1,1);
+		Point2D pt2 = new Point2D.Double(3,4);
+		Point2D pt3;
+		
+		t.addTransformations("translate( 2 3)");
+		assertEquals(t.transformPoint(pt1), pt2);
+		
+		t.addTransformations("translate( -2 -3)");
+		t.addTransformations("rotate(90)");
+		pt2.setLocation(0, 1);
+		pt1.setLocation(1, 0);
+		
+		pt3 = t.transformPoint(pt1);
+		assertEquals(Math.rint(pt3.getX()), pt2.getX());
+		assertEquals(Math.rint(pt3.getY()), pt2.getY());
+	}
+	
+	
+	
+	@Test
+	public void testGetGlobalTransformation()
+	{
+		SVGTransformList t = new SVGTransformList();
+		SVGMatrix m;
+		
+		m = t.getGlobalTransformationMatrix();
+		assertNull(m);
+		
+		t.addTransformations("scale( 2 3)");
+		m = t.getGlobalTransformationMatrix();
+		
+		assertEquals(m.getA(), 2.);
+		assertEquals(m.getB(), 0.);
+		assertEquals(m.getC(), 0.);
+		assertEquals(m.getD(), 3.);
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getF(), 0.);
+		
+		t.addTransformations("skewX( 0.5	\n)");
+		m = t.getGlobalTransformationMatrix();
+		
+		assertEquals(m.getA(), 2.);
+		assertEquals(m.getB(), 0.);
+		assertEquals(m.getC(), 2.*Math.tan(Math.toRadians(0.5)));
+		assertEquals(m.getD(), 3.);
+		assertEquals(m.getE(), 0.);
+		assertEquals(m.getF(), 0.);
+	}
+}
diff --git a/current/junit/test/svg/test.svg b/current/junit/test/svg/test.svg
new file mode 100644
index 0000000..b933450
--- /dev/null
+++ b/current/junit/test/svg/test.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"
+    xmlns:latexdraw="http://latexdraw.sourceforge.net/namespaces/latexdraw"
+    version="1.1" baseProfile="full">
+    <defs/>
+    <g>
+        <g latexdraw:type="rectangle" id="id2">
+            <rect x="181.0" y="61.0" width="138.0" height="78.0"
+                latexdraw:borderPos="outer" stroke-width="2.0"
+                stroke="black" fill="none"/>
+        </g>
+        <g latexdraw:type="rectangle" id="id3">
+            <rect x="361.0" y="181.0" width="118.0" height="78.0"
+                latexdraw:borderPos="outer" stroke-width="2.0"
+                stroke="black" fill="none"/>
+        </g>
+    </g>
+    <metadata>
+        <latexdraw:metadata>
+            <latexdraw:displayBorders>false</latexdraw:displayBorders>
+            <latexdraw:autoAdjust>true</latexdraw:autoAdjust>
+            <latexdraw:ppc>50</latexdraw:ppc>
+            <latexdraw:zoom>1.0</latexdraw:zoom>
+            <latexdraw:unit>cm</latexdraw:unit>
+            <latexdraw:classicGrid>false</latexdraw:classicGrid>
+            <latexdraw:gridGap>20</latexdraw:gridGap>
+            <latexdraw:code>0</latexdraw:code>
+            <latexdraw:displayGrid>true</latexdraw:displayGrid>
+            <latexdraw:magneticGrid>true</latexdraw:magneticGrid>
+            <latexdraw:autoUpdate>true</latexdraw:autoUpdate>
+            <latexdraw:version>2.0.0</latexdraw:version>
+            <latexdraw:size>
+                <latexdraw:width>1008</latexdraw:width>
+                <latexdraw:height>836</latexdraw:height>
+            </latexdraw:size>
+            <latexdraw:position>
+                <latexdraw:x>0</latexdraw:x>
+                <latexdraw:y>24</latexdraw:y>
+            </latexdraw:position>
+            <latexdraw:dividerPosition>0.8</latexdraw:dividerPosition>
+            <latexdraw:displayCodePanel>false</latexdraw:displayCodePanel>
+            <latexdraw:displayXScale>true</latexdraw:displayXScale>
+            <latexdraw:displayYScale>true</latexdraw:displayYScale>
+            <latexdraw:delimitorOpacity>130</latexdraw:delimitorOpacity>
+        </latexdraw:metadata>
+    </metadata>
+</svg>
diff --git a/current/lang/de/1_6.properties b/current/lang/de/1_6.properties
new file mode 100644
index 0000000..1cf9f2f
--- /dev/null
+++ b/current/lang/de/1_6.properties
@@ -0,0 +1,58 @@
+BatchConvertFrame.1=Unterordner hinzuf\u00FCgen
+BatchConvertFrame.2=Dateien hinzuf\u00FCgen
+BatchConvertFrame.4=Alle entfernen
+BatchConvertFrame.5=\u00DCberschreiben
+BatchConvertFrame.6=Pfad w\u00E4hlen
+BatchConvertFrame.7=Format ausw\u00E4hlen
+BatchConvertFrame.8=Konvertieren
+BatchConvertFrame.9=Stopp
+BatchConvertFrame.11=Batch Liste
+BatchConvertFrame.12=Verzeichnis w\u00E4hlen
+BatchConvertFrame.13=Bilder w\u00E4hlen
+BatchConvertFrame.14=Konvertieren als:
+LaTeXDrawFrame.0=PSTricks Code einf\u00FCgen
+LaTeXDrawFrame.1=Bild einf\u00FCgen
+LaTeXDrawFrame.2=Bilder konvertieren
+LaTeXDrawFrame.3=stopp
+LaTeXDrawFrame.4=Verbundene Linien zeichnen
+LaTeXDrawFrame.5=PPM Bild
+LaTeXDrawFrame.6=BMP Bild
+LaTeXDrawFrame.7=PNG Bild
+LaTeXDrawFrame.9=Parsing stoppen\!
+LaTeXDrawFrame.10=Einf\u00FCgen
+LaTeXDrawFrame.11=Mehrere Figuren aus PSTricks Code einf\u00FCgen
+LaTeXDrawFrame.14=Mehrere verbundene Linien zeichnen
+LaTeXDrawFrame.15=PSTricks Datei wird importiert...
+LaTeXDrawFrame.16=<html>Der aktuelle PSTricks Parser verarbeitet nur einige Befehle.<br>Sie k\u00F6nnen nur von LaTeXDraw unterst\u00FCtzte Befehle importieren.<html>
+LaTeXDrawFrame.17=Einen PSTricks Code importieren
+LaTeXDrawFrame.18=Diese Software verwendet JIU, the Java Imaging Utilities. Ver\u00F6ffentlicht unter  
+LaTeXDrawFrame.19=den Bedingungen der GNU General Public License. http://schmidt.devlib.org/jiu/
+LaTeXDrawFrame.23=<html><b><font color=red>Warnung:</b> <br><font color=black><ul><li>PSTricks kann keine JPG, BMP, ... Dateien einf\u00FCgen; es wird eine EPS Datei vom ausgew\u00E4hlten Bild im gleichen Verzeichnis erstellt<br>Das Bild wird nur eingef\u00FCgt, wenn Sie Schreibrechte f\u00FCr das Verzeichnis haben;<li>TeX unterst\u00FCtzt keine Leerzeichen in Pfadangaben, kontrollieren Sie, dass Sie keine Leerzeichen im Pfad haben.</ul></html>
+LaTeXDrawFrame.25=Bild laden...
+LaTeXDrawFrame.26=Das Bild ist ung\u00FCltig\!
+LaTeXDrawFrame.27=Es ist nicht m\u00F6glich das Bild zu laden\!
+LaTeXDrawFrame.28=Bild eingef\u00FCgt\!
+LaTeXDrawFrame.30=<html>In der Datei ist keine Figur, die importiert werden k\u00F6nnte\!<br>Pr\u00FCfen Sie, dass sie mit begin{pspicture} ...end{pspicture} umschlossen sind.<br>Sie k\u00F6nnen die Datei an  
+LaTeXDrawFrame.31=\ senden, wenn Sie denken, dass es einen Fehler im PSTricks Parser hat.</html>
+LaTeXDrawFrame.32=Keine Figuren gefunden\!
+LaTeXDrawFrame.33=Keine Figuren zum importieren gefunden\!
+LaTeXDrawFrame.34=Es ist nicht m\u00F6glich das PSTricks file zu importieren\!
+LaTeXDrawFrame.35=Import abgebrochen\!
+LaTeXDrawFrame.36=Code wurde in Figuren umgewandelt\!
+InsertPSTricksCodeFrame.0=Figuren aus PSTricks Code einf\u00FCgen
+FatalErrorParsingException.0=<br>Falls die Datei g\u00FCltig ist k\u00F6nnen Sie sie an arno_b at users.sourceforge.net senden</html>
+Picture.0=% Warnung: der Pfad des folgenden Bildes enth\u00E4llt Leerzeichen und wird nicht von TeX kompiliert\!
+ParserCmdMessage.0=Linie  
+ParserCmdMessage.1=Befehl:  
+ParserCmdMessage.2=Ausnahme:  
+ParserMessagesFrame.0=Befehl
+ParserMessagesFrame.1=Linie
+ParserMessagesFrame.2=Ausnahme
+ParserMessagesFrame.3=<html><font color=red><b>Eine oder mehrere Warnungen sind w\u00E4hrend des Parsings aufgetreten</b></html>
+ParserMessagesFrame.4=TeX Parser: Warnung(en)
+ParametersGridFrame.0=Invertiere Label Position X folgend
+ParametersGridFrame.1=Invertiere Label Position Y folgend
+PSTricksParser.0=Fehler w\u00E4hrend des \u00D6ffnens der Datei: ung\u00FCltige Datei\!
+PSTricksParser.1=<html>Die inkrementelle Definition von pspicture wird noch nicht unterst\u00FCtzt:<br>
+PSTricksParser.2=begin{pspicture}...begin{pspicture} ... end{pspicture}...</html>
+PSTricksParser.3=Fehler beim Parsen der Datei \!
diff --git a/current/lang/de/1_7.properties b/current/lang/de/1_7.properties
new file mode 100644
index 0000000..2fd0242
--- /dev/null
+++ b/current/lang/de/1_7.properties
@@ -0,0 +1,60 @@
+LaTeXDrawException.0=Ung\u00FCltiges Bild.
+LaTeXDrawFrame.0=Schatten
+LaTeXDrawFrame.9=Schattenfarbe ausw\u00E4hlen
+LaTeXDrawFrame.1=Farbverlauf 1
+LaTeXDrawFrame.2=Farbverlauf 2
+LaTeXDrawFrame.4=Schatten zur Figur hinzuf\u00FCgen.
+LaTeXDrawFrame.5=Farbe des Schattens w\u00E4hlen.
+LaTeXDrawFrame.7=Die erste Farbe des Farbverlaufes w\u00E4hlen.
+LaTeXDrawFrame.8=Die zweite Farbe des Farbverlaufes w\u00E4hlen.
+ParametersTextFrame.0=Deckkraft
+ParametersTextFrame.1=Boxen Liste
+ParametersTextFrame.2=Undurchsichtig
+ParametersTextFrame.3=Kreis
+ParametersTextFrame.4=Rechteck
+ParametersTextFrame.5=Dreieck
+ParametersTextFrame.6=Raute
+ParametersTextFrame.7=Ellipse
+ParametersTextFrame.8=Einfache Box
+ParametersTextFrame.9=Mehrere Boxen
+ParametersGridFrame.0=Gitter Parameter
+ParametersTextFrame.10=Eingerahmte Box(en) aktivieren
+ParametersTextFrame.11=Hinzuf\u00FCgen
+ParametersTextFrame.12=\u00C4ndern
+ParametersTextFrame.13=Entfernen
+ParametersTextFrame.14=Separator:
+ParametersTextFrame.15=Box editieren
+ParametersTextFrame.16=Gr\u00F6sse der Box ber\u00FCcksichtigen
+ParametersTextFrame.17=Wenn aktiviert, wird der Hintergrund des Textes undurchsichtig sein.
+ParametersTextFrame.18=Eingerahmte Box(en)
+ParametersTextFrame.20=Einen oder mehrere Rahmen um den Text erstellen.
+ParametersTextFrame.21=Die Box wird ein Rechteck sein.
+ParametersTextFrame.22=Die Box wird ein Dreieck sein.
+ParametersTextFrame.23=Eine simple Box um den ganzen Text erstellen.
+ParametersTextFrame.24=Die Box wird eine Ellipse sein.
+ParametersTextFrame.25=Die Box wird eine Raute sein.
+ParametersTextFrame.26=Mehrere Boxen um die verschiedenen Teile des Textes erstellen.
+ParametersTextFrame.27=Die Box wird ein Kreis sein.
+ParametersTextFrame.28=Eine neue Box hinzuf\u00FCgen.
+ParametersTextFrame.29=Die Position der ausgew\u00E4hlten Box bearbeiten.
+ParametersTextFrame.30=Die ausgew\u00E4hlte Box entfernen.
+ParametersTextFrame.32=Wenn aktiviert, wird die Box nicht auf dem Text vor oder hinter dem umrahmten Text gezeichnet.
+ParametersTextFrame.34=Text Auswahl
+ParametersTextFrame.35=Text zum Rahmen ausw\u00E4hlen:
+ParametersTextFrame.36=Text Auswahl
+ParametersTextFrame.37=Ung\u00FCltige Box; sie \u00FCberlappt eine andere Box.
+AbstractParametersFrame.0=Dimension/Position
+AbstractParametersFrame.1=Winkel des Schattens
+AbstractParametersFrame.2=Gr\u00F6sse des Schattens
+AbstractParametersFrame.3=Winkel des Farbverlaufs
+AbstractParametersFrame.4=Mittelpunkt
+AbstractParametersFrame.6=Weitere
+AbstractParametersFrame.7=Runde Ecken:
+AbstractParametersFrame.8=Schraffur
+AbstractParametersFrame.9=Doppelte Linien
+AbstractParametersFrame.11=F\u00FCllfarbe
+AbstractParametersFrame.12=Farbverlauf
+BatchConvertFrame.0=In den gleichen Verzeichnissen
+LaTeXDrawFrame.6=Position figures into the drawing (in front of, behind,...).
+ParametersTextFrame.31=Change the spacing between the text and the box.
+ParametersTextFrame.33=Open the panel of parameters of the box to edit it.
diff --git a/current/lang/de/1_8.properties b/current/lang/de/1_8.properties
new file mode 100644
index 0000000..e2b4d92
--- /dev/null
+++ b/current/lang/de/1_8.properties
@@ -0,0 +1,57 @@
+UndoRedoManager.0=Transformation
+AbstractParametersFrame.0=Intervall:
+ParametersAxeFrame.0=Form:
+ParametersAxeFrame.1=Ursprung zeigen
+ParametersAxeFrame.2=Achsen
+ParametersAxeFrame.3=X-Labels anzeigen
+ParametersAxeFrame.4=Y-Labels anzeigen
+ParametersAxeFrame.5=Abstand zwischen Labels festlegen (cm)
+ParametersAxeFrame.6=X-Labels Abstand:
+ParametersAxeFrame.7=Y-Labels Abstand:
+ParametersAxeFrame.8=X-Labels Inkrement:
+ParametersAxeFrame.9=Y-Labels Inkrement:
+ParametersAxeFrame.10=X-Labels Ursprung:
+ParametersAxeFrame.11=Y-Labels Ursprung:
+ParametersAxeFrame.12=Labels
+ParametersAxeFrame.13=Gr\u00F6sse:
+ParametersAxeFrame.14=Stil:
+ParametersAxeFrame.15=X-Ticks anzeigen
+ParametersAxeFrame.16=Y-Ticks anzeigen
+ParametersAxeFrame.17=Ticks
+PreferencesFrame.3=Pfad des LaTeX Editors:
+PreferencesFrame.4=Standard Gitter
+PreferencesFrame.5=Benutzerdefiniertes Gitter
+PreferencesFrame.6=Magnetisches Gitter
+PreferencesFrame.7=Intervall:
+LaTeXDrawFrame.0=Achsen zeichnen
+LaTeXDrawFrame.2=Ausgew\u00E4hlte Figur(en) rotieren.
+LaTeXDrawFrame.3=Ausgew\u00E4hlte Figur(en) um 90\u00B0 rotieren.
+LaTeXDrawFrame.4=Ausgew\u00E4hlte Figur(en) um 180\u00B0 rotieren.
+LaTeXDrawFrame.5=Ausgew\u00E4hlte Figur(en) um 270\u00B0 rotieren.
+LaTeXDrawFrame.6=Reverse figures by symmetry.
+LaTeXDrawFrame.7=Ausgew\u00E4hlte Figuren horizontal spiegeln
+LaTeXDrawFrame.8=Ausgew\u00E4hlte Figuren vertikal spiegeln
+LaTeXDrawFrame.10=Ein standard Gitter darstellen (in cm oder in inch).
+LaTeXDrawFrame.11=Ein ver\u00E4nderbares Gitter darstellen.
+LaTeXDrawFrame.12=Enth\u00E4llt die Parameter des (magnetischen) Gitters
+LaTeXDrawFrame.13=magnetisch
+LaTeXDrawFrame.14=Wenn aktiviert, werden die Figuren magnetisch zum Gitter sein.
+LaTeXDrawFrame.15=Das Intervall zwischen den Linien des benutzerdefinierten Gitters festlegen (in pixeln).
+LaTeXDrawFrame.17=Achsen zeichnen.
+LaTeXDrawFrame.18=LaTeX Editor ausf\u00FChren.
+LaTeXDrawFrame.19=Ihr LaTeXDraw Editor ausf\u00FChren...
+LaTeXDrawFrame.20=Sie m\u00FCssen den Pfad zu Ihrem LaTeX Editor im Einstellungs Men\u00FC festlegen.
+LaTeXDrawFrame.21=Die ausgew\u00E4hlte Datei ist ung\u00FCltig.
+LaTeXDrawFrame.23=Schliessen
+LaTeXDrawFrame.25=Bibliotheken
+LaTeXDrawFrame.26=\u00DCbersetzer
+LaTeXDrawFrame.27=Release Note
+LaTeXDrawFrame.28=Lizenz
+Axe.0=Keine
+Axe.1=Achse
+Axe.2=Rahmen
+Axe.3=Voll
+Axe.4=Oben
+Axe.5=Unten
+LaTeXDrawFrame.16=Draw grids and axes.
+LaTeXDrawFrame.22=Redefine the path in the panel of preferences.
diff --git a/current/lang/de/1_9.properties b/current/lang/de/1_9.properties
new file mode 100644
index 0000000..e98d820
--- /dev/null
+++ b/current/lang/de/1_9.properties
@@ -0,0 +1,70 @@
+LaTeXDrawFrame.0=Letzte Dateien
+LaTeXDrawFrame.1=Zeichne geschlossene B\u00E9zier Kurve
+LaTeXDrawFrame.2=L\u00F6sche alle
+LaTeXDrawFrame.3=Tastenkombinationen
+LaTeXDrawFrame.4=Nach Update pr\u00FCfen
+LaTeXDrawFrame.5=Formen
+LaTeXDrawFrame.6=Alle Figuren sichtbar machen
+LaTeXDrawFrame.7=<html>Wenn eine Figur Koordinaten unter (0,0) hat, ist sie nicht sichtbar.<br>Diese Taste setzt alle Figuren, dass sie sichtbar sind.</html>
+LaTeXDrawFrame.8=Die Eigenschaften des Handlers definieren.
+LaTeXDrawFrame.9=Deckkraft des Handler
+LaTeXDrawFrame.10=Die Transparenz des Handlers definieren.
+LaTeXDrawFrame.11=Geschlossene B\u00E9zier Kurve zeichnen
+LaTeXDrawFrame.12=<html>\u00DCberpr\u00FCen Sie, dass die Version des Java Runtime Environment, dass<br> Sie verwendet haben um diese Datei zu erzeugen, die gleiche ist, die sie momentan verwenden.</html>
+LaTeXDrawFrame.13=Das Hilfe Verzeichnis ist nicht erreichbar, die Hilfe Seite kann nicht geladen werden.
+LaTeXDrawFrame.14=Die Hilfe Seite kann nicht erstellt werden.
+PSTricksParser.0=begin{center} muss Ausserhalb von begin{pspicture}...end{pspicture} sein
+PSTricksParser.1=end{center} muss Ausserhalb von begin{pspicture}...end{pspicture} sein
+PSTricksParser.2=end{figure} muss Ausserhalb von begin{pspicture}...end{pspicture} sein
+PSTricksParser.3=end{pspicture} oder pspicture nicht gefunden.
+DrawPanel.0=Figuren am Gitter ausrichten
+ParametersAkinPointsFrame.0=Punkte Intervall:
+ParametersAkinPointsFrame.1=\u00D6ffnen
+ParametersAkinPointsFrame.2=Typ:
+ParametersAkinPointsFrame.3=Freihand Parameter
+ParametersBezierCurveFrame.2=Ausgleichen
+ParametersBezierCurveFrame.3=Kontrollpunkte in Beziehung auf die Punkte ausgleichen.
+ParametersBezierCurveFrame.4=Abstand:
+ParametersBezierCurveFrame.5=Den Abstand zwischen dem Kontrollpunkt und dem Punkt beim Ausgleichen definieren.
+ParametersBezierCurveFrame.6=X 1er ctrl pt
+ParametersBezierCurveFrame.7=Y 1er ctrl pt
+ParametersBezierCurveFrame.8=X 2er ctrl pt
+ParametersBezierCurveFrame.9=Y 2er ctrl pt
+PreferencesFrame.0=Anzahl zuletzt ge\u00F6ffneter Dateien:
+PreferencesFrame.1=Theme (neustart erforderlich):
+ShortcutsFrame.1=Sequenz
+ShortcutsFrame.3=Kategorie
+ShortcutsFrame.4=Navigation
+ShortcutsFrame.5=Transformation
+ShortcutsFrame.6=Zeichnung
+ShortcutsFrame.7=\ (grosse Bewegung)
+ShortcutsFrame.8=Linksklick
+ShortcutsFrame.9=Verschiebe die horizontale Bildlaufleiste nach rechts
+ShortcutsFrame.10=Verschiebe die horizontale Bildlaufleiste nach links
+ShortcutsFrame.11=Verschiebe die vertikale Bildlaufleiste nach oben
+ShortcutsFrame.12=Verschiebe die vertikale Bildlaufleiste nach unten
+ShortcutsFrame.14=Gehe zum Ende der horizontalen Bildlaufleiste
+ShortcutsFrame.15=Gehe zum Anfang der horizontalen Bildlaufleiste
+ShortcutsFrame.16=Gehe zum oberen Teil der vertikalen Bildlaufleiste
+ShortcutsFrame.17=Gehe zum unteren Teil der vertikalen Bildlaufleiste
+ShortcutsFrame.18=Verschiebe die ausgew\u00E4hlte Figur nach rechts
+ShortcutsFrame.19=Verschiebe die ausgew\u00E4hlte Figur nach links
+ShortcutsFrame.20=Verschiebe die ausgew\u00E4hlte Figur nach oben
+ShortcutsFrame.21=Verschiebe die ausgew\u00E4hlte Figur nach unten
+ShortcutsFrame.23=Richte die ausgew\u00E4hlten Figuren am dargestellten Gitter aus
+ShortcutsFrame.25=Alle Figuren der Zeichnung ausw\u00E4hlen
+ShortcutsFrame.26=Die angeklickte Figur zur Auswahl hinzuf\u00FCgen
+ShortcutsFrame.27=Die angeklickte Figur aus der Auswahl entfernen
+ShortcutsFrame.28=N\u00E4chste oder die erste Figur ausw\u00E4hlen (nur im Auswahlmodus)
+ShortcutsFrame.29=Mausrad
+ShortcutsFrame.30=Zoom in/out
+MenusListener.0=Die linke Taste dr\u00FCcken und die Maus bewegen um den zweiten Punkt zu setzen. Taste loslassen, um den Vorgang abzuschliessen.
+MenusListener.1=Linksklick um ein Punkt huzuzuf\u00FCgen, Rechtsklick oder ein doppelter Linksklick um den letzten Punkt zu setzen und den Vorgang abzuschliessen.
+MenusListener.4=Die Linke Taste dr\u00FCcken und die Maus bewegen um den letzten Punkt zu setzen. Taste loslassen um den Vorgang abzuschliessen.
+MenusListener.5=Ein Linksklick f\u00FCgt Text hinzu.
+MenusListener.6=Ein Linksklick f\u00FCgt ein Gitter hizu.
+MenusListener.7=Ein Linksklick f\u00FCgt Achsen hinzu.
+MenusListener.8=Linke Taste dr\u00FCcken und die Maus bewegen, um die Form zu Zeichnen. Loslassen der Taste beendet den Vorgang.
+MenusListener.9=Ein Linksklick f\u00FCgt einen Punkt hinzu.
+RecentFilesListener.0=Kein Zugriff auf die Datei.
+RecentFilesListener.1=Datei kann nicht ge\u00F6ffnet werden
diff --git a/current/lang/de/LaTeXDrawFrame.properties b/current/lang/de/LaTeXDrawFrame.properties
new file mode 100644
index 0000000..14b57af
--- /dev/null
+++ b/current/lang/de/LaTeXDrawFrame.properties
@@ -0,0 +1,207 @@
+LaTeXDrawFrame.0=\ Hilfe
+LaTeXDrawFrame.1=\u00DCber 
+LaTeXDrawFrame.2=Linie Zeichnen
+LaTeXDrawFrame.3=Rechteck zeichnen
+LaTeXDrawFrame.4=Punkt zeichnen
+LaTeXDrawFrame.5=Quadrat zeichnen
+LaTeXDrawFrame.6=Rhombus zeichnen
+LaTeXDrawFrame.7=Freihand
+LaTeXDrawFrame.8=Dreieck zeichnen
+LaTeXDrawFrame.9=Kreis zeichnen
+LaTeXDrawFrame.10=Gitter zeichnen
+LaTeXDrawFrame.11=Ellipse zeichnen
+LaTeXDrawFrame.12=Polygon zeichnen
+LaTeXDrawFrame.13=Figur(en) ausw\u00E4hlen
+LaTeXDrawFrame.14=Grenzen anzeigen
+LaTeXDrawFrame.15=Grenzen automatisch anpassen
+LaTeXDrawFrame.16=Exportieren als...
+LaTeXDrawFrame.17=Figur l\u00F6schen
+LaTeXDrawFrame.18=Beenden
+LaTeXDrawFrame.19=PSTricks Code
+LaTeXDrawFrame.20=JPEG Bild
+LaTeXDrawFrame.21=EPS Bild
+LaTeXDrawFrame.22=Wiederherstellen
+LaTeXDrawFrame.23=R\u00FCckg\u00E4ngig
+LaTeXDrawFrame.25=Projekt speichern
+LaTeXDrawFrame.26=Projekt speichern als
+LaTeXDrawFrame.27=\u00D6ffne Projekt
+LaTeXDrawFrame.28=Neues Projekt
+LaTeXDrawFrame.29=Code drucken
+LaTeXDrawFrame.30=Zeichnung drucken
+LaTeXDrawFrame.35=Bogen zeichnen
+LaTeXDrawFrame.36=Kreissektor zeichnen
+LaTeXDrawFrame.37=Kreissegment zeichnen
+LaTeXDrawFrame.38=X-Massstab
+LaTeXDrawFrame.39=Y-Massstab
+LaTeXDrawFrame.40=Kopieren
+LaTeXDrawFrame.41=Vorlagen aktualisieren
+LaTeXDrawFrame.42=Als Vorlage exportieren
+LaTeXDrawFrame.43=Einf\u00FCgen
+LaTeXDrawFrame.44=Ausschneiden
+LaTeXDrawFrame.45=Standard Gitter
+LaTeXDrawFrame.46=Code Feld
+LaTeXDrawFrame.47=R\u00E4nder
+LaTeXDrawFrame.48=Innenraum
+LaTeXDrawFrame.51=gef\u00FCllt
+LaTeXDrawFrame.53=Figur Eigenschaften
+LaTeXDrawFrame.55=Kommentare hinzuf\u00FCgen
+LaTeXDrawFrame.56=Einstellungen
+LaTeXDrawFrame.57=Hineinzoomen
+LaTeXDrawFrame.58=Herauszoomen
+LaTeXDrawFrame.60=Text hinzuf\u00FCgen
+LaTeXDrawFrame.61=Vordergrund
+LaTeXDrawFrame.62=Hintergrund
+LaTeXDrawFrame.63=B\u00E9zier Kurve zeichnen
+LaTeXDrawFrame.64=Figur drehen
+LaTeXDrawFrame.66=Linienfarbe der Figur \u00E4ndern
+LaTeXDrawFrame.68=F\u00FCllfarbe der Figur \u00E4ndern
+LaTeXDrawFrame.69=\u00C4ndere die Farbe der Schraffur
+LaTeXDrawFrame.70=Figur in den Vordergund verschieben
+LaTeXDrawFrame.71=Figur in den Hintergrund verschieben
+LaTeXDrawFrame.73=Die Figur ausw\u00E4hlen, die vor der ausgew\u00E4hlten Figur sein wird
+LaTeXDrawFrame.74=Wenn aktiviert, kann die Figur mit der Maus rotiert werden
+LaTeXDrawFrame.75=Mehrere Figuren gruppieren
+LaTeXDrawFrame.76=Mehrere Figuren separieren
+LaTeXDrawFrame.77=Die Position der Grenzen der Figur festlegen
+LaTeXDrawFrame.79=\u00C4ndere die Farbe des Bereichs zwischen den doppelten R\u00E4ndern
+LaTeXDrawFrame.82=<html>Ein Fehler ist w\u00E4hrend der Ausf\u00FChrung von LaTeXDraw aufgetreten:<br>
+LaTeXDrawFrame.83=LaTeXDraw kann nicht gestartet werden
+LaTeXDrawFrame.86=LaTeXDraw Fehler
+LaTeXDrawFrame.88=Datei
+LaTeXDrawFrame.89=Bearbeiten
+LaTeXDrawFrame.90=Anzeigen
+LaTeXDrawFrame.91=Zeichnen
+LaTeXDrawFrame.92=Code
+LaTeXDrawFrame.93=Hilfe
+LaTeXDrawFrame.94=Zeichnung hinein zoomen
+LaTeXDrawFrame.95=Zeichnung heraus zoomen
+LaTeXDrawFrame.96=Zoom 100%
+LaTeXDrawFrame.103=Vorlagen
+LaTeXDrawFrame.105=Nicht m\u00F6glich das Vorlagenmenu zu erzeugen\!
+LaTeXDrawFrame.107=Werkzeugleiste
+LaTeXDrawFrame.108=Ein neues Projekt erstellen
+LaTeXDrawFrame.109=Ein Projekt \u00F6ffnen
+LaTeXDrawFrame.110=Projekt speichern
+LaTeXDrawFrame.113=100%
+LaTeXDrawFrame.114=Eine Aktion r\u00FCckg\u00E4ngig machen
+LaTeXDrawFrame.115=Eine Aktion wiedeholen
+LaTeXDrawFrame.116=Eine Linie zeichnen
+LaTeXDrawFrame.117=Einen Punkt zeichnen
+LaTeXDrawFrame.119=Ein Rechteck zeichnen
+LaTeXDrawFrame.120=Ein Quadrat zeichnen
+LaTeXDrawFrame.121=Ein Polygon zeichnen
+LaTeXDrawFrame.123=Einen Rhombus zeichnen
+LaTeXDrawFrame.124=Ein Dreieck zeichnen
+LaTeXDrawFrame.125=Eine Ellipse zeichnen
+LaTeXDrawFrame.127=Einen Kreis zeichnen
+LaTeXDrawFrame.128=Einen Bogen zeichnen
+LaTeXDrawFrame.130=Einen Kreissektor zeichnen
+LaTeXDrawFrame.131=Ein Kreissegment zeichnen
+LaTeXDrawFrame.132=B\u00E9zier Kurve zeichnen
+LaTeXDrawFrame.133=Ein Gitter zeichnen
+LaTeXDrawFrame.136=<html>Eine oder mehrere Figuren ausw\u00E4hlen<br>
+LaTeXDrawFrame.140=\u00C4ndere die Eigenschaften der Figur
+LaTeXDrawFrame.141=<html>R\u00E4nder der Zeichnung anzeigen<br>
+LaTeXDrawFrame.142=<font color = red>Tipp<font color=black>: wenn Sie die Grenzend der Zeichnung<br>
+LaTeXDrawFrame.143=anzeigen, deaktivieren Sie die autoaktualisierung der Grenzen<br>
+LaTeXDrawFrame.144=um die Gr\u00F6sse der Zeichnung zu \u00E4ndern</html>
+LaTeXDrawFrame.146=Kopiert...
+LaTeXDrawFrame.147=Eingef\u00FCgt...
+LaTeXDrawFrame.148=Ausgeschnitten...
+LaTeXDrawFrame.149=Gel\u00F6scht...
+LaTeXDrawFrame.151=Farbe der doppelten R\u00E4nder ausw\u00E4hlen
+LaTeXDrawFrame.154=Gruppiert...
+LaTeXDrawFrame.156=Wollen Sie dieses Projekt speichern?
+LaTeXDrawFrame.158=Wiederhohlen...
+LaTeXDrawFrame.159=R\u00FCckg\u00E4ngig...
+LaTeXDrawFrame.160=Vorlagen aktualisiert
+LaTeXDrawFrame.163=Zeichnung wurde gedruckt\!
+LaTeXDrawFrame.164=Nicht m\u00F6glich die Zeichnung zu drucken\!
+LaTeXDrawFrame.165=Code drucken...
+LaTeXDrawFrame.166=Code wurde gedruckt\!
+LaTeXDrawFrame.167=Nicht m\u00F6glich den Code zu drucken\!
+LaTeXDrawFrame.169=Vorlage exportiert
+LaTeXDrawFrame.170=Als PSTricks Code exportieren...
+LaTeXDrawFrame.171=Ausw\u00E4hlen
+LaTeXDrawFrame.172=PSTricks Code als TeX Datei exportieren
+LaTeXDrawFrame.173=Wollen Sie die Datei ersetzen?
+LaTeXDrawFrame.174=Als PSTricks exportieren
+LaTeXDrawFrame.175=PSTricks Code wurde exportiert\!
+LaTeXDrawFrame.176=Nicht m\u00F6glich als PSTricks Code zu exportieren\!
+LaTeXDrawFrame.177=Als Bild exportieren...
+LaTeXDrawFrame.179=Figuren exportieren als
+LaTeXDrawFrame.182=Exportieren als
+LaTeXDrawFrame.183=\ Datei
+LaTeXDrawFrame.184=Exportieren als Bild erfolgreich
+LaTeXDrawFrame.185=Nicht m\u00F6glich als Bild zu exportieren
+LaTeXDrawFrame.186=Projekt wird gespeichert...
+LaTeXDrawFrame.188=Zeichnung speichern
+LaTeXDrawFrame.190=Als JPEG Datei exportieren
+LaTeXDrawFrame.191=Projekt gespeichert\!
+LaTeXDrawFrame.192=Nicht m\u00F6glich das Projekt zu speichern\!
+LaTeXDrawFrame.193=<html>Es ist ein Fehler w\u00E4hrend dem Speichern einer Datei aufgetreten:<br>
+LaTeXDrawFrame.198=Neues Projekt erzeugt
+LaTeXDrawFrame.200=Eine Zeichnung \u00F6ffnen
+LaTeXDrawFrame.201=Datei wird ge\u00F6ffnet...
+LaTeXDrawFrame.202=Datei ge\u00F6ffnet\!
+LaTeXDrawFrame.204=<html>Es ist ein Fehler w\u00E4hrend dem \u00D6ffnen einer Datei aufgetreten:<br>
+LaTeXDrawFrame.208=</span><br>Version
+LaTeXDrawFrame.210=Neue Version
+LaTeXDrawFrame.211=Neue Version vorhanden\!
+LaTeXDrawFrame.212=Keine neue Version
+LaTeXDrawFrame.215=LaTeXDraw Hilfe
+LaTeXDrawFrame.218=Ein PSTricks Code Generator f\u00FCr LaTeX\!
+LaTeXDrawFrame.219=Version
+LaTeXDrawFrame.229=Importieren...
+LaTeXDrawFrame.230=Aus TeX Datei
+LFrame2.0=Definiere die Gr\u00F6sse eines Punktes.
+LFrame2.1=Ausgew\u00E4hlte Figuren in eine Linie bringen.
+LFrame2.17=Farben
+LFrame2.18=Unm\u00F6glich die Datei zu \u00F6ffnen.
+LFrame2.19=Diese Vorlage kann nicht gefunden werden
+LFrame2.21=Vorlage nicht gefunden
+LFrame2.22=Das Dokument kann nicht gedruckt werden
+LFrame2.23=Kein Drucker gefunden
+LFrame2.25=Die GPL Bibliothek jlibeps wird verwendet um EPS Bilder zu erzeugen.
+LFrame2.26=Neues Projekt mit Auswahl
+LaTeXDrawFrame.31=Behind a figure
+LaTeXDrawFrame.32=In front of a figure
+LaTeXDrawFrame.33=Group
+LaTeXDrawFrame.34=Separate
+LaTeXDrawFrame.49=Hatchings
+LaTeXDrawFrame.65=Change the thickness of the figure
+LaTeXDrawFrame.67=If selected, the figure will be filled
+LaTeXDrawFrame.72=Select the figure which will be behind the selected figure
+LaTeXDrawFrame.78=If selected, the figure will have double borders
+LaTeXDrawFrame.80= Thickness
+LaTeXDrawFrame.118=Draw a rectangular shape
+LaTeXDrawFrame.137=<font color=red>Piece of advice <font color=black>: to select several
+LaTeXDrawFrame.138=figures, click and<br>drag the mouse on the figures you want</html>
+LaTeXDrawFrame.139=Delete the selected figure(s)
+LaTeXDrawFrame.155=Separated...
+LaTeXDrawFrame.161=Error for file
+LaTeXDrawFrame.162=Printing the drawing...
+LaTeXDrawFrame.168=Exporting as template...
+LaTeXDrawFrame.197=Creation of a new project...
+LaTeXDrawFrame.203=Not able to open file!
+LaTeXDrawFrame.209= released!</html>
+LaTeXDrawFrame.213=Unable to check if a new version exists!
+LaTeXDrawFrame.220=, build
+LaTeXDrawFrame.221= is distributed under the terms of the GNU General Public License
+LaTeXDrawFrame.222= as published by the Free Software Foundation (version 2)
+LFrame2.10=Distribute vertically, at equal distance between, the selected figures.
+LFrame2.11=Distribute vertically at equal distance between the middle of the selected figures.
+LFrame2.12=Distribute vertically at equal distance between the top sides of the selected figures.
+LFrame2.13=Distribute horizontally at equal distance between the left sides of the selected figures.
+LFrame2.14=Distribute horizontally, at equal distance between, the selected figures.
+LFrame2.15=Distribute horizontally at equal distance between the middle of the selected figures.
+LFrame2.16=Distribute horizontally at equal distance between the right sides of the selected figures.
+LFrame2.2=Align on the left the selected figures.
+LFrame2.20=Please, update the templates menu
+LFrame2.3=Align on the right the selected figures.
+LFrame2.4=Align on the top the selected figures.
+LFrame2.5=Align on the bottom the selected figures.
+LFrame2.6=Align horizontally in the middle the selected figures.
+LFrame2.7=Align vertically in the middle the selected figures.
+LFrame2.8=Distribute at equal distance the selected figures.
+LFrame2.9=Distribute vertically, at equal distance between the bottom sides of the selected figures.
diff --git a/current/lang/de/dialogFrames.properties b/current/lang/de/dialogFrames.properties
new file mode 100644
index 0000000..ebd5ba6
--- /dev/null
+++ b/current/lang/de/dialogFrames.properties
@@ -0,0 +1,116 @@
+PreferencesFrame.Pref=Einstellungen...
+PreferencesFrame.grid=Gitter
+PreferencesFrame.codePanel=Code Feld
+PreferencesFrame.antiAl=Antialiasing
+PreferencesFrame.rendQ=Render Qualit\u00E4t
+PreferencesFrame.colRendQ=Farbrender Qualit\u00E4t
+PreferencesFrame.AlphaQ=Alpha Interpolation Qualit\u00E4t
+PreferencesFrame.codeAuto=Code autoupdate (langsamer)
+PreferencesFrame.newVers=Beim Sart auf neue Version pr\u00FCfen
+PreferencesFrame.lge=Sprache (Neustart n\u00F6tig)
+PreferencesFrame.general=Allgemein
+PreferencesFrame.folders=Ordner
+PreferencesFrame.quality=Qualit\u00E4t
+PreferencesFrame.selectFolder=Ordner ausw\u00E4hlen
+PreferencesFrame.defOpenSave=Standard Ordner f\u00FCr \u00F6ffnen/speichern aktionen:
+PreferencesFrame.defFold=Standard Ordner f\u00FCr import/export aktionen:
+PreferencesFrame.prefSaved=Einstellungen gespeichert\!
+DrawPropertiesFrame.0=Beschriftung der Zeichnung
+DrawPropertiesFrame.1=Beschriftung der Zeichnung
+DrawPropertiesFrame.2=Zeichnung Eigenschaften
+DrawPropertiesFrame.3=pixels per
+DrawPropertiesFrame.5=Auf einer Seite mit nur Floats
+DrawPropertiesFrame.6=Am Anfang der Seite
+DrawPropertiesFrame.7=Am Ende der Seite
+DrawPropertiesFrame.8=Hier
+DrawPropertiesFrame.9=HIER\!
+DrawPropertiesFrame.10=In der Mitte der Seite
+DrawPropertiesFrame.13=Anzahl der Pixel pro L\u00E4ngeneinheit \u00E4ndern
+ExceptionFrameDialog.0=Report Senden
+ExceptionFrameDialog.2=<font color=black></b><br>Sie k\u00F6nnen einen Report an den LaTeXDraw Entwickler senden
+ExceptionFrameDialog.5=Nicht m\u00F6glich einen ExceptionFrameDialog zu erzeugen
+AbstractParametersFrame.3=Allgemeine Parameter
+AbstractParametersFrame.4=Ok
+AbstractParametersFrame.5=Standard
+AbstractParametersFrame.6=Abbrechen
+AbstractParametersFrame.7=Rotationswinkel
+AbstractParametersFrame.8=Dicke:
+AbstractParametersFrame.10=Linientyp
+AbstractParametersFrame.12=Linker Pfeil:
+AbstractParametersFrame.13=Rechter Pfeil:
+AbstractParametersFrame.14=Pfeile Parameter
+AbstractParametersFrame.17=X-center Koordinaten:
+AbstractParametersFrame.18=Y-center Koordinaten:
+AbstractParametersFrame.19=Radius:
+AbstractParametersFrame.20=Punkt Durchmesser =
+AbstractParametersFrame.25=x Breite
+AbstractParametersFrame.26=Pfeil L\u00E4nge
+AbstractParametersFrame.27=Pfeil Inset
+AbstractParametersFrame.28=Pfeil Breite
+AbstractParametersFrame.29=X-Koordinaten:
+AbstractParametersFrame.30=Y-Koordinaten:
+AbstractParametersFrame.31=Breite:
+AbstractParametersFrame.32=H\u00F6he:
+AbstractParametersFrame.33=Paramter der Form
+AbstractParametersFrame.36=Randfarben w\u00E4hlen
+AbstractParametersFrame.37=F\u00FCllfarbe w\u00E4hlen
+AbstractParametersFrame.38=Pfeile
+ParametersArcFrame.0=Anfangswinkel:
+ParametersArcFrame.1=Endwinkel:
+ParametersArcFrame.2=Typ des Bogens:
+ParametersDotFrame.0=Typ des Punktes:
+ParametersDrawFrame.0=Nord-West X
+ParametersDrawFrame.1=Nord-West Y
+ParametersDrawFrame.2=S\u00FCd-Ost X
+ParametersDrawFrame.3=S\u00FCd-Ost Y
+ParametersGridFrame.0=Y Ursprung:
+ParametersGridFrame.1=X Ursprung
+ParametersGridFrame.2=Beschriftungen:
+ParametersGridFrame.3=Einheit:
+ParametersGridFrame.5=Gitter Punkte
+ParametersGridFrame.6=Gitter Breite:
+ParametersGridFrame.7=Untergitter Breite:
+ParametersGridFrame.9=Label Gr\u00F6sse
+ParametersLineFrame.0=Linke X-Koordinaten:
+ParametersLineFrame.1=Linke Y-Koordinaten:
+ParametersLineFrame.2=Rechte X-Koordinaten:
+ParametersLineFrame.3=Rechte Y-Koordinaten:
+ParametersTextFrame.0=Fett
+ParametersTextFrame.1=Kursiv
+ParametersTextFrame.2=Schriftart:
+ParametersTextFrame.3=Gr\u00F6sse:
+ParametersTextFrame.4=Text
+ParametersGridFrame.10=Untergitter:
+ParametersGridFrame.11=X max:
+ParametersGridFrame.12=X min:
+ParametersGridFrame.13=Y max:
+ParametersGridFrame.14=Y min:
+ParametersGridFrame.15=Zeichne Labels:
+ParametersGridFrame.17=Labelfarbe w\u00E4hlen
+ParametersGridFrame.18=Untergitter Farbe w\u00E4hlen
+ParametersPolygonFrame.1=Punkt n\u00B0
+ParamsBC.0=Alle bewegen
+PreferencesFrame.bordersDraw=Borders of the drawing
+PreferencesFrame.errorReadPref=Error during the reading of the preferences file!
+DrawPropertiesFrame.11=Vertical position of the drawing
+DrawPropertiesFrame.12=Horizontal position of the drawing
+ExceptionFrameDialog.1=<html><b>An error occurred!</b><br><b><font color=red>
+ExceptionFrameDialog.3=LaTeXDraw error: an exception occurred
+ExceptionFrameDialog.4=<html>An error occurred:<br>
+AbstractParametersFrame.0=Double boundary
+AbstractParametersFrame.2=Separator:
+AbstractParametersFrame.11=Hatchings Width:
+AbstractParametersFrame.15=Show ctrl points
+AbstractParametersFrame.16=Rounded
+AbstractParametersFrame.21=Bar width =
+AbstractParametersFrame.22=Bracket length =
+AbstractParametersFrame.23=Rounded bracket lgth =
+AbstractParametersFrame.24=x thickness +
+AbstractParametersFrame.34=Select hatchings color
+AbstractParametersFrame.35=Select double boundary color
+ParametersGridFrame.4=Subgrid dots:
+ParametersGridFrame.8=Subgrid division:
+ParametersTriangleFrame.0=Base center X-coord:
+ParametersTriangleFrame.1=Base center Y-coord:
+ParamsBC.1=If not selected, when you move a point its control points are moved too.
+ExportDialog.0=Compression
diff --git a/current/lang/de/others.properties b/current/lang/de/others.properties
new file mode 100644
index 0000000..7dc8624
--- /dev/null
+++ b/current/lang/de/others.properties
@@ -0,0 +1,44 @@
+XScale.cm=cm
+XScale.inch=Zoll
+LaTeXDrawException.valueInc=Ung\u00FCltiger Wert
+LaTeXDrawException.invFile=Dies ist keine LaTeXDraw-Datei\!
+LaTeXDrawException.invLaTeXDrawVer=Diese Version von LaTeXDraw wird nicht unterst\u00FCtzt.
+LaTeXDrawException.invException=LatexDrawAusnahme: unbekannter Fehlercode
+Arc.arc=Kreisbogen
+Arc.wedge=Kreissektor
+Arc.chord=Kreissegment
+Figure.boundPos=Position der Begrenzung
+DrawContainer.nameTemplate=Name der Vorlage eingeben
+DrawContainer.overwriteTemplate=Diese Vorlage exisiert bereits; \u00FCberschreiben?
+UndoRedoManager.changeParams=Parameter \u00E4ndern
+UndoRedoManager.move=Bewegen
+UndoRedoManager.delete=L\u00F6schen
+UndoRedoManager.create=Erstellen
+UndoRedoManager.join=Zusammenf\u00FCgen
+UndoRedoManager.seperate=Unterteilen
+UndoRedoManager.intCol=F\u00FCllfarbe \u00E4ndern
+UndoRedoManager.style=Styl \u00E4ndern
+UndoRedoManager.lArrow=Stil des linken Pfeils \u00E4ndern
+UndoRedoManager.rArrow=Stil des rechten Pfeils \u00E4ndern
+UndoRedoManager.dotStyle=Punkt-Stil \u00E4ndern
+UndoRedoManager.noRedo=Wiederholen nicht m\u00F6glich
+UndoRedoManager.noUndo=R\u00FCckg\u00E4ngig machen nicht m\u00F6glich
+CodePanel.reload=Erneut laden
+CodePanel.autoUpdate=Auto-Update
+CodePanel.copySel=Ausgew\u00E4hlten Text kopieren
+CodePanel.copyAll=Ganzen Code kopieren
+CodePanel.updateCode=Code aktualisieren
+CodePanel.addComment=Kommentare in den Code einf\u00FCgen
+CodePanel.reloadText=PSTricks Code neu geladen\!
+CodePanel.copiedText=PSTricks Code wurde in die Zwischenablage kopiert\!
+CodePanel.copiedSelText=Auswahl in die Zwischenablage kopiert\!
+SVGManager.0=Die Formen konnten nicht vom SVG-Dokument generiert werden.
+Arc.arcType=Kind of arc
+CloseButton.closePanel=Close the panel
+UndoRedoManager.changeDispo=Change disposition
+UndoRedoManager.filled=Change interior style
+UndoRedoManager.bordCol=Change borders color
+UndoRedoManager.thick=Change thickness
+UndoRedoManager.align=alignment
+UndoRedoManager.distrib=distribution
+CodePanel.tip=<html><center>If selected, the code is updated in real time<br><font color = red>Piece of advice <font color = black>: disable the autoupdate or do not<br> display the codepanel when the drawing is complex or<br> when you move a big figure.</center></html>
diff --git a/current/lang/en-US/1_6.properties b/current/lang/en-US/1_6.properties
new file mode 100644
index 0000000..e79f714
--- /dev/null
+++ b/current/lang/en-US/1_6.properties
@@ -0,0 +1,58 @@
+BatchConvertFrame.1=Add sub folders
+BatchConvertFrame.2=Add files
+BatchConvertFrame.4=Remove All
+BatchConvertFrame.5=Overwrite
+BatchConvertFrame.6=Select path
+BatchConvertFrame.7=Select format
+BatchConvertFrame.8=Convert
+BatchConvertFrame.9=Stop
+BatchConvertFrame.11=Batch list
+BatchConvertFrame.12=Select directory
+BatchConvertFrame.13=Select pictures
+BatchConvertFrame.14=Convert as:
+LaTeXDrawFrame.0=Insert PSTricks code
+LaTeXDrawFrame.1=Insert a picture
+LaTeXDrawFrame.2=Convert pictures
+LaTeXDrawFrame.3=stop
+LaTeXDrawFrame.4=Draw joined lines
+LaTeXDrawFrame.5=PPM picture
+LaTeXDrawFrame.6=BMP picture
+LaTeXDrawFrame.7=PNG picture
+LaTeXDrawFrame.9=Stop the parsing\!
+LaTeXDrawFrame.10=Insert
+LaTeXDrawFrame.11=Insert several figures from PSTricks code
+LaTeXDrawFrame.14=Draw several joined lines
+LaTeXDrawFrame.15=Importing a PSTricks file...
+LaTeXDrawFrame.16=<html>The current PSTricks parser only parses few commands.<br>You may import only commands managed by LaTeXDraw.<html>
+LaTeXDrawFrame.17=Import PSTricks code
+LaTeXDrawFrame.18=This software uses JIU, the Java Imaging Utilities. Distributed under  
+LaTeXDrawFrame.19=the terms of the GNU General Public License. http://schmidt.devlib.org/jiu/
+LaTeXDrawFrame.23=<html><b><font color=red>Warnings:</b> <br><font color=black><ul><li>PSTricks cannot include JPG, BMP,... files; so an EPS picture will be created from the selected picture, <br>in the same directory. So the picture will be included only if you have rights to write in the directory;<li>TeX does not support spaces in the path, so try to do not have any.</ul></html>
+LaTeXDrawFrame.25=Loading the picture...
+LaTeXDrawFrame.26=The picture is invalid\!
+LaTeXDrawFrame.27=Not able to load the picture\!
+LaTeXDrawFrame.28=Picture inserted\!
+LaTeXDrawFrame.30=<html>There is no figure to import\!<br>If it is false, check that they are surrounded by \\begin{pspicture} ...\\end{pspicture}.<br>You can send the file to  
+LaTeXDrawFrame.31=\ if you think there is a bug in the PSTricks parser.</html>
+LaTeXDrawFrame.32=No figure found\!
+LaTeXDrawFrame.33=No figure found to import\!
+LaTeXDrawFrame.34=Not able to import the PSTricks file\!
+LaTeXDrawFrame.35=Importation canceled\!
+LaTeXDrawFrame.36=Code converted into figures\!
+InsertPSTricksCodeFrame.0=Insert figures from PSTricks code
+FatalErrorParsingException.0=<br>If the file is valid, you can send it to arno_b at users.sourceforge.net</html>
+Picture.0=% Warning: the path of the following picture contains spaces and will not be compiled by tex\!
+ParserCmdMessage.0=Line  
+ParserCmdMessage.1=Command:  
+ParserCmdMessage.2=Exception:  
+ParserMessagesFrame.0=Command
+ParserMessagesFrame.1=Line
+ParserMessagesFrame.2=Exception
+ParserMessagesFrame.3=<html><font color=red><b>One or several warnings occurred during the parsing</b></html>
+ParserMessagesFrame.4=TeX parser: warning(s)
+ParametersGridFrame.0=Invert label position following X
+ParametersGridFrame.1=Invert label position following Y
+PSTricksParser.0=Error during the opening of the file: invalid file\!
+PSTricksParser.1=<html>The incremental pspicture definition is not yet managed:<br>
+PSTricksParser.2=\\begin{pspicture}...\\begin{pspicture} ... \\end{pspicture}...</html>
+PSTricksParser.3=Error during the parsing of the file\!
diff --git a/current/lang/en-US/1_7.properties b/current/lang/en-US/1_7.properties
new file mode 100644
index 0000000..c1e6150
--- /dev/null
+++ b/current/lang/en-US/1_7.properties
@@ -0,0 +1,60 @@
+LaTeXDrawException.0=Invalid picture.
+LaTeXDrawFrame.0=Shadow
+LaTeXDrawFrame.9=Select shadow color
+LaTeXDrawFrame.1=Gradient 1
+LaTeXDrawFrame.2=Gradient 2
+LaTeXDrawFrame.4=Add a shadow to the figure.
+LaTeXDrawFrame.5=Choose the color of the shadow.
+LaTeXDrawFrame.6=Position figures into the drawing (in front of, behind,...).
+LaTeXDrawFrame.7=Choose the first color of the gradient.
+LaTeXDrawFrame.8=Choose the second color of the gradient.
+ParametersTextFrame.0=Opacity
+ParametersTextFrame.1=Boxes list
+ParametersTextFrame.2=Opaque
+ParametersTextFrame.3=Circle
+ParametersTextFrame.4=Rectangle
+ParametersTextFrame.5=Triangle
+ParametersTextFrame.6=Diamond
+ParametersTextFrame.7=Ellipse
+ParametersTextFrame.8=Simple box
+ParametersTextFrame.9=Several boxes
+ParametersGridFrame.0=Grid parameters
+ParametersTextFrame.10=Enable framed box(es)
+ParametersTextFrame.11=Add
+ParametersTextFrame.12=Modify
+ParametersTextFrame.13=Remove
+ParametersTextFrame.14=Separator:
+ParametersTextFrame.15=Edit box
+ParametersTextFrame.16=Consider box size
+ParametersTextFrame.17=If selected, the background of the text will be opaque.
+ParametersTextFrame.18=Framed box(es)
+ParametersTextFrame.20=Create a or several frames around the text.
+ParametersTextFrame.21=The box will be a rectangle.
+ParametersTextFrame.22=The box will be a triangle.
+ParametersTextFrame.23=Create a simple box around the whole text.
+ParametersTextFrame.24=The box will be an ellipse.
+ParametersTextFrame.25=The box will be a diamond.
+ParametersTextFrame.26=Create several boxes around different parts of the text.
+ParametersTextFrame.27=The box will be a circle.
+ParametersTextFrame.28=Add a new box.
+ParametersTextFrame.29=Edit the position of the selected box.
+ParametersTextFrame.30=Remove the selected box.
+ParametersTextFrame.31=Change the spacing between the text and the box.
+ParametersTextFrame.32=If selected, the box will not be drawn on the text at the start and the end of the framed text.
+ParametersTextFrame.33=Open the panel of parameters of the box to edit it.
+ParametersTextFrame.34=Text selection
+ParametersTextFrame.35=Select the text to frame:
+ParametersTextFrame.36=Text Selection
+ParametersTextFrame.37=Invalid box; it overlaps another box.
+AbstractParametersFrame.0=Dimensions/Position
+AbstractParametersFrame.1=Shadow angle
+AbstractParametersFrame.2=Shadow size
+AbstractParametersFrame.3=Gradient angle
+AbstractParametersFrame.4=Middle Pt
+AbstractParametersFrame.6=Other
+AbstractParametersFrame.7=Round corner:
+AbstractParametersFrame.8=Hatching
+AbstractParametersFrame.9=Double line
+AbstractParametersFrame.11=Replenishment
+AbstractParametersFrame.12=Gradient
+BatchConvertFrame.0=In the same directories
diff --git a/current/lang/en-US/1_8.properties b/current/lang/en-US/1_8.properties
new file mode 100644
index 0000000..7a7130d
--- /dev/null
+++ b/current/lang/en-US/1_8.properties
@@ -0,0 +1,57 @@
+UndoRedoManager.0=Transformation
+AbstractParametersFrame.0=interval:
+ParametersAxeFrame.0=Shape:
+ParametersAxeFrame.1=Show origin
+ParametersAxeFrame.2=Axes
+ParametersAxeFrame.3=Display X-labels
+ParametersAxeFrame.4=Display Y-labels
+ParametersAxeFrame.5=Define distance between labels (cm)
+ParametersAxeFrame.6=X-labels distance:
+ParametersAxeFrame.7=Y-labels distance:
+ParametersAxeFrame.8=X-labels increment:
+ParametersAxeFrame.9=Y-labels increment:
+ParametersAxeFrame.10=X-labels origin:
+ParametersAxeFrame.11=Y-labels origin:
+ParametersAxeFrame.12=Labels
+ParametersAxeFrame.13=Size:
+ParametersAxeFrame.14=Style:
+ParametersAxeFrame.15=Display X-ticks
+ParametersAxeFrame.16=Display Y-ticks
+ParametersAxeFrame.17=Ticks
+PreferencesFrame.3=Path of your LaTeX editor:
+PreferencesFrame.4=Standard grid
+PreferencesFrame.5=Personal grid
+PreferencesFrame.6=Magnetic grid
+PreferencesFrame.7=Interval:
+LaTeXDrawFrame.0=Draw Axes
+LaTeXDrawFrame.2=Rotate the selected figure(s).
+LaTeXDrawFrame.3=Rotate the selected figure(s) of 90\u00B0.
+LaTeXDrawFrame.4=Rotate the selected figure(s) of 180\u00B0.
+LaTeXDrawFrame.5=Rotate the selected figure(s) of 270\u00B0.
+LaTeXDrawFrame.6=Reverse figures by symmetry.
+LaTeXDrawFrame.7=Reverse horizontally the selected figures.
+LaTeXDrawFrame.8=Reverse vertically the selected figures.
+LaTeXDrawFrame.10=Display a standard grid (in cm or inch).
+LaTeXDrawFrame.11=Display a grid you can modify the interval between its lines.
+LaTeXDrawFrame.12=Contains the parameters of the (magnetic) grid
+LaTeXDrawFrame.13=magnetic
+LaTeXDrawFrame.14=If selected, the figures will be magnetic to the grid.
+LaTeXDrawFrame.15=Define the interval between the lines of the personal grid (in pixels).
+LaTeXDrawFrame.16=Draw grids and axes.
+LaTeXDrawFrame.17=Draw axes.
+LaTeXDrawFrame.18=Launch your LaTeX editor.
+LaTeXDrawFrame.19=Launching of your LaTeX editor...
+LaTeXDrawFrame.20=You must define the path of your LaTeX editor in the panel of preferences.
+LaTeXDrawFrame.21=The file you selected is invalid.
+LaTeXDrawFrame.22=Redefine the path in the panel of preferences.
+LaTeXDrawFrame.23=Close
+LaTeXDrawFrame.25=Libraries
+LaTeXDrawFrame.26=Translators
+LaTeXDrawFrame.27=Release note
+LaTeXDrawFrame.28=License
+Axe.0=None
+Axe.1=Axe
+Axe.2=Frame
+Axe.3=Full
+Axe.4=Top
+Axe.5=Bottom
diff --git a/current/lang/en-US/1_9.properties b/current/lang/en-US/1_9.properties
new file mode 100644
index 0000000..aeb327e
--- /dev/null
+++ b/current/lang/en-US/1_9.properties
@@ -0,0 +1,71 @@
+LaTeXDrawFrame.0=Recent files
+LaTeXDrawFrame.1=Draw Closed B\u00E9zier Curve
+LaTeXDrawFrame.2=Clear all
+LaTeXDrawFrame.3=Shortcuts
+LaTeXDrawFrame.4=Check update
+LaTeXDrawFrame.5=Shapes
+LaTeXDrawFrame.6=Set visible all the figures
+LaTeXDrawFrame.7=<html>If a figure has its coordinates under (0,0), you cannot see it.<br>This button allows to replace all the figures in order to be visible.</html>
+LaTeXDrawFrame.8=Define the properties of the handlers.
+LaTeXDrawFrame.9=Handlers opacity
+LaTeXDrawFrame.10=Define the transparency of the handlers.
+LaTeXDrawFrame.11=Draw a closed B\u00E9zier curve
+LaTeXDrawFrame.12=<html>Check that the version of the Java Runtime Environment you used<br>to create this file is the same of this JRE you currently use.</html>
+LaTeXDrawFrame.13=The help directory is unreachable, the help page cannot be loaded.
+LaTeXDrawFrame.14=Not able to create the help page.
+PSTricksParser.0=\\begin{center} must be out of \\begin{pspicture}...\\end{pspicture}
+PSTricksParser.1=\\end{center} must be out of \\begin{pspicture}...\\end{pspicture}
+PSTricksParser.2=\\end{figure} must be out of \\begin{pspicture}...\\end{pspicture}
+PSTricksParser.3=\\end{pspicture} or \\pspicture not found.
+DrawPanel.0=Update figures to the grid
+ParametersAkinPointsFrame.0=Points interval:
+ParametersAkinPointsFrame.1=Open
+ParametersAkinPointsFrame.2=type:
+ParametersAkinPointsFrame.3=Free hand parameters
+ParametersBezierCurveFrame.2=Equilibrate
+ParametersBezierCurveFrame.3=Equilibrate the control points in respect of the position of the points.
+ParametersBezierCurveFrame.4=Distance:
+ParametersBezierCurveFrame.5=Define the space between the control point and the point when equilibrating the curve.
+ParametersBezierCurveFrame.6=X 1st ctrl pt
+ParametersBezierCurveFrame.7=Y 1st ctrl pt
+ParametersBezierCurveFrame.8=X 2nd ctrl pt
+ParametersBezierCurveFrame.9=Y 2nd ctrl pt
+PreferencesFrame.0=Number of recent files:
+PreferencesFrame.1=Theme (need restart):
+ShortcutsFrame.1=Sequence
+ShortcutsFrame.3=Category
+ShortcutsFrame.4=Navigation
+ShortcutsFrame.5=Transformation
+ShortcutsFrame.6=Drawing
+ShortcutsFrame.7=\ (big move)
+ShortcutsFrame.8=left click
+ShortcutsFrame.9=Move the horizontal scrollbar to the right
+ShortcutsFrame.10=Move the horizontal scrollbar to the left
+ShortcutsFrame.11=Move the vertical scrollbar to the top
+ShortcutsFrame.12=Move the vertical scrollbar to the bottom
+ShortcutsFrame.14=Go to the end of the horizontal scrollbar
+ShortcutsFrame.15=Go to the beginning of the horizontal scrollbar
+ShortcutsFrame.16=Go to the top of the vertical scrollbar
+ShortcutsFrame.17=Go to the bottom of the vertical scrollbar
+ShortcutsFrame.18=Move the selected figures to the right
+ShortcutsFrame.19=Move the selected figures to the left
+ShortcutsFrame.20=Move the selected figures to the top
+ShortcutsFrame.21=Move the selected figures to the bottom
+ShortcutsFrame.23=Update the selected figures to the displayed grid
+ShortcutsFrame.25=Select all the figures of the drawing
+ShortcutsFrame.26=Add the clicked figure to the selection
+ShortcutsFrame.27=Remove the clicked figure from the selection
+ShortcutsFrame.28=Select the next or the first figure (in selection mode only)
+ShortcutsFrame.29=Mouse wheel
+ShortcutsFrame.30=Zoom in/out
+MenusListener.0=Press the left button and drag the mouse to place the second point. Release the button to finish the creation.
+MenusListener.1=A left-click to add a point, a right-click or a double left-click to place the last point and to finish the creation.
+MenusListener.4=Press the left button and drag the mouse to place the last point. Release the button to finish the creation.
+MenusListener.5=A left-click adds text.
+MenusListener.6=A left-click adds a grid.
+MenusListener.7=A left-click adds axes.
+MenusListener.8=Press the left button and drag the mouse to draw the shape. Release the button to finish the creation.
+MenusListener.9=A left-click adds a dot.
+RecentFilesListener.0=It is impossible to access to this file.
+RecentFilesListener.1=Cannot open the file
+
diff --git a/current/lang/en-US/LaTeXDrawFrame.properties b/current/lang/en-US/LaTeXDrawFrame.properties
new file mode 100644
index 0000000..7908d13
--- /dev/null
+++ b/current/lang/en-US/LaTeXDrawFrame.properties
@@ -0,0 +1,207 @@
+LaTeXDrawFrame.0=\ help
+LaTeXDrawFrame.1=About 
+LaTeXDrawFrame.2=Draw line
+LaTeXDrawFrame.3=Draw rectangle
+LaTeXDrawFrame.4=Draw dot
+LaTeXDrawFrame.5=Draw square
+LaTeXDrawFrame.6=Draw rhombus
+LaTeXDrawFrame.7=Freehand
+LaTeXDrawFrame.8=Draw triangle
+LaTeXDrawFrame.9=Draw circle
+LaTeXDrawFrame.10=Draw grid
+LaTeXDrawFrame.11=Draw ellipse
+LaTeXDrawFrame.12=Draw polygon
+LaTeXDrawFrame.13=Select figure(s)
+LaTeXDrawFrame.14=Display borders
+LaTeXDrawFrame.15=Auto borders adjustment
+LaTeXDrawFrame.16=Export as...
+LaTeXDrawFrame.17=Delete Figure
+LaTeXDrawFrame.18=Quit
+LaTeXDrawFrame.19=PSTricks code
+LaTeXDrawFrame.20=JPEG picture
+LaTeXDrawFrame.21=EPS picture
+LaTeXDrawFrame.22=Redo
+LaTeXDrawFrame.23=Undo
+LaTeXDrawFrame.25=Save project
+LaTeXDrawFrame.26=Save as project
+LaTeXDrawFrame.27=Open project
+LaTeXDrawFrame.28=New project
+LaTeXDrawFrame.29=Print code
+LaTeXDrawFrame.30=Print drawing
+LaTeXDrawFrame.31=Behind a figure
+LaTeXDrawFrame.32=In front of a figure
+LaTeXDrawFrame.33=Group
+LaTeXDrawFrame.34=Separate
+LaTeXDrawFrame.35=Draw arc
+LaTeXDrawFrame.36=Draw wedge
+LaTeXDrawFrame.37=Draw chord
+LaTeXDrawFrame.38=X-Scale
+LaTeXDrawFrame.39=Y-Scale
+LaTeXDrawFrame.40=Copy
+LaTeXDrawFrame.41=Update templates
+LaTeXDrawFrame.42=Export as template
+LaTeXDrawFrame.43=Paste
+LaTeXDrawFrame.44=Cut
+LaTeXDrawFrame.45=Standard Grid
+LaTeXDrawFrame.46=Code Panel
+LaTeXDrawFrame.47=Borders
+LaTeXDrawFrame.48=Interior
+LaTeXDrawFrame.49=Hatchings
+LaTeXDrawFrame.51=filled
+LaTeXDrawFrame.53=Figure Properties
+LaTeXDrawFrame.55=Add comments
+LaTeXDrawFrame.56=Preferences
+LaTeXDrawFrame.57=Zoom in
+LaTeXDrawFrame.58=Zoom out
+LaTeXDrawFrame.60=Add text
+LaTeXDrawFrame.61=Foreground
+LaTeXDrawFrame.62=Background
+LaTeXDrawFrame.63=Draw B\u00E9zier curve
+LaTeXDrawFrame.64=Rotate the figure
+LaTeXDrawFrame.65=Change the thickness of the figure
+LaTeXDrawFrame.66=Change the color of the borders of the figure
+LaTeXDrawFrame.67=If selected, the figure will be filled
+LaTeXDrawFrame.68=Change the color of the interior of the figure
+LaTeXDrawFrame.69=Change the color of the hatchings
+LaTeXDrawFrame.70=Put the figure in the foreground
+LaTeXDrawFrame.71=Put the figure in the background
+LaTeXDrawFrame.72=Select the figure which will be behind the selected figure
+LaTeXDrawFrame.73=Select the figure which will be in front of the selected figure
+LaTeXDrawFrame.74=If activated, you can rotate a figure with the mouse using handlers
+LaTeXDrawFrame.75=Group several figures
+LaTeXDrawFrame.76=Separate several figures
+LaTeXDrawFrame.77=Define the position of the borders of the figure
+LaTeXDrawFrame.78=If selected, the figure will have double borders
+LaTeXDrawFrame.79=Change to color of the space between the double borders
+LaTeXDrawFrame.80=\ Thickness
+LaTeXDrawFrame.82=<html>An error occurred during the launch of LaTeXDraw:<br>
+LaTeXDrawFrame.83=LaTeXDraw is not able to start
+LaTeXDrawFrame.86=LaTeXDraw Error
+LaTeXDrawFrame.88=File
+LaTeXDrawFrame.89=Edit
+LaTeXDrawFrame.90=Display
+LaTeXDrawFrame.91=Draw
+LaTeXDrawFrame.92=Code
+LaTeXDrawFrame.93=Help
+LaTeXDrawFrame.94=Zoom in the drawing
+LaTeXDrawFrame.95=Zoom out the drawing
+LaTeXDrawFrame.96=Zoom 100%
+LaTeXDrawFrame.103=Templates
+LaTeXDrawFrame.105=Not able to create the templates menu\!
+LaTeXDrawFrame.107=Toolbar
+LaTeXDrawFrame.108=Create a new project
+LaTeXDrawFrame.109=Open a project
+LaTeXDrawFrame.110=Save the project
+LaTeXDrawFrame.113=100%
+LaTeXDrawFrame.114=Undo an action
+LaTeXDrawFrame.115=Redo an action
+LaTeXDrawFrame.116=Draw a line
+LaTeXDrawFrame.117=Draw a dot
+LaTeXDrawFrame.118=Draw a rectangular shape
+LaTeXDrawFrame.119=Draw a rectangle
+LaTeXDrawFrame.120=Draw a square
+LaTeXDrawFrame.121=Draw a polygon
+LaTeXDrawFrame.123=Draw a rhombus
+LaTeXDrawFrame.124=Draw a triangle
+LaTeXDrawFrame.125=Draw an ellipse
+LaTeXDrawFrame.127=Draw a circle
+LaTeXDrawFrame.128=Draw an arc
+LaTeXDrawFrame.130=Draw a wedge
+LaTeXDrawFrame.131=Draw a chord
+LaTeXDrawFrame.132=Draw a B\u00E9zier curve
+LaTeXDrawFrame.133=Draw a grid
+LaTeXDrawFrame.136=<html>Select one or several figures<br>
+LaTeXDrawFrame.137=<font color=red>Piece of advice <font color=black>: to select several
+LaTeXDrawFrame.138=figures, click and<br>drag the mouse on the figures you want</html>
+LaTeXDrawFrame.139=Delete the selected figure(s)
+LaTeXDrawFrame.140=Change the figure properties
+LaTeXDrawFrame.141=<html>Display the borders of the drawing<br>
+LaTeXDrawFrame.142=<font color = red>Piece of advice <font color=black>: if you display the borders of the<br>
+LaTeXDrawFrame.143=drawing, disable the borders autoupdate to be able to<br>
+LaTeXDrawFrame.144=change the dimensions of the drawing</html>
+LaTeXDrawFrame.146=Copied...
+LaTeXDrawFrame.147=Pasted...
+LaTeXDrawFrame.148=Cut...
+LaTeXDrawFrame.149=Deleted...
+LaTeXDrawFrame.151=Select double borders color
+LaTeXDrawFrame.154=Grouped...
+LaTeXDrawFrame.155=Separated...
+LaTeXDrawFrame.156=Do you want to save the project?
+LaTeXDrawFrame.158=Redo...
+LaTeXDrawFrame.159=Undo...
+LaTeXDrawFrame.160=Templates updated...
+LaTeXDrawFrame.161=Error for file
+LaTeXDrawFrame.162=Printing the drawing...
+LaTeXDrawFrame.163=Drawing printed\!
+LaTeXDrawFrame.164=Not able to print the drawing\!
+LaTeXDrawFrame.165=Printing code...
+LaTeXDrawFrame.166=Code printed\!
+LaTeXDrawFrame.167=Not able to print the code\!
+LaTeXDrawFrame.168=Exporting as template...
+LaTeXDrawFrame.169=Template exported\!
+LaTeXDrawFrame.170=Exporting as PSTricks code...
+LaTeXDrawFrame.171=Select
+LaTeXDrawFrame.172=Export the PSTricks code as a TeX file
+LaTeXDrawFrame.173=Do you want to replace the file?
+LaTeXDrawFrame.174=Export as PSTricks
+LaTeXDrawFrame.175=PSTricks code exported\!
+LaTeXDrawFrame.176=Not able to export PSTricks code\!
+LaTeXDrawFrame.177=Exporting as picture...
+LaTeXDrawFrame.179=Export figures as
+LaTeXDrawFrame.182=Export as
+LaTeXDrawFrame.183=\ file
+LaTeXDrawFrame.184=Export as picture done\!
+LaTeXDrawFrame.185=Not able to export as picture\!
+LaTeXDrawFrame.186=Saving project...
+LaTeXDrawFrame.188=Save the drawing
+LaTeXDrawFrame.190=Export as JPEG file
+LaTeXDrawFrame.191=Project saved\!
+LaTeXDrawFrame.192=Not able to save the project\!
+LaTeXDrawFrame.193=<html>An error occurred during the saving of a file:<br>
+LaTeXDrawFrame.197=Creation of a new project...
+LaTeXDrawFrame.198=New project created\!
+LaTeXDrawFrame.200=Open a drawing
+LaTeXDrawFrame.201=Opening a file...
+LaTeXDrawFrame.202=File opened\!
+LaTeXDrawFrame.203=Not able to open file\!
+LaTeXDrawFrame.204=<html>An error occurred during the loading of a file:<br>
+LaTeXDrawFrame.208=</span><br>Version
+LaTeXDrawFrame.209=\ released\!</html>
+LaTeXDrawFrame.210=New Version
+LaTeXDrawFrame.211=New version released\!
+LaTeXDrawFrame.212=No new version
+LaTeXDrawFrame.213=Unable to check if a new version exists\!
+LaTeXDrawFrame.215=LaTeXDraw help
+LaTeXDrawFrame.218=A PSTricks code generator for LaTeX\!
+LaTeXDrawFrame.219=Version
+LaTeXDrawFrame.220=, build
+LaTeXDrawFrame.221=\ is distributed under the terms of the GNU General Public License
+LaTeXDrawFrame.222=\ as published by the Free Software Foundation (version 2)
+LaTeXDrawFrame.229=Import...
+LaTeXDrawFrame.230=From TeX file
+LFrame2.0=Define the size of a dot.
+LFrame2.1=Align the selected figures.
+LFrame2.10=Distribute vertically, at equal distance between, the selected figures.
+LFrame2.11=Distribute vertically at equal distance between the middle of the selected figures.
+LFrame2.12=Distribute vertically at equal distance between the top sides of the selected figures.
+LFrame2.13=Distribute horizontally at equal distance between the left sides of the selected figures.
+LFrame2.14=Distribute horizontally, at equal distance between, the selected figures.
+LFrame2.15=Distribute horizontally at equal distance between the middle of the selected figures.
+LFrame2.16=Distribute horizontally at equal distance between the right sides of the selected figures.
+LFrame2.17=Colors
+LFrame2.18=Impossible to open the file.
+LFrame2.19=This template cannot be found
+LFrame2.2=Align on the left the selected figures.
+LFrame2.20=Please, update the templates menu
+LFrame2.21=Template not found
+LFrame2.22=The document cannot be printed.
+LFrame2.23=No printer found.
+LFrame2.25=The GPL library jlibeps is used to create EPS pictures.
+LFrame2.3=Align on the right the selected figures.
+LFrame2.4=Align on the top the selected figures.
+LFrame2.5=Align on the bottom the selected figures.
+LFrame2.6=Align horizontally in the middle the selected figures.
+LFrame2.7=Align vertically in the middle the selected figures.
+LFrame2.8=Distribute at equal distance the selected figures.
+LFrame2.9=Distribute vertically, at equal distance between the bottom sides of the selected figures.
+LFrame2.26=New project with selection
diff --git a/current/lang/en-US/dialogFrames.properties b/current/lang/en-US/dialogFrames.properties
new file mode 100644
index 0000000..ca48552
--- /dev/null
+++ b/current/lang/en-US/dialogFrames.properties
@@ -0,0 +1,116 @@
+PreferencesFrame.Pref=Preferences...
+PreferencesFrame.grid=Grid
+PreferencesFrame.codePanel=Code panel
+PreferencesFrame.antiAl=Anti-aliasing
+PreferencesFrame.rendQ=Rendering quality
+PreferencesFrame.colRendQ=Color rendering quality
+PreferencesFrame.AlphaQ=Alpha interpolation quality
+PreferencesFrame.bordersDraw=Borders of the drawing
+PreferencesFrame.codeAuto=Code autoupdate (slower)
+PreferencesFrame.newVers=Check new version on start-up
+PreferencesFrame.lge=Language (need restart)
+PreferencesFrame.general=General
+PreferencesFrame.folders=Folders
+PreferencesFrame.quality=Quality
+PreferencesFrame.selectFolder=Select a folder
+PreferencesFrame.defOpenSave=Default folder for open/save actions:
+PreferencesFrame.defFold=Default folder for import/export actions:
+PreferencesFrame.errorReadPref=Error during the reading of the preferences file\!
+PreferencesFrame.prefSaved=Preferences saved\!
+DrawPropertiesFrame.0=The label of the drawing
+DrawPropertiesFrame.1=The caption of the drawing
+DrawPropertiesFrame.2=Drawing Properties
+DrawPropertiesFrame.3=pixels per
+DrawPropertiesFrame.5=In a page with only floats
+DrawPropertiesFrame.6=At the top of the page
+DrawPropertiesFrame.7=At the bottom of the page
+DrawPropertiesFrame.8=Here
+DrawPropertiesFrame.9=HERE\!
+DrawPropertiesFrame.10=In the center of the page
+DrawPropertiesFrame.11=Vertical position of the drawing
+DrawPropertiesFrame.12=Horizontal position of the drawing
+DrawPropertiesFrame.13=Change the number of pixels per unit of length
+ExceptionFrameDialog.0=Send Report
+ExceptionFrameDialog.1=<html><b>An error occurred\!</b><br><b><font color=red>
+ExceptionFrameDialog.2=<font color=black></b><br>You can send the report to the LaTeXDraw developer
+ExceptionFrameDialog.3=LaTeXDraw error: an exception occurred
+ExceptionFrameDialog.4=<html>An error occurred:<br>
+ExceptionFrameDialog.5=Not able to create a ExceptionFrameDialog
+AbstractParametersFrame.0=Double boundary
+AbstractParametersFrame.2=Separator:
+AbstractParametersFrame.3=Generals parameters
+AbstractParametersFrame.4=Ok
+AbstractParametersFrame.5=Default
+AbstractParametersFrame.6=Cancel
+AbstractParametersFrame.7=Angle of rotation:
+AbstractParametersFrame.8=Thickness:
+AbstractParametersFrame.10=Type of line:
+AbstractParametersFrame.11=Hatchings Width:
+AbstractParametersFrame.12=Left Arrow:
+AbstractParametersFrame.13=Right Arrow:
+AbstractParametersFrame.14=Arrows parameters
+AbstractParametersFrame.15=Show ctrl points
+AbstractParametersFrame.16=Rounded
+AbstractParametersFrame.17=X-center coordinate:
+AbstractParametersFrame.18=Y-center coordinate:
+AbstractParametersFrame.19=Radius:
+AbstractParametersFrame.20=Dot diameter =
+AbstractParametersFrame.21=Bar width =
+AbstractParametersFrame.22=Bracket length =
+AbstractParametersFrame.23=Rounded bracket lgth =
+AbstractParametersFrame.24=x thickness +
+AbstractParametersFrame.25=x width
+AbstractParametersFrame.26=Arrow length
+AbstractParametersFrame.27=Arrow inset
+AbstractParametersFrame.28=Arrow width
+AbstractParametersFrame.29=X-coordinate:
+AbstractParametersFrame.30=Y-coordinate:
+AbstractParametersFrame.31=Width:
+AbstractParametersFrame.32=Height:
+AbstractParametersFrame.33=Parameters of the shape
+AbstractParametersFrame.34=Select hatchings color
+AbstractParametersFrame.35=Select double boundary color
+AbstractParametersFrame.36=Select borders color
+AbstractParametersFrame.37=Select interior color
+AbstractParametersFrame.38=Arrows
+ParametersArcFrame.0=start angle:
+ParametersArcFrame.1=end angle:
+ParametersArcFrame.2=Type of arc:
+ParametersDotFrame.0=Type of dot:
+ParametersDrawFrame.0=North-West X
+ParametersDrawFrame.1=North-West Y
+ParametersDrawFrame.2=South-East X
+ParametersDrawFrame.3=South-East Y
+ParametersGridFrame.0=Y Origin:
+ParametersGridFrame.1=X Origin:
+ParametersGridFrame.2=Labels:
+ParametersGridFrame.3=Unit:
+ParametersGridFrame.4=Subgrid dots:
+ParametersGridFrame.5=Grid dots:
+ParametersGridFrame.6=Grid width:
+ParametersGridFrame.7=Subgrid width:
+ParametersGridFrame.8=Subgrid division:
+ParametersGridFrame.9=Label size:
+ParametersLineFrame.0=Left X-coordinate:
+ParametersLineFrame.1=Left Y-coordinate:
+ParametersLineFrame.2=Right X-coordinate:
+ParametersLineFrame.3=Right Y-coordinate:
+ParametersTextFrame.0=Bold
+ParametersTextFrame.1=Italic
+ParametersTextFrame.2=Font:
+ParametersTextFrame.3=Size:
+ParametersTextFrame.4=Text
+ParametersGridFrame.10=Subgrid:
+ParametersGridFrame.11=X max:
+ParametersGridFrame.12=X min:
+ParametersGridFrame.13=Y max:
+ParametersGridFrame.14=Y min:
+ParametersGridFrame.15=Draw labels
+ParametersGridFrame.17=Select labels color
+ParametersGridFrame.18=Select subgrid color
+ParametersPolygonFrame.1=Point n\u00B0
+ParametersTriangleFrame.0=Base center X-coord:
+ParametersTriangleFrame.1=Base center Y-coord:
+ParamsBC.0=Move all
+ParamsBC.1=If not selected, when you move a point its control points are moved too.
+ExportDialog.0=Compression
diff --git a/current/lang/en-US/others.properties b/current/lang/en-US/others.properties
new file mode 100644
index 0000000..0c98a9b
--- /dev/null
+++ b/current/lang/en-US/others.properties
@@ -0,0 +1,44 @@
+XScale.cm=cm
+XScale.inch=inch
+LaTeXDrawException.valueInc=Value incorrect
+LaTeXDrawException.invFile=This file is not a LaTeXDraw file\!
+LaTeXDrawException.invLaTeXDrawVer=This version of LaTeXDraw is not managed\!
+LaTeXDrawException.invException=LaTeXDrawException: unknown error code
+Arc.arc=Arc
+Arc.wedge=Wedge
+Arc.chord=Chord
+Arc.arcType=Kind of arc
+Figure.boundPos=Boundary position
+DrawContainer.nameTemplate=Enter the name of the template
+DrawContainer.overwriteTemplate=This template already exists; overwrite it?
+CloseButton.closePanel=Close the panel
+UndoRedoManager.changeParams=Change parameters
+UndoRedoManager.changeDispo=Change disposition
+UndoRedoManager.move=Move
+UndoRedoManager.delete=Delete
+UndoRedoManager.create=Create
+UndoRedoManager.join=Join
+UndoRedoManager.seperate=Separate
+UndoRedoManager.filled=Change interior style
+UndoRedoManager.intCol=Change interior color
+UndoRedoManager.bordCol=Change borders color
+UndoRedoManager.thick=Change thickness
+UndoRedoManager.style=Change style
+UndoRedoManager.lArrow=Change left arrow style
+UndoRedoManager.rArrow=Change right arrow style
+UndoRedoManager.dotStyle=Change dot style
+UndoRedoManager.noRedo=No redo possible
+UndoRedoManager.noUndo=No undo possible
+UndoRedoManager.align=alignment
+UndoRedoManager.distrib=distribution
+CodePanel.reload=Reload
+CodePanel.autoUpdate=Auto update
+CodePanel.copySel=Copy the selected text
+CodePanel.copyAll=Copy all the code
+CodePanel.tip=<html><center>If selected, the code is updated in real time<br><font color = red>Piece of advice <font color = black>: disable the autoupdate or do not<br> display the codepanel when the drawing is complex or<br> when you move a big figure.</center></html>
+CodePanel.updateCode=Update the code
+CodePanel.addComment=Add comments to the code
+CodePanel.reloadText=PSTricks code reloaded\!
+CodePanel.copiedText=PSTricks code copied in the clipboard\!
+CodePanel.copiedSelText=Selection copied in the clipboard\!
+SVGManager.0=Unable to generate the shapes from the SVG document.
diff --git a/current/lang/en/1_6.properties b/current/lang/en/1_6.properties
new file mode 100644
index 0000000..cf128fd
--- /dev/null
+++ b/current/lang/en/1_6.properties
@@ -0,0 +1,58 @@
+BatchConvertFrame.1=Add sub folders
+BatchConvertFrame.2=Add files
+BatchConvertFrame.4=Remove All
+BatchConvertFrame.5=Overwrite
+BatchConvertFrame.6=Select path
+BatchConvertFrame.7=Select format
+BatchConvertFrame.8=Convert
+BatchConvertFrame.9=Stop
+BatchConvertFrame.11=Batch list
+BatchConvertFrame.12=Select directory
+BatchConvertFrame.13=Select pictures
+BatchConvertFrame.14=Convert as:
+LaTeXDrawFrame.0=Insert PSTricks code
+LaTeXDrawFrame.1=Insert a picture
+LaTeXDrawFrame.2=Convert pictures
+LaTeXDrawFrame.3=stop
+LaTeXDrawFrame.4=Draw joined lines
+LaTeXDrawFrame.5=PPM picture
+LaTeXDrawFrame.6=BMP picture
+LaTeXDrawFrame.7=PNG picture
+LaTeXDrawFrame.9=Stop the parsing\!
+LaTeXDrawFrame.10=Insert
+LaTeXDrawFrame.11=Insert several figures from PSTricks code
+LaTeXDrawFrame.14=Draw several joined lines
+LaTeXDrawFrame.15=Importing a PSTricks file...
+LaTeXDrawFrame.16=<html>The current PSTricks parser only parses few commands.<br>You may import only commands managed by LaTeXDraw.<html>
+LaTeXDrawFrame.17=Import PSTricks code
+LaTeXDrawFrame.18=This software uses JIU, the Java Imaging Utilities. Distributed under  
+LaTeXDrawFrame.19=the terms of the GNU General Public License. http://schmidt.devlib.org/jiu/
+LaTeXDrawFrame.23=<html><b><font color=red>Warnings:</b> <br><font color=black><ul><li>PSTricks cannot include JPG, BMP,... files; so an EPS picture will be created from the selected picture, <br>in the same directory. So the picture will be included only if you have rights to write in the directory;<li>TeX does not support spaces in the path, so try to do not have any.</ul></html>
+LaTeXDrawFrame.25=Loading the picture...
+LaTeXDrawFrame.26=The picture is invalid\!
+LaTeXDrawFrame.27=Not able to load the picture\!
+LaTeXDrawFrame.28=Picture inserted\!
+LaTeXDrawFrame.30=<html>There is no figure to import\!<br>If it is false, check that they are surrounded by begin{pspicture} ...end{pspicture}.<br>You can send the file to  
+LaTeXDrawFrame.31=\ if you think there is a bug in the PSTricks parser.</html>
+LaTeXDrawFrame.32=No figure found\!
+LaTeXDrawFrame.33=No figure found to import\!
+LaTeXDrawFrame.34=Not able to import the PSTricks file\!
+LaTeXDrawFrame.35=Importation cancelled\!
+LaTeXDrawFrame.36=Code converted into figures\!
+InsertPSTricksCodeFrame.0=Insert figures from PSTricks code
+FatalErrorParsingException.0=<br>If the file is valid, you can send it to arno_b at users.sourceforge.net</html>
+Picture.0=% Warning: the path of the following picture contains spaces and will not be compiled by tex\!
+ParserCmdMessage.0=Line  
+ParserCmdMessage.1=Command:  
+ParserCmdMessage.2=Exception:  
+ParserMessagesFrame.0=Command
+ParserMessagesFrame.1=Line
+ParserMessagesFrame.2=Exception
+ParserMessagesFrame.3=<html><font color=red><b>One or several warnings occurred during the parsing</b></html>
+ParserMessagesFrame.4=TeX parser: warning(s)
+ParametersGridFrame.0=Invert label position following X
+ParametersGridFrame.1=Invert label position following Y
+PSTricksParser.0=Error during the opening of the file: invalid file\!
+PSTricksParser.1=<html>The incremental pspicture definition is not yet managed:<br>
+PSTricksParser.2=begin{pspicture}...begin{pspicture} ... end{pspicture}...</html>
+PSTricksParser.3=Error during the parsing of the file\!
diff --git a/current/lang/en/1_7.properties b/current/lang/en/1_7.properties
new file mode 100644
index 0000000..c981315
--- /dev/null
+++ b/current/lang/en/1_7.properties
@@ -0,0 +1,60 @@
+LaTeXDrawException.0=Invalid picture.
+LaTeXDrawFrame.0=Shadow
+LaTeXDrawFrame.9=Select shadow colour
+LaTeXDrawFrame.1=Gradient 1
+LaTeXDrawFrame.2=Gradient 2
+LaTeXDrawFrame.4=Add a shadow to the figure.
+LaTeXDrawFrame.5=Choose the colour of the shadow.
+LaTeXDrawFrame.6=Position figures into the drawing (in front of, behind,...).
+LaTeXDrawFrame.7=Choose the first colour of the gradient.
+LaTeXDrawFrame.8=Choose the second colour of the gradient.
+ParametersTextFrame.0=Opacity
+ParametersTextFrame.1=Boxes list
+ParametersTextFrame.2=Opaque
+ParametersTextFrame.3=Circle
+ParametersTextFrame.4=Rectangle
+ParametersTextFrame.5=Triangle
+ParametersTextFrame.6=Diamond
+ParametersTextFrame.7=Ellipse
+ParametersTextFrame.8=Simple box
+ParametersTextFrame.9=Several boxes
+ParametersGridFrame.0=Grid parameters
+ParametersTextFrame.10=Enable framed box(es)
+ParametersTextFrame.11=Add
+ParametersTextFrame.12=Modify
+ParametersTextFrame.13=Remove
+ParametersTextFrame.14=Separator:
+ParametersTextFrame.15=Edit box
+ParametersTextFrame.16=Consider box size
+ParametersTextFrame.17=If selected, the background of the text will be opaque.
+ParametersTextFrame.18=Framed box(es)
+ParametersTextFrame.20=Create a or several frames around the text.
+ParametersTextFrame.21=The box will be a rectangle.
+ParametersTextFrame.22=The box will be a triangle.
+ParametersTextFrame.23=Create a simple box around the whole text.
+ParametersTextFrame.24=The box will be an ellipse.
+ParametersTextFrame.25=The box will be a diamond.
+ParametersTextFrame.26=Create several boxes around different parts of the text.
+ParametersTextFrame.27=The box will be a circle.
+ParametersTextFrame.28=Add a new box.
+ParametersTextFrame.29=Edit the position of the selected box.
+ParametersTextFrame.30=Remove the selected box.
+ParametersTextFrame.31=Change the spacing between the text and the box.
+ParametersTextFrame.32=If selected, the box will not be drawn on the text at the start and the end of the framed text.
+ParametersTextFrame.33=Open the panel of parameters of the box to edit it.
+ParametersTextFrame.34=Text selection
+ParametersTextFrame.35=Select the text to frame:
+ParametersTextFrame.36=Text Selection
+ParametersTextFrame.37=Invalid box; it overlaps another box.
+AbstractParametersFrame.0=Dimensions/Position
+AbstractParametersFrame.1=Shadow angle
+AbstractParametersFrame.2=Shadow size
+AbstractParametersFrame.3=Gradient angle
+AbstractParametersFrame.4=Middle Pt
+AbstractParametersFrame.6=Other
+AbstractParametersFrame.7=Round corner:
+AbstractParametersFrame.8=Hatching
+AbstractParametersFrame.9=Double line
+AbstractParametersFrame.11=Replenishment
+AbstractParametersFrame.12=Gradient
+BatchConvertFrame.0=In the same directories
diff --git a/current/lang/en/1_8.properties b/current/lang/en/1_8.properties
new file mode 100644
index 0000000..4766e41
--- /dev/null
+++ b/current/lang/en/1_8.properties
@@ -0,0 +1,57 @@
+UndoRedoManager.0=Transformation
+AbstractParametersFrame.0=interval:
+ParametersAxeFrame.0=Shape:
+ParametersAxeFrame.1=Show origin
+ParametersAxeFrame.2=Axes
+ParametersAxeFrame.3=Display X-labels
+ParametersAxeFrame.4=Display Y-labels
+ParametersAxeFrame.5=Define distance between labels (cm)
+ParametersAxeFrame.6=X-labels distance:
+ParametersAxeFrame.7=Y-labels distance:
+ParametersAxeFrame.8=X-labels increment:
+ParametersAxeFrame.9=Y-labels increment:
+ParametersAxeFrame.10=X-labels origin:
+ParametersAxeFrame.11=Y-labels origin:
+ParametersAxeFrame.12=Labels
+ParametersAxeFrame.13=Size:
+ParametersAxeFrame.14=Style:
+ParametersAxeFrame.15=Display X-ticks
+ParametersAxeFrame.16=Display Y-ticks
+ParametersAxeFrame.17=Ticks
+PreferencesFrame.3=Path of your LaTeX editor:
+PreferencesFrame.4=Standard grid
+PreferencesFrame.5=Personal grid
+PreferencesFrame.6=Magnetic grid
+PreferencesFrame.7=Interval:
+LaTeXDrawFrame.0=Draw Axes
+LaTeXDrawFrame.2=Rotate the selected figure(s).
+LaTeXDrawFrame.3=Rotate the selected figure(s) of 90\u00B0.
+LaTeXDrawFrame.4=Rotate the selected figure(s) of 180\u00B0.
+LaTeXDrawFrame.5=Rotate the selected figure(s) of 270\u00B0.
+LaTeXDrawFrame.6=Reverse figures by symmetry.
+LaTeXDrawFrame.7=Reverse horizontally the selected figures.
+LaTeXDrawFrame.8=Reverse vertically the selected figures.
+LaTeXDrawFrame.10=Display a standard grid (in cm or inch).
+LaTeXDrawFrame.11=Display a grid you can modify the interval between its lines.
+LaTeXDrawFrame.12=Contains the parameters of the (magnetic) grid
+LaTeXDrawFrame.13=magnetic
+LaTeXDrawFrame.14=If selected, the figures will be magnetic to the grid.
+LaTeXDrawFrame.15=Define the interval between the lines of the personal grid (in pixels).
+LaTeXDrawFrame.16=Draw grids and axes.
+LaTeXDrawFrame.17=Draw axes.
+LaTeXDrawFrame.18=Launch your LaTeX editor.
+LaTeXDrawFrame.19=Launching of your LaTeX editor...
+LaTeXDrawFrame.20=You must define the path of your LaTeX editor in the preferences window.
+LaTeXDrawFrame.21=The file you selected is invalid.
+LaTeXDrawFrame.22=Redefine the path in the panel of preferences.
+LaTeXDrawFrame.23=Close
+LaTeXDrawFrame.25=Libraries
+LaTeXDrawFrame.26=Translators
+LaTeXDrawFrame.27=Release note
+LaTeXDrawFrame.28=Licence
+Axe.0=None
+Axe.1=Axe
+Axe.2=Frame
+Axe.3=Full
+Axe.4=Top
+Axe.5=Bottom
diff --git a/current/lang/en/1_9.properties b/current/lang/en/1_9.properties
new file mode 100644
index 0000000..089f36e
--- /dev/null
+++ b/current/lang/en/1_9.properties
@@ -0,0 +1,70 @@
+LaTeXDrawFrame.0=Recent files
+LaTeXDrawFrame.1=Draw Closed B\u00E9zier Curve
+LaTeXDrawFrame.2=Clear all
+LaTeXDrawFrame.3=Shortcuts
+LaTeXDrawFrame.4=Check update
+LaTeXDrawFrame.5=Shapes
+LaTeXDrawFrame.6=Set visible all the figures
+LaTeXDrawFrame.7=<html>If a figure has its coordinates under (0,0), you cannot see it.<br>This button allows to move all the figures in order to be visible.</html>
+LaTeXDrawFrame.8=Define the properties of the handlers.
+LaTeXDrawFrame.9=Handlers opacity
+LaTeXDrawFrame.10=Define the transparency of the handlers.
+LaTeXDrawFrame.11=Draw a closed B\u00E9zier curve
+LaTeXDrawFrame.12=<html>Check that the version of the Java Runtime Environment you used<br>to create this file is the same of the JRE you currently use.</html>
+LaTeXDrawFrame.13=The help directory is unreachable, the help page cannot be loaded.
+LaTeXDrawFrame.14=Not able to create the help page.
+PSTricksParser.0=begin{center} must be out of begin{pspicture}...end{pspicture}
+PSTricksParser.1=end{center} must be out of begin{pspicture}...end{pspicture}
+PSTricksParser.2=end{figure} must be out of begin{pspicture}...end{pspicture}
+PSTricksParser.3=end{pspicture} or pspicture not found.
+DrawPanel.0=Update figures to the grid
+ParametersAkinPointsFrame.0=Points interval:
+ParametersAkinPointsFrame.1=Open
+ParametersAkinPointsFrame.2=type:
+ParametersAkinPointsFrame.3=Free hand parameters
+ParametersBezierCurveFrame.2=Equilibrate
+ParametersBezierCurveFrame.3=Equilibrate the control points in respect of the position of the points.
+ParametersBezierCurveFrame.4=Distance:
+ParametersBezierCurveFrame.5=Define the space between the control point and the point when equilibrating the curve.
+ParametersBezierCurveFrame.6=X 1st ctrl pt
+ParametersBezierCurveFrame.7=Y 1st ctrl pt
+ParametersBezierCurveFrame.8=X 2nd ctrl pt
+ParametersBezierCurveFrame.9=Y 2nd ctrl pt
+PreferencesFrame.0=Number of recent files:
+PreferencesFrame.1=Theme (need restart):
+ShortcutsFrame.1=Sequence
+ShortcutsFrame.3=Category
+ShortcutsFrame.4=Navigation
+ShortcutsFrame.5=Transformation
+ShortcutsFrame.6=Drawing
+ShortcutsFrame.7=\ (big move)
+ShortcutsFrame.8=left click
+ShortcutsFrame.9=Move the horizontal scrollbar to the right
+ShortcutsFrame.10=Move the horizontal scrollbar to the left
+ShortcutsFrame.11=Move the vertical scrollbar to the top
+ShortcutsFrame.12=Move the vertical scrollbar to the bottom
+ShortcutsFrame.14=Go to the end of the horizontal scrollbar
+ShortcutsFrame.15=Go to the beginning of the horizontal scrollbar
+ShortcutsFrame.16=Go to the top of the vertical scrollbar
+ShortcutsFrame.17=Go to the bottom of the vertical scrollbar
+ShortcutsFrame.18=Move the selected figures to the right
+ShortcutsFrame.19=Move the selected figures to the left
+ShortcutsFrame.20=Move the selected figures to the top
+ShortcutsFrame.21=Move the selected figures to the bottom
+ShortcutsFrame.23=Update the selected figures to the displayed grid
+ShortcutsFrame.25=Select all the figures of the drawing
+ShortcutsFrame.26=Add the clicked figure to the selection
+ShortcutsFrame.27=Remove the clicked figure from the selection
+ShortcutsFrame.28=Select the next or the first figure (in selection mode only)
+ShortcutsFrame.29=Mouse wheel
+ShortcutsFrame.30=Zoom in/out
+MenusListener.0=Press the left button and drag the mouse to place the second point. Release the button to finish the creation.
+MenusListener.1=A left-click to add a point, a right-click or a double left-click to place the last point and to finish the creation.
+MenusListener.4=Press the left button and drag the mouse to place the last point. Release the button to finish the creation.
+MenusListener.5=A left-click adds text.
+MenusListener.6=A left-click adds a grid.
+MenusListener.7=A left-click adds axes.
+MenusListener.8=Press the left button and drag the mouse to draw the shape. Release the button to finish the creation.
+MenusListener.9=A left-click adds a dot.
+RecentFilesListener.0=It is impossible to access to this file.
+RecentFilesListener.1=Cannot open the file
diff --git a/current/lang/en/LaTeXDrawFrame.properties b/current/lang/en/LaTeXDrawFrame.properties
new file mode 100644
index 0000000..e56a79a
--- /dev/null
+++ b/current/lang/en/LaTeXDrawFrame.properties
@@ -0,0 +1,207 @@
+LaTeXDrawFrame.0=\ help
+LaTeXDrawFrame.1=About 
+LaTeXDrawFrame.2=Draw line
+LaTeXDrawFrame.3=Draw rectangle
+LaTeXDrawFrame.4=Draw dot
+LaTeXDrawFrame.5=Draw square
+LaTeXDrawFrame.6=Draw rhombus
+LaTeXDrawFrame.7=Freehand
+LaTeXDrawFrame.8=Draw triangle
+LaTeXDrawFrame.9=Draw circle
+LaTeXDrawFrame.10=Draw grid
+LaTeXDrawFrame.11=Draw ellipse
+LaTeXDrawFrame.12=Draw polygon
+LaTeXDrawFrame.13=Select figure(s)
+LaTeXDrawFrame.14=Display borders
+LaTeXDrawFrame.15=Auto borders adjustment
+LaTeXDrawFrame.16=Export as...
+LaTeXDrawFrame.17=Delete Figure
+LaTeXDrawFrame.18=Quit
+LaTeXDrawFrame.19=PSTricks code
+LaTeXDrawFrame.20=JPEG picture
+LaTeXDrawFrame.21=EPS picture
+LaTeXDrawFrame.22=Redo
+LaTeXDrawFrame.23=Undo
+LaTeXDrawFrame.25=Save project
+LaTeXDrawFrame.26=Save project as
+LaTeXDrawFrame.27=Open project
+LaTeXDrawFrame.28=New project
+LaTeXDrawFrame.29=Print code
+LaTeXDrawFrame.30=Print drawing
+LaTeXDrawFrame.31=Behind a figure
+LaTeXDrawFrame.32=In front of a figure
+LaTeXDrawFrame.33=Group
+LaTeXDrawFrame.34=Separate
+LaTeXDrawFrame.35=Draw arc
+LaTeXDrawFrame.36=Draw wedge
+LaTeXDrawFrame.37=Draw chord
+LaTeXDrawFrame.38=X-Scale
+LaTeXDrawFrame.39=Y-Scale
+LaTeXDrawFrame.40=Copy
+LaTeXDrawFrame.41=Update templates
+LaTeXDrawFrame.42=Export as template
+LaTeXDrawFrame.43=Paste
+LaTeXDrawFrame.44=Cut
+LaTeXDrawFrame.45=Standard Grid
+LaTeXDrawFrame.46=Code Panel
+LaTeXDrawFrame.47=Borders
+LaTeXDrawFrame.48=Interior
+LaTeXDrawFrame.49=Hatchings
+LaTeXDrawFrame.51=filled
+LaTeXDrawFrame.53=Figure Properties
+LaTeXDrawFrame.55=Add comments
+LaTeXDrawFrame.56=Preferences
+LaTeXDrawFrame.57=Zoom in
+LaTeXDrawFrame.58=Zoom out
+LaTeXDrawFrame.60=Add text
+LaTeXDrawFrame.61=Foreground
+LaTeXDrawFrame.62=Background
+LaTeXDrawFrame.63=Draw B\u00E9zier curve
+LaTeXDrawFrame.64=Rotate the figure
+LaTeXDrawFrame.65=Change the thickness of the figure
+LaTeXDrawFrame.66=Change the colour of the borders of the figure
+LaTeXDrawFrame.67=If selected, the figure will be filled
+LaTeXDrawFrame.68=Change the colour of the interior of the figure
+LaTeXDrawFrame.69=Change the colour of the hatchings
+LaTeXDrawFrame.70=Put the figure in the foreground
+LaTeXDrawFrame.71=Put the figure in the background
+LaTeXDrawFrame.72=Select the figure which will be behind the selected figure
+LaTeXDrawFrame.73=Select the figure which will be in front of the selected figure
+LaTeXDrawFrame.74=If activated, you can rotate a figure with the mouse using handlers
+LaTeXDrawFrame.75=Group several figures
+LaTeXDrawFrame.76=Separate several figures
+LaTeXDrawFrame.77=Define the position of the borders of the figure
+LaTeXDrawFrame.78=If selected, the figure will have double borders
+LaTeXDrawFrame.79=Change to colour of the space between the double borders
+LaTeXDrawFrame.80=\ Thickness
+LaTeXDrawFrame.82=<html>An error occurred during the launch of LaTeXDraw:<br>
+LaTeXDrawFrame.83=LaTeXDraw is not able to start
+LaTeXDrawFrame.86=LaTeXDraw Error
+LaTeXDrawFrame.88=File
+LaTeXDrawFrame.89=Edit
+LaTeXDrawFrame.90=Display
+LaTeXDrawFrame.91=Draw
+LaTeXDrawFrame.92=Code
+LaTeXDrawFrame.93=Help
+LaTeXDrawFrame.94=Zoom in the drawing
+LaTeXDrawFrame.95=Zoom out the drawing
+LaTeXDrawFrame.96=Zoom 100%
+LaTeXDrawFrame.103=Templates
+LaTeXDrawFrame.105=Not able to create the templates menu\!
+LaTeXDrawFrame.107=Toolbar
+LaTeXDrawFrame.108=Create a new project
+LaTeXDrawFrame.109=Open a project
+LaTeXDrawFrame.110=Save the project
+LaTeXDrawFrame.113=100%
+LaTeXDrawFrame.114=Undo an action
+LaTeXDrawFrame.115=Redo an action
+LaTeXDrawFrame.116=Draw a line
+LaTeXDrawFrame.117=Draw a dot
+LaTeXDrawFrame.118=Draw a rectangular shape
+LaTeXDrawFrame.119=Draw a rectangle
+LaTeXDrawFrame.120=Draw a square
+LaTeXDrawFrame.121=Draw a polygon
+LaTeXDrawFrame.123=Draw a rhombus
+LaTeXDrawFrame.124=Draw a triangle
+LaTeXDrawFrame.125=Draw an ellipse
+LaTeXDrawFrame.127=Draw a circle
+LaTeXDrawFrame.128=Draw an arc
+LaTeXDrawFrame.130=Draw a wedge
+LaTeXDrawFrame.131=Draw a chord
+LaTeXDrawFrame.132=Draw a B\u00E9zier curve
+LaTeXDrawFrame.133=Draw a grid
+LaTeXDrawFrame.136=<html>Select one or several figures<br>
+LaTeXDrawFrame.137=<font color=red>Piece of advice <font color=black>: to select several
+LaTeXDrawFrame.138=figures, click and<br>drag the mouse on the figures you want</html>
+LaTeXDrawFrame.139=Delete the selected figure(s)
+LaTeXDrawFrame.140=Change the figure properties
+LaTeXDrawFrame.141=<html>Display the borders of the drawing<br>
+LaTeXDrawFrame.142=<font color = red>Piece of advice <font color=black>: if you display the borders of the<br>
+LaTeXDrawFrame.143=drawing, disable the borders autoupdate to be able to<br>
+LaTeXDrawFrame.144=change the dimensions of the drawing</html>
+LaTeXDrawFrame.146=Copied...
+LaTeXDrawFrame.147=Pasted...
+LaTeXDrawFrame.148=Cut...
+LaTeXDrawFrame.149=Deleted...
+LaTeXDrawFrame.151=Select double borders colour
+LaTeXDrawFrame.154=Grouped...
+LaTeXDrawFrame.155=Separated...
+LaTeXDrawFrame.156=Do you want to save the project?
+LaTeXDrawFrame.158=Redo...
+LaTeXDrawFrame.159=Undo...
+LaTeXDrawFrame.160=Templates updated...
+LaTeXDrawFrame.161=Error for file
+LaTeXDrawFrame.162=Printing the drawing...
+LaTeXDrawFrame.163=Drawing printed\!
+LaTeXDrawFrame.164=Not able to print the drawing\!
+LaTeXDrawFrame.165=Printing code...
+LaTeXDrawFrame.166=Code printed\!
+LaTeXDrawFrame.167=Not able to print the code\!
+LaTeXDrawFrame.168=Exporting as template...
+LaTeXDrawFrame.169=Template exported\!
+LaTeXDrawFrame.170=Exporting as PSTricks code...
+LaTeXDrawFrame.171=Select
+LaTeXDrawFrame.172=Export the PSTricks code as a TeX file
+LaTeXDrawFrame.173=Do you want to replace the file?
+LaTeXDrawFrame.174=Export as PSTricks
+LaTeXDrawFrame.175=PSTricks code exported\!
+LaTeXDrawFrame.176=Not able to export PSTricks code\!
+LaTeXDrawFrame.177=Exporting as picture...
+LaTeXDrawFrame.179=Export figures as
+LaTeXDrawFrame.182=Export as
+LaTeXDrawFrame.183=\ file
+LaTeXDrawFrame.184=Export as picture done\!
+LaTeXDrawFrame.185=Not able to export as picture\!
+LaTeXDrawFrame.186=Saving project...
+LaTeXDrawFrame.188=Save the drawing
+LaTeXDrawFrame.190=Export as JPEG file
+LaTeXDrawFrame.191=Project saved\!
+LaTeXDrawFrame.192=Not able to save the project\!
+LaTeXDrawFrame.193=<html>An error occurred during the saving of a file:<br>
+LaTeXDrawFrame.197=Creation of a new project...
+LaTeXDrawFrame.198=New project created\!
+LaTeXDrawFrame.200=Open a drawing
+LaTeXDrawFrame.201=Opening a file...
+LaTeXDrawFrame.202=File opened\!
+LaTeXDrawFrame.203=Not able to open file\!
+LaTeXDrawFrame.204=<html>An error occurred during the loading of a file:<br>
+LaTeXDrawFrame.208=</span><br>Version
+LaTeXDrawFrame.209=\ released\!</html>
+LaTeXDrawFrame.210=New Version
+LaTeXDrawFrame.211=New version released\!
+LaTeXDrawFrame.212=No new version
+LaTeXDrawFrame.213=Unable to check if a new version exists\!
+LaTeXDrawFrame.215=LaTeXDraw help
+LaTeXDrawFrame.218=A PSTricks code generator for LaTeX\!
+LaTeXDrawFrame.219=Version
+LaTeXDrawFrame.220=, build
+LaTeXDrawFrame.221=\ is distributed under the terms of the GNU General Public License
+LaTeXDrawFrame.222=\ as published by the Free Software Foundation (version 2)
+LaTeXDrawFrame.229=Import...
+LaTeXDrawFrame.230=From TeX file
+LFrame2.0=Define the size of a dot.
+LFrame2.1=Align the selected figures.
+LFrame2.10=Distribute vertically, at equal distance between, the selected figures.
+LFrame2.11=Distribute vertically at equal distance between the middle of the selected figures.
+LFrame2.12=Distribute vertically at equal distance between the top sides of the selected figures.
+LFrame2.13=Distribute horizontally at equal distance between the left sides of the selected figures.
+LFrame2.14=Distribute horizontally, at equal distance between, the selected figures.
+LFrame2.15=Distribute horizontally at equal distance between the middle of the selected figures.
+LFrame2.16=Distribute horizontally at equal distance between the right sides of the selected figures.
+LFrame2.17=Colours
+LFrame2.18=Impossible to open the file.
+LFrame2.19=This template cannot be found
+LFrame2.2=Align on the left the selected figures.
+LFrame2.20=Please, update the templates menu
+LFrame2.21=Template not found
+LFrame2.22=The document cannot be printed.
+LFrame2.23=No printer found.
+LFrame2.25=The GPL library jlibeps is used to create EPS pictures.
+LFrame2.3=Align on the right the selected figures.
+LFrame2.4=Align on the top the selected figures.
+LFrame2.5=Align on the bottom the selected figures.
+LFrame2.6=Align horizontally in the middle the selected figures.
+LFrame2.7=Align vertically in the middle the selected figures.
+LFrame2.8=Distribute at equal distance the selected figures.
+LFrame2.9=Distribute vertically, at equal distance between the bottom sides of the selected figures.
+LFrame2.26=New project with selection
diff --git a/current/lang/en/dialogFrames.properties b/current/lang/en/dialogFrames.properties
new file mode 100644
index 0000000..36b95c3
--- /dev/null
+++ b/current/lang/en/dialogFrames.properties
@@ -0,0 +1,116 @@
+PreferencesFrame.Pref=Preferences...
+PreferencesFrame.grid=Grid
+PreferencesFrame.codePanel=Code panel
+PreferencesFrame.antiAl=Anti-aliasing
+PreferencesFrame.rendQ=Rendering quality
+PreferencesFrame.colRendQ=Colour rendering quality
+PreferencesFrame.AlphaQ=Alpha interpolation quality
+PreferencesFrame.bordersDraw=Borders of the drawing
+PreferencesFrame.codeAuto=Code autoupdate (slower)
+PreferencesFrame.newVers=Check new version on start-up
+PreferencesFrame.lge=Language (need restart)
+PreferencesFrame.general=General
+PreferencesFrame.folders=Folders
+PreferencesFrame.quality=Quality
+PreferencesFrame.selectFolder=Select a folder
+PreferencesFrame.defOpenSave=Default folder for open/save actions:
+PreferencesFrame.defFold=Default folder for import/export actions:
+PreferencesFrame.errorReadPref=Error during the reading of the preferences file\!
+PreferencesFrame.prefSaved=Preferences saved\!
+DrawPropertiesFrame.0=The label of the drawing
+DrawPropertiesFrame.1=The caption of the drawing
+DrawPropertiesFrame.2=Drawing Properties
+DrawPropertiesFrame.3=pixels per
+DrawPropertiesFrame.5=In a page with only floats
+DrawPropertiesFrame.6=At the top of the page
+DrawPropertiesFrame.7=At the bottom of the page
+DrawPropertiesFrame.8=Here
+DrawPropertiesFrame.9=HERE\!
+DrawPropertiesFrame.10=In the centre of the page
+DrawPropertiesFrame.11=Vertical position of the drawing
+DrawPropertiesFrame.12=Horizontal position of the drawing
+DrawPropertiesFrame.13=Change the number of pixels per unit of length
+ExceptionFrameDialog.0=Send Report
+ExceptionFrameDialog.1=<html><b>An error occurred\!</b><br><b><font color=red>
+ExceptionFrameDialog.2=<font color=black></b><br>You can send the report to the LaTeXDraw developer
+ExceptionFrameDialog.3=LaTeXDraw error: an exception occurred
+ExceptionFrameDialog.4=<html>An error occurred:<br>
+ExceptionFrameDialog.5=Not able to create a ExceptionFrameDialog
+AbstractParametersFrame.0=Double boundary
+AbstractParametersFrame.2=Separator:
+AbstractParametersFrame.3=Generals parameters
+AbstractParametersFrame.4=Ok
+AbstractParametersFrame.5=Default
+AbstractParametersFrame.6=Cancel
+AbstractParametersFrame.7=Angle of rotation:
+AbstractParametersFrame.8=Thickness:
+AbstractParametersFrame.10=Type of line:
+AbstractParametersFrame.11=Hatchings Width:
+AbstractParametersFrame.12=Left Arrow:
+AbstractParametersFrame.13=Right Arrow:
+AbstractParametersFrame.14=Arrows parameters
+AbstractParametersFrame.15=Show ctrl points
+AbstractParametersFrame.16=Rounded
+AbstractParametersFrame.17=X-centre coordinate:
+AbstractParametersFrame.18=Y-centre coordinate:
+AbstractParametersFrame.19=Radius:
+AbstractParametersFrame.20=Dot diameter =
+AbstractParametersFrame.21=Bar width =
+AbstractParametersFrame.22=Bracket length =
+AbstractParametersFrame.23=Rounded bracket lgth =
+AbstractParametersFrame.24=x thickness +
+AbstractParametersFrame.25=x width
+AbstractParametersFrame.26=Arrow length
+AbstractParametersFrame.27=Arrow inset
+AbstractParametersFrame.28=Arrow width
+AbstractParametersFrame.29=X-coordinate:
+AbstractParametersFrame.30=Y-coordinate:
+AbstractParametersFrame.31=Width:
+AbstractParametersFrame.32=Height:
+AbstractParametersFrame.33=Parameters of the shape
+AbstractParametersFrame.34=Select hatchings colour
+AbstractParametersFrame.35=Select double boundary colour
+AbstractParametersFrame.36=Select borders colour
+AbstractParametersFrame.37=Select interior colour
+AbstractParametersFrame.38=Arrows
+ParametersArcFrame.0=start angle:
+ParametersArcFrame.1=end angle:
+ParametersArcFrame.2=Type of arc:
+ParametersDotFrame.0=Type of dot:
+ParametersDrawFrame.0=North-West X
+ParametersDrawFrame.1=North-West Y
+ParametersDrawFrame.2=South-East X
+ParametersDrawFrame.3=South-East Y
+ParametersGridFrame.0=Y Origin:
+ParametersGridFrame.1=X Origin:
+ParametersGridFrame.2=Labels:
+ParametersGridFrame.3=Unit:
+ParametersGridFrame.4=Subgrid dots:
+ParametersGridFrame.5=Grid dots:
+ParametersGridFrame.6=Grid width:
+ParametersGridFrame.7=Subgrid width:
+ParametersGridFrame.8=Subgrid division:
+ParametersGridFrame.9=Label size:
+ParametersLineFrame.0=Left X-coordinate:
+ParametersLineFrame.1=Left Y-coordinate:
+ParametersLineFrame.2=Right X-coordinate:
+ParametersLineFrame.3=Right Y-coordinate:
+ParametersTextFrame.0=Bold
+ParametersTextFrame.1=Italic
+ParametersTextFrame.2=Font:
+ParametersTextFrame.3=Size:
+ParametersTextFrame.4=Text
+ParametersGridFrame.10=Subgrid:
+ParametersGridFrame.11=X max:
+ParametersGridFrame.12=X min:
+ParametersGridFrame.13=Y max:
+ParametersGridFrame.14=Y min:
+ParametersGridFrame.15=Draw labels
+ParametersGridFrame.17=Select labels colour
+ParametersGridFrame.18=Select subgrid colour
+ParametersPolygonFrame.1=Point n\u00B0
+ParametersTriangleFrame.0=Base centre X-coord:
+ParametersTriangleFrame.1=Base centre Y-coord:
+ParamsBC.0=Move all
+ParamsBC.1=If not selected, when you move a point its control points are moved too.
+ExportDialog.0=Compression
diff --git a/current/lang/en/others.properties b/current/lang/en/others.properties
new file mode 100644
index 0000000..7753456
--- /dev/null
+++ b/current/lang/en/others.properties
@@ -0,0 +1,44 @@
+XScale.cm=cm
+XScale.inch=inch
+LaTeXDrawException.valueInc=Incorrect value
+LaTeXDrawException.invFile=This file is not a LaTeXDraw file\!
+LaTeXDrawException.invLaTeXDrawVer=This version of LaTeXDraw is not managed\!
+LaTeXDrawException.invException=LaTeXDrawException: unknown code error
+Arc.arc=Arc
+Arc.wedge=Wedge
+Arc.chord=Chord
+Arc.arcType=Kind of arc
+Figure.boundPos=Boundary position
+DrawContainer.nameTemplate=Enter the name of the template
+DrawContainer.overwriteTemplate=This template already exists; overwrite it?
+CloseButton.closePanel=Close the window
+UndoRedoManager.changeParams=Change parameters
+UndoRedoManager.changeDispo=Change disposition
+UndoRedoManager.move=Move
+UndoRedoManager.delete=Delete
+UndoRedoManager.create=Create
+UndoRedoManager.join=Join
+UndoRedoManager.seperate=Separate
+UndoRedoManager.filled=Change interior style
+UndoRedoManager.intCol=Change interior colour
+UndoRedoManager.bordCol=Change borders colour
+UndoRedoManager.thick=Change thickness
+UndoRedoManager.style=Change style
+UndoRedoManager.lArrow=Change left arrow style
+UndoRedoManager.rArrow=Change right arrow style
+UndoRedoManager.dotStyle=Change dot style
+UndoRedoManager.noRedo=No redo possible
+UndoRedoManager.noUndo=No undo possible
+UndoRedoManager.align=alignment
+UndoRedoManager.distrib=distribution
+CodePanel.reload=Reload
+CodePanel.autoUpdate=Auto update
+CodePanel.copySel=Copy the selected text
+CodePanel.copyAll=Copy all the code
+CodePanel.tip=<html><center>If selected, the code is updated in real time<br><font color = red>Piece of advice <font color = black>: disable the autoupdate or do not<br> display the codepanel when the drawing is complex or<br> when you move a big figure.</center></html>
+CodePanel.updateCode=Update the code
+CodePanel.addComment=Add comments to the code
+CodePanel.reloadText=PSTricks code reloaded\!
+CodePanel.copiedText=PSTricks code copied in the clipboard\!
+CodePanel.copiedSelText=Selection copied in the clipboard\!
+SVGManager.0=Unable to generate the shapes from the SVG document.
diff --git a/current/lang/es/1_6.properties b/current/lang/es/1_6.properties
new file mode 100644
index 0000000..285dda2
--- /dev/null
+++ b/current/lang/es/1_6.properties
@@ -0,0 +1,58 @@
+BatchConvertFrame.1=A\u00F1adir subdirectorios
+BatchConvertFrame.2=A\u00F1adir archivos
+BatchConvertFrame.4=Eliminar todo
+BatchConvertFrame.5=Sobreescribir
+BatchConvertFrame.6=Seleccionar ruta
+BatchConvertFrame.7=Seleccionar formato
+BatchConvertFrame.8=Convertir
+BatchConvertFrame.9=Detener
+BatchConvertFrame.11=Lista de tareas a ejecutar
+BatchConvertFrame.12=Seleccione un directorio
+BatchConvertFrame.13=Seleccionar im\u00E1genes
+BatchConvertFrame.14=Convertir como :
+LaTeXDrawFrame.0=Insertar c\u00F3digo PSTricks
+LaTeXDrawFrame.1=Insertar una imagen
+LaTeXDrawFrame.2=Convertir figuras
+LaTeXDrawFrame.3=stop
+LaTeXDrawFrame.4=Dibujar l\u00EDneas una tras otra
+LaTeXDrawFrame.5=imagen PPM
+LaTeXDrawFrame.6=imagen BMP
+LaTeXDrawFrame.7=imagen PNG
+LaTeXDrawFrame.9=Parar el an\u00E1lisis gramatical \!
+LaTeXDrawFrame.10=Insertar
+LaTeXDrawFrame.11=Insertar varias figuras usando c\u00F3digo PSTricks
+LaTeXDrawFrame.14=Dibujar varias l\u00EDneas una tras otra
+LaTeXDrawFrame.15=Importando un archivo PSTriks...
+LaTeXDrawFrame.16=<html>El int\u00E9rprete actual para PSTricks s\u00F3lo interpreta algunos comandos.<br>S\u00F3lo puede importar comandos gestionados por LaTeXDraw.<html>
+LaTeXDrawFrame.17=Importar c\u00F3digo PSTricks
+LaTeXDrawFrame.18=Este programa usa JUI, utilidades de im\u00E1genes en java. Distribuido bajo  
+LaTeXDrawFrame.19=los t\u00E9rminos de la Licencia P\u00FAblica General GNU. http://schmidt.devlib.org/jiu/
+LaTeXDrawFrame.23=<html><b><font color=red>Advertencias:</b> <br><font color=black><ul><li>PSTricks no puede incluir archivos JPEG, BMP, ...; por lo tanto se crear\u00E1 una imagen EPS con base en la imagen seleccionada,<br> en el mismo directorio. La imagen s\u00F3lo ser\u00E1 incluida si usted tiene derechos de escritura en dicho directorio. Adem\u00E1s, TeX no soporta espacios en la ruta, as\u00ED que por favor intente que \u00E9sta no tenga ningun espacio.</ul></html>
+LaTeXDrawFrame.25=Cargando la figura ..
+LaTeXDrawFrame.26=¡ La figura es inv\u00E1lida \!
+LaTeXDrawFrame.27=¡ No es posible cargar la figura \!
+LaTeXDrawFrame.28=¡ Figura insertada \!
+LaTeXDrawFrame.30=<html>\! No hay figura para importar en el archivo \!<br>Si no es cierto, verifique que su c\u00F3digo esta contenido entre begin{psicture} ...end{pspicture}.<br>Usted puede enviar el archivo a  
+LaTeXDrawFrame.31=\ si usted cree que existe un error en el int\u00E9rprete de PSTricks.</html>
+LaTeXDrawFrame.32=¡No se ha selecciona ninguna figura\!
+LaTeXDrawFrame.33=¡No se ha encontrado ninguna figura para importar\!
+LaTeXDrawFrame.34=¡ No es posible importar el archivo PSTricks \!
+LaTeXDrawFrame.35=¡ Importaci\u00F3n cancelada \!
+LaTeXDrawFrame.36=¡El c\u00F3digo fue convertido en figuras\!
+InsertPSTricksCodeFrame.0=Insertar figuras basadas en c\u00F3digo PSTricks
+FatalErrorParsingException.0=<br>Si el archivo es v\u00E1lido, puede enviarlo a arno_b at users.sourceforge.net</html>
+Picture.0=% Advertencia : la ruta de la siguiente figura contiene espacios y no podr\u00E1 ser compilada usando TeX \!
+ParserCmdMessage.0=L\u00EDnea  
+ParserCmdMessage.1=Comando:  
+ParserCmdMessage.2=Excepci\u00F3n:  
+ParserMessagesFrame.0=Comando
+ParserMessagesFrame.1=L\u00EDnea
+ParserMessagesFrame.2=Excepci\u00F3n
+ParserMessagesFrame.3=<html><font color=red><b>Se han producido una o m\u00E1s advertencias durante la conversi\u00F3n</b></html>
+ParserMessagesFrame.4=int\u00E9rprete de TeX: advertencia(s)
+ParametersGridFrame.0=Invertir la posici\u00F3n de etiqueta siguiendo X
+ParametersGridFrame.1=Invertir la posici\u00F3n de etiqueta siguiendo Y
+PSTricksParser.0=¡ Error durante la lectura del archivo : archivo inv\u00E1lido \!
+PSTricksParser.1=<html>El uso de pspicture en forma anidada no est\u00E1 aun definida en este programa :<br>
+PSTricksParser.2=begin{pspicture}...begin{pspicture} ... end{pspicture}...</html>
+PSTricksParser.3=¡Error durante la interpretaci\u00F3n del archivo\!
diff --git a/current/lang/es/1_7.properties b/current/lang/es/1_7.properties
new file mode 100644
index 0000000..893b3d6
--- /dev/null
+++ b/current/lang/es/1_7.properties
@@ -0,0 +1,60 @@
+LaTeXDrawException.0=Figura inv\u00E1lida.
+LaTeXDrawFrame.0=Sombreado
+LaTeXDrawFrame.9=Seleccionar color de sombreado
+LaTeXDrawFrame.1=Gradiente 1
+LaTeXDrawFrame.2=Gradiente 2
+LaTeXDrawFrame.4=A\u00F1adir sombreado a la figura.
+LaTeXDrawFrame.5=Elegir color de sombreado.
+LaTeXDrawFrame.6=Posicionar figuras en el dibujo (en frente, detr\u00E1s, ...).
+LaTeXDrawFrame.7=Seleccionar el primer color del gradiente.
+LaTeXDrawFrame.8=Seleccionar el segundo color del gradiente.
+ParametersTextFrame.0=Transparencia
+ParametersTextFrame.1=Lista de cajas
+ParametersTextFrame.2=Opaco
+ParametersTextFrame.3=C\u00EDrculo
+ParametersTextFrame.4=Rect\u00E1ngulo
+ParametersTextFrame.5=Tri\u00E1ngulo
+ParametersTextFrame.6=Rombo
+ParametersTextFrame.7=Elipse
+ParametersTextFrame.8=Caja simple
+ParametersTextFrame.9=Varias cajas
+ParametersGridFrame.0=Par\u00E1metros de cuadr\u00EDcula
+ParametersTextFrame.10=Habilitar caja(s) enmarcada(s)
+ParametersTextFrame.11=A\u00F1adir
+ParametersTextFrame.12=Modificar
+ParametersTextFrame.13=Remover
+ParametersTextFrame.14=Separador:
+ParametersTextFrame.15=Editar caja
+ParametersTextFrame.16=Considerar tama\u00F1o de caja
+ParametersTextFrame.17=Si habilitado, el transfondo del texto estar\u00E1 opacado.
+ParametersTextFrame.18=Caja(s) enmarcada(s)
+ParametersTextFrame.20=Crear uno o varios marcos alrededor del texto.
+ParametersTextFrame.21=La caja ser\u00E1 un rect\u00E1ngulo.
+ParametersTextFrame.22=La caja ser\u00E1 un tri\u00E1ngulo.
+ParametersTextFrame.23=Crear una caja simple alrededor de todo el texto.
+ParametersTextFrame.24=La caja ser\u00E1 una elipse.
+ParametersTextFrame.25=La caja ser\u00E1 un rombo.
+ParametersTextFrame.26=Crear varios marcos alrededor del texto.
+ParametersTextFrame.27=La caja ser\u00E1 un c\u00EDrculo.
+ParametersTextFrame.28=A\u00F1adir una nueva caja.
+ParametersTextFrame.29=Editar la posici\u00F3n de la caja seleccionada.
+ParametersTextFrame.30=Remover la caja seleccionada.
+ParametersTextFrame.31=Cambiar el espaciado entre el texto y la caja.
+ParametersTextFrame.32=Si lo habilita, la caja no se dibujar\u00E1 sobre el texto ni al inicio ni despu\u00E9s del texto enmarcado.
+ParametersTextFrame.33=Abrir el panel de par\u00E1metros de la baja para editarla.
+ParametersTextFrame.34=Texto seleccionado
+ParametersTextFrame.35=Elegir el texto para enmarcar:
+ParametersTextFrame.36=Selecci\u00F3n de Texto
+ParametersTextFrame.37=Caja inv\u00E1lida; se traslapa con otra caja.
+AbstractParametersFrame.0=Dimensiones/Posici\u00F3n
+AbstractParametersFrame.1=Angulo de sombreado
+AbstractParametersFrame.2=Tama\u00F1o de sombreado
+AbstractParametersFrame.3=Angulo del gradiente
+AbstractParametersFrame.4=Punto medio
+AbstractParametersFrame.6=Otros
+AbstractParametersFrame.7=Esquina redondeada:
+AbstractParametersFrame.8=Cuadriculado
+AbstractParametersFrame.9=L\u00EDnea doble
+AbstractParametersFrame.11=Rebastecimiento
+AbstractParametersFrame.12=Gradiente
+BatchConvertFrame.0=En los mismos directorios
diff --git a/current/lang/es/1_8.properties b/current/lang/es/1_8.properties
new file mode 100644
index 0000000..9d412d4
--- /dev/null
+++ b/current/lang/es/1_8.properties
@@ -0,0 +1,57 @@
+UndoRedoManager.0=Transformaci\u00F3n
+AbstractParametersFrame.0=intervalo:
+ParametersAxeFrame.0=Forma:
+ParametersAxeFrame.1=Mostrar origen
+ParametersAxeFrame.2=Ejes
+ParametersAxeFrame.3=Mostrar etiquetas-X
+ParametersAxeFrame.4=Mostrar etiquetas-Y
+ParametersAxeFrame.5=Definir separaci\u00F3n de las etiquetas (cm)
+ParametersAxeFrame.6=Distancia etiquetas-X:
+ParametersAxeFrame.7=Distancia etiquetas-Y:
+ParametersAxeFrame.8=Incremento etiquetas-X:
+ParametersAxeFrame.9=Incremento etiquetas-Y:
+ParametersAxeFrame.10=Origen etiquetas-X:
+ParametersAxeFrame.11=Origen etiquetas-Y:
+ParametersAxeFrame.12=Etiquetas
+ParametersAxeFrame.13=Tama\u00F1o:
+ParametersAxeFrame.14=Estilo:
+ParametersAxeFrame.15=Mostrar divisiones-X
+ParametersAxeFrame.16=Mostrar divisiones-Y
+ParametersAxeFrame.17=Divisiones
+PreferencesFrame.3=Ruta de su editor LaTeX:
+PreferencesFrame.4=Cuadr\u00EDcula est\u00E1ndar
+PreferencesFrame.5=Cuadr\u00EDcula personal
+PreferencesFrame.6=Cuadr\u00EDcula magn\u00E9tica
+PreferencesFrame.7=Intervalo:
+LaTeXDrawFrame.0=Dibujar Ejes
+LaTeXDrawFrame.2=Rotar el objeto(s) seleccionado.
+LaTeXDrawFrame.3=Rotar la(s) figura(s) seleccionadas 90\u00B0.
+LaTeXDrawFrame.4=Rotar la(s) figura(s) seleccionadas 180\u00B0.
+LaTeXDrawFrame.5=Rotar la(s) figura(s) seleccionadas 270\u00B0.
+LaTeXDrawFrame.6=Invertir objeto usando simetr\u00EDa.
+LaTeXDrawFrame.7=Invertir horizontalmente.
+LaTeXDrawFrame.8=Invertir verticalmente.
+LaTeXDrawFrame.10=Mostrar la cuadr\u00EDcula est\u00E1ndar (en cm o en pulg.)
+LaTeXDrawFrame.11=Mostrar una cuadr\u00EDcula cuya separaci\u00F3n entre l\u00EDneas puede ser modificada.
+LaTeXDrawFrame.12=Contiene los par\u00E1metros de la cuadri. (magn\u00E9tica)
+LaTeXDrawFrame.13=magn\u00E9tica
+LaTeXDrawFrame.14=Si habilitado, los objetos se acoplar\u00E1n (magnetizar\u00E1n) a la cuadr\u00EDcula.
+LaTeXDrawFrame.15=Definir la separaci\u00F3n entre l\u00EDneas de la cuadri. personal (en pixeles).
+LaTeXDrawFrame.16=Dibujar cuadr\u00EDculas y ejes.
+LaTeXDrawFrame.17=Dibujar ejes.
+LaTeXDrawFrame.18=Abrir su editor LaTeX.
+LaTeXDrawFrame.19=Ejecutando su editor de LaTeX...
+LaTeXDrawFrame.20=Usted debe definir la ruta de su editor de LaTeX en el panel de preferencias.
+LaTeXDrawFrame.21=El archivo que seleccion\u00F3 es inv\u00E1lido.
+LaTeXDrawFrame.22=Redefinir la ruta en el panel de preferencias.
+LaTeXDrawFrame.23=Cerrar
+LaTeXDrawFrame.25=Librer\u00EDas
+LaTeXDrawFrame.26=Traductores
+LaTeXDrawFrame.27=Nota de lanzamiento
+LaTeXDrawFrame.28=Licencia
+Axe.0=Ninguno
+Axe.1=Eje
+Axe.2=Ventana
+Axe.3=Relleno
+Axe.4=Arriba
+Axe.5=Abajo
diff --git a/current/lang/es/1_9.properties b/current/lang/es/1_9.properties
new file mode 100644
index 0000000..a32c67b
--- /dev/null
+++ b/current/lang/es/1_9.properties
@@ -0,0 +1,70 @@
+LaTeXDrawFrame.0=Archivos recientes
+LaTeXDrawFrame.1=Dibujar una Curva B\u00E9zier Cerrada
+LaTeXDrawFrame.2=Borrar todo
+LaTeXDrawFrame.3=Atajos
+LaTeXDrawFrame.4=Revisar actualizaci\u00F3n
+LaTeXDrawFrame.5=Formas
+LaTeXDrawFrame.6=Visualizar todas las figuras
+LaTeXDrawFrame.7=<html>Si una figura tiene sus coordenas debajo de (0,0), Ud. no podr\u00E1 visualizarla.<br> Este bot\u00F3n permite trasladar todas las figuras para que sean visibles.</html>
+LaTeXDrawFrame.8=Definir las propiedades de las gu\u00EDas
+LaTeXDrawFrame.9=Opacidad de las gu\u00EDas
+LaTeXDrawFrame.10=Definir la transparencia de las gu\u00EDas.
+LaTeXDrawFrame.11=Dibujar una curva B\u00E9zier cerrada
+LaTeXDrawFrame.12=<html>Verifique que la versi\u00F3n de Java Runtime Environment que us\u00F3<br>para crear este archivo es la misma que el JRE que usa actualmente.</html>
+LaTeXDrawFrame.13=El f\u00F3lder de Ayuda no puede ser cargado.
+LaTeXDrawFrame.14=No se puede crear la p\u00E1gina de Ayuda.
+PSTricksParser.0=begin{center} debe estar fuera de begin{pspicture}...end{pspicture}
+PSTricksParser.1=end{center} debe estar fuera de begin{pspicture}...end{pspicture}
+PSTricksParser.2=end{figure} debe estar fuera de begin{pspicture}...end{pspicture}
+PSTricksParser.3=end{pspicture} o pspicture no encontrado.
+DrawPanel.0=Actualizar figuras en la cuadr\u00EDcula
+ParametersAkinPointsFrame.0=Intervalo para puntos:
+ParametersAkinPointsFrame.1=Abrir
+ParametersAkinPointsFrame.2=tipo:
+ParametersAkinPointsFrame.3=Par\u00E1metros de trazo libre
+ParametersBezierCurveFrame.2=Equilibrar
+ParametersBezierCurveFrame.3=Equilibrar los Puntos de Control con respecto a la posici\u00F3n de los puntos.
+ParametersBezierCurveFrame.4=Distancia:
+ParametersBezierCurveFrame.5=Definir el espacio entre el punto de control y el punto de equilibrio de la curva
+ParametersBezierCurveFrame.6=X 1er Pt Ctrl
+ParametersBezierCurveFrame.7=Y 1er Pt Ctrl
+ParametersBezierCurveFrame.8=X 2do Pt Ctrl
+ParametersBezierCurveFrame.9=Y 2do Pt Ctrl
+PreferencesFrame.0=N\u00FAmer de archivos recientes:
+PreferencesFrame.1=Tema (necesita reiniciar):
+ShortcutsFrame.1=Secuencia
+ShortcutsFrame.3=Categor\u00EDa
+ShortcutsFrame.4=Navegaci\u00F3n
+ShortcutsFrame.5=Transformaci\u00F3n
+ShortcutsFrame.6=Dibujo
+ShortcutsFrame.7=\ (gran traslado)
+ShortcutsFrame.8=clic izq.
+ShortcutsFrame.9=Mover Barra de Desplaz. horizontal a la der.
+ShortcutsFrame.10=Mover Barra de Desplaz. horizontal a la izq.
+ShortcutsFrame.11=Mover Barra de Desplaz. vertical a la cabecera
+ShortcutsFrame.12=Mover Barra de Desplaz. vertical al pie de p\u00E1g.
+ShortcutsFrame.14=Ir al final de Barra de Desplaz. horizontal
+ShortcutsFrame.15=Ir al comienzo de Barra de Desplaz. horizontal
+ShortcutsFrame.16=Ir a la parte superior de Barra de Desplaz. vertical
+ShortcutsFrame.17=Ir a la parte inferior de Barra de Desplaz. vertical
+ShortcutsFrame.18=Mover las figuras seleccionadas a la derecha
+ShortcutsFrame.19=Mover las figuras seleccionadas a la izquierda
+ShortcutsFrame.20=Mover las figuras seleccionadas hacia arriba
+ShortcutsFrame.21=Mover las figuras seleccionadas hacia abajo
+ShortcutsFrame.23=Actualizar las figuras seleecionadas en cuadr\u00EDcula actual
+ShortcutsFrame.25=Seleccionar todas las figuras del dibujo
+ShortcutsFrame.26=A\u00F1adir la figura cliqueada a la selecci\u00F3n
+ShortcutsFrame.27=Eliminar la figura marcada de la selecci\u00F3n
+ShortcutsFrame.28=Seleccionar la pr\u00F3x. o la primera figura (disponible en Modo Selecci\u00F3n)
+ShortcutsFrame.29=Rueda del rat\u00F3n (mouse)
+ShortcutsFrame.30=Agrandar/Empeque\u00F1ecer
+MenusListener.0=Presionar el bot\u00F3n izq. y deslizar el rat\u00F3n para colocar el segundo punto. Soltar el bot\u00F3n para finalizar la creaci\u00F3n.
+MenusListener.1=Un clic izq. para a\u00F1adir un punto, un clic der. o doble clic izq. para colocar el \u00FAltimo punto y finalizar la creaci\u00F3n.
+MenusListener.4=Presionar el bot\u00F3n izq. y deslizar el rat\u00F3n para colocar el \u00FAltimo punto. Soltar el bot\u00F3n para finalizar la creaci\u00F3n.
+MenusListener.5=Un clic izquierdo a\u00F1ade texto.
+MenusListener.6=Un clic izquierdo a\u00F1ade una cuadr\u00EDcula.
+MenusListener.7=Un clic izquierdo a\u00F1ade ejes.
+MenusListener.8=Presionar el bot\u00F3n izq. y deslizar el rat\u00F3n para dibujar la figura. Soltar el bot\u00F3n para finalizar la creaci\u00F3n.
+MenusListener.9=Un clic izquierdo a\u00F1ade un punto.
+RecentFilesListener.0=Es imposible accesar este archivo.
+RecentFilesListener.1=Archivo no puede ser abierto
diff --git a/current/lang/es/LaTeXDrawFrame.properties b/current/lang/es/LaTeXDrawFrame.properties
new file mode 100644
index 0000000..66a25c7
--- /dev/null
+++ b/current/lang/es/LaTeXDrawFrame.properties
@@ -0,0 +1,207 @@
+LaTeXDrawFrame.0=\ ayuda
+LaTeXDrawFrame.1=Acerca de 
+LaTeXDrawFrame.2=Dibujar l\u00EDnea recta
+LaTeXDrawFrame.3=Dibujar rect\u00E1ngulo
+LaTeXDrawFrame.4=Dibujar punto
+LaTeXDrawFrame.5=Dibujar cuadrado
+LaTeXDrawFrame.6=Dibujar rombo
+LaTeXDrawFrame.7=Trazo libre
+LaTeXDrawFrame.8=Dibujar tri\u00E1ngulo
+LaTeXDrawFrame.9=Dibujar c\u00EDrculo
+LaTeXDrawFrame.10=Dibujar cuadr\u00EDcula
+LaTeXDrawFrame.11=Dibujar una elipse
+LaTeXDrawFrame.12=Dibujar un pol\u00EDgono
+LaTeXDrawFrame.13=Seleccionar objeto(s)
+LaTeXDrawFrame.14=Exhibir bordes
+LaTeXDrawFrame.15=Ajuste autom\u00E1tico de bordes
+LaTeXDrawFrame.16=Exportar como ...
+LaTeXDrawFrame.17=Borrar Objeto
+LaTeXDrawFrame.18=Cerrar
+LaTeXDrawFrame.19=C\u00F3digo PSTricks
+LaTeXDrawFrame.20=figura JPEG
+LaTeXDrawFrame.21=figura EPS
+LaTeXDrawFrame.22=Rehacer
+LaTeXDrawFrame.23=Deshacer
+LaTeXDrawFrame.25=Guardar proyecto
+LaTeXDrawFrame.26=Guardar como proyecto
+LaTeXDrawFrame.27=Abrir proyecto
+LaTeXDrawFrame.28=Nuevo proyecto
+LaTeXDrawFrame.29=Imprimir c\u00F3digo
+LaTeXDrawFrame.30=Imprimir dibujo
+LaTeXDrawFrame.31=Detras de la figura
+LaTeXDrawFrame.32=Delante de la figura
+LaTeXDrawFrame.33=Agrupar
+LaTeXDrawFrame.34=Desagrupar
+LaTeXDrawFrame.35=Dibujar arco
+LaTeXDrawFrame.36=Dibujar \u00E1ngulo
+LaTeXDrawFrame.37=Dibujar cuerda
+LaTeXDrawFrame.38=Escala-X
+LaTeXDrawFrame.39=Escala-Y
+LaTeXDrawFrame.40=Copiar
+LaTeXDrawFrame.41=Actualizar plantillas
+LaTeXDrawFrame.42=Exportar como plantilla
+LaTeXDrawFrame.43=Pegar
+LaTeXDrawFrame.44=Cortar
+LaTeXDrawFrame.45=Cuadr\u00EDcula est\u00E1ndar
+LaTeXDrawFrame.46=Panel de c\u00F3digo
+LaTeXDrawFrame.47=Bordes
+LaTeXDrawFrame.48=Interior
+LaTeXDrawFrame.51=llenado
+LaTeXDrawFrame.53=Propiedades de la figura
+LaTeXDrawFrame.55=A\u00F1adir comentarios
+LaTeXDrawFrame.56=Preferencias
+LaTeXDrawFrame.57=Acercar
+LaTeXDrawFrame.58=Alejar
+LaTeXDrawFrame.60=A\u00F1adir texto
+LaTeXDrawFrame.61=Primer plano
+LaTeXDrawFrame.62=Fondo
+LaTeXDrawFrame.63=Dibujar Curva B\u00E9zier
+LaTeXDrawFrame.64=Rotar la figura
+LaTeXDrawFrame.65=Cambiar ancho del objeto
+LaTeXDrawFrame.66=Cambiar color de los bordes del objeto
+LaTeXDrawFrame.67=Si el objeto est\u00E1 seleccionado ser\u00E1 rellenado
+LaTeXDrawFrame.68=Cambiar color interior del objeto
+LaTeXDrawFrame.69=Cambiar el color del cuadriculado
+LaTeXDrawFrame.70=Poner objeto en primer plano
+LaTeXDrawFrame.71=Poner objeto al fondo
+LaTeXDrawFrame.72=Elegir objeto que estar\u00E1 detr\u00E1s del objeto seleccionado
+LaTeXDrawFrame.73=Elegir objeto que estar\u00E1 sobre el objeto seleccionado
+LaTeXDrawFrame.74=Si se activa, podr\u00E1 rotar el objeto con el rat\u00F3n
+LaTeXDrawFrame.75=Agrupar varios objetos
+LaTeXDrawFrame.76=Separar varios objetos
+LaTeXDrawFrame.77=Definir la posici\u00F3n de los bordes del objeto
+LaTeXDrawFrame.78=Si se selecciona, el objeto tendr\u00E1 borde doble
+LaTeXDrawFrame.79=Cambiar el color del espacio entre las l\u00EDneas del doble borde
+LaTeXDrawFrame.80=\ Ancho
+LaTeXDrawFrame.82=<html>Ha ocurrido un error al iniciar LaTeXDraw:<br>
+LaTeXDrawFrame.83=LaTeXDraw no puede comenzar
+LaTeXDrawFrame.86=Error en LaTeXDraw
+LaTeXDrawFrame.88=Archivo
+LaTeXDrawFrame.89=Editar
+LaTeXDrawFrame.90=Mostrar
+LaTeXDrawFrame.91=Dibujar
+LaTeXDrawFrame.92=C\u00F3digo
+LaTeXDrawFrame.93=Ayuda
+LaTeXDrawFrame.94=Acercar el dibujo
+LaTeXDrawFrame.95=Alejar el dibujo
+LaTeXDrawFrame.96=Escala 100%
+LaTeXDrawFrame.103=Plantillas
+LaTeXDrawFrame.105=No es posible crear el men\u00FA de plantillas\!
+LaTeXDrawFrame.107=Barra de herramientas
+LaTeXDrawFrame.108=Crear un nuevo proyecto
+LaTeXDrawFrame.109=Abrir un proyecto
+LaTeXDrawFrame.110=Guardar el proyecto
+LaTeXDrawFrame.113=100%
+LaTeXDrawFrame.114=Deshacer una acci\u00F3n
+LaTeXDrawFrame.115=Rehacer una acci\u00F3n
+LaTeXDrawFrame.116=Dibujar una l\u00EDnea recta
+LaTeXDrawFrame.117=Dibujar un punto
+LaTeXDrawFrame.118=Dibujar una figura rectangular
+LaTeXDrawFrame.119=Dibujar un rect\u00E1ngulo
+LaTeXDrawFrame.120=Dibujar un cuadrado
+LaTeXDrawFrame.121=Dibujar un pol\u00EDgono
+LaTeXDrawFrame.123=Dibujar un rombo
+LaTeXDrawFrame.124=Dibujar un tri\u00E1ngulo
+LaTeXDrawFrame.125=Dibujar una elipse
+LaTeXDrawFrame.127=Dibujar un c\u00EDrculo
+LaTeXDrawFrame.128=Dibujar un arco
+LaTeXDrawFrame.130=Dibujar un \u00E1ngulo
+LaTeXDrawFrame.131=Dibujar una cuerda
+LaTeXDrawFrame.132=Dibujar una curva B\u00E9zier
+LaTeXDrawFrame.133=Dibujar una cuadr\u00EDcula
+LaTeXDrawFrame.136=<html>Seleccione una o varias figuras<br>
+LaTeXDrawFrame.138=Objetos,  <br> seleccione los objetos deseados </html>
+LaTeXDrawFrame.139=Eliminar los objetos seleccionados
+LaTeXDrawFrame.140=Cambiar las propiedades del objeto
+LaTeXDrawFrame.141=<html>Mostrar bordes del dibujo<br>
+LaTeXDrawFrame.142=<font color = red>Consejo <font color=black>: si muestra los bordes del<br>
+LaTeXDrawFrame.143=dibujo, desactive ajuste autom\u00E1tico de bordes para ser capaz de<br>
+LaTeXDrawFrame.144=cambiar las dimensiones del dibujo</html>
+LaTeXDrawFrame.146=Copiado ...
+LaTeXDrawFrame.147=Pegado ...
+LaTeXDrawFrame.148=Cortado ...
+LaTeXDrawFrame.149=Borrado ...
+LaTeXDrawFrame.151=Seleccione el color del borde doble
+LaTeXDrawFrame.154=Agrupado ...
+LaTeXDrawFrame.155=Desagrupado ...
+LaTeXDrawFrame.156=¿ Desea guardar el proyecto ?
+LaTeXDrawFrame.158=Rehacer ...
+LaTeXDrawFrame.159=Deshacer ...
+LaTeXDrawFrame.160=Plantillas actualizadas ...
+LaTeXDrawFrame.161=Error en archivo
+LaTeXDrawFrame.162=Imprimiendo el dibujo ...
+LaTeXDrawFrame.163=¡ Dibujo impreso \!
+LaTeXDrawFrame.164=¡ No es posible imprimir el dibujo \!
+LaTeXDrawFrame.165=Imprimiendo c\u00F3digo ...
+LaTeXDrawFrame.166=¡ C\u00F3digo impreso \!
+LaTeXDrawFrame.167=¡ No es posible imprimir el c\u00F3digo \!
+LaTeXDrawFrame.168=Exportando como plantilla ...
+LaTeXDrawFrame.169=¡ Plantilla exportada \!
+LaTeXDrawFrame.170=Exportando el c\u00F3digo PSTricks ...
+LaTeXDrawFrame.171=Seleccionar
+LaTeXDrawFrame.172=Exportar el c\u00F3digo PSTricks como archivo TeX
+LaTeXDrawFrame.173=¿ Desea reemplazar el archivo ?
+LaTeXDrawFrame.174=Exportar como PSTricks
+LaTeXDrawFrame.175=¡ C\u00F3digo PStricks exportado \!
+LaTeXDrawFrame.176=¡ No es posible exportar el c\u00F3digo PSTricks \!
+LaTeXDrawFrame.177=Exportando como figura ...
+LaTeXDrawFrame.179=Exportar figuras como
+LaTeXDrawFrame.182=Exportar como
+LaTeXDrawFrame.183=\ archivo
+LaTeXDrawFrame.184=¡ Exportado como figura \!
+LaTeXDrawFrame.185=¡ No es posible exportar como figura \!
+LaTeXDrawFrame.186=Guardando el proyecto...
+LaTeXDrawFrame.188=Guardar el dibujo
+LaTeXDrawFrame.190=Exportar como archivo JPEG
+LaTeXDrawFrame.191=¡ Proyecto guardado \!
+LaTeXDrawFrame.192=¡ No es posible guardar el proyecto \!
+LaTeXDrawFrame.193=<html>Ha ocurrido un error al guardar el archivo:<br>
+LaTeXDrawFrame.197=Craci\u00F3n de un nuevo proyecto...
+LaTeXDrawFrame.198=¡ Nuevo proyecto creado \!
+LaTeXDrawFrame.200=Abrir un dibujo
+LaTeXDrawFrame.201=Abriendo un archivo...
+LaTeXDrawFrame.202=¡ Archivo abierto \!
+LaTeXDrawFrame.203=¡ No es posible abrir el archivo \!
+LaTeXDrawFrame.204=<html>Ha ocurrido un arror al abrir el archivo:<br>
+LaTeXDrawFrame.208=</span><br>Versi\u00F3n
+LaTeXDrawFrame.209=\ emitida \!</html>
+LaTeXDrawFrame.210=Nueva Versi\u00F3n
+LaTeXDrawFrame.211=¡ Nueva versi\u00F3n disponible \!
+LaTeXDrawFrame.212=No hay nueva versi\u00F3n
+LaTeXDrawFrame.213=¡ Es imposible comprobar si hay nuevas versiones \!
+LaTeXDrawFrame.215=Ayuda de LaTeXDraw
+LaTeXDrawFrame.218=¡ Un generador de c\u00F3digo PSTricks para LaTeX \!
+LaTeXDrawFrame.219=Versi\u00F3n
+LaTeXDrawFrame.220=, compilado
+LaTeXDrawFrame.221=\ est\u00E1 distribuido bajo los t\u00E9rminos de la Licencia P\u00FAblica General GNU
+LaTeXDrawFrame.222=\ publicado por Free Software Foundation (version 2)
+LaTeXDrawFrame.229=Importar ...
+LaTeXDrawFrame.230=Desde archivo TeX
+LFrame2.0=Definir el tama\u00F1o de un punto.
+LFrame2.1=Alinear los objetos seleccionados.
+LFrame2.10=Distribuir de forma vertical, equidistante, los objetos selecionados.
+LFrame2.11=Distribuir de forma vertical, con centros equidistantes, los objetos selecionados.
+LFrame2.12=Distribuir de forma vertical, con l\u00EDmites superiores equidistantes, los objetos selecionados.
+LFrame2.13=Distribuir de forma horizontal, con los lados izquierdos equidistantes, los objetos selecionados.
+LFrame2.14=Distribuir de forma horizontal, equidistantes, los objetos selecionados.
+LFrame2.15=Distribuir de forma horizontal, con los centros equidistantes, los objetos selecionados.
+LFrame2.16=Distribuir de forma horizontal, con los lados derechos equidistantes, los objetos selecionados.
+LFrame2.17=Colores
+LFrame2.18=Imposible abrir el archivo.
+LFrame2.19=No se encuentra la plantilla.
+LFrame2.2=Alinear los objetos seleccionados a la izquierda.
+LFrame2.20=Actualize el menu de plantillas por favor
+LFrame2.21=Plantilla no encontrada
+LFrame2.22=No se puede imprimir el documento.
+LFrame2.23=No se encuentra la impresora.
+LFrame2.25=Se utiliza la librer\u00ED a jlibeps para crear figuras EPS.
+LFrame2.3=Alinear los objetos seleccionados a la derecha.
+LFrame2.4=Alinear los objetos seleccionados a la parte superior.
+LFrame2.5=Alinear los objetos seleccionados a la parte inferior.
+LFrame2.6=Alinear los objetos seleccionados horizontalmente por su centro.
+LFrame2.7=Alinear los objetos seleccionados verticalmente por su centro.
+LFrame2.8=Distribuir de forma equidistante los objetos seleccionados.
+LFrame2.9=Distribuir de forma vertical, con la parte inferior equidistante, los objetos seleccionados.
+LFrame2.26=Nuevo proyecto con la selecci\u00F3n
+LaTeXDrawFrame.49=Hatchings
+LaTeXDrawFrame.137=<font color=red>Piece of advice <font color=black>: to select several
diff --git a/current/lang/es/dialogFrames.properties b/current/lang/es/dialogFrames.properties
new file mode 100644
index 0000000..0298b1c
--- /dev/null
+++ b/current/lang/es/dialogFrames.properties
@@ -0,0 +1,116 @@
+PreferencesFrame.Pref=Preferencias ...
+PreferencesFrame.grid=Cuadr\u00EDcula
+PreferencesFrame.codePanel=Panel de c\u00F3digo
+PreferencesFrame.antiAl=Anti-alias
+PreferencesFrame.rendQ=Calidad de dibujo
+PreferencesFrame.colRendQ=Calidad de color en dibujo
+PreferencesFrame.AlphaQ=Calidad de interpolaci\u00F3n alfa
+PreferencesFrame.bordersDraw=Bordes del dibujo
+PreferencesFrame.codeAuto=Actualizaci\u00F3n de c\u00F3digo autom\u00E1tica (lento)
+PreferencesFrame.newVers=Verificar nueva versi\u00F3n al abrir el programa
+PreferencesFrame.lge=Lenguaje (necesita reiniciar el programa)
+PreferencesFrame.general=General
+PreferencesFrame.folders=Directorios
+PreferencesFrame.quality=Calidad
+PreferencesFrame.selectFolder=Seleccionar un directorio
+PreferencesFrame.defOpenSave=Directorio por defecto para abrir/guardar acciones:
+PreferencesFrame.defFold=Directorio por defecto para importar/exportar acciones:
+PreferencesFrame.errorReadPref=Error de lectura del archivo de preferencias\!
+PreferencesFrame.prefSaved=Preferencias guardadas \!
+DrawPropertiesFrame.0=La etiqueta del dibujo
+DrawPropertiesFrame.1=La leyenda del dibujo
+DrawPropertiesFrame.2=Propiedades del dibujo
+DrawPropertiesFrame.3=Por
+DrawPropertiesFrame.5=En una p\u00E1gina con objetos en cualquier posici\u00F3n
+DrawPropertiesFrame.6=En la parte superior de la p\u00E1gina
+DrawPropertiesFrame.7=En la parte inferior de la p\u00E1gina
+DrawPropertiesFrame.8=Aqu\u00ED
+DrawPropertiesFrame.9=AQUI \!
+DrawPropertiesFrame.10=En el centro de la p\u00E1gina
+DrawPropertiesFrame.11=Posici\u00F3n vertical del dibujo
+DrawPropertiesFrame.12=Posici\u00F3n horizontal del dibujo
+DrawPropertiesFrame.13=Cambiar el n\u00FAmero de pixels por unidad de longitud
+ExceptionFrameDialog.0=Enviar reporte
+ExceptionFrameDialog.1=<html><b>¡ Ha ocurrido un error \!</b><br><b><font color=red>
+ExceptionFrameDialog.2=<font color=black></b><br>Usted puede enviar el reporte al programador de LaTeXDraw
+ExceptionFrameDialog.3=Error de LaTeXDraw: ha ocurrido una excepci\u00F3n
+ExceptionFrameDialog.4=<html>Ha ocurrido un error: <br>
+ExceptionFrameDialog.5=Habilitar para crear ExceptionFrameDialog
+AbstractParametersFrame.0=L\u00EDmite de borde doble
+AbstractParametersFrame.2=Separador:
+AbstractParametersFrame.3=Par\u00E1metros generales
+AbstractParametersFrame.4=Ok
+AbstractParametersFrame.5=Defecto
+AbstractParametersFrame.6=Cancelar
+AbstractParametersFrame.7=Angulo de rotaci\u00F3n:
+AbstractParametersFrame.8=Espesura:
+AbstractParametersFrame.10=Tipo de l\u00EDnea:
+AbstractParametersFrame.11=Anchura del sombreado:
+AbstractParametersFrame.12=Extremo izquierdo:
+AbstractParametersFrame.13=Extremo derecho:
+AbstractParametersFrame.14=Par\u00E1metros de las flechas
+AbstractParametersFrame.15=Mostrar puntos ctrl
+AbstractParametersFrame.16=Redondeado
+AbstractParametersFrame.17=Coord. de centrado eje-X:
+AbstractParametersFrame.18=Coord. de centrado eje-Y:
+AbstractParametersFrame.19=Radio :
+AbstractParametersFrame.20=Di\u00E1metro del punto =
+AbstractParametersFrame.21=Anchura de la barra =
+AbstractParametersFrame.22=Longitud del par\u00E9ntesis =
+AbstractParametersFrame.23=Longitud del par\u00E9ntesis redondeado
+AbstractParametersFrame.24=por ancho +
+AbstractParametersFrame.25=por ancho +
+AbstractParametersFrame.26=Long. punta de flecha
+AbstractParametersFrame.27=Long. interior punta de flecha
+AbstractParametersFrame.28=Ancho punta de flecha
+AbstractParametersFrame.29=Coordenada-X:
+AbstractParametersFrame.30=Coordenada-Y:
+AbstractParametersFrame.31=Ancho:
+AbstractParametersFrame.32=Altura:
+AbstractParametersFrame.33=Par\u00E1metros de
+AbstractParametersFrame.34=Seleccionar color de las sombras
+AbstractParametersFrame.35=Elegir color de frontera doble
+AbstractParametersFrame.36=Elegir color de los b\u00F3rderes
+AbstractParametersFrame.37=Elegir color interior
+AbstractParametersFrame.38=Flechas
+ParametersArcFrame.0=\u00E1ngulo inicial:
+ParametersArcFrame.1=\u00E1ngulo final:
+ParametersArcFrame.2=Tipo de arco:
+ParametersDotFrame.0=Tipo de punto:
+ParametersDrawFrame.0=Noroeste X
+ParametersDrawFrame.1=Noroeste Y
+ParametersDrawFrame.2=Sudeste X
+ParametersDrawFrame.3=Sudeste Y
+ParametersGridFrame.0=Origen en Y:
+ParametersGridFrame.1=Origen en X:
+ParametersGridFrame.2=Etiquetas:
+ParametersGridFrame.3=Unidad:
+ParametersGridFrame.4=Puntos de subcuadr\u00EDcula:
+ParametersGridFrame.5=Puntos de cuadr\u00EDcula:
+ParametersGridFrame.6=Ancho de cuadr\u00EDcula:
+ParametersGridFrame.7=Ancho de subcuadr\u00EDcula:
+ParametersGridFrame.8=Subdivisi\u00F3n de rejilla
+ParametersGridFrame.9=Tama\u00F1o de etiqueta:
+ParametersLineFrame.0=Coordenada en X izquierda:
+ParametersLineFrame.1=Coordenada en Y izquierda:
+ParametersLineFrame.2=Coordenada en X derecha:
+ParametersLineFrame.3=Coordenada en Y derecha:
+ParametersTextFrame.0=Negrita
+ParametersTextFrame.1=It\u00E1lica
+ParametersTextFrame.2=Fuente:
+ParametersTextFrame.3=Tama\u00F1o:
+ParametersTextFrame.4=Texto
+ParametersGridFrame.10=Subcuadr\u00EDcula:
+ParametersGridFrame.11=X max:
+ParametersGridFrame.12=X min:
+ParametersGridFrame.13=Y max:
+ParametersGridFrame.14=Y min:
+ParametersGridFrame.15=Dibujar etiquetas
+ParametersGridFrame.17=Elegir color de etiquetas
+ParametersGridFrame.18=Elegir color de subcuadr\u00EDcula
+ParametersPolygonFrame.1=Punto n\u00B0
+ParametersTriangleFrame.0=Centro de base coord-X:
+ParametersTriangleFrame.1=Centro de base coord-Y:
+ParamsBC.0=Mover todo
+ParamsBC.1=Si no est\u00E1 seleccionado, cuando mueva un punto sus puntos de control tambi\u00E9n se mover\u00E1n.
+ExportDialog.0=Compresi\u00F3n
diff --git a/current/lang/es/others.properties b/current/lang/es/others.properties
new file mode 100644
index 0000000..283e6ad
--- /dev/null
+++ b/current/lang/es/others.properties
@@ -0,0 +1,44 @@
+XScale.cm=cm
+XScale.inch=pulgadas
+LaTeXDrawException.valueInc=Valor incorrecto
+LaTeXDrawException.invFile=¡Este archivo no es un archivo LaTeXDraw\!
+LaTeXDrawException.invLaTeXDrawVer=¡Esta versi\u00F3n de LaTeXDraw no est\u00E1 administrada\!
+LaTeXDrawException.invException=LaTeXDrawException : error de c\u00F3digo desconocido
+Arc.arc=Arco
+Arc.wedge=Angulo
+Arc.chord=Cuerda
+Arc.arcType=Tipo de arco
+Figure.boundPos=Posici\u00F3n de Frontera
+DrawContainer.nameTemplate=Escriba el nombre de la plantilla
+DrawContainer.overwriteTemplate=Esta plantilla ya existe, ¿desea reemplazarla?
+CloseButton.closePanel=Cerrar el panel
+UndoRedoManager.changeParams=Cambiar par\u00E1metros
+UndoRedoManager.changeDispo=Cambiar disposici\u00F3n
+UndoRedoManager.move=Mover
+UndoRedoManager.delete=Borrar
+UndoRedoManager.create=Crear
+UndoRedoManager.join=Agrupar
+UndoRedoManager.seperate=Desagrupar
+UndoRedoManager.filled=Cambiar estilo interior
+UndoRedoManager.intCol=Cambiar color interior
+UndoRedoManager.bordCol=Cambiar color de bordes
+UndoRedoManager.thick=Cambiar ancho
+UndoRedoManager.style=Cambiar estilo
+UndoRedoManager.lArrow=Cambiar estilo de extremo izq.
+UndoRedoManager.rArrow=Cambiar estilo de extremo der.
+UndoRedoManager.dotStyle=Cambiar estilo de punto
+UndoRedoManager.noRedo=Rehacer no posible
+UndoRedoManager.noUndo=Deshacer no posible
+UndoRedoManager.align=alineaci\u00F3n
+UndoRedoManager.distrib=distribuci\u00F3n
+CodePanel.reload=Recargar
+CodePanel.autoUpdate=Actualizaci\u00F3n auto.
+CodePanel.copySel=Copiar el texto seleccionado
+CodePanel.copyAll=Copiar todo el c\u00F3digo
+CodePanel.tip=<html><center>Si lo selecciona, el c\u00F3digo se actualiza en tiempo real.<br><font color = red>Consejo<font color = black>: desactive la actualizaci\u00F3n autom\u00E1tica o no muestre el panel de c\u00F3digo cuando el dibujo sea complejo o<br> cuando est\u00E9 moviendo una figura grande.</center></html>
+CodePanel.updateCode=Actualizar el c\u00F3digo
+CodePanel.addComment=A\u00F1adir comentarios al c\u00F3digo
+CodePanel.reloadText=c\u00F3digo PSTricks recargado \!
+CodePanel.copiedText=c\u00F3digo PSTricks copiado en memoria \!
+CodePanel.copiedSelText=Selecci\u00F3n copiada en memoria \!
+SVGManager.0=Imposible generar las formas desde el documento SVG.
diff --git a/current/lang/fr/1_6.properties b/current/lang/fr/1_6.properties
new file mode 100644
index 0000000..0da0d45
--- /dev/null
+++ b/current/lang/fr/1_6.properties
@@ -0,0 +1,58 @@
+BatchConvertFrame.1=Sous dossier
+BatchConvertFrame.2=Fichiers
+BatchConvertFrame.4=Tt Supp.
+BatchConvertFrame.5=Ecraser
+BatchConvertFrame.6=Choisir emplacement
+BatchConvertFrame.7=S\u00E9lectionner format
+BatchConvertFrame.8=Convertir
+BatchConvertFrame.9=Arr\u00EAter
+BatchConvertFrame.11=Liste de convertion
+BatchConvertFrame.12=Choisir r\u00E9pertoire
+BatchConvertFrame.13=S\u00E9lectionner images
+BatchConvertFrame.14=Convertir en :
+LaTeXDrawFrame.0=Ins\u00E9rer du code PSTricks
+LaTeXDrawFrame.1=Ins\u00E9rer une figure
+LaTeXDrawFrame.2=Convertir images
+LaTeXDrawFrame.3=Arr\u00EAter
+LaTeXDrawFrame.4=Tracer lignes jointes
+LaTeXDrawFrame.5=Image PPM
+LaTeXDrawFrame.6=Image BMP
+LaTeXDrawFrame.7=Image PNG
+LaTeXDrawFrame.9=Arr\u00EAter l'analyse syntaxique \!
+LaTeXDrawFrame.10=Ins\u00E9rer
+LaTeXDrawFrame.11=Ins\u00E9rer plusieurs figures \u00E0 partir de code PSTricks
+LaTeXDrawFrame.14=Tracer plusieurs lignes jointes
+LaTeXDrawFrame.15=Importation d'un fichier PSTricks...
+LaTeXDrawFrame.16=L'analyseur PSTricks ne g\u00E8re que peu de fonctions.<br>Il est conseill\u00E9 d'importer seulement les fonctions g\u00E9r\u00E9es par LaTeXDraw.<html>
+LaTeXDrawFrame.17=Importer du code PSTricks
+LaTeXDrawFrame.18=Ce logiciel utilise JIU, the Java Imaging Utilities. Distribu\u00E9 sous  
+LaTeXDrawFrame.19=les termes de la licence publique g\u00E9n\u00E9rale GNU. http://schmidt.devlib.org/jiu/
+LaTeXDrawFrame.23=<html><b><font color=red>Attention :</b> <br><font color=black><ul><li>PSTricks ne peut inclure des fichiers jpeg, bmp, ... ; donc un fichier EPS sera cr\u00E9\u00E9 \u00E0 partir de l'image choisie<br>dans le m\u00EAme r\u00E9pertoire. Donc l'image sera incluse seulement si vous avez les droits d'\u00E9criture dans le r\u00E9pertoire.<li>TeX ne g\u00E9re pas les espaces dans les noms, donc d\u00E9brouillez-vous pour ne pas en avoir.</ul></html>
+LaTeXDrawFrame.25=Chargement de l'image ...
+LaTeXDrawFrame.26=L'image est invalide \!
+LaTeXDrawFrame.27=Impossible de charger l'image \!
+LaTeXDrawFrame.28=Image ins\u00E9r\u00E9e \!
+LaTeXDrawFrame.30=<html>Il n'y a pas de figure \u00E0 importer \!<br>Dans le cas contraire, v\u00E9rifiez la pr\u00E9sence des balises begin{psicture} ...end{pspicture}.<br>Vous pouvez envoyer le fichier au  
+LaTeXDrawFrame.31=\ si vous pensez qu'il s'agit d'une erreur de l'analyseur PSTricks.</html>
+LaTeXDrawFrame.32=Pas de figure trouv\u00E9e \!
+LaTeXDrawFrame.33=Pas de figure trouv\u00E9e \u00E0 importer \!
+LaTeXDrawFrame.34=Impossible d'importer le fichier PSTricks \!
+LaTeXDrawFrame.35=Importation annul\u00E9e \!
+LaTeXDrawFrame.36=Le code est converti en figures \!
+InsertPSTricksCodeFrame.0=Ins\u00E9rer des figures \u00E0 partir de code PSTricks
+FatalErrorParsingException.0=<br>Si le fichier est correct, vous pouvez l'envoyer \u00E0 arno_b at users.sourceforge.net</html>
+Picture.0=% Attention : le chemin de la figure contient des espaces et ne pourra pas \u00EAtre compil\u00E9 par TeX \!
+ParserCmdMessage.0=Ligne  
+ParserCmdMessage.1=Commande :  
+ParserCmdMessage.2=Exception :  
+ParserMessagesFrame.0=Commande
+ParserMessagesFrame.1=Ligne
+ParserMessagesFrame.2=Exception
+ParserMessagesFrame.3=<html><font color=red><b>Une ou plusieurs erreurs sont apparues lors de l'importation</b></html>
+ParserMessagesFrame.4=Analyseur PSTricks : avertissement(s)
+ParametersGridFrame.0=Inverser position \u00E9tq suivant X
+ParametersGridFrame.1=Inverser position \u00E9tq suivant Y
+PSTricksParser.0=Erreur durant l'ouverture du fichier : fichier invalide \!
+PSTricksParser.1=<html>La d\u00E9finition incr\u00E9mentale de figure pspicture n'est pas g\u00E9r\u00E9e :<br>
+PSTricksParser.2=begin{pspciture}...begin{pspciture} ... end{picture}...</html>
+PSTricksParser.3=Erreur durant l'analyse du fichier \!
diff --git a/current/lang/fr/1_7.properties b/current/lang/fr/1_7.properties
new file mode 100644
index 0000000..3959445
--- /dev/null
+++ b/current/lang/fr/1_7.properties
@@ -0,0 +1,60 @@
+LaTeXDrawException.0=Image invalide.
+LaTeXDrawFrame.0=Ombre
+LaTeXDrawFrame.9=S\u00E9lectionner couleur ombre
+LaTeXDrawFrame.1=D\u00E9grad\u00E9 1
+LaTeXDrawFrame.2=D\u00E9grad\u00E9 2
+LaTeXDrawFrame.4=Ajouter une ombre \u00E0 la figure.
+LaTeXDrawFrame.5=Choisir la couleur de l'ombre.
+LaTeXDrawFrame.6=Positionner des figures dans le dessin (devant, derri\u00E8re, ...).
+LaTeXDrawFrame.7=Choisir la premi\u00E8re couleur du d\u00E9grad\u00E9.
+LaTeXDrawFrame.8=Choisir la seconde couleur du d\u00E9grad\u00E9.
+ParametersTextFrame.0=Opacit\u00E9
+ParametersTextFrame.1=Liste des bo\u00EEtes
+ParametersTextFrame.2=Opaque
+ParametersTextFrame.3=Cercle
+ParametersTextFrame.4=Rectangle
+ParametersTextFrame.5=Triangle
+ParametersTextFrame.6=Losange
+ParametersTextFrame.7=Ellipse
+ParametersTextFrame.8=Simple bo\u00EEte
+ParametersTextFrame.9=Plusieurs bo\u00EEtes
+ParametersGridFrame.0=Param\u00E8tres de la grille
+ParametersTextFrame.10=Encadrement possible
+ParametersTextFrame.11=Ajouter
+ParametersTextFrame.12=Modifier
+ParametersTextFrame.13=Supprimer
+ParametersTextFrame.14=S\u00E9parateur :
+ParametersTextFrame.15=Editer bo\u00EEte
+ParametersTextFrame.16=Consid\u00E9rer taille bo\u00EEte
+ParametersTextFrame.17=Si s\u00E9lectionn\u00E9, l'arri\u00E8re-plan du texte sera opaque.
+ParametersTextFrame.18=Bo\u00EEte(s) encadrante(s)
+ParametersTextFrame.20=Cr\u00E9er une ou plusieurs bo\u00EEtes autour du texte.
+ParametersTextFrame.21=La bo\u00EEte sera un rectangle.
+ParametersTextFrame.22=La bo\u00EEte sera un triangle.
+ParametersTextFrame.23=Cr\u00E9er une bo\u00EEte encadrant tout le texte.
+ParametersTextFrame.24=La bo\u00EEte sera une ellipse.
+ParametersTextFrame.25=La bo\u00EEte sera un losange.
+ParametersTextFrame.26=Cr\u00E9er plusieurs bo\u00EEtes autour de diff\u00E9rentes parties du texte.
+ParametersTextFrame.27=La bo\u00EEte sera un cercle.
+ParametersTextFrame.28=Ajouter une nouvelle bo\u00EEte.
+ParametersTextFrame.29=Editer la position de la bo\u00EEte s\u00E9lectionn\u00E9e.
+ParametersTextFrame.30=Supprimer la bo\u00EEte s\u00E9lectionn\u00E9e.
+ParametersTextFrame.31=Changer l'espacement entre le texte et la bo\u00EEte.
+ParametersTextFrame.32=Si s\u00E9lectionn\u00E9, la bo\u00EEte ne sera pas dessin\u00E9e sur les autres parties du texte.
+ParametersTextFrame.33=Ouvrir le panneau des param\u00E8tres pour l'\u00E9diter la bo\u00EEte.
+ParametersTextFrame.34=S\u00E9lection du texte
+ParametersTextFrame.35=S\u00E9lectionner le texte \u00E0 encadrer :
+ParametersTextFrame.36=S\u00E9lection du texte
+ParametersTextFrame.37=Bo\u00EEte invalide ; elle chevauche une autre bo\u00EEte.
+AbstractParametersFrame.0=Dimensions/Position
+AbstractParametersFrame.1=Angle de l'ombre
+AbstractParametersFrame.2=Taille de l'ombre
+AbstractParametersFrame.3=Angle du d\u00E9grad\u00E9
+AbstractParametersFrame.4=Pt du milieu
+AbstractParametersFrame.6=Autres
+AbstractParametersFrame.7=Coin rond :
+AbstractParametersFrame.8=Hachures
+AbstractParametersFrame.9=Double ligne
+AbstractParametersFrame.11=Remplissage
+AbstractParametersFrame.12=D\u00E9grad\u00E9
+BatchConvertFrame.0=Dans les m\u00EAmes dossiers
diff --git a/current/lang/fr/1_8.properties b/current/lang/fr/1_8.properties
new file mode 100644
index 0000000..7bb9fbf
--- /dev/null
+++ b/current/lang/fr/1_8.properties
@@ -0,0 +1,57 @@
+UndoRedoManager.0=Transformation
+AbstractParametersFrame.0=intervalle :
+ParametersAxeFrame.0=Forme :
+ParametersAxeFrame.1=Afficher origine
+ParametersAxeFrame.2=Axes
+ParametersAxeFrame.3=Afficher \u00E9tiquettes X
+ParametersAxeFrame.4=Afficher \u00E9tiquettes Y
+ParametersAxeFrame.5=D\u00E9finir distance entre etiquettes (cm)
+ParametersAxeFrame.6=Dist. \u00E9tiquettes X :
+ParametersAxeFrame.7=Dist. \u00E9tiquettes Y :
+ParametersAxeFrame.8=Incr\u00E9ment \u00E9tiq. X :
+ParametersAxeFrame.9=Incr\u00E9ment \u00E9tiq. Y :
+ParametersAxeFrame.10=Origine \u00E9tiquettes X :
+ParametersAxeFrame.11=Origine \u00E9tiquettes Y :
+ParametersAxeFrame.12=Etiquettes
+ParametersAxeFrame.13=Taille :
+ParametersAxeFrame.14=Style :
+ParametersAxeFrame.15=Afficher marques X
+ParametersAxeFrame.16=Afficher marques Y
+ParametersAxeFrame.17=Marques
+PreferencesFrame.3=Chemin de l'\u00E9diteur LaTeX :
+PreferencesFrame.4=Grille standard
+PreferencesFrame.5=Grille personnelle
+PreferencesFrame.6=Grille magn\u00E9tique
+PreferencesFrame.7=Intervalle :
+LaTeXDrawFrame.0=Dessiner Axes
+LaTeXDrawFrame.2=Pivoter les figures s\u00E9lectionn\u00E9es.
+LaTeXDrawFrame.3=Pivoter les figures s\u00E9lectionn\u00E9es de 90\u00B0.
+LaTeXDrawFrame.4=Pivoter les figures s\u00E9lectionn\u00E9es de 180\u00B0.
+LaTeXDrawFrame.5=Pivoter les figures s\u00E9lectionn\u00E9es de 270\u00B0.
+LaTeXDrawFrame.6=Renverser les figures s\u00E9lectionn\u00E9es par une sym\u00E9trie.
+LaTeXDrawFrame.7=Renverser horizontalement les figures s\u00E9lectionn\u00E9es.
+LaTeXDrawFrame.8=Renverser verticalement les figures s\u00E9lectionn\u00E9es.
+LaTeXDrawFrame.10=Afficher la grille standard (en cm ou en pouce).
+LaTeXDrawFrame.11=Afficher une grille dont vous pouvez modifier l'intervalle entre les lignes.
+LaTeXDrawFrame.12=Contient les paramet\u00E8res concernant la grille magn\u00E9tique.
+LaTeXDrawFrame.13=magn\u00E9tique
+LaTeXDrawFrame.14=Si coch\u00E9, les figures seront magn\u00E9tiques \u00E0 la grille.
+LaTeXDrawFrame.15=D\u00E9finit l'intervalle entre les lignes de la grille personnelle (en pixels).
+LaTeXDrawFrame.16=Dessiner des grilles et des axes.
+LaTeXDrawFrame.17=Dessiner axes.
+LaTeXDrawFrame.18=Ouvre votre \u00E9diteur LaTeX.
+LaTeXDrawFrame.19=Lancement de votre \u00E9diteur LaTeX...
+LaTeXDrawFrame.20=Vous devez d\u00E9finir le chemin de votre \u00E9diteur LaTeX dans la fen\u00EAtre des pr\u00E9f\u00E9rences.
+LaTeXDrawFrame.21=Le fichier s\u00E9lectionn\u00E9 est invalide.
+LaTeXDrawFrame.22=Red\u00E9finissez le chemin dans le panneau des pr\u00E9f\u00E9rences.
+LaTeXDrawFrame.23=Fermer
+LaTeXDrawFrame.25=Librairies
+LaTeXDrawFrame.26=Traducteurs
+LaTeXDrawFrame.27=Note des versions
+LaTeXDrawFrame.28=Licence
+Axe.0=Aucune
+Axe.1=Axe
+Axe.2=Rectangle
+Axe.3=Tout
+Axe.4=Haut
+Axe.5=Bas
diff --git a/current/lang/fr/1_9.properties b/current/lang/fr/1_9.properties
new file mode 100644
index 0000000..802d118
--- /dev/null
+++ b/current/lang/fr/1_9.properties
@@ -0,0 +1,70 @@
+LaTeXDrawFrame.0=Fichiers r\u00E9cents
+LaTeXDrawFrame.1=Tracer Courbe de B\u00E9zier Ferm\u00E9e
+LaTeXDrawFrame.2=Tout supprimer
+LaTeXDrawFrame.3=Raccourcis
+LaTeXDrawFrame.4=V\u00E9rifier nouvelle version
+LaTeXDrawFrame.5=Formes
+LaTeXDrawFrame.6=Rendre visible ttes les figures
+LaTeXDrawFrame.7=<html>Si une figure a ses coordonn\u00E9es inf\u00E9rieures \u00E0 (0,0), vous ne pouvez la voir \u00E0 l'\u00E9cran ;<br>ce bouton permet de rendre visible toutes les figures.</html>
+LaTeXDrawFrame.8=D\u00E9finir les propri\u00E9t\u00E9s des poign\u00E9es de contr\u00F4le.
+LaTeXDrawFrame.9=Opacit\u00E9 des poign\u00E9es de contr\u00F4le
+LaTeXDrawFrame.10=D\u00E9finir la transparence des poign\u00E9es de contr\u00F4le.
+LaTeXDrawFrame.11=Tracer une courbe de B\u00E9zier close
+LaTeXDrawFrame.12=<html>V\u00E9rifiez que la version de Java que vous avez utilis\u00E9<br>pour cr\u00E9er ce fichier est la m\u00EAme que le Java que vous utilisez en ce moment.</html>
+LaTeXDrawFrame.13=Le r\u00E9pertoire de l'aide est introuvable, la page d'aide ne peut \u00EAtre charg\u00E9e.
+LaTeXDrawFrame.14=Impossible de cr\u00E9er la page d'aide.
+PSTricksParser.0=begin{center} doit \u00EAtre en dehors de begin{pspicture}...end{pspicture}
+PSTricksParser.1=end{center} doit \u00EAtre en dehors de begin{pspicture}...end{pspicture}
+PSTricksParser.2=end{figure} doit \u00EAtre en dehors de begin{pspicture}...end{pspicture}
+PSTricksParser.3=end{pspicture} ou pspicture introuvable.
+DrawPanel.0=Accorder figures \u00E0 la grille
+ParametersAkinPointsFrame.0=intervalle points :
+ParametersAkinPointsFrame.1=Ouvrir
+ParametersAkinPointsFrame.2=type :
+ParametersAkinPointsFrame.3=Param\u00E8tres trac\u00E9 \u00E0 la main
+ParametersBezierCurveFrame.2=Equilibrer
+ParametersBezierCurveFrame.3=Equilibre les points de contr\u00F4le en se basant sur la position des points.
+ParametersBezierCurveFrame.4=Distance :
+ParametersBezierCurveFrame.5=D\u00E9finir l'espace entre le point de contr\u00F4le et le point lors de l'\u00E9quilibrage de la courbe.
+ParametersBezierCurveFrame.6=1ier pt ctrl X
+ParametersBezierCurveFrame.7=1ier pt ctrl Y
+ParametersBezierCurveFrame.8=2nd pt ctrl X
+ParametersBezierCurveFrame.9=2nd pt ctrl Y
+PreferencesFrame.0=Nombre de fichiers r\u00E9cents :
+PreferencesFrame.1=Th\u00E8me (avec red\u00E9marrage) :
+ShortcutsFrame.1=S\u00E9quence
+ShortcutsFrame.3=Cat\u00E9gorie
+ShortcutsFrame.4=Navigation
+ShortcutsFrame.5=Transformation
+ShortcutsFrame.6=Dessin
+ShortcutsFrame.7=\ (Gros mouvement)
+ShortcutsFrame.8=clic gauche
+ShortcutsFrame.9=Bouger l'ascenseur horizontal vers la droite
+ShortcutsFrame.10=Bouger l'ascenseur horizontal vers la gauche
+ShortcutsFrame.11=Bouger l'ascenseur vertical vers le haut
+ShortcutsFrame.12=Bouger l'ascenseur vertical vers le bas
+ShortcutsFrame.14=Aller au bout de l'ascenseur horizontal
+ShortcutsFrame.15=Aller au d\u00E9but de l'ascenseur horizontal
+ShortcutsFrame.16=Aller au plus haut de l'ascenseur vertical
+ShortcutsFrame.17=Aller au plus base de l'ascenseur vertical
+ShortcutsFrame.18=Bouger les figures s\u00E9lectionn\u00E9es vers la droite
+ShortcutsFrame.19=Bouger les figures s\u00E9lectionn\u00E9es vers la gauche
+ShortcutsFrame.20=Bouger les figures s\u00E9lectionn\u00E9es vers le haut
+ShortcutsFrame.21=Bouger les figures s\u00E9lectionn\u00E9es vers le bas
+ShortcutsFrame.23=Bouger les figures s\u00E9lectionn\u00E9es afin qu'elles s'alignent sur la grille
+ShortcutsFrame.25=S\u00E9lectionner toutes les figures du dessin
+ShortcutsFrame.26=Ajouter la figure cliqu\u00E9e \u00E0 la s\u00E9lection
+ShortcutsFrame.27=Supprimer la figure cliqu\u00E9e de la s\u00E9lection
+ShortcutsFrame.28=S\u00E9lectionne la prochaine ou la premi\u00E8re figure (en mode s\u00E9lection seulement)
+ShortcutsFrame.29=Roulette souris
+ShortcutsFrame.30=Zoom avant/arri\u00E8re
+MenusListener.0=Presser le bouton gauche et d\u00E9placer la souris pour placer le deuxi\u00E8me point. Rel\u00E2cher ensuite le bouton pour terminer la cr\u00E9ation de la figure.
+MenusListener.1=Un clic gauche pour ajouter un point, un clic droit ou un double clic gauche pour placer le dernier point et terminer la cr\u00E9ation de la figure.
+MenusListener.4=Presser le bouton gauche et d\u00E9placer la souris afin de placer le dernier point. Rel\u00E2cher ensuite le bouton pour terminer la cr\u00E9ation de la figure.
+MenusListener.5=Un clic gauche ajoute du texte.
+MenusListener.6=Un clic gauche ajoute une grille.
+MenusListener.7=Un clic gauche ajoute des axes.
+MenusListener.8=Presser le bouton gauche and d\u00E9placer la souris pour dessiner la figure. Rel\u00E2cher ensuite le bouton pour terminer la cr\u00E9ation.
+MenusListener.9=Un clic gauche ajoute un point.
+RecentFilesListener.0=Il n'est pas possible d'acc\u00E9der \u00E0 ce fichier.
+RecentFilesListener.1=Impossible d'ouvrir le fichier
diff --git a/current/lang/fr/LaTeXDrawFrame.properties b/current/lang/fr/LaTeXDrawFrame.properties
new file mode 100644
index 0000000..599367e
--- /dev/null
+++ b/current/lang/fr/LaTeXDrawFrame.properties
@@ -0,0 +1,207 @@
+LaTeXDrawFrame.0=\ aide
+LaTeXDrawFrame.1=A Propos de 
+LaTeXDrawFrame.2=Tracer ligne
+LaTeXDrawFrame.3=Tracer rectangle
+LaTeXDrawFrame.4=Tracer point
+LaTeXDrawFrame.5=Tracer carr\u00E9
+LaTeXDrawFrame.6=Tracer losange
+LaTeXDrawFrame.7=Tracer \u00E0 la main
+LaTeXDrawFrame.8=Tracer triangle
+LaTeXDrawFrame.9=Tracer cercle
+LaTeXDrawFrame.10=Tracer grille
+LaTeXDrawFrame.11=Tracer ellipse
+LaTeXDrawFrame.12=Tracer polygone
+LaTeXDrawFrame.13=S\u00E9lectionner figure(s)
+LaTeXDrawFrame.14=Afficher bordure du dessin
+LaTeXDrawFrame.15=Ajustement auto. bordure
+LaTeXDrawFrame.16=Exporter en ...
+LaTeXDrawFrame.17=Supprimer Figure
+LaTeXDrawFrame.18=Quitter
+LaTeXDrawFrame.19=Code PSTricks
+LaTeXDrawFrame.20=Image JPEG
+LaTeXDrawFrame.21=Image EPS
+LaTeXDrawFrame.22=Refaire
+LaTeXDrawFrame.23=D\u00E9faire
+LaTeXDrawFrame.25=Enregistrer projet
+LaTeXDrawFrame.26=Enregistrer projet sous
+LaTeXDrawFrame.27=Ouvrir projet
+LaTeXDrawFrame.28=Nouveau projet
+LaTeXDrawFrame.29=Imprimer code
+LaTeXDrawFrame.30=Imprimer dessin
+LaTeXDrawFrame.31=Derri\u00E8re une figure
+LaTeXDrawFrame.32=Devant une figure
+LaTeXDrawFrame.33=Grouper
+LaTeXDrawFrame.34=S\u00E9parer
+LaTeXDrawFrame.35=Tracer arc
+LaTeXDrawFrame.36=Tracer camembert
+LaTeXDrawFrame.37=Tracer arc ferm\u00E9
+LaTeXDrawFrame.38=Echelle X
+LaTeXDrawFrame.39=Echelle Y
+LaTeXDrawFrame.40=Copier
+LaTeXDrawFrame.41=Mettre \u00E0 jour mod\u00E8les
+LaTeXDrawFrame.42=Exporter comme mod\u00E8le
+LaTeXDrawFrame.43=Coller
+LaTeXDrawFrame.44=Couper
+LaTeXDrawFrame.45=Grille Standard
+LaTeXDrawFrame.46=Panneau du code
+LaTeXDrawFrame.47=Bordures
+LaTeXDrawFrame.48=Int\u00E9rieur
+LaTeXDrawFrame.49=Hachures
+LaTeXDrawFrame.51=rempli
+LaTeXDrawFrame.53=Propri\u00E9t\u00E9s figure
+LaTeXDrawFrame.55=Ajouter commentaire
+LaTeXDrawFrame.56=Pr\u00E9f\u00E9rences
+LaTeXDrawFrame.57=Zoom avant
+LaTeXDrawFrame.58=Zoom arri\u00E8re
+LaTeXDrawFrame.60=Ajouter texte
+LaTeXDrawFrame.61=Premier plan
+LaTeXDrawFrame.62=Arri\u00E8re plan
+LaTeXDrawFrame.63=Tracer Courbe de B\u00E9zier
+LaTeXDrawFrame.64=Pivoter figure
+LaTeXDrawFrame.65=Change l'\u00E9paisseur de la figure
+LaTeXDrawFrame.66=Change la couleur des bords de la figure
+LaTeXDrawFrame.67=Si s\u00E9lectionn\u00E9, la figure sera remplie
+LaTeXDrawFrame.68=Change la couleur de l'int\u00E9rieur de la figure
+LaTeXDrawFrame.69=Changer la couleur des hachures
+LaTeXDrawFrame.70=Mettre la figure au premier plan
+LaTeXDrawFrame.71=Mettre la figure en arri\u00E8re plan
+LaTeXDrawFrame.72=S\u00E9lectionner la figure \u00E0 mettre derri\u00E8re la figure s\u00E9lectionn\u00E9e
+LaTeXDrawFrame.73=S\u00E9lectionner la figure \u00E0 mettre devant la figure s\u00E9lectionn\u00E9e
+LaTeXDrawFrame.74=Si activ\u00E9, vous pouvez pivoter une figure avec la souris en utilisant les poign\u00E9es de contr\u00F4le
+LaTeXDrawFrame.75=Joindre plusieurs figures
+LaTeXDrawFrame.76=S\u00E9parer plusieurs figures
+LaTeXDrawFrame.77=D\u00E9finir la position des bords de la figure
+LaTeXDrawFrame.78=Si s\u00E9lectionn\u00E9, la figure aura une double bordure
+LaTeXDrawFrame.79=Changer la couleur de l'espace entre les doubles bords
+LaTeXDrawFrame.80=\ Epaisseur
+LaTeXDrawFrame.82=<html>Une erreur est survenue lors du lancement de LaTeXDraw :<br>
+LaTeXDrawFrame.83=Impossible de d\u00E9marrer LaTeXDraw
+LaTeXDrawFrame.86=Erreur LaTeXDraw
+LaTeXDrawFrame.88=Fichier
+LaTeXDrawFrame.89=Edition
+LaTeXDrawFrame.90=Affichage
+LaTeXDrawFrame.91=Dessin
+LaTeXDrawFrame.92=Code
+LaTeXDrawFrame.93=Aide
+LaTeXDrawFrame.94=Zoomer sur le dessin
+LaTeXDrawFrame.95=Zoom arri\u00E8re sur le dessin
+LaTeXDrawFrame.96=Zoom 100%
+LaTeXDrawFrame.103=Mod\u00E8les
+LaTeXDrawFrame.105=Impossible de cr\u00E9er le menu des mod\u00E8les \!
+LaTeXDrawFrame.107=Barre d'outils
+LaTeXDrawFrame.108=Cr\u00E9ation d'un nouveau projet
+LaTeXDrawFrame.109=Ouverture d'un projet
+LaTeXDrawFrame.110=Sauvegarde d'un projet
+LaTeXDrawFrame.113=100%
+LaTeXDrawFrame.114=D\u00E9faire l'action
+LaTeXDrawFrame.115=Refaire l'action
+LaTeXDrawFrame.116=Tracer une ligne
+LaTeXDrawFrame.117=Dessiner un point
+LaTeXDrawFrame.118=Tracer une forme rectangulaire
+LaTeXDrawFrame.119=Tracer un rectangle
+LaTeXDrawFrame.120=Tracer un carr\u00E9
+LaTeXDrawFrame.121=Tracer un polygone
+LaTeXDrawFrame.123=Tracer un losange
+LaTeXDrawFrame.124=Tracer un triangle
+LaTeXDrawFrame.125=Tracer une ellipse
+LaTeXDrawFrame.127=Tracer un cercle
+LaTeXDrawFrame.128=Tracer un arc
+LaTeXDrawFrame.130=Tracer un camenbert
+LaTeXDrawFrame.131=Tracer un arc ferm\u00E9
+LaTeXDrawFrame.132=Tracer une courbe de B\u00E9zier
+LaTeXDrawFrame.133=Tracer une grille
+LaTeXDrawFrame.136=<html>S\u00E9lectionner une ou plusieurs figures<br>
+LaTeXDrawFrame.137=<font color=red>Conseil <font color=black>: pour s\u00E9lectionner plusieurs
+LaTeXDrawFrame.138=figures, cliquez et<br>faites glisser la souris sur les figures de votre choix.</html>
+LaTeXDrawFrame.139=Supprimer les figures selectionn\u00E9es
+LaTeXDrawFrame.140=Changer les propri\u00E9t\u00E9s de la figure
+LaTeXDrawFrame.141=<html>Afficher les bordures du dessin<br>
+LaTeXDrawFrame.142=<font color = red>Conseil <font color=black>: si vous voulez afficher les bordures du<br>
+LaTeXDrawFrame.143=dessin, d\u00E9sactivez la mise \u00E0 jour automatique des bords afin de pouvoir <br>
+LaTeXDrawFrame.144=changer les dimensions du dessin.</html>
+LaTeXDrawFrame.146=Copi\u00E9 ...
+LaTeXDrawFrame.147=Coll\u00E9 ...
+LaTeXDrawFrame.148=Coup\u00E9 ...
+LaTeXDrawFrame.149=Supprim\u00E9 ...
+LaTeXDrawFrame.151=Choisir la couleur de la double bordure
+LaTeXDrawFrame.154=Joint ...
+LaTeXDrawFrame.155=S\u00E9par\u00E9 ...
+LaTeXDrawFrame.156=Voulez-vous enregistrer le projet ?
+LaTeXDrawFrame.158=Refait ...
+LaTeXDrawFrame.159=D\u00E9fait ...
+LaTeXDrawFrame.160=Mod\u00E8les mis \u00E0 jour ...
+LaTeXDrawFrame.161=Erreur pour le fichier
+LaTeXDrawFrame.162=Impression du dessin en cours ...
+LaTeXDrawFrame.163=Dessin imprim\u00E9 \!
+LaTeXDrawFrame.164=Impossible d'imprimer le dessin \!
+LaTeXDrawFrame.165=Impression du code en cours ...
+LaTeXDrawFrame.166=Code imprim\u00E9 \!
+LaTeXDrawFrame.167=Impossible d'imprimer le code \!
+LaTeXDrawFrame.168=Exportation du mod\u00E8le ...
+LaTeXDrawFrame.169=Mod\u00E8le export\u00E9 \!
+LaTeXDrawFrame.170=Exportation en PSTricks...
+LaTeXDrawFrame.171=S\u00E9lectionner
+LaTeXDrawFrame.172=Exporter le code PSTricks dans un fichier
+LaTeXDrawFrame.173=Voulez-vous remplacer le fichier ?
+LaTeXDrawFrame.174=Exporter en code PSTricks
+LaTeXDrawFrame.175=Code PStricks export\u00E9 \!
+LaTeXDrawFrame.176=Impossible d'exporter le code PSTricks \!
+LaTeXDrawFrame.177=Exporter en image ...
+LaTeXDrawFrame.179=Exporter les figures en
+LaTeXDrawFrame.182=Exporter comme
+LaTeXDrawFrame.183=\ fichier
+LaTeXDrawFrame.184=Exportation en une image termin\u00E9e \!
+LaTeXDrawFrame.185=Impossible d'exporter en fichier image \!
+LaTeXDrawFrame.186=Sauvegarde du dessin ...
+LaTeXDrawFrame.188=Enregistrer le dessin
+LaTeXDrawFrame.190=Exporter en fichier JPEG
+LaTeXDrawFrame.191=Projet enregistr\u00E9 \!
+LaTeXDrawFrame.192=Impossible d'enregistrer le projet \!
+LaTeXDrawFrame.193=<html>Une erreur est survenue lors de la sauvegarde d'un fichier :<br>
+LaTeXDrawFrame.197=Cr\u00E9ation d'un nouveau projet...
+LaTeXDrawFrame.198=Nouveau projet cr\u00E9\u00E9 \!
+LaTeXDrawFrame.200=Ouvrir un dessin
+LaTeXDrawFrame.201=Ouverture d'un fichier ...
+LaTeXDrawFrame.202=Fichier ouvert \!
+LaTeXDrawFrame.203=Impossible d'ouvrir le fichier \!
+LaTeXDrawFrame.204=<html>Une erreur est survenue lors du chargement d'un fichier :<br>
+LaTeXDrawFrame.208=</span><br>Version
+LaTeXDrawFrame.209=\ disponible \!</html>
+LaTeXDrawFrame.210=Nouvelle Version
+LaTeXDrawFrame.211=Nouvelle version disponible \!
+LaTeXDrawFrame.212=Pas de nouvelle version
+LaTeXDrawFrame.213=Impossible de v\u00E9rifier l'existence d'une nouvelle version \!
+LaTeXDrawFrame.215=L'aide pour LaTeXDraw
+LaTeXDrawFrame.218=Un g\u00E9n\u00E9rateur de code PSTricks pour LaTeX \!
+LaTeXDrawFrame.219=Version
+LaTeXDrawFrame.220=, build
+LaTeXDrawFrame.221=\ est distribu\u00E9 sous les termes de la licence publique g\u00E9n\u00E9rale GNU
+LaTeXDrawFrame.222=\ comme publi\u00E9e par la Free Software Foundation (version 2)
+LaTeXDrawFrame.229=Importer ...
+LaTeXDrawFrame.230=Depuis un fichier TeX
+LFrame2.0=D\u00E9finir la taille d'un point.
+LFrame2.1=Aligner les figures s\u00E9lectionn\u00E9es.
+LFrame2.10=R\u00E9partir verticalement, \u00E0 \u00E9gale distance entre les figures s\u00E9lectionn\u00E9es.
+LFrame2.11=R\u00E9partir verticalement, \u00E0 \u00E9gale distance entre le milieu des figures s\u00E9lectionn\u00E9es.
+LFrame2.12=R\u00E9partir verticalement, \u00E0 \u00E9gale distance entre le haut des figures s\u00E9lectionn\u00E9es.
+LFrame2.13=R\u00E9partir horizontalement, \u00E0 \u00E9gale distance entre le c\u00F4t\u00E9 gauche des figures s\u00E9lectionn\u00E9es.
+LFrame2.14=R\u00E9partir horizontalement, \u00E0 \u00E9gale distance entre les figures s\u00E9lectionn\u00E9es.
+LFrame2.15=R\u00E9partir horizontalement, \u00E0 \u00E9gale distance entre le milieu des figures s\u00E9lectionn\u00E9es.
+LFrame2.16=R\u00E9partir horizontalement, \u00E0 \u00E9gale distance entre le c\u00F4t\u00E9 droit des figures s\u00E9lectionn\u00E9es.
+LFrame2.17=Couleurs
+LFrame2.18=Impossible d'ouvrir le fichier
+LFrame2.19=Ce mod\u00E8le n'a pas pu \u00EAtre trouv\u00E9
+LFrame2.2=Aligner le c\u00F4t\u00E9 gauche des figures s\u00E9lectionn\u00E9es.
+LFrame2.20=SVP, mettez \u00E0 jour le menu des mod\u00E8les
+LFrame2.21=mod\u00E8le introuvable
+LFrame2.22=Le document ne peut pas \u00EAtre imprim\u00E9.
+LFrame2.23=Aucune imprimante trouv\u00E9e.
+LFrame2.25=La librairie GPL jlibeps est utilis\u00E9e pour cr\u00E9er des images EPS.
+LFrame2.3=Aligner le c\u00F4t\u00E9 droit des figures s\u00E9lectionn\u00E9es.
+LFrame2.4=Aligner le haut des figures s\u00E9lectionn\u00E9es.
+LFrame2.5=Aligner le bas des figures s\u00E9lectionn\u00E9es.
+LFrame2.6=Aligner horizontalement le milieu des figures s\u00E9lectionn\u00E9es.
+LFrame2.7=Aligner verticalement le milieu des figures s\u00E9lectionn\u00E9es.
+LFrame2.8=R\u00E9partir de mani\u00E8re r\u00E9guli\u00E8re les figures s\u00E9lectionn\u00E9es.
+LFrame2.9=R\u00E9partir verticalement, \u00E0 \u00E9gale distance au-dessus et en-dessous des figures s\u00E9lectionn\u00E9es.
+LFrame2.26=Nouveau projet utilisant la s\u00E9lection
diff --git a/current/lang/fr/dialogFrames.properties b/current/lang/fr/dialogFrames.properties
new file mode 100644
index 0000000..3fab067
--- /dev/null
+++ b/current/lang/fr/dialogFrames.properties
@@ -0,0 +1,116 @@
+PreferencesFrame.Pref=Pr\u00E9f\u00E9rences ...
+PreferencesFrame.grid=Grille
+PreferencesFrame.codePanel=Panneau du code
+PreferencesFrame.antiAl=Anti-cr\u00E9nelage
+PreferencesFrame.rendQ=Qualit\u00E9 du rendu
+PreferencesFrame.colRendQ=Qualit\u00E9 du rendu des couleurs
+PreferencesFrame.AlphaQ=Qualit\u00E9 de l'interpolation Alpha
+PreferencesFrame.bordersDraw=Bords du dessin
+PreferencesFrame.codeAuto=Mise \u00E0 jour auto. du code (plus lent)
+PreferencesFrame.newVers=V\u00E9rifier l'existance d'une nouvelle version au d\u00E9marrage
+PreferencesFrame.lge=Langue (avec red\u00E9marrage)
+PreferencesFrame.general=G\u00E9n\u00E9ral
+PreferencesFrame.folders=Dossiers
+PreferencesFrame.quality=Qualit\u00E9
+PreferencesFrame.selectFolder=S\u00E9lectionner un dossier
+PreferencesFrame.defOpenSave=Dossier par d\u00E9faut pour l'enregistrement/chargement :
+PreferencesFrame.defFold=Dossier par d\u00E9faut pour l'importation/exportation :
+PreferencesFrame.errorReadPref=Erreur survenue lors de la lecture du fichier des pr\u00E9f\u00E9rences \!
+PreferencesFrame.prefSaved=Pr\u00E9f\u00E9rences enregistr\u00E9es \!
+DrawPropertiesFrame.0=L'\u00E9tiquette du dessin
+DrawPropertiesFrame.1=Le titre du dessin
+DrawPropertiesFrame.2=Propri\u00E9t\u00E9s du dessin
+DrawPropertiesFrame.3=pixels par
+DrawPropertiesFrame.5=Dans une page avec que des figures, tableaux, ...
+DrawPropertiesFrame.6=En haut de page
+DrawPropertiesFrame.7=En bas de page
+DrawPropertiesFrame.8=Ici
+DrawPropertiesFrame.9=ICI \!
+DrawPropertiesFrame.10=En milieu de page
+DrawPropertiesFrame.11=Position verticale du dessin
+DrawPropertiesFrame.12=Position horizontale du dessin
+DrawPropertiesFrame.13=Changer le nombre de pixels par unit\u00E9 de mesure
+ExceptionFrameDialog.0=Envoyer le rapport
+ExceptionFrameDialog.1=<html><b>Une erreur est survenue \!</b><br><b><font color=red>
+ExceptionFrameDialog.2=<font color=black></b><br>Vous pouvez envoyer un rapport au d\u00E9veloppeur de LaTeXDraw
+ExceptionFrameDialog.3=Erreur LaTeXDraw : une exception est survenue
+ExceptionFrameDialog.4=<html>Une erreur est survenue :<br>
+ExceptionFrameDialog.5=Impossible de cr\u00E9er une fen\u00EAtre ExceptionFrameDialog
+AbstractParametersFrame.0=Doubles bords
+AbstractParametersFrame.2=S\u00E9parateur :
+AbstractParametersFrame.3=Param\u00E8tres g\u00E9n\u00E9raux
+AbstractParametersFrame.4=Valider
+AbstractParametersFrame.5=D\u00E9faut
+AbstractParametersFrame.6=Annuler
+AbstractParametersFrame.7=Angle de rotation :
+AbstractParametersFrame.8=Epaisseur :
+AbstractParametersFrame.10=Type de ligne :
+AbstractParametersFrame.11=Largeur hachures :
+AbstractParametersFrame.12=Fl\u00E8che gauche :
+AbstractParametersFrame.13=Fl\u00E8che droite :
+AbstractParametersFrame.14=Param\u00E8tres fl\u00E8ches
+AbstractParametersFrame.15=Afficher pts ctrl
+AbstractParametersFrame.16=Arrondi
+AbstractParametersFrame.17=coord. X du centre :
+AbstractParametersFrame.18=coord. Y du centre :
+AbstractParametersFrame.19=Rayon :
+AbstractParametersFrame.20=Diam\u00E8tre point =
+AbstractParametersFrame.21=Largeur bar =
+AbstractParametersFrame.22=Lgr crochet =
+AbstractParametersFrame.23=Lgr crochet arrondi =
+AbstractParametersFrame.24=x \u00E9paisseur +
+AbstractParametersFrame.25=x largeur
+AbstractParametersFrame.26=Longueur fl\u00E8che
+AbstractParametersFrame.27=Encart fl\u00E8che
+AbstractParametersFrame.28=Largeur fl\u00E8che
+AbstractParametersFrame.29=Coordonn\u00E9e X :
+AbstractParametersFrame.30=Coordonn\u00E9e Y :
+AbstractParametersFrame.31=Largeur :
+AbstractParametersFrame.32=Hauteur :
+AbstractParametersFrame.33=Param\u00E8tres de la figure
+AbstractParametersFrame.34=Choisir la couleur des hachures
+AbstractParametersFrame.35=S\u00E9lectionner la couleur des doubles bords
+AbstractParametersFrame.36=S\u00E9lectionner la couleur des bords
+AbstractParametersFrame.37=S\u00E9lectionner la couleur de l'int\u00E9rieur
+AbstractParametersFrame.38=Fl\u00E8ches
+ParametersArcFrame.0=Angle de d\u00E9part :
+ParametersArcFrame.1=Angle d'arriv\u00E9 :
+ParametersArcFrame.2=Type d'arc :
+ParametersDotFrame.0=Type de point :
+ParametersDrawFrame.0=Nord-Ouest X
+ParametersDrawFrame.1=Nord-Ouest Y
+ParametersDrawFrame.2=Sud-Est X
+ParametersDrawFrame.3=Sud-Est Y
+ParametersGridFrame.0=Origine Y :
+ParametersGridFrame.1=Origine X :
+ParametersGridFrame.2=Etiquettes :
+ParametersGridFrame.3=Unit\u00E9 :
+ParametersGridFrame.4=Pts sous-grille :
+ParametersGridFrame.5=Points grille :
+ParametersGridFrame.6=Largeur grille :
+ParametersGridFrame.7=Largeur ss-grille :
+ParametersGridFrame.8=Division sous-grille :
+ParametersGridFrame.9=Taille \u00E9tiquettes :
+ParametersLineFrame.0=Coord. X gauche :
+ParametersLineFrame.1=Coord. Y gauche :
+ParametersLineFrame.2=Coord. X droite :
+ParametersLineFrame.3=Coord. Y droite :
+ParametersTextFrame.0=Gras
+ParametersTextFrame.1=Italique
+ParametersTextFrame.2=Police :
+ParametersTextFrame.3=Taille :
+ParametersTextFrame.4=Texte
+ParametersGridFrame.10=Sous-grille :
+ParametersGridFrame.11=X max :
+ParametersGridFrame.12=X min :
+ParametersGridFrame.13=Y max :
+ParametersGridFrame.14=Y min :
+ParametersGridFrame.15=Afficher \u00E9tiquettes
+ParametersGridFrame.17=S\u00E9lectionner couleur \u00E9tiquettes
+ParametersGridFrame.18=S\u00E9lectionner couleur sous-grille
+ParametersPolygonFrame.1=Point n\u00B0
+ParametersTriangleFrame.0=Coord X centre base :
+ParametersTriangleFrame.1=Coord Y centre base :
+ParamsBC.0=Tout bouger
+ParamsBC.1=Si non s\u00E9lectionn\u00E9, le mouvement d'un point provoque le mouvement de son point de contr\u00F4le.
+ExportDialog.0=Compression
diff --git a/current/lang/fr/others.properties b/current/lang/fr/others.properties
new file mode 100644
index 0000000..079c263
--- /dev/null
+++ b/current/lang/fr/others.properties
@@ -0,0 +1,44 @@
+XScale.cm=cm
+XScale.inch=pouce
+LaTeXDrawException.valueInc=Valeur incorrecte
+LaTeXDrawException.invFile=Ce fichier n'est pas un fichier LaTeXDraw \!
+LaTeXDrawException.invLaTeXDrawVer=Cette version de LaTeXDraw n'est pas g\u00E9r\u00E9e \!
+LaTeXDrawException.invException=LaTeXDrawException : code inconnu
+Arc.arc=Arc
+Arc.wedge=Camenbert
+Arc.chord=Arc ferm\u00E9
+Arc.arcType=Type d'arc
+Figure.boundPos=Position des bords
+DrawContainer.nameTemplate=Entrez le nom du mod\u00E8le
+DrawContainer.overwriteTemplate=Ce mod\u00E8le existe d\u00E9j\u00E0 ; l'\u00E9craser ?
+CloseButton.closePanel=Fermer le panneau
+UndoRedoManager.changeParams=Changer param\u00E8tres
+UndoRedoManager.changeDispo=Changer disposition
+UndoRedoManager.move=Bouger
+UndoRedoManager.delete=Supprimer
+UndoRedoManager.create=Cr\u00E9er
+UndoRedoManager.join=Joindre
+UndoRedoManager.seperate=S\u00E9parer
+UndoRedoManager.filled=Changer le style de l'int\u00E9rieur
+UndoRedoManager.intCol=Changer couleur int\u00E9rieure
+UndoRedoManager.bordCol=Changer couleur bordure
+UndoRedoManager.thick=Changer \u00E9paisseur
+UndoRedoManager.style=Changer style
+UndoRedoManager.lArrow=Changer style fl\u00E8che gauche
+UndoRedoManager.rArrow=Changer style fl\u00E8che droite
+UndoRedoManager.dotStyle=Changer style point
+UndoRedoManager.noRedo=Impossible de refaire
+UndoRedoManager.noUndo=Impossible de d\u00E9faire
+UndoRedoManager.align=alignement
+UndoRedoManager.distrib=distribution
+CodePanel.reload=Recharger
+CodePanel.autoUpdate=M\u00E0J auto.
+CodePanel.copySel=Copier le code s\u00E9lectionn\u00E9
+CodePanel.copyAll=Copier tout le code
+CodePanel.tip=<html><center>Si coch\u00E9, le code sera mis \u00E0 jour en temps r\u00E9el<br><font color = red>Conseil <font color = black> : d\u00E9sactivez la mise \u00E0 jour automatique ou<br> n'affichez pas le panneau de code lorsque le dessin est complexe.</center></html>
+CodePanel.updateCode=Mettre \u00E0 jour le code
+CodePanel.addComment=Ajouter des commentaires
+CodePanel.reloadText=Code PSTricks recharg\u00E9 \!
+CodePanel.copiedText=Code PSTricks copi\u00E9 dans le presse-papier \!
+CodePanel.copiedSelText=Selection copi\u00E9e dans le presse-papier \!
+SVGManager.0=Impossible de g\u00E9n\u00E9rer les formes \u00E0 partir du document SVG.
diff --git a/current/lang/it/1_6.properties b/current/lang/it/1_6.properties
new file mode 100644
index 0000000..7ba9084
--- /dev/null
+++ b/current/lang/it/1_6.properties
@@ -0,0 +1,58 @@
+BatchConvertFrame.1=Aggiungi sottocartelle
+BatchConvertFrame.2=Aggiungi files
+BatchConvertFrame.4=Elimina tutto
+BatchConvertFrame.5=Sovrascrivi
+BatchConvertFrame.6=Seleziona percorso
+BatchConvertFrame.7=Seleziona formato
+BatchConvertFrame.8=Converti
+BatchConvertFrame.9=Stop
+BatchConvertFrame.11=Elenco batch
+BatchConvertFrame.12=Seleziona cartella
+BatchConvertFrame.13=Seleziona immagini
+BatchConvertFrame.14=Converti in:
+LaTeXDrawFrame.0=Inserisci codice PSTricks
+LaTeXDrawFrame.1=Inserisci un'immagine
+LaTeXDrawFrame.2=Converti immagini
+LaTeXDrawFrame.3=stop
+LaTeXDrawFrame.4=Disegna linee unite
+LaTeXDrawFrame.5=Immagine PPM
+LaTeXDrawFrame.6=Immagine BMP
+LaTeXDrawFrame.7=Immagine PNG
+LaTeXDrawFrame.9=Ferma il parsing\!
+LaTeXDrawFrame.10=Inserisci
+LaTeXDrawFrame.11=Inserisci figure da codice PSTricks
+LaTeXDrawFrame.14=Disegna linee unite
+LaTeXDrawFrame.15=Importo un file PSTricks...
+LaTeXDrawFrame.16=<html>Il parser PSTricks corrente supporta solo alcuni comandi.<br>Dovresti importare solo comandi gestiti da LaTeXDraw.<html>
+LaTeXDrawFrame.17=Importa un codice PSTricks
+LaTeXDrawFrame.18=Questo software utilizza JIU, le Java Imaging Utiities. Distribuito  
+LaTeXDrawFrame.19=nei termini della GNU General Public License. http://schmidt.devlib.org/jiu/
+LaTeXDrawFrame.23=<html><b><font color=red>Attenzione:</b> <br><font color=black><ul><li>PSTricks non pu\u00F2 includere file JPG, BMP,...; perci\u00F2 dall'immagine selezionata verr\u00E0 creata un'immagine EPS<br>nella stessa cartella. Cos\u00EC l'immagine sar\u00E0 inclusa solo se si hanno i diritti di scrittura nella cartella;<li>TeX non supporta spazi nel percorso, perci\u00F2 fai in modo di non averne.</ul></html>
+LaTeXDrawFrame.25=Carico l'immagine...
+LaTeXDrawFrame.26=L'immagine non \u00E8 valida\!
+LaTeXDrawFrame.27=Impossibile caricare l'immagine\!
+LaTeXDrawFrame.28=Immagine inserita\!
+LaTeXDrawFrame.30=<html>Nessuna immagine da importare\!<br>Se questo \u00E8 falso, controlla che siano racchiuse fra begin{pspicture} ...end{pspicture}.<br>Puoi inviare il file a  
+LaTeXDrawFrame.31=\ se pensi ci sia una bug in PSTricks.</html>
+LaTeXDrawFrame.32=Non \u00E8 stata trovata nessuna figura\!
+LaTeXDrawFrame.33=Non \u00E8 stata trovata nessuna figura da importare\!
+LaTeXDrawFrame.34=Impossibile importare il file PSTricks\!
+LaTeXDrawFrame.35=Importazione annullata\!
+LaTeXDrawFrame.36=Codice convertito in figure\!
+InsertPSTricksCodeFrame.0=Inserisci figure da codice PSTricks
+FatalErrorParsingException.0=<br>Se il file \u00E8 valido, puoi inviarlo ad arno_b at users.sourceforge.net</html>
+Picture.0=% Attenzione: il percorso della seguente immagine contiene spazi e non sar\u00E0 compilato da tex\!
+ParserCmdMessage.0=Linea  
+ParserCmdMessage.1=Comando:  
+ParserCmdMessage.2=Eccezione:  
+ParserMessagesFrame.0=Comando
+ParserMessagesFrame.1=Linea
+ParserMessagesFrame.2=Eccezione
+ParserMessagesFrame.3=<html><font color=red><b>Ci sono stati uno o pi\u00F9 warning durante il parsing</b></html>
+ParserMessagesFrame.4=Parser TeX: warning
+ParametersGridFrame.0=Inverte la posizione dell'etichetta seguendo X
+ParametersGridFrame.1=Inverte la posizione dell'etichetta seguendo Y
+PSTricksParser.0=Errore durante l'apertura del file: file non valido\!
+PSTricksParser.1=<html>Non \u00E8 ancora gestito l'incremento della definizione di pspicture:<br>
+PSTricksParser.2=begin{pspicture}...begin{pspicture} ... end{pspicture}...</html>
+PSTricksParser.3=Errore durante il parsing del file\!
diff --git a/current/lang/it/1_7.properties b/current/lang/it/1_7.properties
new file mode 100644
index 0000000..3c2fec3
--- /dev/null
+++ b/current/lang/it/1_7.properties
@@ -0,0 +1,60 @@
+LaTeXDrawException.0=Immagine non valida.
+LaTeXDrawFrame.0=Ombra
+LaTeXDrawFrame.9=Seleziona colore dell'ombra
+LaTeXDrawFrame.1=Gradiente 1
+LaTeXDrawFrame.2=Gradiente 2
+LaTeXDrawFrame.4=Aggiungi un'ombra alla figura.
+LaTeXDrawFrame.5=Scegli il colore dell'ombra.
+LaTeXDrawFrame.6=Posizione figure nel disegno (davanti, dietro, ...).
+LaTeXDrawFrame.7=Scegli il primo colore del gradiente.
+LaTeXDrawFrame.8=Scegli il secondo colore del gradiente.
+ParametersTextFrame.0=Opacit\u00E0
+ParametersTextFrame.1=Lista box
+ParametersTextFrame.2=Opaco
+ParametersTextFrame.3=Cerchio
+ParametersTextFrame.4=Rettangolo
+ParametersTextFrame.5=Triangolo
+ParametersTextFrame.6=Losanga
+ParametersTextFrame.7=Ellisse
+ParametersTextFrame.8=Box semplice
+ParametersTextFrame.9=Molte box
+ParametersGridFrame.0=Parametri della griglia
+ParametersTextFrame.10=Abilita le cornici ai box
+ParametersTextFrame.11=Aggiungi
+ParametersTextFrame.12=Modifica
+ParametersTextFrame.13=Elimina
+ParametersTextFrame.14=Separatore:
+ParametersTextFrame.15=Modifica box
+ParametersTextFrame.16=Considera dimensione box
+ParametersTextFrame.17=Se selezionato, lo shondo del testo sar\u00E0 opaco.
+ParametersTextFrame.18=Box corniciate
+ParametersTextFrame.20=Crea uno o molti bordi attorno al testo.
+ParametersTextFrame.21=Il box sar\u00E0 un rettangolo.
+ParametersTextFrame.22=Il box sar\u00E0 un triangolo.
+ParametersTextFrame.23=Crea un semplice box attorno a tutto il testo.
+ParametersTextFrame.24=Il box sar\u00E0 una ellisse.
+ParametersTextFrame.25=Il box sar\u00E0 un diamante.
+ParametersTextFrame.26=Crea varie box attorno a porzioni differenti del testo.
+ParametersTextFrame.27=Il box sar\u00E0 un cerchio.
+ParametersTextFrame.28=Aggiungi un nuovo box.
+ParametersTextFrame.29=Modifica la posizione del box selezionato.
+ParametersTextFrame.30=Rimuovi il box selezionato.
+ParametersTextFrame.31=Cambia lo spazio fra il box ed il testo.
+ParametersTextFrame.32=Se selezionato, il box non sar\u00E0 disegnato sul testo all'inizio ed alla fine del testo bordato.
+ParametersTextFrame.33=Apri il pannello dei parametri del box per modificarlo.
+ParametersTextFrame.34=Selezione testo
+ParametersTextFrame.35=Seleziona il testo da corniciare:
+ParametersTextFrame.36=Selezione testo
+ParametersTextFrame.37=Box non valido; si sovrappone ad un altro box.
+AbstractParametersFrame.0=Dimensioni/Posizione
+AbstractParametersFrame.1=Ombra dell'angolo
+AbstractParametersFrame.2=Dimensione ombra
+AbstractParametersFrame.3=Angolo gradiente
+AbstractParametersFrame.4=Punto medio
+AbstractParametersFrame.6=Altro
+AbstractParametersFrame.7=Angolo arrotondato:
+AbstractParametersFrame.8=Tratteggio
+AbstractParametersFrame.9=Linea doppia
+AbstractParametersFrame.11=Riempimento
+AbstractParametersFrame.12=Gradiente
+BatchConvertFrame.0=nelle stesse cartelle
diff --git a/current/lang/it/1_8.properties b/current/lang/it/1_8.properties
new file mode 100644
index 0000000..3a63aed
--- /dev/null
+++ b/current/lang/it/1_8.properties
@@ -0,0 +1,57 @@
+UndoRedoManager.0=Trasformazione
+AbstractParametersFrame.0=intervallo:
+ParametersAxeFrame.0=Forma:
+ParametersAxeFrame.1=Mostra origine
+ParametersAxeFrame.2=Assi
+ParametersAxeFrame.3=Mostra le etichette su X
+ParametersAxeFrame.4=Mostra le etichette su Y
+ParametersAxeFrame.5=Definisci la distanza fra le etichette (cm)
+ParametersAxeFrame.6=Distanza etichette X:
+ParametersAxeFrame.7=Distanza etichette Y:
+ParametersAxeFrame.8=Incremento etichette X:
+ParametersAxeFrame.9=Incremento etichette Y:
+ParametersAxeFrame.10=Origine etichette X:
+ParametersAxeFrame.11=Origine etichette Y:
+ParametersAxeFrame.12=Etichette
+ParametersAxeFrame.13=Dimensione:
+ParametersAxeFrame.14=Stile:
+ParametersAxeFrame.15=Mostra i marcatori su X
+ParametersAxeFrame.16=Mostra i marcatori su Y
+ParametersAxeFrame.17=Trattini
+PreferencesFrame.3=Percorso al tuo editor LaTeX:
+PreferencesFrame.4=Griglia standard
+PreferencesFrame.5=Griglia personale
+PreferencesFrame.6=Griglia magnetica
+PreferencesFrame.7=Intervallo:
+LaTeXDrawFrame.0=Disegna assi
+LaTeXDrawFrame.2=Ruota le figure selezionate.
+LaTeXDrawFrame.3=Ruota le figure selezionate di 90\u00B0.
+LaTeXDrawFrame.4=Ruota le figure selezionate di 180\u00B0.
+LaTeXDrawFrame.5=Ruota le figure selezionate di 270\u00B0.
+LaTeXDrawFrame.6=Inverti simmetricamente le figure.
+LaTeXDrawFrame.7=Inverti le figure selezionate orizzontalmente.
+LaTeXDrawFrame.8=Inverti le figure selezionate verticalmente.
+LaTeXDrawFrame.10=Mostra una griglia standard (in cm o pollici).
+LaTeXDrawFrame.11=Mostra una griglia con intervallo di ampiezza personalizzabile fra le linee guida.
+LaTeXDrawFrame.12=Contiene il parametro della griglia (magnetica)
+LaTeXDrawFrame.13=magnetica
+LaTeXDrawFrame.14=Se selezionato, le figure saranno agganciate alla griglia.
+LaTeXDrawFrame.15=Definisce l'intervallo fra le linee della griglia personale (in pixel).
+LaTeXDrawFrame.16=Disegna gliglia ed assi.
+LaTeXDrawFrame.17=Disegna assi.
+LaTeXDrawFrame.18=Esegui il tuo editor LaTeX.
+LaTeXDrawFrame.19=Esecuzione editor LaTeX...
+LaTeXDrawFrame.20=Devi definire il percorso del tuo editor LaTeX dal pannello delle preferenze.
+LaTeXDrawFrame.21=Il file selezionato non \u00E8 valido.
+LaTeXDrawFrame.22=Ridefinisci il percorso dal pannello delle preferenze.
+LaTeXDrawFrame.23=Chiudi
+LaTeXDrawFrame.25=Librerie
+LaTeXDrawFrame.26=Traduttori
+LaTeXDrawFrame.27=Note di release
+LaTeXDrawFrame.28=Licenza
+Axe.0=Nessuno
+Axe.2=Frame
+Axe.3=Completo
+Axe.4=Alto
+Axe.5=Basso
+Axe.1=Asse
diff --git a/current/lang/it/1_9.properties b/current/lang/it/1_9.properties
new file mode 100644
index 0000000..6ca40f8
--- /dev/null
+++ b/current/lang/it/1_9.properties
@@ -0,0 +1,70 @@
+LaTeXDrawFrame.0=File recenti
+LaTeXDrawFrame.1=Disegna curva di B\u00E9zier chiusa
+LaTeXDrawFrame.2=Pulisci tutto
+LaTeXDrawFrame.3=Scorciatoie
+LaTeXDrawFrame.4=Controlla aggiornamenti
+LaTeXDrawFrame.5=Forme
+LaTeXDrawFrame.6=Imposta tutte le figure come visibili
+LaTeXDrawFrame.7=<html>Se una figura ha le sue coordinate su (0,0), tu non la puoi vedere.<br>Questo pulsante ti permette di sostituire tutte le figure affinch\u00E9 siano visibili.</html>
+LaTeXDrawFrame.8=Definisce le propriet\u00E0 dei gestore
+LaTeXDrawFrame.9=Gestori opacit\u00E0:
+LaTeXDrawFrame.10=DEfinisci la trasparenza dei gestori.
+LaTeXDrawFrame.11=Disegna una curva di B\u00E9zier chiusa.
+LaTeXDrawFrame.12=<html>Controlla che la versione del runtime di Java che \u00E8 stato usato<br>per creare questo file sia la stessa del JRE attualmente in uso.</html>
+LaTeXDrawFrame.13=La cartella di aiuto \u00E8 irraggiungibile, la pagina di aiuto non pu\u00F2 essere caricata.
+LaTeXDrawFrame.14=Impossibile creare la pagina di aiuto.
+PSTricksParser.0=begin{center} deve essere all'esterno di begin{pspicture}...end{pspicture}
+PSTricksParser.1=end{center} deve essere all'esterno di begin{pspicture}...end{pspicture}
+PSTricksParser.2=end{figure} deve essere all'esterno di begin{pspicture}...end{pspicture}
+PSTricksParser.3=end{pspicture} o pspicturenon trovato.
+DrawPanel.0=Aggiorna le figure rispetto alla griglia
+ParametersAkinPointsFrame.0=Intervallo punti:
+ParametersAkinPointsFrame.1=Apri
+ParametersAkinPointsFrame.2=tipo:
+ParametersAkinPointsFrame.3=Parametri mano libera
+ParametersBezierCurveFrame.2=Equilibra
+ParametersBezierCurveFrame.4=Distanza:
+PreferencesFrame.0=Numero di file recenti:
+PreferencesFrame.1=Tema (richiede riavvio):
+ShortcutsFrame.1=Sequenza
+ShortcutsFrame.3=Categoria
+ShortcutsFrame.4=Navigazione
+ShortcutsFrame.5=Trasformazione
+ShortcutsFrame.6=Disegno
+ShortcutsFrame.7=\ (movimento ampio)
+ShortcutsFrame.8=click sinistro
+ShortcutsFrame.9=Muove la barra di scorrimento orizzontale verso destra
+ShortcutsFrame.10=Muove la barra di scorrimento orizzontale verso sinistra
+ShortcutsFrame.11=Muove la barra di scorrimento verticale verso l'alto
+ShortcutsFrame.12=Muove la barra di scorrimento verticale verso il basso
+ShortcutsFrame.14=Va alla fine dalla barra di scorrimento orizzontale
+ShortcutsFrame.15=Va all'inizio della barra di scorrimento orizzontale
+ShortcutsFrame.16=Va in testa alla barra di scorrimento verticale
+ShortcutsFrame.17=Va in fondo alla barra di scorrimento verticale
+ShortcutsFrame.18=Muove le figure selezionate verso destra
+ShortcutsFrame.19=Muove le figure selezionate verso sinistra
+ShortcutsFrame.20=Muove le figure selezionate verso l'alto
+ShortcutsFrame.21=Muove le figure selezionate verso il basso
+ShortcutsFrame.23=Aggiorna le figure selezionate alla griglia disegnata
+ShortcutsFrame.25=Seleziona tutte le figure del disegno
+ShortcutsFrame.26=Aggiunge la figura cliccata alla selezione
+ShortcutsFrame.27=Rimuove le figure dalla selezione
+ShortcutsFrame.28=Seleziona la prossima o la prima figura (solo in modalit\u00E0 selezione)
+ShortcutsFrame.29=Rotella del mouse
+ShortcutsFrame.30=Zoom in/out
+MenusListener.0=Premi il bottone sinistro e trascina il mouse nella posizione del secondo punto. Rilascia il bottone per concludere la creazione.
+MenusListener.1=Un click sinistro per aggiungere un punto, un click destro o un doppio click sinistro per collocare l'ultimo punto e finire la creazione.
+MenusListener.4=Premi il bottone sinistro e trascina il mouse per posizionare l'ultimo punto. Rilascia il bottone per concludere la creazione.
+MenusListener.5=Il tasto sinistro del mouse aggiunge un testo.
+MenusListener.6=Il tasto sinistro del mouse aggiunge una griglia.
+MenusListener.7=Il tasto sinistro del mouse aggiunge gli assi.
+MenusListener.8=Premi il bottone sinistro e trascina il mouse per disegnare la forma. Rilascia il bottone per concludere la creazione.
+MenusListener.9=Il tasto sinistro del mouse aggiunge un punto.
+RecentFilesListener.0=Impossibile accedere a questo file.
+RecentFilesListener.1=Impossibile aprire il file
+ParametersBezierCurveFrame.3=Equilibra i punti di controllo rispetto alla posizione dei punti.
+ParametersBezierCurveFrame.5=Definisci lo spazio fra il punto di controllo ed il punto quando si equilibria la curva.
+ParametersBezierCurveFrame.6=Asse X, punto di controllo n. 1
+ParametersBezierCurveFrame.7=Asse Y, punto di controllo n. 1
+ParametersBezierCurveFrame.8=Asse X, punto di controllo n. 2
+ParametersBezierCurveFrame.9=Asse Y, punto di controllo n. 2
diff --git a/current/lang/it/LaTeXDrawFrame.properties b/current/lang/it/LaTeXDrawFrame.properties
new file mode 100644
index 0000000..d987047
--- /dev/null
+++ b/current/lang/it/LaTeXDrawFrame.properties
@@ -0,0 +1,207 @@
+LaTeXDrawFrame.0=\ Aiuto
+LaTeXDrawFrame.1=Informazioni 
+LaTeXDrawFrame.2=Disegna linea
+LaTeXDrawFrame.3=Disegna rettangolo
+LaTeXDrawFrame.4=Disegna punto
+LaTeXDrawFrame.5=Disegna quadrato
+LaTeXDrawFrame.6=Disegna rombo
+LaTeXDrawFrame.7=A mano libera
+LaTeXDrawFrame.8=Disegna triangolo
+LaTeXDrawFrame.9=Disegna cerchio
+LaTeXDrawFrame.10=Disegna griglia
+LaTeXDrawFrame.11=Disegna ellisse
+LaTeXDrawFrame.12=Disegna poligono
+LaTeXDrawFrame.13=Seleziona figura (e)
+LaTeXDrawFrame.14=Mostra bordi
+LaTeXDrawFrame.15=Aggiustamento automatico dei bordi
+LaTeXDrawFrame.16=Esporta come...
+LaTeXDrawFrame.17=Cancella figura
+LaTeXDrawFrame.18=Esci
+LaTeXDrawFrame.19=Codice PSTricks
+LaTeXDrawFrame.20=Immagine JPEG
+LaTeXDrawFrame.21=Immagine EPS
+LaTeXDrawFrame.22=Ripeti
+LaTeXDrawFrame.23=Annulla
+LaTeXDrawFrame.25=Salva progetto
+LaTeXDrawFrame.26=Salva come progetto
+LaTeXDrawFrame.27=Apri progetto
+LaTeXDrawFrame.28=Nuovo progetto
+LaTeXDrawFrame.29=Stampa codice
+LaTeXDrawFrame.30=Stampa disegno
+LaTeXDrawFrame.35=Disegna arco
+LaTeXDrawFrame.38=Scala X
+LaTeXDrawFrame.39=Scala Y
+LaTeXDrawFrame.40=Copia
+LaTeXDrawFrame.41=Aggiorna modelli
+LaTeXDrawFrame.42=Esporta come modello
+LaTeXDrawFrame.43=Incolla
+LaTeXDrawFrame.44=Taglia
+LaTeXDrawFrame.45=Griglia standard
+LaTeXDrawFrame.47=Bordi
+LaTeXDrawFrame.48=Interni
+LaTeXDrawFrame.51=riempito
+LaTeXDrawFrame.53=Propriet\u00E0 della Figura
+LaTeXDrawFrame.55=Aggiungi commenti
+LaTeXDrawFrame.56=Preferenze
+LaTeXDrawFrame.57=Zoom avanti
+LaTeXDrawFrame.58=Zoom indietro
+LaTeXDrawFrame.60=Aggiungi testo
+LaTeXDrawFrame.61=Primo piano
+LaTeXDrawFrame.62=Sfondo
+LaTeXDrawFrame.63=Disegna curva di B\u00E9zier
+LaTeXDrawFrame.64=Ruota la figura
+LaTeXDrawFrame.65=Cambia lo spessore della figura
+LaTeXDrawFrame.66=Cambia il colore dei bordi della figura
+LaTeXDrawFrame.68=Cambia il colore dell'interno della figura
+LaTeXDrawFrame.69=Cambia il colore del tratteggio
+LaTeXDrawFrame.70=Metti la figura in primo piano
+LaTeXDrawFrame.71=Metti la figura sullo sfondo
+LaTeXDrawFrame.72=Seleziona la figura che andr\u00E0 dietro alla figura selezionata
+LaTeXDrawFrame.73=Seleziona la figura che andr\u00E0 davanti alla figura selezionata
+LaTeXDrawFrame.75=Raggruppa alcune figure
+LaTeXDrawFrame.76=Separa alcune figure
+LaTeXDrawFrame.77=Definisce la posizione dei bordi della figura
+LaTeXDrawFrame.80=\ Spessore
+LaTeXDrawFrame.82=<html>Un errore si \u00E8 verificato durante il lancio di LaTeXDraw:<br>
+LaTeXDrawFrame.83=LaTeXDraw non \u00E8 in grado di partire
+LaTeXDrawFrame.86=LaTeXDraw Error
+LaTeXDrawFrame.88=File
+LaTeXDrawFrame.89=Modifica
+LaTeXDrawFrame.90=Mostra
+LaTeXDrawFrame.91=Disegna
+LaTeXDrawFrame.92=Codice
+LaTeXDrawFrame.93=Aiuto
+LaTeXDrawFrame.94=Ingrandisci il disegno
+LaTeXDrawFrame.95=Rimpicciolisci il disegno
+LaTeXDrawFrame.96=ingrandimento 100%
+LaTeXDrawFrame.103=Modelli
+LaTeXDrawFrame.105=Impossibile creare il menu dei modelli\!
+LaTeXDrawFrame.107=Barra degli strumenti
+LaTeXDrawFrame.108=Crea un nuovo progetto
+LaTeXDrawFrame.109=Apri un progetto
+LaTeXDrawFrame.110=Salva il progetto
+LaTeXDrawFrame.113=100%
+LaTeXDrawFrame.114=Anulla
+LaTeXDrawFrame.115=Rifai
+LaTeXDrawFrame.116=Disegna una linea
+LaTeXDrawFrame.117=Disegna un punto
+LaTeXDrawFrame.118=Disegna una forma rettangolare
+LaTeXDrawFrame.119=Disegna un rettangolo
+LaTeXDrawFrame.120=Disegna un quadrato
+LaTeXDrawFrame.121=Disegna un poligono
+LaTeXDrawFrame.123=Disegna un rombo
+LaTeXDrawFrame.124=Disegna un triangolo
+LaTeXDrawFrame.125=Disegna un'ellisse
+LaTeXDrawFrame.127=Disegna un cerchio
+LaTeXDrawFrame.128=Disegna un arco
+LaTeXDrawFrame.132=Disegna una curva di B\u00E9zier
+LaTeXDrawFrame.133=Disegna una griglia
+LaTeXDrawFrame.136=<html>Seleziona una o pi\u00F9 figure<br>
+LaTeXDrawFrame.140=Cambia le propriet\u00E0 della figura
+LaTeXDrawFrame.141=<html>Mostra i bordi del disegno<br>
+LaTeXDrawFrame.146=Copiato...
+LaTeXDrawFrame.147=Incollato...
+LaTeXDrawFrame.148=Tagliato...
+LaTeXDrawFrame.149=Cancellato...
+LaTeXDrawFrame.154=Raggruppato...
+LaTeXDrawFrame.155=Separato...
+LaTeXDrawFrame.156=Vuoi salvare il progetto?
+LaTeXDrawFrame.158=Rifatto...
+LaTeXDrawFrame.159=Annullato...
+LaTeXDrawFrame.160=Aggiornati i Modelli...
+LaTeXDrawFrame.161=Errore per il file
+LaTeXDrawFrame.162=Stampo il disegno...
+LaTeXDrawFrame.163=Disegno stampato\!
+LaTeXDrawFrame.164=Impossibile stampare il disegno\!
+LaTeXDrawFrame.165=Stampo il codice...
+LaTeXDrawFrame.166=Codice stampato\!
+LaTeXDrawFrame.167=Impossibile stampare il codice\!
+LaTeXDrawFrame.168=Esporto come modello...
+LaTeXDrawFrame.169=Modello esportato\!
+LaTeXDrawFrame.170=Esporto come codice PSTricks...
+LaTeXDrawFrame.171=Seleziona
+LaTeXDrawFrame.172=Esporta il codice PSTricks come file TEX
+LaTeXDrawFrame.173=Vuoi rimpiazzare il file?
+LaTeXDrawFrame.174=Esporta come PSTricks
+LaTeXDrawFrame.175=Codice PSTricks esportato\!
+LaTeXDrawFrame.176=Impossibile esportare il codice PSTricks\!
+LaTeXDrawFrame.177=Esporto come immagine...
+LaTeXDrawFrame.179=Esporta figure come
+LaTeXDrawFrame.182=Esporta come
+LaTeXDrawFrame.183=\ file
+LaTeXDrawFrame.184=Esportato come immagine\!
+LaTeXDrawFrame.185=Impossibile esportare come immagine\!
+LaTeXDrawFrame.186=Salvataggio del progetto...
+LaTeXDrawFrame.188=Salva il disegno
+LaTeXDrawFrame.190=Esporta come file JPEG
+LaTeXDrawFrame.191=Progetto salvato\!
+LaTeXDrawFrame.192=Impossibile salvare il progetto\!
+LaTeXDrawFrame.193=<html>Un errore si \u00E8 verificato durante il salvataggio di un file:<br>
+LaTeXDrawFrame.198=Creato un nuovo progetto\!
+LaTeXDrawFrame.200=Apri un disegno
+LaTeXDrawFrame.201=Apro un disegno...
+LaTeXDrawFrame.202=File aperto\!
+LaTeXDrawFrame.203=Impossibile aprire il file\!
+LaTeXDrawFrame.204=<html>Un errore si \u00E8 verificato durante l'apertura di un file:<br>
+LaTeXDrawFrame.208=</span><br>Versione
+LaTeXDrawFrame.209=\ rilasciata\!</html>
+LaTeXDrawFrame.210=Nuova Versione
+LaTeXDrawFrame.211=Rilasciata una nuova versione\!
+LaTeXDrawFrame.212=Nessuna nuova versione
+LaTeXDrawFrame.215=Aiuto di LaTeXDraw
+LaTeXDrawFrame.218=Un generatore di codice PSTricks per LaTeX\!
+LaTeXDrawFrame.219=Versione
+LaTeXDrawFrame.220=, build
+LaTeXDrawFrame.221=\ \u00E8 distribuito sotto le condizioni della General Public License GNU
+LaTeXDrawFrame.222=\ come pubblicata dalla Free Software Foundation (versione 2)
+LaTeXDrawFrame.229=Importa...
+LaTeXDrawFrame.230=Da file TeX
+LFrame2.0=Definisce la dimensione di un punto.
+LFrame2.1=Allinea le figure selezionate.
+LFrame2.17=Colori
+LFrame2.18=Impossibile aprire il file.
+LFrame2.19=Questo modello non pu\u00F2 essere trovato
+LFrame2.2=Allinea le figure selezionate sulla sinistra.
+LFrame2.20=Per favore aggiornare il menu dei modelli
+LFrame2.21=Modello non trovato
+LFrame2.22=Il documento non pu\u00F2 essere stampato.
+LFrame2.23=Non \u00E8 stata trovata nessuna stampante.
+LFrame2.25=La libreria GPL jlibeps viene usata per creare immagini EPS.
+LFrame2.3=Allinea sulla destra le figure selezionate.
+LFrame2.4=Allinea verso l'alto le figure selezionate.
+LFrame2.5=Allinea verso il basso le figure selezionate.
+LFrame2.6=Allinea orizzontalmente al centro le figure selezionate.
+LFrame2.7=Allinea verticalmente al centro le figure selezionate.
+LFrame2.8=Distribuisce le figure selezionate ad uguale distanza.
+LFrame2.26=Nuovo progetto con selezione
+LaTeXDrawFrame.31=Dietro una figura
+LaTeXDrawFrame.32=Davanti ad una figura
+LaTeXDrawFrame.33=Gruppo
+LaTeXDrawFrame.34=Separa
+LaTeXDrawFrame.36=Draw wedge
+LaTeXDrawFrame.37=Draw chord
+LaTeXDrawFrame.46=Pannello Codice
+LaTeXDrawFrame.49=Hatchings
+LaTeXDrawFrame.67=Se selezionata, la figura verr\u00E0 riempita
+LaTeXDrawFrame.74=If activated, you can rotate a figure with the mouse using handlers
+LaTeXDrawFrame.78=Se selezionata, la figura avr\u00E0 doppi bordi
+LaTeXDrawFrame.79=Change to color of the space between the double borders
+LaTeXDrawFrame.130=Draw a wedge
+LaTeXDrawFrame.131=Draw a chord
+LaTeXDrawFrame.137=<font color=red>Informazione <font color=black>: per selezionare diverse
+LaTeXDrawFrame.138=figure, clicca e<br>trascina il mouse sulle figure che vuoi</html>
+LaTeXDrawFrame.139=Elimina la/le figura/e selezionata/e
+LaTeXDrawFrame.142=<font color = red>Informazione <font color=black>: se mostri i bordi del<br>
+LaTeXDrawFrame.143=disegno, disabilita l'auto-aggiornamento dei bordi per essere in grado di<br>
+LaTeXDrawFrame.144=cambiare le dimensioni del disegno</html>
+LaTeXDrawFrame.151=Seleziona il colore dei bordi doppi
+LaTeXDrawFrame.197=Creazione di un nuovo progetto...
+LaTeXDrawFrame.213=Unable to check if a new version exists!
+LFrame2.10=Distribute vertically, at equal distance between, the selected figures.
+LFrame2.11=Distribute vertically at equal distance between the middle of the selected figures.
+LFrame2.12=Distribute vertically at equal distance between the top sides of the selected figures.
+LFrame2.13=Distribute horizontally at equal distance between the left sides of the selected figures.
+LFrame2.14=Distribute horizontally, at equal distance between, the selected figures.
+LFrame2.15=Distribute horizontally at equal distance between the middle of the selected figures.
+LFrame2.16=Distribute horizontally at equal distance between the right sides of the selected figures.
+LFrame2.9=Distribute vertically, at equal distance between the bottom sides of the selected figures.
diff --git a/current/lang/it/dialogFrames.properties b/current/lang/it/dialogFrames.properties
new file mode 100644
index 0000000..812f650
--- /dev/null
+++ b/current/lang/it/dialogFrames.properties
@@ -0,0 +1,116 @@
+PreferencesFrame.Pref=Preferenze...
+PreferencesFrame.grid=Griglia
+PreferencesFrame.codePanel=Pannello del codice
+PreferencesFrame.antiAl=Anti-aliasing
+PreferencesFrame.rendQ=Qualit\u00E0 del rendering
+PreferencesFrame.colRendQ=QUalit\u00E0 del rendering del colore
+PreferencesFrame.AlphaQ=Qualit\u00E0 dell'interpolazione alpha
+PreferencesFrame.bordersDraw=Bordi dell'area di disegno
+PreferencesFrame.codeAuto=Auto aggiornamento del codice (pi\u00F9 lento)
+PreferencesFrame.newVers=Controlla esistenza nuova versione all'avvio
+PreferencesFrame.lge=Linguaggio (richiede riavvio)
+PreferencesFrame.general=Generale
+PreferencesFrame.folders=Cartelle
+PreferencesFrame.quality=Qualit\u00E0
+PreferencesFrame.selectFolder=Seleziona una cartella
+PreferencesFrame.defOpenSave=Cartella di default per azioni di apertura/salvataggio:
+PreferencesFrame.defFold=Cartella di default per azioni di import/export:
+PreferencesFrame.errorReadPref=Si \u00E8 verificato un errore durante la apertura del file delle preferenze.
+PreferencesFrame.prefSaved=Preferenze salvate.
+DrawPropertiesFrame.0=L'etichetta del disegno
+DrawPropertiesFrame.1=Il contenuto del disegno
+DrawPropertiesFrame.2=Propriet\u00E0 del disegno
+DrawPropertiesFrame.3=pixels per
+DrawPropertiesFrame.5=In una pagina con solo flottanti
+DrawPropertiesFrame.6=In cima alla pagina
+DrawPropertiesFrame.7=Al fondo della pagina
+DrawPropertiesFrame.8=Qui
+DrawPropertiesFrame.9=QUI\!
+DrawPropertiesFrame.10=Al centro della pagina
+DrawPropertiesFrame.13=Cambia il numeor di pixel per unit\u00E0 di lunghezza
+ExceptionFrameDialog.0=Invia Rapporto
+ExceptionFrameDialog.1=<html><b>Si \u00E8 verificato un errore\!</b><br><b><font color=red>
+ExceptionFrameDialog.2=<font color=black></b><br>Puoi inviare un rapporto allo sviluppatore di LaTeXDraw
+ExceptionFrameDialog.3=si \u00E8 verificata un'eccezione
+ExceptionFrameDialog.4=<html>Si \u00E8 verificato un errore:<br>
+ExceptionFrameDialog.5=Impossibile creare un ExceptionFrameDialog
+AbstractParametersFrame.0=Doppio limite
+AbstractParametersFrame.2=Separatore:
+AbstractParametersFrame.3=Parametri generali
+AbstractParametersFrame.4=OK
+AbstractParametersFrame.5=Standard
+AbstractParametersFrame.6=Annulla
+AbstractParametersFrame.7=Angolo di rotazione
+AbstractParametersFrame.8=Spessore:
+AbstractParametersFrame.10=Tipo di linea
+AbstractParametersFrame.12=Freccia a sinistra:
+AbstractParametersFrame.13=Freccia a destra:
+AbstractParametersFrame.14=Parametri della freccia
+AbstractParametersFrame.15=Mostra punti di controllo
+AbstractParametersFrame.16=Arrotondato
+AbstractParametersFrame.19=Raggio:
+AbstractParametersFrame.20=DIametro del punto=
+AbstractParametersFrame.26=Lunghezza della freccia
+AbstractParametersFrame.28=Spessore della freccia
+AbstractParametersFrame.29=Coordinata x:
+AbstractParametersFrame.30=Coordinata y:
+AbstractParametersFrame.31=Larghezza:
+AbstractParametersFrame.32=Altezza:
+AbstractParametersFrame.33=Parametri della figura
+AbstractParametersFrame.36=Scegli il colore dei bordi
+AbstractParametersFrame.37=Scegli colore di riempimento
+AbstractParametersFrame.38=Frecce
+ParametersArcFrame.0=angolo iniziale
+ParametersArcFrame.1=angolo finale
+ParametersArcFrame.2=Tipo di arco:
+ParametersDotFrame.0=Tipo di punto:
+ParametersGridFrame.0=Origine X:
+ParametersGridFrame.1=Origine Y:
+ParametersGridFrame.2=Etichetta:
+ParametersGridFrame.3=Unit\u00E0:
+ParametersGridFrame.5=Punti della griglia:
+ParametersGridFrame.6=Larghezza della griglia
+ParametersGridFrame.7=Larghezza della sottogriglia:
+ParametersGridFrame.9=Dimensioni dell'etichetta:
+ParametersTextFrame.0=Grasseto
+ParametersTextFrame.1=Italico
+ParametersTextFrame.2=Carattere:
+ParametersTextFrame.3=Dimensione:
+ParametersTextFrame.4=Testo
+ParametersGridFrame.10=Sottogriglia
+ParametersGridFrame.11=X massimo:
+ParametersGridFrame.12=X minimo:
+ParametersGridFrame.13=Y massimo:
+ParametersGridFrame.14=Y minimo:
+ParametersGridFrame.15=Disegna etichette
+ParametersGridFrame.17=Seleziona il colore delle etichette
+ParametersGridFrame.18=Seleziona il colore delle sottogriglie
+ParametersPolygonFrame.1=Punto n\u00B0
+ParamsBC.0=Muovi tutto
+ExportDialog.0=Compressione
+DrawPropertiesFrame.11=Posizione verticale del disegno
+DrawPropertiesFrame.12=Posizione orizzontale del disegno
+AbstractParametersFrame.11=Hatchings Width:
+AbstractParametersFrame.17=Coordinata X-centro:
+AbstractParametersFrame.18=Coordinata Y-centro:
+AbstractParametersFrame.21=Larghezza barra =
+AbstractParametersFrame.22=Bracket length =
+AbstractParametersFrame.23=Rounded bracket lgth =
+AbstractParametersFrame.24=sottigliezza x +
+AbstractParametersFrame.25=larghezza x
+AbstractParametersFrame.27=Arrow inset
+AbstractParametersFrame.34=Select hatchings color
+AbstractParametersFrame.35=Seleziona il colore del doppio limite
+ParametersDrawFrame.0=X Nord-Ovest
+ParametersDrawFrame.1=Y Nord-Ovest
+ParametersDrawFrame.2=X Sud-Est
+ParametersDrawFrame.3=Y Sud-Est
+ParametersGridFrame.4=Punti sotto-griglia:
+ParametersGridFrame.8=Divisione sotto-griglia:
+ParametersLineFrame.0=Coordinata X sinistra:
+ParametersLineFrame.1=Coordinata Y sinistra:
+ParametersLineFrame.2=Coordinata X destra:
+ParametersLineFrame.3=Coordinata Y destra:
+ParametersTriangleFrame.0=Coordinata X del centro della base:
+ParametersTriangleFrame.1=Coordinata Y del centro della base:
+ParamsBC.1=Se non selezionato, quando sposti un punto anche i suoi punti di controllo vengono spostati.
diff --git a/current/lang/it/others.properties b/current/lang/it/others.properties
new file mode 100644
index 0000000..9e23375
--- /dev/null
+++ b/current/lang/it/others.properties
@@ -0,0 +1,44 @@
+XScale.cm=cm
+XScale.inch=pollici
+LaTeXDrawException.valueInc=Valore incorretto
+LaTeXDrawException.invFile=Questo file non \u00E8 un file di LaTeXDraw\!
+LaTeXDrawException.invLaTeXDrawVer=Questa versione di LaTeXDraw non \u00E8 gestita\!
+LaTeXDrawException.invException=LaTeXDrawException: codice d'errore sconosciuto
+Arc.arc=Arco
+Arc.wedge=Cuneo
+Arc.chord=Corda
+Arc.arcType=Tipo di arco
+Figure.boundPos=Posizione del contorno
+DrawContainer.nameTemplate=Inserisci il nome del modello
+DrawContainer.overwriteTemplate=Questo modello esiste gi\u00E0: sovrascriverlo?
+CloseButton.closePanel=Chiudi il pannello
+UndoRedoManager.changeParams=Cambia i parametri
+UndoRedoManager.changeDispo=Cambia la disposizione
+UndoRedoManager.move=Sposta
+UndoRedoManager.delete=Elimina
+UndoRedoManager.create=Crea
+UndoRedoManager.join=Unisci
+UndoRedoManager.seperate=Separa
+UndoRedoManager.intCol=Cabia il colore dell'interno
+UndoRedoManager.bordCol=Cambia il colore del bordo
+UndoRedoManager.thick=Cambia lo spessore
+UndoRedoManager.style=Cambia lo stile
+UndoRedoManager.lArrow=Cambia lo stile della freccia sinistra
+UndoRedoManager.rArrow=Cambia lo stile della freccia destra
+UndoRedoManager.dotStyle=Cambia lo stile del punto
+UndoRedoManager.noRedo=Impossibile rifare
+UndoRedoManager.noUndo=Impossibile annullare
+UndoRedoManager.align=allineamento
+UndoRedoManager.distrib=distribuzione
+CodePanel.reload=Ricarica
+CodePanel.autoUpdate=Auto aggiorna
+CodePanel.copySel=Copia il testo selezionato
+CodePanel.copyAll=Copia tutto il codice
+CodePanel.tip=<html><center>Se selezionato, il codice \u00E8 aggiornato in tempo reale<br><font color = red>Consiglio <font color = black>: Disabilita l'autoaggiornamento o non mostrare il pannello<br>del codice quando il disegno \u00E8 complesso <br> o stai muovendo una grande figura</center></html>
+CodePanel.updateCode=Aggiorna il codice
+CodePanel.addComment=Aggiungi commenti al codice
+CodePanel.reloadText=Codice PSTricks ricaricato\!
+CodePanel.copiedText=Codice PSTricks copiato nella clipboard\!
+CodePanel.copiedSelText=Selezione copiata nella clipboard\!
+SVGManager.0=Impossibile generare le figure dal documento SVG.
+UndoRedoManager.filled=Cambia lo stile per l'interno
diff --git a/current/lang/pl/1_6.properties b/current/lang/pl/1_6.properties
new file mode 100644
index 0000000..a77f790
--- /dev/null
+++ b/current/lang/pl/1_6.properties
@@ -0,0 +1,58 @@
+BatchConvertFrame.1=Dodaj podfoldery
+BatchConvertFrame.2=Dodaj pliki
+BatchConvertFrame.4=Usu\u0144 wszystko
+BatchConvertFrame.5=Nadpisz
+BatchConvertFrame.6=Wybierz \u015Bcie\u017Ck\u0119
+BatchConvertFrame.7=Wybierz format
+BatchConvertFrame.8=Konwertuj
+BatchConvertFrame.9=Zatrzymaj
+BatchConvertFrame.11=Lista Batch
+BatchConvertFrame.12=Wybierz katalog
+BatchConvertFrame.13=Wybierz obrazy
+BatchConvertFrame.14=Konwertuj na:
+LaTeXDrawFrame.0=Wstaw kod PSTricks
+LaTeXDrawFrame.1=Wstaw obraz
+LaTeXDrawFrame.2=Konwertuj obrazy
+LaTeXDrawFrame.3=zatrzymaj
+LaTeXDrawFrame.4=Rysuj \u0142aman\u0105
+LaTeXDrawFrame.5=Obraz PPM
+LaTeXDrawFrame.6=Obraz BMP
+LaTeXDrawFrame.7=Obraz PNG
+LaTeXDrawFrame.9=Zatrzymaj parsowanie\!
+LaTeXDrawFrame.10=Wstaw
+LaTeXDrawFrame.11=Wstaw figury z kodu PSTricks
+LaTeXDrawFrame.14=Rysuj \u0142aman\u0105
+LaTeXDrawFrame.15=Importowanie pliku PSTricks...
+LaTeXDrawFrame.16=<html>Aktualny parser PSTricks parser przetwarza tylko wybrane polecenia.<br>Mo\u017Cesz importowa\u0107 tylko polecenia obs\u0142ugiwane przez LaTeXDraw.<html>
+LaTeXDrawFrame.17=Importuj kod PSTricks
+LaTeXDrawFrame.18=Ten program wykorzystuje JIU (Java Imaging Utilities) - rozpowszechnione  
+LaTeXDrawFrame.19=na licencji GNU General Public License. http://schmidt.devlib.org/jiu/
+LaTeXDrawFrame.23=<html><b><font color=red>Ostrze\u017Cenia:</b> <br><font color=black><ul><li>PSTricks nie obs\u0142uguje plik\u00F3w JPG, BMP,... ; dlatego plik EPS zostanie utworzony z podanego obrazu, <br>w tym samym folderze. Obraz zostanie do\u0142\u0105czony, je\u015Bli masz prawa zapisu w danym folderze;<li>TeX nie obs\u0142uguje spacji w \u015Bcie\u017Cce, dlatego nie u\u017Cywaj ich w nazwach plik\u00F3w i folder\u00F3w.</ul></html>
+LaTeXDrawFrame.25=Wczytywanie obrazu...
+LaTeXDrawFrame.26=Obraz jest niepoprawny\!
+LaTeXDrawFrame.27=Wczytanie obrazu niemo\u017Cliwe\!
+LaTeXDrawFrame.28=Obraz zosta\u0142 wstawiony\!
+LaTeXDrawFrame.30=<html>Brak figury do importu\!<br>Sprawd\u017A czy opisy figur s\u0105 zawarte pomi\u0119dzy begin{pspicture} ...end{pspicture}.<br>Mo\u017Cesz wys\u0142a\u0107 plik do  
+LaTeXDrawFrame.31=\ je\u015Bli uwa\u017Casz, \u017Ce w parserze PSTricks znajduje si\u0119 b\u0142\u0105d.</html>
+LaTeXDrawFrame.32=Nie znaleziono figury\!
+LaTeXDrawFrame.33=Nie znaleziono figury do importu\!
+LaTeXDrawFrame.34=Import pliku PSTricks niemo\u017Cliwy\!
+LaTeXDrawFrame.35=Importowanie anulowane\!
+LaTeXDrawFrame.36=Kod skonwertowany na figury\!
+InsertPSTricksCodeFrame.0=Wstaw figury z kodu PSTricks
+FatalErrorParsingException.0=<br>Je\u015Bli plik jest poprawny, mo\u017Cesz go wys\u0142a\u0107 do: arno_b at users.sourceforge.net</html>
+Picture.0=% Ostrze\u017Cenie: \u015Bcie\u017Cka do obrazu zawiera spacje i nie zostanie przetworzona przez tex\!
+ParserCmdMessage.0=Linia  
+ParserCmdMessage.1=Polecenie:  
+ParserCmdMessage.2=Wyj\u0105tek:  
+ParserMessagesFrame.0=Polecenie
+ParserMessagesFrame.1=Linia
+ParserMessagesFrame.2=Wyj\u0105tek
+ParserMessagesFrame.3=<html><font color=red><b>Jedno lub wi\u0119cej ostrze\u017Ce\u0144 wyst\u0105pi\u0142o podczas parsowania</b></html>
+ParserMessagesFrame.4=Parser TeX: ostrze\u017Cenie(a)
+ParametersGridFrame.0=Przestaw jednostki wzgl\u0119dem pionowych linii siatki
+ParametersGridFrame.1=Przestaw jednostki wzgl\u0119dem poziomych linii siatki
+PSTricksParser.0=B\u0142\u0105d podczas otwierania pliku: niepoprawny plik\!
+PSTricksParser.1=<html>Przyrostowa definicja pspicture nie jest jeszcze obs\u0142ugiwana:<br>
+PSTricksParser.2=begin{pspicture}...begin{pspicture} ... end{pspicture}...</html>
+PSTricksParser.3=B\u0142\u0105d podczas parsowania pliku\!
diff --git a/current/lang/pl/1_7.properties b/current/lang/pl/1_7.properties
new file mode 100644
index 0000000..3f4e4b9
--- /dev/null
+++ b/current/lang/pl/1_7.properties
@@ -0,0 +1,60 @@
+LaTeXDrawException.0=Niepoprawny obraz.
+LaTeXDrawFrame.0=Cie\u0144
+LaTeXDrawFrame.9=Wybierz kolor cienia
+LaTeXDrawFrame.1=Gradient 1
+LaTeXDrawFrame.2=Gradient 2
+LaTeXDrawFrame.4=Dodaj cie\u0144 do figury
+LaTeXDrawFrame.5=Wybierz kolor cienia
+LaTeXDrawFrame.6=Pozycje figur na rysunku
+LaTeXDrawFrame.7=Wybierz pierwszy kolor gradientu
+LaTeXDrawFrame.8=Wybierz drugi kolor gradientu
+ParametersTextFrame.0=Nieprzezroczysto\u015B\u0107
+ParametersTextFrame.1=Lista obramowa\u0144
+ParametersTextFrame.2=Nieprzezroczyste t\u0142o
+ParametersTextFrame.3=Okr\u0105g
+ParametersTextFrame.4=Prostok\u0105t
+ParametersTextFrame.5=Tr\u00F3jk\u0105t
+ParametersTextFrame.6=Romb
+ParametersTextFrame.7=Elipsa
+ParametersTextFrame.8=Prosta ramka
+ParametersTextFrame.9=Wiele obramowa\u0144
+ParametersGridFrame.0=Parametry siatki
+ParametersTextFrame.10=W\u0142\u0105cz ramki
+ParametersTextFrame.11=Dodaj
+ParametersTextFrame.12=Zmie\u0144
+ParametersTextFrame.13=Usu\u0144
+ParametersTextFrame.14=Separator:
+ParametersTextFrame.15=Edytuj
+ParametersTextFrame.16=Dopasuj rozmiar ramki
+ParametersTextFrame.17=Je\u015Bli wybrane, t\u0142o b\u0119dzie nieprzezroczyste.
+ParametersTextFrame.18=Ramki
+ParametersTextFrame.20=Tworzy jedn\u0105 lub wi\u0119cej ramek wok\u00F3\u0142 tekstu.
+ParametersTextFrame.21=Ramka b\u0119dzie prostok\u0105tem.
+ParametersTextFrame.22=Ramka b\u0119dzie tr\u00F3jk\u0105tem.
+ParametersTextFrame.23=Tworzy pojedyncz\u0105 ramk\u0119 wok\u00F3\u0142 ca\u0142ego tekstu.
+ParametersTextFrame.24=Ramka b\u0119dzie elips\u0105.
+ParametersTextFrame.25=Ramka b\u0119dzie rombem.
+ParametersTextFrame.26=Tworzy wiele ramek wok\u00F3\u0142 r\u00F3\u017Cnych cz\u0119\u015Bci tekstu.
+ParametersTextFrame.27=Ramka b\u0119dzie okr\u0119giem.
+ParametersTextFrame.28=Dodaje now\u0105 ramk\u0119.
+ParametersTextFrame.29=Edytuje wybran\u0105 ramk\u0119.
+ParametersTextFrame.30=Usuwa wybran\u0105 ramk\u0119.
+ParametersTextFrame.31=Zmienia odst\u0119p mi\u0119dzy tekstem a ramk\u0105.
+ParametersTextFrame.32=Je\u015Bli wybrane, ramka nie b\u0119dzie nak\u0142ada\u0107 si\u0119 na inne litery tekstu.
+ParametersTextFrame.33=Otw\u00F3rz panel z parametrami ramki, aby edytowa\u0107.
+ParametersTextFrame.34=Wyb\u00F3r tekstu.
+ParametersTextFrame.35=Wybierz tekst do ramki:
+ParametersTextFrame.36=Wyb\u00F3r tekstu
+ParametersTextFrame.37=Niepoprawna ramka; nak\u0142ada si\u0119 na inn\u0105 ramk\u0119.
+AbstractParametersFrame.0=Wymiary/Pozycja
+AbstractParametersFrame.1=K\u0105t cienia
+AbstractParametersFrame.2=Rozmiar cienia
+AbstractParametersFrame.3=K\u0105t gradientu
+AbstractParametersFrame.4=Punkt \u015Brodkowy
+AbstractParametersFrame.6=Inne
+AbstractParametersFrame.7=Zaokr\u0105glenie:
+AbstractParametersFrame.8=Kreskowanie
+AbstractParametersFrame.9=Podw\u00F3jna linia
+AbstractParametersFrame.11=Wype\u0142nienie
+AbstractParametersFrame.12=Gradient
+BatchConvertFrame.0=W tych samych folderach
diff --git a/current/lang/pl/1_8.properties b/current/lang/pl/1_8.properties
new file mode 100644
index 0000000..3dff6e6
--- /dev/null
+++ b/current/lang/pl/1_8.properties
@@ -0,0 +1,57 @@
+UndoRedoManager.0=Transformacja
+AbstractParametersFrame.0=odst\u0119p:
+ParametersAxeFrame.0=Figura:
+ParametersAxeFrame.1=Poka\u017C pocz\u0105tek
+ParametersAxeFrame.2=Osie
+ParametersAxeFrame.3=Poka\u017C skal\u0119 na osi X
+ParametersAxeFrame.4=Poka\u017C skal\u0119 na osi Y
+ParametersAxeFrame.5=Okre\u015Bl d\u0142ugo\u015B\u0107 jednostki skali
+ParametersAxeFrame.6=D\u0142ugo\u015B\u0107 jednostki osi X:
+ParametersAxeFrame.7=D\u0142ugo\u015B\u0107 jednostki osi Y:
+ParametersAxeFrame.8=Zwi\u0119kszaj jednostk\u0119 na osi X co:
+ParametersAxeFrame.9=Zwi\u0119kszaj jednostk\u0119 na osi Y co:
+ParametersAxeFrame.10=Pocz\u0105tek skali na osi X:
+ParametersAxeFrame.11=Pocz\u0105tek skali na osi Y:
+ParametersAxeFrame.12=Skala i jednostki
+ParametersAxeFrame.13=Wielko\u015B\u0107:
+ParametersAxeFrame.14=Styl:
+ParametersAxeFrame.15=Poka\u017C kreski na osi X:
+ParametersAxeFrame.16=Poka\u017C kreski na osi Y:
+ParametersAxeFrame.17=Zaznaczenie jednostek
+PreferencesFrame.3=\u015Acie\u017Cka do edytora LaTeX'a:
+PreferencesFrame.4=Standardowa siatka
+PreferencesFrame.5=W\u0142asna siatka
+PreferencesFrame.6=Magnetyczna siatka
+PreferencesFrame.7=Odst\u0119p:
+LaTeXDrawFrame.0=Rysuj osie
+LaTeXDrawFrame.2=Obr\u00F3\u0107 wybran\u0105(e) figur\u0119(y)
+LaTeXDrawFrame.3=Obr\u00F3\u0107 wybran\u0105(e) figur\u0119(y) o 90\u00B0
+LaTeXDrawFrame.4=Obr\u00F3\u0107 wybran\u0105(e) figur\u0119(y) o 180\u00B0
+LaTeXDrawFrame.5=Obr\u00F3\u0107 wybran\u0105(e) figur\u0119(y) o 270\u00B0
+LaTeXDrawFrame.6=Odbij figury symetrycznie
+LaTeXDrawFrame.7=Odbij w poziomie wybran\u0105 figur\u0119
+LaTeXDrawFrame.8=Odbij w pionie
+LaTeXDrawFrame.10=Wy\u015Bwietl standardow\u0105 siatk\u0119 (w cm lub calach)
+LaTeXDrawFrame.11=Wy\u015Bwietl siatk\u0119 dla kt\u00F3rej mo\u017Cesz modyfikowa\u0107 odst\u0119py pomi\u0119dzy jej liniami
+LaTeXDrawFrame.12=Zawiera parametry (przyci\u0105gaj\u0105cej) siatki
+LaTeXDrawFrame.13=przyci\u0105gaj\u0105cy
+LaTeXDrawFrame.14=Je\u015Bli wybrane, figury b\u0119d\u0105 przyci\u0105gane do siatki
+LaTeXDrawFrame.15=Okre\u015Bl odst\u0119p pomi\u0119dzy liniami w\u0142asnej siatki (w pikselach)
+LaTeXDrawFrame.16=Rysuj siatki i osie.
+LaTeXDrawFrame.17=Rysuj osie.
+LaTeXDrawFrame.18=Uruchom edytor LaTeX'a
+LaTeXDrawFrame.19=Uruchamianie edytora LaTeX'a...
+LaTeXDrawFrame.20=Musisz okre\u015Bli\u0107 \u015Bcie\u017Ck\u0119 edytora LaTeX'a w Ustawieniach
+LaTeXDrawFrame.21=Wybrany plik jest niepoprawny.
+LaTeXDrawFrame.22=Okre\u015Bl ponownie \u015Bcie\u017Ck\u0119 w Ustawieniach
+LaTeXDrawFrame.23=Zamknij
+LaTeXDrawFrame.25=Biblioteki
+LaTeXDrawFrame.26=T\u0142umacze
+LaTeXDrawFrame.27=Informacja o wydaniu
+LaTeXDrawFrame.28=Licencja
+Axe.0=\u017Baden
+Axe.1=O\u015B
+Axe.2=Ramka
+Axe.3=Pe\u0142ny
+Axe.4=G\u00F3ra
+Axe.5=D\u00F3\u0142
diff --git a/current/lang/pl/1_9.properties b/current/lang/pl/1_9.properties
new file mode 100644
index 0000000..0fbf477
--- /dev/null
+++ b/current/lang/pl/1_9.properties
@@ -0,0 +1,70 @@
+LaTeXDrawFrame.0=Ostatnio otwierane pliki
+LaTeXDrawFrame.1=Rysuj zamkni\u0119t\u0105 krzyw\u0105 B\u00E9ziera
+LaTeXDrawFrame.2=Wyczy\u015B\u0107 wszystko
+LaTeXDrawFrame.3=Skr\u00F3ty
+LaTeXDrawFrame.4=Sprawd\u017A uaktualnienie
+LaTeXDrawFrame.5=Figury
+LaTeXDrawFrame.6=Ustaw widoczne wszystkie figury
+LaTeXDrawFrame.7=<html>Je\u015Bli figura ma wsp\u00F3\u0142rz\u0119dne mniejsze do (0,0), nie mo\u017Ce jej zobaczy\u0107.<br>Ten przycisk przesuwa figury tak, aby wszystkie by\u0142y widoczne.</html>
+LaTeXDrawFrame.8=Okre\u015Bla w\u0142a\u015Bciwo\u015Bci manipulator\u00F3w
+LaTeXDrawFrame.9=Widoczno\u015B\u0107 manipulator\u00F3w
+LaTeXDrawFrame.10=Okre\u015Bla przezroczysto\u015B\u0107 manipulator\u00F3w.
+LaTeXDrawFrame.11=Rysuj zamkni\u0119t\u0105 krzyw\u0105 B\u00E9ziera
+LaTeXDrawFrame.12=<html>Sprawd\u017A czy wersja \u015Brodowiska Java Runtime Environment, kt\u00F3ra zosta\u0142a u\u017Cyta<br>do stworzenia tego pliku jest zgodna z obecnie u\u017Cywan\u0105.</html>
+LaTeXDrawFrame.13=Folder pomocy jest nieosi\u0105galny, strona pomocy nie mog\u0142a zosta\u0107 wczytana.
+LaTeXDrawFrame.14=Utworzenie strony pomocy by\u0142o niemo\u017Cliwe.
+PSTricksParser.0=begin{center} musi znajdowa\u0107 si\u0119 poza begin{pspicture}...end{pspicture}
+PSTricksParser.1=end{center} musi znajdowa\u0107 si\u0119 poza begin{pspicture}...end{pspicture}
+PSTricksParser.2=end{figure} musi znajdowa\u0107 si\u0119 poza begin{pspicture}...end{pspicture}
+PSTricksParser.3=end{pspicture} lub pspicture nie odnaleziono.
+DrawPanel.0=Uaktualnij figury do siatki
+ParametersAkinPointsFrame.0=Odst\u0119py punkt\u00F3w:
+ParametersAkinPointsFrame.1=Otw\u00F3rz
+ParametersAkinPointsFrame.2=typ:
+ParametersAkinPointsFrame.3=Opcje linii odr\u0119cznej
+ParametersBezierCurveFrame.2=Kalibruj
+ParametersBezierCurveFrame.3=Kalibruje regulatory ze wzgl\u0119du na pozycj\u0119 punkt\u00F3w rysunku.
+ParametersBezierCurveFrame.4=Odleg\u0142o\u015B\u0107:
+ParametersBezierCurveFrame.5=Okre\u015Bla odst\u0119p pomi\u0119dzy regulatorami a punktami podczas kalibrowania krzywej
+ParametersBezierCurveFrame.6=wsp. X regulatora 1
+ParametersBezierCurveFrame.7=wsp. Y regulatora 1
+ParametersBezierCurveFrame.8=wsp. X regulatora 2
+ParametersBezierCurveFrame.9=wsp. Y regulatora 2
+PreferencesFrame.0=Liczba ostatnio u\u017Cywanych plik\u00F3w:
+PreferencesFrame.1=Temat (wymaga restartu)
+ShortcutsFrame.1=Kombinacja klawiszy
+ShortcutsFrame.3=Kategoria
+ShortcutsFrame.4=Nawigacja
+ShortcutsFrame.5=Transformacja
+ShortcutsFrame.6=Rysunek
+ShortcutsFrame.7=\ (du\u017Ce przesuni\u0119cie)
+ShortcutsFrame.8=lewy-klik
+ShortcutsFrame.9=Przesu\u0144 poziomy pasek przewijania na prawo
+ShortcutsFrame.10=Przesu\u0144 poziomy pasek przewijania na lewo
+ShortcutsFrame.11=Przesu\u0144 pionowy pasek przewijania na g\u00F3r\u0119
+ShortcutsFrame.12=Przesu\u0144 pionowy pasek przewijania na d\u00F3\u0142
+ShortcutsFrame.14=Id\u017A do ko\u0144ca poziomego pasku przewijania
+ShortcutsFrame.15=Id\u017A do pocz\u0105tku poziomego pasku przewijania
+ShortcutsFrame.16=Id\u017A do g\u00F3ry pionowego pasku przewijania
+ShortcutsFrame.17=Id\u017A do do\u0142u pionowego pasku przewijania
+ShortcutsFrame.18=Przesu\u0144 wybrane figury na prawo
+ShortcutsFrame.19=Przesu\u0144 wybrane figury na lewo
+ShortcutsFrame.20=Przesu\u0144 wybrane figury na g\u00F3r\u0119
+ShortcutsFrame.21=Przesu\u0144 wybrane figury na d\u00F3\u0142
+ShortcutsFrame.23=Dopasuj wybrane figury do wy\u015Bwietlonej siatki
+ShortcutsFrame.25=Zaznacz wszystkie figury na rysunku
+ShortcutsFrame.26=Dodaj klikni\u0119t\u0105 figur\u0119 do wyboru
+ShortcutsFrame.27=Usu\u0144 klikni\u0119t\u0105 figur\u0119 z wyboru
+ShortcutsFrame.28=Wybierz nast\u0119pn\u0105 lub pierwsz\u0105 figur\u0119 (w trybie wyboru)
+ShortcutsFrame.29=K\u00F3\u0142ko myszy
+ShortcutsFrame.30=Powi\u0119kszanie/pomniejszanie
+MenusListener.0=Wci\u015Bnij lewy przycisk i przeci\u0105gnij mysz, aby zaznaczy\u0107 drugi punkt. Zwolnienie przycisku ko\u0144czy rysowanie.
+MenusListener.1=Klikni\u0119cie lewym przyciskiem myszy - dodaje punkt, klikni\u0119cie prawym lub podw\u00F3jne lewym ko\u0144czy rysowanie.
+MenusListener.4=Wci\u015Bnij lewy przycisk i przeci\u0105gnij mysz, aby zaznaczy\u0107 ko\u0144cowy punkt. Zwolnienie przycisku ko\u0144czy rysowanie.
+MenusListener.5=Klikni\u0119cie lewym przyciskiem myszy dodaje tekst.
+MenusListener.6=Klikni\u0119cie lewym przyciskiem myszy dodaje siatk\u0119.
+MenusListener.7=Klikni\u0119cie lewym przyciskiem myszy dodaje osie.
+MenusListener.8=Wci\u015Bnij lewy przycisk i przeci\u0105gnij mysz, aby narysowa\u0107 figur\u0119. Zwolnienie przycisku ko\u0144czy rysowanie.
+MenusListener.9=Klikni\u0119cie lewym przyciskiem myszy dodaje punkt.
+RecentFilesListener.0=Niemo\u017Cliwy dost\u0119p do tego pliku.
+RecentFilesListener.1=Nie mo\u017Cna otworzy\u0107 pliku
diff --git a/current/lang/pl/LaTeXDrawFrame.properties b/current/lang/pl/LaTeXDrawFrame.properties
new file mode 100644
index 0000000..d166878
--- /dev/null
+++ b/current/lang/pl/LaTeXDrawFrame.properties
@@ -0,0 +1,207 @@
+LaTeXDrawFrame.0=\ pomoc
+LaTeXDrawFrame.1=O programie 
+LaTeXDrawFrame.2=Rysuj lini\u0119
+LaTeXDrawFrame.3=Rysuj prostok\u0105t
+LaTeXDrawFrame.4=Rysuj punkt
+LaTeXDrawFrame.5=Rysuj kwadrat
+LaTeXDrawFrame.6=Rysuj romb
+LaTeXDrawFrame.7=Linia odr\u0119czna
+LaTeXDrawFrame.8=Rysuj tr\u00F3jk\u0105t
+LaTeXDrawFrame.9=Rysuj okr\u0105d
+LaTeXDrawFrame.10=Rysuj siatk\u0119
+LaTeXDrawFrame.11=Rysuj elips\u0119
+LaTeXDrawFrame.12=Rysuj wielok\u0105t
+LaTeXDrawFrame.13=Wybierz figur\u0119(y)
+LaTeXDrawFrame.14=Wy\u015Bwietl granice
+LaTeXDrawFrame.15=Automatyczne dopasowanie granic
+LaTeXDrawFrame.16=Eksport jako...
+LaTeXDrawFrame.17=Usu\u0144 figur\u0119
+LaTeXDrawFrame.18=Wyjd\u017A
+LaTeXDrawFrame.19=Kod PSTricks
+LaTeXDrawFrame.20=Obraz JPEG
+LaTeXDrawFrame.21=Obraz EPS
+LaTeXDrawFrame.22=Powt\u00F3rz
+LaTeXDrawFrame.23=Cofnij
+LaTeXDrawFrame.25=Zapisz projekt
+LaTeXDrawFrame.26=Zapisz projekt jako
+LaTeXDrawFrame.27=Otw\u00F3rz projekt
+LaTeXDrawFrame.28=Nowy projekt
+LaTeXDrawFrame.29=Drukuj kod
+LaTeXDrawFrame.30=Drukuj rysunek
+LaTeXDrawFrame.31=Za figur\u0105
+LaTeXDrawFrame.32=Przed figur\u0105
+LaTeXDrawFrame.33=Grupuj
+LaTeXDrawFrame.34=Rozdziel
+LaTeXDrawFrame.35=Rysuj \u0142uk
+LaTeXDrawFrame.36=Rysuj wycinek ko\u0142a
+LaTeXDrawFrame.37=Rysuj odcinek ko\u0142a
+LaTeXDrawFrame.38=O\u015B X
+LaTeXDrawFrame.39=O\u015B Y
+LaTeXDrawFrame.40=Kopiuj
+LaTeXDrawFrame.41=Uaktualnij szablony
+LaTeXDrawFrame.42=Eksportuj jako szablon
+LaTeXDrawFrame.43=Wklej
+LaTeXDrawFrame.44=Wytnij
+LaTeXDrawFrame.45=Standardowa siatka
+LaTeXDrawFrame.46=Kod projektu
+LaTeXDrawFrame.47=Kraw\u0119dzie
+LaTeXDrawFrame.48=Wn\u0119trze
+LaTeXDrawFrame.49=Kreskowanie
+LaTeXDrawFrame.51=wype\u0142niony
+LaTeXDrawFrame.53=W\u0142a\u015Bciwo\u015Bci figury
+LaTeXDrawFrame.55=Dodaj komentarze
+LaTeXDrawFrame.56=Ustawienia
+LaTeXDrawFrame.57=Powi\u0119ksz
+LaTeXDrawFrame.58=Pomniejsz
+LaTeXDrawFrame.60=Dodaj tekst
+LaTeXDrawFrame.61=Pierwszy plan
+LaTeXDrawFrame.62=T\u0142o
+LaTeXDrawFrame.63=Rysuj krzyw\u0105 B\u00E9ziera
+LaTeXDrawFrame.64=Obr\u00F3\u0107 figur\u0105
+LaTeXDrawFrame.65=Zmie\u0144 grubo\u015B\u0107 figury
+LaTeXDrawFrame.66=Zmie\u0144 kolor kraw\u0119dzi figury
+LaTeXDrawFrame.67=Je\u015Bli zaznaczone, figura b\u0119dzie wype\u0142niona
+LaTeXDrawFrame.68=Zmie\u0144 kolor wn\u0119trza figury
+LaTeXDrawFrame.69=Zmie\u0144 kolor kreskowania
+LaTeXDrawFrame.70=Przesu\u0144 figur\u0119 na pierwszy plan
+LaTeXDrawFrame.71=Przesu\u0144 figur\u0119 w t\u0142o
+LaTeXDrawFrame.72=Wybierz figur\u0119, kt\u00F3ra b\u0119dzie za wybran\u0105 ju\u017C figur\u0105
+LaTeXDrawFrame.73=Wybierz figur\u0119, kt\u00F3ra b\u0119dzie przed wybran\u0105 ju\u017C figur\u0105
+LaTeXDrawFrame.74=Je\u015Bli w\u0142\u0105czone, mo\u017Cesz obraca\u0107 figur\u0119 mysz\u0105 korzystaj\u0105c z manipulator\u00F3w
+LaTeXDrawFrame.75=Grupuj figury
+LaTeXDrawFrame.76=Rozdziel figury
+LaTeXDrawFrame.77=Okre\u015Bl pozycj\u0119 kraw\u0119dzi figury
+LaTeXDrawFrame.78=Je\u015Bli wybrane, figura b\u0119dzie mia\u0142a podw\u00F3jne kraw\u0119dzie
+LaTeXDrawFrame.79=Zmie\u0144 kolor pomi\u0119dzy podw\u00F3jnymi kraw\u0119dziami
+LaTeXDrawFrame.80=\ Grubo\u015B\u0107
+LaTeXDrawFrame.82=<html>Wyst\u0105pi\u0142 b\u0142\u0105d poczas uruchamiania LaTeXDraw:<br>
+LaTeXDrawFrame.83=Start programu LaTeXDraw jest niemo\u017Cliwy
+LaTeXDrawFrame.86=B\u0142\u0105d LaTeXDraw
+LaTeXDrawFrame.88=Plik
+LaTeXDrawFrame.89=Edycja
+LaTeXDrawFrame.90=Opcje widoku
+LaTeXDrawFrame.91=Rysuj
+LaTeXDrawFrame.92=Kod
+LaTeXDrawFrame.93=Pomoc
+LaTeXDrawFrame.94=Powi\u0119ksz rysunek
+LaTeXDrawFrame.95=Pomniejsz rysunek
+LaTeXDrawFrame.96=Zoom 100%
+LaTeXDrawFrame.103=Szablony
+LaTeXDrawFrame.105=Utworzenie menu szablon\u00F3w niemo\u017Cliwe\!
+LaTeXDrawFrame.107=Pasek narz\u0119dzi
+LaTeXDrawFrame.108=Utw\u00F3rz nowy projekt
+LaTeXDrawFrame.109=Otw\u00F3rz projekt
+LaTeXDrawFrame.110=Zapisz projekt
+LaTeXDrawFrame.113=100%
+LaTeXDrawFrame.114=Cofnij akcj\u0119
+LaTeXDrawFrame.115=Powt\u00F3rz akcj\u0119
+LaTeXDrawFrame.116=Rysuj lini\u0119
+LaTeXDrawFrame.117=Rysuj punkt
+LaTeXDrawFrame.118=Rysuj prostok\u0105tny kszta\u0142t
+LaTeXDrawFrame.119=Rysuj prostok\u0105t
+LaTeXDrawFrame.120=Rysuj kwadrat
+LaTeXDrawFrame.121=Rysuj wielok\u0105t
+LaTeXDrawFrame.123=Rysuj romb
+LaTeXDrawFrame.124=Rysuj tr\u00F3jk\u0105t
+LaTeXDrawFrame.125=Rysuj elips\u0119
+LaTeXDrawFrame.127=Rysuj okr\u0105g
+LaTeXDrawFrame.128=Rysuj \u0142uk
+LaTeXDrawFrame.130=Rysuj wycinek ko\u0142a
+LaTeXDrawFrame.131=Rysuj odcinek ko\u0142a
+LaTeXDrawFrame.132=Rysuj krzyw\u0105 B\u00E9ziera
+LaTeXDrawFrame.133=Rysuj siatk\u0119
+LaTeXDrawFrame.136=<html>Wybierz jedn\u0105 lub wi\u0119cej figur<br>
+LaTeXDrawFrame.137=<font color=red>Rada <font color=black>: aby wybra\u0107 wi\u0119cej
+LaTeXDrawFrame.138=figur, kliknij <br>i przeci\u0105gnij mysz na figury, kt\u00F3re chcesz wybra\u0107</html>
+LaTeXDrawFrame.139=Usu\u0144 wybrane figury
+LaTeXDrawFrame.140=Zmie\u0144 w\u0142a\u015Bciwo\u015Bci figury
+LaTeXDrawFrame.141=<html>Wy\u015Bwietl granice rysunku<br>
+LaTeXDrawFrame.142=<font color = red>Rada <font color=black>: je\u015Bli wy\u015Bwietlasz granice<br>
+LaTeXDrawFrame.143=rysunku, wy\u0142\u0105cz automatyczn\u0105 aktualizacj\u0119 granic rysunku,<br>
+LaTeXDrawFrame.144=aby m\u00F3c zmieni\u0107 wymiary rysunku</html>
+LaTeXDrawFrame.146=Skopiowano...
+LaTeXDrawFrame.147=Wklejono...
+LaTeXDrawFrame.148=Wyci\u0119to...
+LaTeXDrawFrame.149=Usuni\u0119to...
+LaTeXDrawFrame.151=Wybierz kolor podw\u00F3jnych kraw\u0119dzi
+LaTeXDrawFrame.154=Zgrupowano...
+LaTeXDrawFrame.155=Rozdzielono...
+LaTeXDrawFrame.156=Czy chcesz zapisa\u0107 projekt?
+LaTeXDrawFrame.158=Powt\u00F3rzono...
+LaTeXDrawFrame.159=Cofni\u0119to...
+LaTeXDrawFrame.160=Szablony zaktualizowano...
+LaTeXDrawFrame.161=B\u0142\u0105d dla pliku
+LaTeXDrawFrame.162=Drukowanie rysunku...
+LaTeXDrawFrame.163=Rysunek wydrukowano\!
+LaTeXDrawFrame.164=Wydruk rysunku niemo\u017Cliwy\!
+LaTeXDrawFrame.165=Drukowanie kodu...
+LaTeXDrawFrame.166=Kod wydrukowano\!
+LaTeXDrawFrame.167=Wydruk kodu niemo\u017Cliwy\!
+LaTeXDrawFrame.168=Eksportowanie do szablonu...
+LaTeXDrawFrame.169=Szablon wyeksportowano\!
+LaTeXDrawFrame.170=Eksportowanie do kodu PSTricks...
+LaTeXDrawFrame.171=Wybierz
+LaTeXDrawFrame.172=Eksportuj PSTricks jako plik TeX
+LaTeXDrawFrame.173=Czy chcesz zast\u0105pi\u0107 plik?
+LaTeXDrawFrame.174=Eksportuj jako PSTricks
+LaTeXDrawFrame.175=Kod PSTricks wyeksportowano\!
+LaTeXDrawFrame.176=Eksport kodu PSTricks niemo\u017Cliwy\!
+LaTeXDrawFrame.177=Eksportowanie obrazu...
+LaTeXDrawFrame.179=Eksportuj figury jako
+LaTeXDrawFrame.182=Eksportuj jako
+LaTeXDrawFrame.183=\ plik
+LaTeXDrawFrame.184=Eksport obrazu uko\u0144czono\!
+LaTeXDrawFrame.185=Eksport obrazu niemo\u017Cliwy\!
+LaTeXDrawFrame.186=Zapisywanie projektu...
+LaTeXDrawFrame.188=Zapisz rysunek
+LaTeXDrawFrame.190=Eksportuj jako plik JPEG
+LaTeXDrawFrame.191=Projekt zapisano\!
+LaTeXDrawFrame.192=Zapis projektu niemo\u017Cliwy\!
+LaTeXDrawFrame.193=<html>Wyst\u0105pi\u0142 b\u0142\u0105d podczas zapisywania pliku:<br>
+LaTeXDrawFrame.197=Tworzenie nowego projektu...
+LaTeXDrawFrame.198=Utworzono nowy projekt\!
+LaTeXDrawFrame.200=Otw\u00F3rz rysunek
+LaTeXDrawFrame.201=Otwieranie pliku...
+LaTeXDrawFrame.202=Plik otworzono\!
+LaTeXDrawFrame.203=Otworzenie pliku niemo\u017Cliwe\!
+LaTeXDrawFrame.204=<html>Wyst\u0105pi\u0142 b\u0142\u0105d podczas \u0142adowania pliku:<br>
+LaTeXDrawFrame.208=</span><br>Wersja
+LaTeXDrawFrame.209=\ wydano\!</html>
+LaTeXDrawFrame.210=Nowa wersja
+LaTeXDrawFrame.211=Nowa wersja zosta\u0142a wydana\!
+LaTeXDrawFrame.212=Brak nowych wersji
+LaTeXDrawFrame.213=Brak mo\u017Cliwo\u015Bci sprawdzenia aktualizacji\!
+LaTeXDrawFrame.215=Pomoc LaTeXDraw
+LaTeXDrawFrame.218=Generator kodu PSTricks dla systemu LaTeX\!
+LaTeXDrawFrame.219=Wersja
+LaTeXDrawFrame.220=, build
+LaTeXDrawFrame.221=\ jest rozpowszechniany na licencji GNU General Public License
+LaTeXDrawFrame.222=\ jako publikowany przez Free Software Foundation (wersja 2)
+LaTeXDrawFrame.229=Importuj...
+LaTeXDrawFrame.230=Z pliku TeX
+LFrame2.0=Okre\u015Bl rozmiar punktu.
+LFrame2.1=Dopasuj wybrane figury.
+LFrame2.10=Rozmie\u015B\u0107 pionowo wybrane figury z zachowaniem r\u00F3wnych odst\u0119p\u00F3w pomi\u0119dzy nimi.
+LFrame2.11=Rozmie\u015B\u0107 pionowo wybrane figury z zachowaniem r\u00F3wnych odst\u0119p\u00F3w pomi\u0119dzy ich \u015Brodkami.
+LFrame2.12=Rozmie\u015B\u0107 pionowo wybrane figury z zachowaniem r\u00F3wnych odst\u0119p\u00F3w pomi\u0119dzy ich g\u00F3rnymi kraw\u0119dziami.
+LFrame2.13=Rozmie\u015B\u0107 poziomo wybrane figury z zachowaniem r\u00F3wnych odst\u0119p\u00F3w pomi\u0119dzy ich lewymi kraw\u0119dziami.
+LFrame2.14=Rozmie\u015B\u0107 poziomo wybrane figury z zachowaniem r\u00F3wnych odst\u0119p\u00F3w pomi\u0119dzy nimi.
+LFrame2.15=Rozmie\u015B\u0107 poziomo wybrane figury z zachowaniem r\u00F3wnych odst\u0119p\u00F3w pomi\u0119dzy ich \u015Brodkami.
+LFrame2.16=Rozmie\u015B\u0107 poziomo wybrane figury z zachowaniem r\u00F3wnych odst\u0119p\u00F3w pomi\u0119dzy ich prawymi kraw\u0119dziami.
+LFrame2.17=Kolory
+LFrame2.18=Otworzenie pliku niemo\u017Cliwe.
+LFrame2.19=Szablonu nie znaleziono
+LFrame2.2=Wyr\u00F3wnaj do lewej wybrane figury.
+LFrame2.20=Prosz\u0119, uaktualnij menu szablon\u00F3w
+LFrame2.21=Szablonu nie znaleziono
+LFrame2.22=Dokument nie mo\u017Ce zosta\u0107 wydrukowany.
+LFrame2.23=Brak drukarki.
+LFrame2.25=Biblioteka GPL jlibeps jest u\u017Cywana do tworzenie obraz\u00F3w EPS.
+LFrame2.3=Wyr\u00F3wnaj do prawej wybrane figury.
+LFrame2.4=Wyr\u00F3wnaj do g\u00F3ry wybrane figury.
+LFrame2.5=Wyr\u00F3wnaj do do\u0142u wybrane figury.
+LFrame2.6=Wyr\u00F3wnaj poziomo w \u015Brodku wybranych figur.
+LFrame2.7=Wyr\u00F3wnaj pionowo w \u015Brodku wybranych figur.
+LFrame2.8=Rozmie\u015B\u0107 figury zachowuj\u0105c r\u00F3wny odst\u0119p mi\u0119dzy nimi.
+LFrame2.9=Rozmie\u015B\u0107 pionowo wybrane figury z zachowaniem r\u00F3wnych odst\u0119p\u00F3w pomi\u0119dzy ich dolnymi kraw\u0119dziami.
+LFrame2.26=Nowy projekt z zaznaczenia
diff --git a/current/lang/pl/dialogFrames.properties b/current/lang/pl/dialogFrames.properties
new file mode 100644
index 0000000..b365660
--- /dev/null
+++ b/current/lang/pl/dialogFrames.properties
@@ -0,0 +1,116 @@
+PreferencesFrame.Pref=Ustawienia...
+PreferencesFrame.grid=Siatka
+PreferencesFrame.codePanel=Kod
+PreferencesFrame.antiAl=Wyg\u0142adzanie kraw\u0119dzi
+PreferencesFrame.rendQ=Jako\u015B\u0107 renderingu
+PreferencesFrame.colRendQ=Jako\u015B\u0107 koloru renderingu
+PreferencesFrame.AlphaQ=Jako\u015B\u0107 interpolacji Alpha
+PreferencesFrame.bordersDraw=Granice rysunku
+PreferencesFrame.codeAuto=Automatyczna aktualizacja kodu (wolniejsze)
+PreferencesFrame.newVers=Sprawd\u017A czy jest nowa wersja przy starcie
+PreferencesFrame.lge=J\u0119zyk (wymagany restart)
+PreferencesFrame.general=Og\u00F3lne
+PreferencesFrame.folders=Foldery
+PreferencesFrame.quality=Jako\u015B\u0107
+PreferencesFrame.selectFolder=Wybierz folder
+PreferencesFrame.defOpenSave=Domy\u015Blny folder dla operacji otw\u00F3rz/zapisz
+PreferencesFrame.defFold=Domy\u015Blny folder dla operacji importuj/eksportuj
+PreferencesFrame.errorReadPref=B\u0142\u0105d podczas otwierania pliku z ustawieniami\!
+PreferencesFrame.prefSaved=Ustawienia zapisane\!
+DrawPropertiesFrame.0=Etykieta rysunku
+DrawPropertiesFrame.1=Nag\u0142\u00F3wek rysunku
+DrawPropertiesFrame.2=W\u0142a\u015Bciwo\u015Bci rysunku
+DrawPropertiesFrame.3=pikseli na
+DrawPropertiesFrame.5=Po stronie figur, tabel, ...
+DrawPropertiesFrame.6=Na g\u00F3rze strony
+DrawPropertiesFrame.7=Na dole strony
+DrawPropertiesFrame.8=Tutaj
+DrawPropertiesFrame.9=TUTAJ\!
+DrawPropertiesFrame.10=W \u015Brodku strony
+DrawPropertiesFrame.11=Pozioma pozycja rysunku
+DrawPropertiesFrame.12=Pozioma pozycja rysunku
+DrawPropertiesFrame.13=Zmie\u0144 liczb\u0119 pikseli na jednostk\u0119 d\u0142ugo\u015Bci
+ExceptionFrameDialog.0=Wy\u015Blij raport
+ExceptionFrameDialog.1=<html><b>Wyst\u0105pi\u0142 b\u0142\u0105d\!</b><br><b><font color=red>
+ExceptionFrameDialog.2=<font color=black></b><br>Mo\u017Cesz wys\u0142a\u0107 raport do tw\u00F3rcy LaTeXDraw
+ExceptionFrameDialog.3=B\u0142\u0105d LaTeXDraw: wyst\u0105pi\u0142 wyj\u0105tek
+ExceptionFrameDialog.4=<html>Wyst\u0105pi\u0142 b\u0142\u0105d:<br>
+ExceptionFrameDialog.5=Utworzenie ExceptionFrameDialog niemo\u017Cliwe
+AbstractParametersFrame.0=Podw\u00F3jne kraw\u0119dzie
+AbstractParametersFrame.2=Separator:
+AbstractParametersFrame.3=Og\u00F3lne parametry
+AbstractParametersFrame.4=OK
+AbstractParametersFrame.5=Domy\u015Blne
+AbstractParametersFrame.6=Anuluj
+AbstractParametersFrame.7=K\u0105t obrotu:
+AbstractParametersFrame.8=Grubo\u015B\u0107:
+AbstractParametersFrame.10=Rodzaj linii:
+AbstractParametersFrame.11=Szeroko\u015B\u0107 kreskowania:
+AbstractParametersFrame.12=Lewa strza\u0142ka:
+AbstractParametersFrame.13=Prawa strza\u0142ka:
+AbstractParametersFrame.14=Parametry strza\u0142ek
+AbstractParametersFrame.15=Poka\u017C regulatory
+AbstractParametersFrame.16=Zaokr\u0105glony
+AbstractParametersFrame.17=Wsp\u00F3\u0142rz\u0119dna X \u015Brodka:
+AbstractParametersFrame.18=Wsp\u00F3\u0142rz\u0119dna Y \u015Brodka:
+AbstractParametersFrame.19=Promie\u0144:
+AbstractParametersFrame.20=\u015Arednica punktu =
+AbstractParametersFrame.21=Szeroko\u015B\u0107 paska =
+AbstractParametersFrame.22=D\u0142ugo\u015B\u0107 klamer =
+AbstractParametersFrame.23=D\u0142. zaokr\u0105glonych klamer =
+AbstractParametersFrame.24=x grubo\u015B\u0107 +
+AbstractParametersFrame.25=x szeroko\u015B\u0107
+AbstractParametersFrame.26=D\u0142ugo\u015B\u0107 strza\u0142ki
+AbstractParametersFrame.27=Wstawki strza\u0142ki
+AbstractParametersFrame.28=Szeroko\u015B\u0107 strza\u0142ki
+AbstractParametersFrame.29=Wsp\u00F3\u0142rz\u0119dna X
+AbstractParametersFrame.30=Wsp\u00F3\u0142rz\u0119dna Y
+AbstractParametersFrame.31=Szeroko\u015B\u0107:
+AbstractParametersFrame.32=Wysoko\u015B\u0107:
+AbstractParametersFrame.33=Opcje kszta\u0142tu
+AbstractParametersFrame.34=Wybierz kolor kreskowania
+AbstractParametersFrame.35=Wybierz color podw\u00F3jnych kraw\u0119dzi
+AbstractParametersFrame.36=Wybierz kolor kraw\u0119dzi
+AbstractParametersFrame.37=Wybierz kolor wn\u0119trza
+AbstractParametersFrame.38=Strza\u0142ki
+ParametersArcFrame.0=k\u0105t pocz\u0105tkowy:
+ParametersArcFrame.1=k\u0105t ko\u0144cowy:
+ParametersArcFrame.2=Typ \u0142uku:
+ParametersDotFrame.0=Typ punktu:
+ParametersDrawFrame.0=Lewy g\u00F3rny X
+ParametersDrawFrame.1=Lewy g\u00F3rny Y
+ParametersDrawFrame.2=Prawy dolny X
+ParametersDrawFrame.3=Prawy dolny Y
+ParametersGridFrame.0=Y Pocz\u0105tek
+ParametersGridFrame.1=X Pocz\u0105tek
+ParametersGridFrame.2=Jednostki:
+ParametersGridFrame.3=Jednostka:
+ParametersGridFrame.4=Punkty mniejszych siatek:
+ParametersGridFrame.5=Punkty siatki:
+ParametersGridFrame.6=Szeroko\u015B\u0107 siatki:
+ParametersGridFrame.7=Szeroko\u015B\u0107 mniejszych siatek:
+ParametersGridFrame.8=Podzia\u0142 mniejszych siatek:
+ParametersGridFrame.9=Wielko\u015B\u0107 czcionki jednostki:
+ParametersLineFrame.0=Lewy X
+ParametersLineFrame.1=Lewy Y
+ParametersLineFrame.2=Prawy X
+ParametersLineFrame.3=Prawy Y
+ParametersTextFrame.0=Pogrubienie
+ParametersTextFrame.1=Kursywa
+ParametersTextFrame.2=Czcionka:
+ParametersTextFrame.3=Rozmiar:
+ParametersTextFrame.4=Tekst
+ParametersGridFrame.10=Mniejsza siatka:
+ParametersGridFrame.11=X max:
+ParametersGridFrame.12=X min:
+ParametersGridFrame.13=Y max:
+ParametersGridFrame.14=Y min:
+ParametersGridFrame.15=Poka\u017C jednostki
+ParametersGridFrame.17=Wybierz kolor jednostek
+ParametersGridFrame.18=Wyb\u00F3r koloru mniejszej siatki
+ParametersPolygonFrame.1=Punkt nr
+ParametersTriangleFrame.0=\u015Arodkowy X
+ParametersTriangleFrame.1=\u015Arodkowy Y
+ParamsBC.0=Przesuwaj wszystko
+ParamsBC.1=Je\u015Bli nie wybrane, gdy przesuwasz punktu ich regulatory s\u0105 tak\u017Ce przesuwane.
+ExportDialog.0=Kompresja
diff --git a/current/lang/pl/others.properties b/current/lang/pl/others.properties
new file mode 100644
index 0000000..b9e2e9c
--- /dev/null
+++ b/current/lang/pl/others.properties
@@ -0,0 +1,44 @@
+XScale.cm=cm
+XScale.inch=cal
+LaTeXDrawException.valueInc=Niepoprawna warto\u015B\u0107
+LaTeXDrawException.invFile=To nie jest plik LaTeXDraw\!
+LaTeXDrawException.invLaTeXDrawVer=Ta wersja LaTeXDraw nie jest wspierana\!
+LaTeXDrawException.invException=Nieznany b\u0142\u0105d
+Arc.arc=\u0141uk
+Arc.wedge=Wycinek ko\u0142a
+Arc.chord=Odcinek ko\u0142a
+Arc.arcType=Rodzaj \u0142uku
+Figure.boundPos=Pozycja granicy
+DrawContainer.nameTemplate=Podaj nazw\u0119 szablonu
+DrawContainer.overwriteTemplate=Szablon istnieje, nadpisa\u0107?
+CloseButton.closePanel=Zamknij panel
+UndoRedoManager.changeParams=Zmie\u0144 opcje
+UndoRedoManager.changeDispo=Zmie\u0144 dyspozycje
+UndoRedoManager.move=Przesu\u0144
+UndoRedoManager.delete=Usu\u0144
+UndoRedoManager.create=Utw\u00F3rz
+UndoRedoManager.join=Po\u0142\u0105cz
+UndoRedoManager.seperate=Rozdziel
+UndoRedoManager.filled=Zmie\u0144 styl wn\u0119trza
+UndoRedoManager.intCol=Zmie\u0144 kolor wn\u0119trza
+UndoRedoManager.bordCol=Zmie\u0144 kolor granic
+UndoRedoManager.thick=Zmie\u0144 grubo\u015B\u0107
+UndoRedoManager.style=Zmie\u0144 styl
+UndoRedoManager.lArrow=Zmie\u0144 styl lewej strza\u0142ki
+UndoRedoManager.rArrow=Zmie\u0144 styl prawej strza\u0142ki
+UndoRedoManager.dotStyle=Zmie\u0144 styl punktu
+UndoRedoManager.noRedo=Powt\u00F3rzenie niemo\u017Cliwe
+UndoRedoManager.noUndo=Cofni\u0119cie niemo\u017Cliwe
+UndoRedoManager.align=wyr\u00F3wnanie
+UndoRedoManager.distrib=dystrybucja
+CodePanel.reload=Od\u015Bwie\u017C
+CodePanel.autoUpdate=Aktualizuj kod
+CodePanel.copySel=Kopiuj zaznaczony kod
+CodePanel.copyAll=Kopiuj ca\u0142y kod
+CodePanel.tip=<html><center>Je\u015Bli zaznaczone, kod b\u0119dzie aktualizowany na bie\u017C\u0105co<br><font color = red>Rada <font color = black>: wy\u0142\u0105cz automatyczne aktualizowanie kodu <br>albo nie wy\u015Bwietlaj panelu z kodem, gdy rysunek jest z\u0142o\u017Cony <br> lub podczas przesuwania du\u017Cego obiektu</center></html>
+CodePanel.updateCode=Aktualizuj kod
+CodePanel.addComment=Dodaj komentarze do kodu
+CodePanel.reloadText=Kod PSTricks zosta\u0142 zaktualizowany\!
+CodePanel.copiedText=Kod PSTricks zosta\u0142 skopiowany do schowka\!
+CodePanel.copiedSelText=Kod PSTricks zosta\u0142 skopiowany do schowka\!
+SVGManager.0=Niemo\u017Cliwe utworzenie kszta\u0142t\u00F3w z pliku SVG
diff --git a/current/latexDraw/figures/AkinPoints.java b/current/latexDraw/figures/AkinPoints.java
new file mode 100644
index 0000000..c7000db
--- /dev/null
+++ b/current/latexDraw/figures/AkinPoints.java
@@ -0,0 +1,908 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import javax.swing.JLabel;
+
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.ui.components.LabelListCellRenderer;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines joined points.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/25/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class AkinPoints extends LaTeXDrawPolygon
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The default value of interval. @since 1.9*/
+	public static final int DEFAULT_INTERVAL = 5;
+	
+	/** The akin points are drawn as curves. @since 1.9*/
+	public static final short TYPE_CURVES = 1;
+	
+	/** The akin points are drawn as lines. @since 1.9*/
+	public static final short TYPE_LINES = 0;
+	
+	/** The type by default of the akin points. @since 1.9*/
+	public static final short DEFAULT_TYPE = TYPE_CURVES;
+	
+	public static final String LABEL_TYPE_CHOICE = "typeChoice";//$NON-NLS-1$
+	
+	public static final boolean DEFAULT_OPEN = true;
+	
+	
+	/** Define if the shape is closed or not. @since 1.9 */
+	protected boolean open;
+	
+	/** Define the interval between the each point to use. @since 1.9*/
+	protected int interval;
+	
+	/** Define the type of the akin points: lines or curves. @since 1.9*/
+	protected int type;
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public AkinPoints(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), increaseMeter);
+	}
+	
+	
+	
+	
+	/**
+	 * The constructor using one point.
+	 * @param pt The first point.
+	 */
+	public AkinPoints(LaTeXDrawPoint2D pt, boolean increaseMeter)
+	{
+		super(increaseMeter);
+	
+		open 		= DEFAULT_OPEN;
+		type 		= DEFAULT_TYPE;
+		interval 	= DEFAULT_INTERVAL;
+		isBordersMovable 	 = false;
+		isDashableOrDotable  = true;
+		isDoubleBoundaryable = false;
+		canBeFilled 		 = true;
+		borders = new LaTeXDrawRectangle((LaTeXDrawPoint2D)pt.clone(), (LaTeXDrawPoint2D)pt.clone(), false);
+		addPoint(pt);
+		updateShape();
+	}
+	
+
+	/**
+	 * Create a list of choice in order to select the type of shape we want.
+	 * @return The created list.
+	 * @since 1.9
+	 */
+	public static LaTeXDrawComboBox createTypeChoice()
+	{
+		LaTeXDrawComboBox typeChoice = new LaTeXDrawComboBox();
+		typeChoice.setRenderer(new LabelListCellRenderer());
+		typeChoice.setName(LABEL_TYPE_CHOICE);
+		typeChoice.setActionCommand(LABEL_TYPE_CHOICE);
+		
+		JLabel l = new JLabel(String.valueOf(TYPE_CURVES));
+		l.setIcon(LaTeXDrawResources.curvesFreehandIcon);
+		typeChoice.addItem(l);
+		l = new JLabel(String.valueOf(TYPE_LINES));
+		l.setIcon(LaTeXDrawResources.linesFreehandIcon);
+		typeChoice.addItem(l);
+		
+		return typeChoice;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to add a point to the polygon
+	 * @param pt The point to be added
+	 */
+	@Override
+	public boolean addPoint(LaTeXDrawPoint2D pt)
+	{
+		boolean add = true;
+		
+		if(!pts.isEmpty())
+		{ // The problem with akin points, is that some akin points
+			// can be equal and consequently, the code becomes heavier;
+			// so we look the last point and of it's equal to the new point
+			// we don't insert this new point.
+			LaTeXDrawPoint2D  p = pts.lastElement();
+			if(((int)p.x)==((int)pt.x) && ((int)p.y)==((int)pt.y))
+				add = false;
+		}
+		
+		if(add)
+		{
+			pts.add(pt);
+			if(borders!=null)
+				updateBorders();
+			
+			updateShape();
+			
+			return true;
+		}
+		return false;
+	}
+
+	
+	
+	@Override
+	public boolean addPointAt(LaTeXDrawPoint2D pt, int id)
+	{
+		if(id == -1)
+			id = pts.size()-1;
+		
+		if(id<0 || id>pts.size())
+			throw new IllegalArgumentException(String.valueOf(id));
+		
+		if(pt!=null)
+		{
+			if(pts.isEmpty())
+				pts.add(pt);
+			else
+				pts.add(id, pt);
+			
+			if(borders!=null)
+				updateBorders(pt);
+			
+			updateShape();
+			
+			return true;
+		}
+		return false;
+	}
+
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		if(pts==null || pts.isEmpty()) return ;
+		
+		if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+		else 
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER,
+					1.f, new float[]{0,thickness+dotSep}, 0));
+		else
+		if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+					1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+		
+		Color formerCol = g.getColor();
+		
+		if(hasShadow)
+		{
+			Stroke formerS = g.getStroke();
+			double dx=0, dy=0;
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			g.translate(dx, dy);
+			g.setColor(shadowColor);
+			g.draw(shape);
+			
+			if(isFilled() || hasGradient() || isHatched())
+				g.fill(shape);
+			
+			g.translate(-dx, -dy);
+			g.setColor(interiorColor);
+			g.draw(shape);
+			g.setStroke(formerS);
+		}
+		
+		fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, shape);
+		
+		g.setColor(linesColor);
+        g.draw(shape);
+		g.setColor(formerCol);
+		
+		if(isSelected && borders!=null)
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+	
+	
+	
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt)
+	{
+		if(isSelected && (borders.dNE.isIn(pt) || borders.dNW.isIn(pt) || 
+			borders.dSE.isIn(pt) || borders.dSW.isIn(pt) || borders.dS.isIn(pt)  || 
+			borders.dN.isIn(pt) || borders.dE.isIn(pt)  || borders.dW.isIn(pt)))
+			return true;
+		
+		Stroke wideline = new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
+		Shape s = wideline.createStrokedShape(shape);
+
+		if(s.contains(pt))
+			return true;
+
+		if(isFilled() || hasGradient() || isHatched())
+			if(shape.contains(pt))
+				return true;
+		
+		return false;
+	}
+
+	
+	
+	
+	@Override
+	public void onClick(Point pt)
+	{
+		isSelected = true;
+		if(borders!=null)
+			borders.onClick(pt);
+	}
+
+	
+	
+	
+	
+	@Override
+	public void setLastPoint(double x, double y) 
+	{
+		/* We cannot set the last point of akin points. */
+	}
+
+
+
+	
+	@Override
+	public String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		if(getNbPoints()<2) return null;
+		
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		String coord = "", add="", fillCode=""; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+		int i, size = getNbPoints();
+		double threshold = 0.001;
+		
+		if(hasShadow)
+		{
+			add+=",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				add+=",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+			
+			if(((float)shadowSize) != ((float)DEFAULT_SHADOW_SIZE))
+				add+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC), threshold);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				add += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+		}
+			
+		if(!linesColor.equals(PSTricksConstants.DEFAULT_LINE_COLOR))
+		{
+			String name = DviPsColors.getColourName(linesColor);
+			if(name==null)
+			{
+				name = "color"+number;//$NON-NLS-1$
+				DviPsColors.addUserColour(linesColor, "color"+number); //$NON-NLS-1$
+			}
+			add += ",linecolor="+name; //$NON-NLS-1$
+		}
+		
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) 
+			fillCode=','+str;
+		
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			add += ",linestyle="+lineStyle+",dotsep="+ //$NON-NLS-1$ //$NON-NLS-2$
+			LaTeXDrawNumber.getCutNumber(dotSep/ppc, threshold)+ "cm";	//$NON-NLS-1$
+		else
+			if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+				add += ",linestyle="+lineStyle+",dash=" + //$NON-NLS-1$ //$NON-NLS-2$
+				LaTeXDrawNumber.getCutNumber(blackDashLength/ppc, threshold) + "cm "+ //$NON-NLS-1$
+				LaTeXDrawNumber.getCutNumber(whiteDashLength/ppc, threshold) + "cm";//$NON-NLS-1$
+		
+		if(type==TYPE_CURVES)
+		{
+			float prevx=0;
+			float prevy=0;
+			float curx = (float)pts.firstElement().x;
+			float cury = (float)pts.firstElement().y;
+	        float midx=0;
+	        float midy=0;
+			
+	        coord = "\\moveto(" +LaTeXDrawNumber.getCutNumber((float)((curx-d.x)/ppc), threshold)+","+//$NON-NLS-1$//$NON-NLS-2$
+	        		LaTeXDrawNumber.getCutNumber((float)((d.y-cury)/ppc), threshold)+")\n";//$NON-NLS-1$
+	    	
+	        if(pts.size()>interval)
+	        {
+	            prevx = curx;
+	            prevy = cury;
+	            curx = (float)pts.elementAt(interval).x; 
+	            cury = (float)pts.elementAt(interval).y;
+	            midx = (curx + prevx) / 2.0f;
+	            midy = (cury + prevy) / 2.0f;
+				
+	            coord += "\\lineto(" +LaTeXDrawNumber.getCutNumber((float)((midx-d.x)/ppc), threshold)+","+//$NON-NLS-1$//$NON-NLS-2$
+	            		LaTeXDrawNumber.getCutNumber((float)((d.y-midy)/ppc), threshold)+")\n";//$NON-NLS-1$
+	        }
+	        
+	        for(i=interval*2; i<size; i+=interval) 
+	        {
+				float x1 = (midx + curx) / 2.0f;
+				float y1 = (midy + cury) / 2.0f;
+				prevx = curx;
+				prevy = cury;
+				curx = (float)pts.elementAt(i).x; 
+				cury = (float)pts.elementAt(i).y;
+				midx = (curx + prevx) / 2.0f;
+				midy = (cury + prevy) / 2.0f;
+				float x2 = (prevx + midx) / 2.0f;
+				float y2 = (prevy + midy) / 2.0f;
+				
+	            coord += "\\curveto(" +LaTeXDrawNumber.getCutNumber((float)((x1-d.x)/ppc), threshold)+","+//$NON-NLS-1$//$NON-NLS-2$
+	            		LaTeXDrawNumber.getCutNumber((float)((d.y-y1)/ppc), threshold)+")(" +  //$NON-NLS-1$
+	            		LaTeXDrawNumber.getCutNumber((float)((x2-d.x)/ppc), threshold)+","+//$NON-NLS-1$
+        				LaTeXDrawNumber.getCutNumber((float)((d.y-y2)/ppc), threshold)+")(" +  //$NON-NLS-1$
+        				LaTeXDrawNumber.getCutNumber((float)((midx-d.x)/ppc), threshold)+","+//$NON-NLS-1$
+						LaTeXDrawNumber.getCutNumber((float)((d.y-midy)/ppc), threshold)+")\n";//$NON-NLS-1$
+	        }
+	        
+	        if((i-interval+1)<size)
+	        {
+	        	float x1 = (midx + curx) / 2.0f;
+	        	float y1 = (midy + cury) / 2.0f;
+	            prevx = curx;
+	            prevy = cury;
+	            curx = (float)pts.lastElement().x; 
+	            cury = (float)pts.lastElement().y;
+	            midx = (curx + prevx) / 2.0f;
+	            midy = (cury + prevy) / 2.0f;
+	            float x2 = (prevx + midx) / 2.0f;
+	            float y2 = (prevy + midy) / 2.0f;
+				
+	            coord += "\\curveto(" + //$NON-NLS-1$
+	            LaTeXDrawNumber.getCutNumber((float)((x1-d.x)/ppc), threshold)+","+//$NON-NLS-1$
+	            LaTeXDrawNumber.getCutNumber((float)((d.y-y1)/ppc), threshold)+")(" +  //$NON-NLS-1$
+				LaTeXDrawNumber.getCutNumber((float)((x2-d.x)/ppc), threshold)+","+//$NON-NLS-1$
+				LaTeXDrawNumber.getCutNumber((float)((d.y-y2)/ppc), threshold)+")(" +  //$NON-NLS-1$
+				LaTeXDrawNumber.getCutNumber((float)((pts.lastElement().x-d.x)/ppc), threshold)+","+//$NON-NLS-1$
+				LaTeXDrawNumber.getCutNumber((float)((d.y-pts.lastElement().y)/ppc), threshold)+")\n";//$NON-NLS-1$
+	        }
+		}
+		else
+		{
+			LaTeXDrawPoint2D p = pts.firstElement();
+			
+			coord = "\\moveto(" +LaTeXDrawNumber.getCutNumber((float)((p.x-d.x)/ppc), threshold)+","+//$NON-NLS-1$//$NON-NLS-2$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-p.y)/ppc), threshold)+")\n";//$NON-NLS-1$
+			
+			for(i=interval; i<size; i+=interval)
+			{
+				p = pts.elementAt(i);
+				coord += "\\lineto(" +LaTeXDrawNumber.getCutNumber((float)((p.x-d.x)/ppc), threshold)+","+//$NON-NLS-1$//$NON-NLS-2$
+						LaTeXDrawNumber.getCutNumber((float)((d.y-p.y)/ppc), threshold)+")\n";//$NON-NLS-1$
+			}
+			
+			if((i-interval)<size)
+				coord += "\\lineto(" +LaTeXDrawNumber.getCutNumber((float)((pts.lastElement().x-d.x)/ppc), threshold)+","+//$NON-NLS-1$//$NON-NLS-2$
+				LaTeXDrawNumber.getCutNumber((float)((d.y-pts.lastElement().y)/ppc), threshold)+")\n";//$NON-NLS-1$
+		}
+		
+		if(!isFilled && hasShadow() && isHatched())
+		{
+			String name = DviPsColors.getColourName(interiorColor);
+			if(name==null)
+			{
+				name = "color"+number+'b';//$NON-NLS-1$
+				DviPsColors.addUserColour(interiorColor, name); 
+			}
+			add += ",fillcolor=" + name; //$NON-NLS-1$
+		}
+		
+		return "\\pscustom[linewidth=" + LaTeXDrawNumber.getCutNumber(thickness/ppc, threshold) + fillCode + add +"]\n{\n\\newpath\n" + //$NON-NLS-1$//$NON-NLS-2$
+				coord + (open ? "" : "\\closepath")+ (hasShadow ? "\\openshadow\n" : "") + '}';//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+	}
+
+	
+
+	
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow 			= true;
+		isDoubleBoundaryable 	= false;
+		isDashableOrDotable 	= true;
+		canBeFilled				= true;
+		interiorColor 	= (Color) ois.readObject();
+		lineStyle 		= (String) ois.readObject();
+		rotationAngle 	= ois.readDouble();
+		thickness 		= ois.readFloat();
+		isFilled 		= ois.readBoolean();
+		isSelected 		= ois.readBoolean();
+		isOnRotation 	= ois.readBoolean();
+		linesColor 		= (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep 			= ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		pts 			= (Vector) ois.readObject();
+		
+		delimiters = new Vector<Delimitor>();
+		for(int i=0, size = pts.size();i<size; i++)
+			delimiters.add(new Delimitor(pts.elementAt(i)));
+			
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0) //$NON-NLS-1$
+		{
+			hasDoubleBoundary 	= ois.readBoolean();
+			doubleColor 		= (Color)ois.readObject();
+			doubleSep 			= ois.readDouble();
+		}
+		else
+		{
+			hasDoubleBoundary  	= DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor 		= DEFAULT_DOUBLE_COLOR;
+			doubleSep   		= DEFAULT_DOUBLESEP;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.9")>=0) //$NON-NLS-1$
+		{
+			interval 	= ois.readInt();
+			type 		= ois.readInt();
+			open 		= ois.readBoolean();
+		}
+		else
+		{	
+			interval	= DEFAULT_INTERVAL;
+			type		= DEFAULT_TYPE;
+			open		= DEFAULT_OPEN;
+		}
+		
+		shape = createShape2D();
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		super.updateToGrid(grid);
+		
+		int i=0;
+		
+		while(i<pts.size()-1)
+			if(pts.elementAt(i).equals(pts.elementAt(i+1)))
+				pts.remove(i);
+			else
+				i++;
+		
+		updateShape();
+	}
+
+
+
+
+	/**
+	 * @return the interval.
+	 * @since 1.9
+	 */
+	public int getInterval()
+	{
+		return interval;
+	}
+
+
+
+
+	/**
+	 * @param interval the interval to set.
+	 * @since 1.9
+	 */
+	public void setInterval(int interval)
+	{
+		if(interval>0)
+		{
+			this.interval = interval;
+			updateShape();
+			updateBorders();
+		}
+		else
+			throw new IllegalArgumentException("The interval must be greater than 0.");//$NON-NLS-1$
+	}
+
+
+
+
+	/**
+	 * @return the type.
+	 * @since 1.9
+	 */
+	public int getType()
+	{
+		return type;
+	}
+
+
+
+
+	/**
+	 * @param type the type to set.
+	 * @since 1.9
+	 */
+	public void setType(int type)
+	{
+		if(type==TYPE_CURVES || type==TYPE_LINES)
+		{
+			this.type = type;
+			updateShape();
+			updateBorders();
+		}
+	}
+
+
+	
+	@Override
+	public Shape createShape2D()
+	{
+		GeneralPath gp = new GeneralPath();
+		int i, size = pts.size();
+		
+		if(getType()==TYPE_CURVES)
+		{
+			float prevx = (float)pts.lastElement().x;
+			float prevy = (float)pts.lastElement().y;
+			float curx = (float)pts.firstElement().x;
+			float cury = (float)pts.firstElement().y;
+	        float midx = (curx + prevx) / 2.0f;
+	        float midy = (cury + prevy) / 2.0f;
+			
+        	gp.moveTo(curx, cury);
+	    	
+	        if(pts.size()>interval)
+	        {
+	            prevx = curx;
+	            prevy = cury;
+	            curx = (float)pts.elementAt(interval).x; 
+	            cury = (float)pts.elementAt(interval).y;
+	            midx = (curx + prevx) / 2.0f;
+	            midy = (cury + prevy) / 2.0f;
+	            
+            	gp.lineTo(midx, midy);
+	        }
+	        
+	        for(i=interval*2; i <pts.size(); i+=interval) 
+	        {
+	        	 float x1 = (midx + curx) / 2.0f;
+	             float y1 = (midy + cury) / 2.0f;
+	             prevx = curx;
+	             prevy = cury;
+	             curx = (float)pts.elementAt(i).x; 
+	             cury = (float)pts.elementAt(i).y;
+	             midx = (curx + prevx) / 2.0f;
+	             midy = (cury + prevy) / 2.0f;
+	             float x2 = (prevx + midx) / 2.0f;
+	             float y2 = (prevy + midy) / 2.0f;
+	             
+            	 gp.curveTo(x1, y1, x2, y2, midx, midy);
+	        }
+	        
+	        if((i-interval+1)<size)
+	        {
+	        	float x1 = (midx + curx) / 2.0f;
+	        	float y1 = (midy + cury) / 2.0f;
+	            prevx = curx;
+	            prevy = cury;
+	            curx = (float)pts.lastElement().x; 
+	            cury = (float)pts.lastElement().y;
+	            midx = (curx + prevx) / 2.0f;
+	            midy = (cury + prevy) / 2.0f;
+	            float x2 = (prevx + midx) / 2.0f;
+	            float y2 = (prevy + midy) / 2.0f;
+	            
+            	gp.curveTo(x1, y1, x2, y2, (float)pts.lastElement().x, (float)pts.lastElement().y);
+	        }
+		}
+		else
+		{
+			LaTeXDrawPoint2D p = pts.firstElement();
+			
+			gp.moveTo((float)p.x, (float)p.y);
+			
+			for(i=interval; i<size; i+=interval)
+			{
+				p = pts.elementAt(i);
+				
+				gp.lineTo((float)p.x, (float)p.y);
+			}
+			
+			if((i-interval)<size)
+				gp.lineTo((float)pts.lastElement().x, (float)pts.lastElement().y);
+		}
+		
+		if(!isOpen())
+			gp.closePath();
+	
+		return gp;
+	}
+	
+
+
+	@Override
+	public void updateShape()
+	{
+		updateGravityCenter();
+		shape = createShape2D();
+	}
+
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		AkinPoints ak = (AkinPoints)super.clone();
+		
+		ak.interval = interval;
+		ak.type		= type;
+		ak.updateShape();
+		
+		return ak;
+	}
+
+
+
+
+	/**
+	 * @return the open.
+	 * @since 1.9
+	 */
+	public boolean isOpen()
+	{
+		return open;
+	}
+
+
+
+
+	/**
+	 * @param open the open to set.
+	 * @since 1.9
+	 */
+	public void setOpen(boolean open)
+	{
+		if(this.open!=open)
+		{
+			this.open = open;
+			updateShape();
+		}
+	}
+
+
+
+
+	@Override
+	public Shape createShadowShape()
+	{
+		if(!hasShadow()) return shape;
+		
+		double dx, dy;
+		LaTeXDrawPoint2D cg 		= getGravityCenter();
+		LaTeXDrawPoint2D shadowCg 	= (LaTeXDrawPoint2D)cg.clone();
+		AffineTransform at 			= new AffineTransform();
+		
+		shadowCg.setLocation(cg.x+shadowSize, cg.y);
+		shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+		dx = shadowCg.x-cg.x;
+		dy = cg.y-shadowCg.y;
+		at.translate(dx, dy);
+		
+		return at.createTransformedShape(shape);
+	}
+
+	
+	
+	@Override
+	public void removePointAt(int id)
+	{
+		if(pts.isEmpty()) return ;
+		
+		if(id>=pts.size() || id<-1)
+			throw new IllegalArgumentException();
+
+		if(id==-1)
+			id = pts.size()-1;
+		
+		pts.remove(id);
+		
+		if(borders!=null)
+			updateBorders();
+		
+		updateShape();
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()/4;
+	}
+
+
+
+
+	@Override
+	public void updateBorders()
+	{
+		int i, size = pts.size();
+		double NWx, NWy, SEy, SEx;
+		
+		if(getType()==TYPE_CURVES)
+		{
+			float prevx = (float)pts.lastElement().x;
+			float prevy = (float)pts.lastElement().y;
+			float curx = (float)pts.firstElement().x;
+			float cury = (float)pts.firstElement().y;
+	        float midx = (curx + prevx) / 2.0f;
+	        float midy = (cury + prevy) / 2.0f;
+			
+	        NWx = SEx = curx;
+	        NWy = SEy = cury;
+	    	
+	        if(pts.size()>interval)
+	        {
+	            prevx = curx;
+	            prevy = cury;
+	            curx = (float)pts.elementAt(interval).x; 
+	            cury = (float)pts.elementAt(interval).y;
+	            midx = (curx + prevx) / 2.0f;
+	            midy = (cury + prevy) / 2.0f;
+	        	
+	        	if(midx<NWx) NWx = midx;
+				else if(midx>SEx) SEx = midx;
+				if(midy<NWy) NWy = midy;
+				else if(midy>SEy) SEy = midy;
+	        }
+	        
+	        for(i=interval*2; i <pts.size(); i+=interval) 
+	        {
+	             prevx = curx;
+	             prevy = cury;
+	             curx = (float)pts.elementAt(i).x; 
+	             cury = (float)pts.elementAt(i).y;
+	             midx = (curx + prevx) / 2.0f;
+	             midy = (cury + prevy) / 2.0f;
+	             
+	        	if(midx<NWx) NWx = midx;
+				else if(midx>SEx) SEx = midx;
+				if(midy<NWy) NWy = midy;
+				else if(midy>SEy) SEy = midy;
+	        }
+	        
+	        if((i-interval+1)<size)
+	        {
+	            prevx = curx;
+	            prevy = cury;
+	            curx = (float)pts.lastElement().x; 
+	            cury = (float)pts.lastElement().y;
+	            midx = (curx + prevx) / 2.0f;
+	            midy = (cury + prevy) / 2.0f;
+	            
+	        	if(pts.lastElement().x<NWx) NWx = pts.lastElement().x;
+				else if(pts.lastElement().x>SEx) SEx = pts.lastElement().x;
+				if(pts.lastElement().y<NWy) NWy = pts.lastElement().y;
+				else if(pts.lastElement().y>SEy) SEy = pts.lastElement().y;
+	        }
+		}
+		else
+		{
+			LaTeXDrawPoint2D p = pts.firstElement();
+			NWx = SEx = p.x;		
+			SEy = NWy = p.y;
+			
+			for(i=interval; i<size; i+=interval)
+			{
+				p = pts.elementAt(i);
+				if(p.x<NWx) NWx = p.x;
+				else if(p.x>SEx) SEx = p.x;
+				if(p.y<NWy) NWy = p.y;
+				else if(p.y>SEy) SEy = p.y;
+			}
+			
+			if((i-interval)<size)
+				if(pts.lastElement().x<NWx) NWx = pts.lastElement().x;
+				else if(pts.lastElement().x>SEx) SEx = pts.lastElement().x;
+				if(pts.lastElement().y<NWy) NWy = pts.lastElement().y;
+				else if(pts.lastElement().y>SEy) SEy = pts.lastElement().y;
+		}
+		
+		if(borders==null)
+			borders = new LaTeXDrawRectangle(new LaTeXDrawPoint2D(NWx,NWy),
+											 new LaTeXDrawPoint2D(SEx,SEy),false);
+		else
+		{
+			borders.setLastPoint(SEx, SEy);
+			borders.setFirstPoint(NWx, NWy);
+		}
+		updateGravityCenter();
+	}
+	
+	
+	@Override
+	public boolean shadowFillsShape()
+	{
+		return false;
+	}
+	
+	
+	@Override
+	public String toString()
+	{
+		String str = super.toString();
+		
+		return str + "{pts=" + pts + ", type=" + getType() + ", inter=" + getInterval() + ", open=" + isOpen() + "}"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+	}
+}
diff --git a/current/latexDraw/figures/Arc.java b/current/latexDraw/figures/Arc.java
new file mode 100644
index 0000000..e9b0bc1
--- /dev/null
+++ b/current/latexDraw/figures/Arc.java
@@ -0,0 +1,1477 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.Arc2D;
+import java.awt.geom.Line2D;
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+import javax.swing.JComboBox;
+
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.ui.dialog.AbstractParametersFrame;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines an Arc.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 06/06/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Arc extends Circle implements Arrowable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The delimiter of the start angle */
+	protected Delimitor dStart;
+	
+	/** The delimiter of the end angle */
+	protected Delimitor dEnd;
+	
+	/** The angle of the start (radian)*/
+	protected double startAngle;
+	
+	/** The angle of the end (radian)*/
+	protected double endAngle;
+	
+	/** the arrowhead of the first point */
+	protected ArrowHead arrowHead1;
+	
+	/** The arrow head of the second point */
+	protected ArrowHead arrowHead2;
+	
+	/** The type of arc : wedge, arc, chord */
+	protected int type;
+	
+	/** Allows to display the points of the arc */
+	protected boolean showPoints;
+
+	/** The value by default of the attribute DEFAULT_SHOWPOINTS */
+	public static final boolean DEFAULT_SHOWPOINTS = false;
+	
+	/** A kind of arc */
+	public static final String TYPE_ARC = LaTeXDrawLang.getOthersString("Arc.arc"); //$NON-NLS-1$
+	
+	/** A kind of arc */
+	public static final String TYPE_PIE = LaTeXDrawLang.getOthersString("Arc.wedge"); //$NON-NLS-1$
+	
+	/** A kind of arc */
+	public static final String TYPE_CHORD = LaTeXDrawLang.getOthersString("Arc.chord"); //$NON-NLS-1$
+	
+	/** The label of the arc choice */
+	public static final String LABEL_ARCCHOICE = LaTeXDrawLang.getOthersString("Arc.arcType"); //$NON-NLS-1$
+	
+	/** The start angle by default */
+	public static final double DEFAULT_STARTANGLE = 0;
+	
+	/** The end angle by default */
+	public static final double DEFAULT_ENDANGLE = Math.PI;
+	
+	/** The type of arc by default */
+	public static final String DEFAULT_TYPE = TYPE_ARC;
+	
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public Arc(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), Arc2D.OPEN, increaseMeter);
+	}
+	
+	
+	
+	/**
+	 * The constructor taking the two opposed points
+	 * @param p1 The first point of the parabola
+	 * @param p2 The last point
+	 */
+	public Arc(LaTeXDrawPoint2D p1, LaTeXDrawPoint2D p2, int type, boolean increaseMeter)
+	{
+		super(p1, new LaTeXDrawPoint2D(p2.x,p1.y), new LaTeXDrawPoint2D(p1.x, p2.y), p2, increaseMeter);
+		
+		isBordersMovable = false;
+		isDoubleBoundaryable = false;
+		
+		setType(type);
+		dStart = new Delimitor(new LaTeXDrawPoint2D((p1.x+3*p2.x)/4,p2.y));
+		dEnd   = new Delimitor(new LaTeXDrawPoint2D((3*p1.x+p2.x)/4,p2.y));
+		
+		dStart.setColorSet3();
+		dEnd.setColorSet3();
+
+		endAngle = DEFAULT_ENDANGLE;
+		startAngle = DEFAULT_STARTANGLE;
+		bordersPosition = PSTricksConstants.BORDERS_MIDDLE;
+		
+		arrowHead1 = new ArrowHead(p1, new Line(p1,(LaTeXDrawPoint2D)p1.clone(),false), this);
+		arrowHead2 = new ArrowHead(p2, new Line(p2,(LaTeXDrawPoint2D)p2.clone(),false), this);
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	/**
+	 * Allows to set the style of the first arrow of the line
+	 * @param style The new style of the first arrow of the line
+	 */
+	public synchronized void setArrow1Style(String style)
+	{
+		arrowHead1.setArrowStyle(style);
+	}
+	
+	
+	
+	/**
+	 * Allows to set the style of the second arrow of the line
+	 * @param style The new style of the second arrow of the line
+	 */
+	public synchronized void setArrow2Style(String style)
+	{
+		arrowHead2.setArrowStyle(style);
+	}
+	
+
+	
+	/**
+	 * Allows to get the kind of arc
+	 * @return The kind of arc
+	 */
+	public synchronized int getType()
+	{
+		return type;
+	}
+	
+	
+	
+
+	public String getTypeName()
+	{
+			if(type == Arc2D.OPEN)
+				return TYPE_ARC;
+			
+			if(type == Arc2D.CHORD)
+				return TYPE_CHORD;
+			
+			return TYPE_PIE;
+	}
+	
+	
+	
+	
+	@Override
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound) 
+	{
+		if(percent==1.) return ;
+		super.rescaleX(formerX, newX, percent, bound);
+		updateCenterStartEndDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound) 
+	{
+		if(percent==1.) return ;
+		super.rescaleY(formerY, newY, percent, bound);
+		updateCenterStartEndDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+	
+	
+	
+	
+	
+	/**
+	 * Allows to set the kind of arc
+	 * @param type The kind of arc
+	 */
+	public synchronized void setType(int type)
+	{
+		if(type!=Arc2D.OPEN && type!=Arc2D.PIE && type!=Arc2D.CHORD)
+			throw new IllegalArgumentException();
+		
+		this.type = type;
+		canHaveArrow = type==Arc2D.OPEN;
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+
+	
+	/**
+	 * Allows to set the kind of arc
+	 * @param type The kind of arc
+	 */
+	public synchronized void setType(String type)
+	{
+		if(type.equals(TYPE_ARC))
+			this.type = Arc2D.OPEN;
+		else 
+		if(type.equals(TYPE_CHORD))
+			this.type = Arc2D.CHORD;
+		else 
+		if(type.equals(TYPE_PIE))
+			this.type = Arc2D.PIE;
+		else 
+			throw new IllegalArgumentException();
+	
+		canHaveArrow = this.type==Arc2D.OPEN;
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setThickness(float val)
+	{
+		if(!Double.isInfinite(val) && !Double.isNaN(val) && val>0)
+		{
+			thickness = val;
+			double dim = 1.33*val+3.33 +1.;
+			if(dim<6.) 
+				dim = 6;
+			
+			// We change the size of the delimiters when the size of 
+			// the figure change
+			dStart.setDim(dim);
+			dEnd.setDim(dim);
+			arrowHead1.getLine().setThickness(val);
+			arrowHead2.getLine().setThickness(val);
+			
+			if(borders!=null)
+				borders.setThickness(val);
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+	}
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to set the start angle (radian)
+	 * @param angle The new start angle
+	 */
+	public synchronized void setStartAngle(double angle)
+	{
+		startAngle = angle;
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	/**
+	 * Allows to set the end angle (radian)
+	 * @param angle The new end angle
+	 */
+	public synchronized void setEndAngle(double angle)
+	{
+		endAngle = angle;
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+
+	
+
+	/**
+	 * Allows to get the start angle
+	 * @return The start angle
+	 */
+	public synchronized double getStartAngle()
+	{
+		return startAngle%(2.*Math.PI);
+	}
+	
+	
+	
+
+	/**
+	 * Allows to get the end angle
+	 * @return The end angle
+	 */
+	public synchronized double getEndAngle()
+	{
+		return endAngle%(2.*Math.PI);
+	}
+	
+	
+	
+	@Override
+	public void onDragged(Point formerPt, Point newPt)
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		if(borders.dSelected!=null)
+		{
+			borders.onDragged(formerPt, newPt);
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+		else
+		if(dSelected!=null)
+		{
+			LaTeXDrawPoint2D newPt2 = rotateInvertPoint(newPt);
+			if(dSelected==dStart)
+				moveStartAngle(newPt2);
+			else
+			if(dSelected==dEnd)
+				moveEndAngle(newPt2);
+		}
+		else //	 If the user has clicked on the line
+		{
+			shift(formerPt, newPt);	
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+
+		updateGravityCenter();
+		updateCenterStartEndDelimitors();
+		rotationAngle = borders.getRotationAngle();//update the angle(when rotation)
+	}
+	
+	
+	
+
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint();
+		LaTeXDrawPoint2D SE = borders.getTheSEPoint();
+		Color formerCol = g.getColor();
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+		LaTeXDrawPoint2D startPt = getNonRotatedStartPoint();
+		LaTeXDrawPoint2D endRot  = getNonRotatedEndPoint();
+		ArrowHead ar1=null, ar2=null;
+		String oldStyleL = null, oldStyleR=null;
+		startAngle%=(2*Math.PI);
+		endAngle%=(2*Math.PI);
+		double dx=0, dy=0;
+		boolean changeFillStyle = false;
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}	
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		double start = startAngle, end = endAngle;
+		
+		if(type==Arc2D.OPEN)
+		{
+			double radius = SE.x-NW.x;
+			
+			if(!arrowHead1.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE))
+			{
+				double lgth = arrowHead1.getArrowHeadLength();
+				
+				if(lgth!=0)
+				{
+					startAngle+=(Math.atan(lgth/radius));
+					startAngle%=(2*Math.PI);
+				}
+
+				Line line = new Line(getTangenteAt(startAngle, ((float)startAngle)<((float)Math.PI)), false);
+				line.getPt2().move(line.getPt1(), startPt);
+				line.setPointAt(startPt, 0);
+				arrowHead1.setLine(line);
+				arrowHead1.setPosition(line.getPt1());
+				
+				if(arrowHead1.getArrowStyle().equals(PSTricksConstants.DLARROW_STYLE) || 
+					arrowHead1.getArrowStyle().equals(PSTricksConstants.DRARROW_STYLE))
+				{
+					oldStyleL = arrowHead1.getArrowStyle();
+					double angle = startAngle;
+					
+					if(lgth!=0)
+					{
+						angle+=Math.atan((lgth*3)/radius);
+						angle%=(2*Math.PI);
+					}	
+					
+					line = new Line(getTangenteAt(angle, angle<=Math.PI), false);
+					ar1 = new ArrowHead(line.getPt1(), line, this);
+					ar1.setArrowInset(arrowHead1.getArrowInset());
+					ar1.setArrowLength(arrowHead1.getArrowLength());
+					ar1.setArrowSizeDim(arrowHead1.getArrowSizeDim());
+					ar1.setArrowSizeNum(arrowHead1.getArrowSizeNum());
+					
+					if(arrowHead1.getArrowStyle().equals(PSTricksConstants.DLARROW_STYLE))
+					{
+						ar1.setArrowStyle(PSTricksConstants.LARROW_STYLE);
+						arrowHead1.setArrowStyle(PSTricksConstants.LARROW_STYLE);
+					}
+					else
+					{
+						ar1.setArrowStyle(PSTricksConstants.RARROW_STYLE);
+						arrowHead1.setArrowStyle(PSTricksConstants.RARROW_STYLE);
+					}
+				}
+				
+				if(lgth!=0)
+				{
+					startAngle=start+Math.atan(2*lgth/radius);
+					startAngle%=(2*Math.PI);
+				}
+			}
+			
+			
+			if(!arrowHead2.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE))
+			{
+				double lgth = arrowHead2.getArrowHeadLength();	
+				
+				if(lgth!=0)
+					 endAngle-=(Math.atan(lgth/radius))%(2*Math.PI);
+	
+				Line line = new Line(getTangenteAt(endAngle, ((float)endAngle)>=((float)Math.PI)), false);
+				line.getPt2().move(line.getPt1(), endRot);
+				line.setPointAt(endRot, 0);
+				arrowHead2.setLine(line);
+				arrowHead2.setPosition(line.getPt1());
+				
+				if(arrowHead2.getArrowStyle().equals(PSTricksConstants.DLARROW_STYLE) || 
+					arrowHead2.getArrowStyle().equals(PSTricksConstants.DRARROW_STYLE))
+				{
+					oldStyleR = arrowHead2.getArrowStyle();
+					double angle = endAngle;
+					
+					if(lgth!=0)
+					{
+						angle-=Math.atan((lgth*3)/radius);
+						angle%=(2*Math.PI);
+					}
+					
+					line = new Line(getTangenteAt(angle, angle>=Math.PI), false);
+					ar2 = new ArrowHead(line.getPt1(), line, this);
+					ar2.setArrowInset(arrowHead2.getArrowInset());
+					ar2.setArrowLength(arrowHead2.getArrowLength());
+					ar2.setArrowSizeDim(arrowHead2.getArrowSizeDim());
+					ar2.setArrowSizeNum(arrowHead2.getArrowSizeNum());
+					
+					if(arrowHead2.getArrowStyle().equals(PSTricksConstants.DLARROW_STYLE))
+					{
+						ar2.setArrowStyle(PSTricksConstants.LARROW_STYLE);
+						arrowHead2.setArrowStyle(PSTricksConstants.LARROW_STYLE);
+					}
+					else
+					{
+						ar2.setArrowStyle(PSTricksConstants.RARROW_STYLE);
+						arrowHead2.setArrowStyle(PSTricksConstants.RARROW_STYLE);
+					}
+				}
+				
+				if(lgth!=0)
+				{
+					endAngle=end-Math.atan(2*lgth/radius);
+					endAngle%=(2*Math.PI);
+				}
+			}
+		}
+		
+		if(showPoints)
+		{
+			g.setStroke(new BasicStroke(thickness/2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+					1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+			g.setColor(linesColor);
+		
+			g.draw(new Line2D.Double(gravityCenter.x, gravityCenter.y, startPt.x, startPt.y));
+			g.draw(new Line2D.Double(gravityCenter.x, gravityCenter.y, endRot.x, endRot.y));
+		}
+		
+		Shape s0 = getInsideOutsideOrMiddleBorders();
+		
+		if(hasShadow)
+		{
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			g.translate(dx, dy);
+			g.setColor(shadowColor);
+			g.fill(s0);
+			g.draw(s0);
+			g.translate(-dx, -dy);
+			if(!isFilled)
+			{
+				changeFillStyle = true;
+				isFilled = true;
+			}
+			g.setColor(interiorColor);
+			g.draw(s0);
+		}
+		
+		if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+		else 
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+		{
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER,
+					1.f, new float[]{0,thickness+dotSep}, 0));
+		}
+		else
+		if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+		{
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+					1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+		}	
+		
+		fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, s0);					
+		g.setColor(linesColor);
+		g.draw(s0);
+		
+		if(type==Arc2D.OPEN)
+		{
+			Stroke formerS = g.getStroke();
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			
+			if(hasShadow)
+			{
+				g.translate(dx, dy);
+				arrowHead1.draw(g, interiorColor, true);
+				arrowHead2.draw(g, interiorColor, true);
+				g.translate(-dx, -dy);
+			}
+			
+			arrowHead1.draw(g, interiorColor, false);
+			arrowHead2.draw(g, interiorColor, false);
+			g.setStroke(formerS);
+			
+			if(ar1!=null)	
+			{
+				ar1.draw(g, interiorColor, false);
+				arrowHead1.setArrowStyle(oldStyleL);
+			}
+			
+			if(ar2!=null)	
+			{
+				ar2.draw(g, interiorColor, false);
+				arrowHead2.setArrowStyle(oldStyleR);
+			}
+			
+			startAngle = start;
+			endAngle   = end;
+		}
+		
+		if(changeFillStyle) isFilled = false;
+		g.setColor(formerCol);
+		
+		if(isSelected)
+		{			
+			if(dStart!=null && dEnd!=null)
+			{
+				dStart.draw(g);
+				dEnd.draw(g);
+			}
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+		}
+		else
+			if(rotationAngle%(Math.PI*2)!=0)
+			{
+				g.translate(-c3x, -c3y);
+				g.rotate(-rotationAngle);
+			}
+	}
+
+	
+	
+	
+	/**
+	 * Allows to get the position of the non-rotated end point
+	 * @return The end point
+	 */
+	public LaTeXDrawPoint2D getNonRotatedEndPoint()
+	{
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint();
+		LaTeXDrawPoint2D SE = borders.getTheSEPoint();
+
+		return rotatePoint(new LaTeXDrawPoint2D(SE.x, (SE.y+NW.y)/2.), -endAngle);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the position of the non-rotated start point
+	 * @return The start point
+	 */
+	public LaTeXDrawPoint2D getNonRotatedStartPoint()
+	{
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint();
+		LaTeXDrawPoint2D SE = borders.getTheSEPoint();
+
+		return rotatePoint(new LaTeXDrawPoint2D(SE.x, (SE.y+NW.y)/2.), -startAngle);
+	}
+	
+	
+	
+	
+	
+		
+	@Override
+	public synchronized void setLastPoint(LaTeXDrawPoint2D pt)
+	{
+		super.setLastPoint(pt);
+		updateCenterStartEndDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+	
+	
+	@Override
+	public synchronized void setFirstPoint(LaTeXDrawPoint2D pt)
+	{
+		super.setFirstPoint(pt);
+		updateCenterStartEndDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D p) 
+	{
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);
+		// Is the point is in a selector
+		if(isSelected && (borders.dNE.isIn(pt) || borders.dNW.isIn(pt) 
+			|| borders.dSE.isIn(pt) || borders.dSW.isIn(pt) || dEnd.isIn(pt)|| dStart.isIn(pt)))
+			return true;
+		
+		LaTeXDrawPoint2D NW = getTheNWPoint();
+		LaTeXDrawPoint2D SE = getTheSEPoint();
+		double width = SE.x - NW.x;
+		double start2 = Math.toDegrees(startAngle);
+		double end2   = startAngle>endAngle ? Math.toDegrees(2*Math.PI-startAngle+endAngle) : 
+			Math.toDegrees(endAngle-startAngle);
+		
+		Shape s =  new Arc2D.Double(NW.x-thickness/2., NW.y-thickness/2., 
+						width+thickness, width+thickness, start2, end2, type);
+	
+		if(!s.contains(pt))
+			return false;
+		
+		if(isFilled() || hasShadow() || hasGradient())
+			return true;
+		
+		double gap = thickness/2.;
+		s =  new Arc2D.Double(NW.x+gap, NW.y+gap, width-thickness, width-thickness, start2, end2, type);
+		
+		if(type==Arc2D.PIE)
+		{
+			double radius = width/2.;
+			LaTeXDrawPoint2D start = new LaTeXDrawPoint2D(
+				gravityCenter.x + Math.cos(startAngle)*radius,
+				gravityCenter.y - Math.sin(startAngle)*radius);
+			LaTeXDrawPoint2D end = new LaTeXDrawPoint2D(
+				gravityCenter.x + Math.cos(endAngle)*radius,
+				gravityCenter.y - Math.sin(endAngle)*radius);
+			
+			Line l1 = new Line(gravityCenter, rotatePoint(start), false);
+			l1.setThickness(thickness);
+			if(l1.isIn(p))
+				return true;
+			
+			Line l2 = new Line(gravityCenter, rotatePoint(end), false);
+			l2.setThickness(thickness);
+			if(l2.isIn(p))
+				return true;
+		}
+		else if(type==Arc2D.CHORD)
+		{
+			double radius = width/2.;
+			LaTeXDrawPoint2D start = new LaTeXDrawPoint2D(
+				gravityCenter.x + Math.cos(startAngle)*radius,
+				gravityCenter.y - Math.sin(startAngle)*radius);
+			LaTeXDrawPoint2D end = new LaTeXDrawPoint2D(
+				gravityCenter.x + Math.cos(endAngle)*radius,
+				gravityCenter.y - Math.sin(endAngle)*radius);
+			
+			Line l1 = new Line(rotatePoint(start), rotatePoint(end), false);
+			l1.setThickness(thickness);
+			if(l1.isIn(p))
+				return true;
+		}
+			
+		
+		if(s.contains(pt))
+			return false;
+		
+		return true;
+	}
+
+	
+	
+	
+	
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint(), SE = borders.getTheSEPoint();
+		String add1 = "", add2="", startCode="", addEnd="", fillType="";  //$NON-NLS-1$  //$NON-NLS-2$  //$NON-NLS-3$  //$NON-NLS-4$  //$NON-NLS-5$
+		String arrowsCode="", endCode = ""; //$NON-NLS-1$//$NON-NLS-2$
+		boolean isFilledWasChanged = false;
+		double threshold = 0.001;
+		
+		if(hasShadow)
+		{
+			fillType+=",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				fillType+=",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+			
+			if(((float)shadowSize) != ((float)DEFAULT_SHADOW_SIZE))
+				fillType+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC), threshold) ;//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				fillType += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+			if(!isFilled)
+			{
+				isFilled = true;
+				isFilledWasChanged = true;
+			}
+		}
+		
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) fillType=fillType+','+str;
+		
+		str = getPSTricksCodeLine(ppc);
+		if(str.length()>0) add1=add1+','+str;
+		
+		double x = (NW.x+SE.x)/2. - d.x, y = d.y - (SE.y+NW.y)/2., radius = (SE.x-NW.x)/2.;		
+		
+		if(type==Arc2D.OPEN)
+		{
+			startCode = "\\psarc"; //$NON-NLS-1$
+			
+			String currentArrowLStyle = arrowHead1.getArrowStyle();
+			String currentArrowRStyle = arrowHead2.getArrowStyle();	
+			
+			if(currentArrowRStyle.equals(PSTricksConstants.DLARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.DRARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.DRARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.DLARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.RARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.LARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.LARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.RARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.DLARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.DRARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+				currentArrowRStyle = PSTricksConstants.RRBRACKET_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+				currentArrowRStyle = PSTricksConstants.LRBRACKET_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+				currentArrowRStyle = PSTricksConstants.LSBRACKET_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+				currentArrowRStyle = PSTricksConstants.RSBRACKET_STYLE;
+			
+			String paramsR = ","+ arrowHead2.getParametersCode(); //$NON-NLS-1$
+			String paramsL = ","+ arrowHead1.getParametersCode(); //$NON-NLS-1$
+			if(paramsR.equals(",")) paramsR = ""; //$NON-NLS-1$ //$NON-NLS-2$
+			if(paramsL.equals(",")) paramsL = ""; //$NON-NLS-1$ //$NON-NLS-2$
+			
+			if(!currentArrowLStyle.equals(PSTricksConstants.NONEARROW_STYLE))
+			{
+				arrowsCode="{"+currentArrowLStyle+'-'; //$NON-NLS-1$
+				
+				if(!currentArrowRStyle.equals(PSTricksConstants.NONEARROW_STYLE))
+					arrowsCode+=currentArrowRStyle;
+				arrowsCode+='}';
+				
+				if(!arrowHead1.isOfTheSameTypeAs(arrowHead2))
+				{
+					if((currentArrowRStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+						currentArrowRStyle.equals(PSTricksConstants.RRBRACKET_STYLE)  ||
+						currentArrowRStyle.equals(PSTricksConstants.RSBRACKET_STYLE)  ||
+						currentArrowRStyle.equals(PSTricksConstants.RSBRACKET_STYLE))	&&
+						(currentArrowLStyle.equals(PSTricksConstants.BAREND_STYLE) ||
+						currentArrowLStyle.equals(PSTricksConstants.BARIN_STYLE) ||
+						currentArrowLStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+						currentArrowLStyle.equals(PSTricksConstants.RRBRACKET_STYLE)  ||
+						currentArrowLStyle.equals(PSTricksConstants.RSBRACKET_STYLE)  ||
+						currentArrowLStyle.equals(PSTricksConstants.RSBRACKET_STYLE)))
+						add1 = paramsR;
+					else
+						add1+= paramsL + paramsR;
+				}else add1+=paramsR;
+			}
+			else 
+				if(!currentArrowRStyle.equals(PSTricksConstants.NONEARROW_STYLE))
+				{
+					add1+=paramsR;
+					arrowsCode="{-"+currentArrowRStyle+'}'; //$NON-NLS-1$
+				}
+
+		}
+		else
+		if(type==Arc2D.PIE)
+			startCode = "\\pswedge"; //$NON-NLS-1$
+		else
+		{
+			endCode = "\n\\psline[linewidth=" + LaTeXDrawNumber.getCutNumber(thickness/ppc, threshold) +add1+ //$NON-NLS-1$
+			"](" +LaTeXDrawNumber.getCutNumber((float)((x+Math.cos(startAngle)*radius)/ppc), threshold)+ ',' + //$NON-NLS-1$
+			LaTeXDrawNumber.getCutNumber((float)((y+Math.sin(startAngle)*radius)/ppc), threshold)+
+			")(" +LaTeXDrawNumber.getCutNumber((float)((x+Math.cos(endAngle)*radius)/ppc), threshold)+ ','; //$NON-NLS-1$
+			
+			if(endAngle%Math.PI==0)
+				endCode +=LaTeXDrawNumber.getCutNumber((float)(y/ppc), threshold)+ ")"; //$NON-NLS-1$
+			else endCode +=LaTeXDrawNumber.getCutNumber((float)((y+Math.sin(endAngle)*radius)/ppc), threshold)+ ")"; //$NON-NLS-1$
+			startCode = "\\psarc";//$NON-NLS-1$
+		}
+		
+		if(rotationAngle%(Math.PI*2)!=0.)
+		{
+			double angle = -Math.toDegrees(rotationAngle);
+			double cx = (gravityCenter.x-d.x)/ppc;
+			double cy = (d.y-gravityCenter.y)/ppc;
+			double x2 = -Math.cos(-rotationAngle)*cx+
+						Math.sin(-rotationAngle)*cy+cx;
+			double y2 =  -Math.sin(-rotationAngle)*cx-
+						Math.cos(-rotationAngle)*cy+cy;
+			
+			if(Math.abs(x2) < 0.001) x2 = 0;
+			if(Math.abs(y2) < 0.001) y2 = 0;
+			
+			startCode ="\\rput{"+(float)angle+ "}("+ //$NON-NLS-1$ //$NON-NLS-2$
+			LaTeXDrawNumber.getCutNumber((float)x2, threshold)+','+LaTeXDrawNumber.getCutNumber((float)y2, threshold)+"){"+startCode; //$NON-NLS-1$
+			addEnd = "}"; //$NON-NLS-1$
+		}		
+		
+		if(showPoints)
+			add1+=",showpoints=true"; //$NON-NLS-1$
+		
+		if(hasDoubleBoundary)
+		{
+			add1+=",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc), threshold); //$NON-NLS-1$
+			add1+=",dimen="+bordersPosition;  //$NON-NLS-1$
+			
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(linesColor, name); 
+				}
+				add1+= ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}
+		
+		if(!isFilled && !interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR))
+		{
+			String name = DviPsColors.getColourName(interiorColor);
+			if(name==null)
+			{
+				name = "color"+number+'b';//$NON-NLS-1$
+				DviPsColors.addUserColour(interiorColor, name); 
+			}
+			add1 += ",fillcolor=" + name; //$NON-NLS-1$
+		}
+		
+		if(isFilledWasChanged) isFilled = false;
+		
+		return startCode+ "[linewidth=" + LaTeXDrawNumber.getCutNumber(thickness/ppc, threshold) + //$NON-NLS-1$
+				add1 + add2 + fillType + "]"+ arrowsCode + "(" + LaTeXDrawNumber.getCutNumber((float)(x/ppc), threshold)+','+ //$NON-NLS-1$ //$NON-NLS-2$
+				LaTeXDrawNumber.getCutNumber((float)(y/ppc), threshold) + "){"+ //$NON-NLS-1$
+				LaTeXDrawNumber.getCutNumber((float)(radius/ppc), threshold) +"}{"+ //$NON-NLS-1$
+				LaTeXDrawNumber.getCutNumber((float)Math.toDegrees(startAngle), threshold)
+				 +"}{"+LaTeXDrawNumber.getCutNumber((float)Math.toDegrees(endAngle), threshold)+'}'+endCode+ addEnd; //$NON-NLS-1$
+	}
+
+	
+	
+	
+	/**
+	 * Allows to change the position of the start angle
+	 * @param newPt The new position
+	 */
+	public void moveStartAngle(LaTeXDrawPoint2D newPt)
+	{
+		double radius = newPt.distance(gravityCenter);
+		double angle = Math.acos((newPt.x-gravityCenter.x)/radius);
+		
+		if(newPt.y>gravityCenter.y)
+			 startAngle = 2*Math.PI - angle;
+		else startAngle = angle;
+		
+		updateCenterStartEndDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to change the position of the end angle
+	 * @param newPt The new position
+	 */
+	public void moveEndAngle(LaTeXDrawPoint2D newPt)
+	{
+		double radius = newPt.distance(gravityCenter);
+		double angle = Math.acos((newPt.x-gravityCenter.x)/radius);
+		
+		if(newPt.y>gravityCenter.y)
+			 endAngle = 2*Math.PI - angle;
+		else endAngle = angle;
+		
+		updateCenterStartEndDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void onClick(Point p)
+	{
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);
+		
+		if(dStart.isIn(pt)) dSelected = dStart;
+		else if(dEnd.isIn(pt)) dSelected = dEnd;
+		
+		isSelected = true;
+		borders.onClick(p);
+	}
+
+	
+	
+	
+	
+	@Override
+	public void shift(double shiftX, double shiftY)
+	{
+		if(shiftX==0 && shiftY==0) return ;
+		
+		super.shift(shiftX, shiftY);
+		updateCenterStartEndDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+	
+	
+	
+	/**
+	 * Allows the update the centre, the start delimiter
+	 * and the end delimiter 
+	 * */
+	public void updateCenterStartEndDelimitors()
+	{
+		LaTeXDrawPoint2D second = borders.getPoint(1);
+		LaTeXDrawPoint2D first = borders.getPoint(0), fourth = borders.getPoint(3);
+		double xStart, xEnd, yStart, yEnd;
+		double radius = Math.abs(first.x-second.x)/2.;	
+	
+		gravityCenter.x = (first.x+second.x)/2;
+		gravityCenter.y = (first.y+fourth.y)/2;
+		
+		xStart = gravityCenter.x + Math.cos(startAngle)*radius/2.;
+		yStart = gravityCenter.y - Math.sin(startAngle)*radius/2.;
+		dStart.getCenter().setLocation(xStart, yStart);
+		
+		xEnd = gravityCenter.x + Math.cos(endAngle)*radius/2.;
+		yEnd = gravityCenter.y - Math.sin(endAngle)*radius/2.;
+		dEnd.getCenter().setLocation(xEnd, yEnd);
+	}
+
+
+	
+	/**
+	 * Allows to create a choice containing all kinds of arc
+	 * @return The choice
+	 */
+	public static JComboBox createArcChoice(AbstractParametersFrame f)
+	{		
+		JComboBox arcChoice = new JComboBox();
+		arcChoice.setName(LABEL_ARCCHOICE);
+		
+     	arcChoice.addItem(Arc.TYPE_ARC);
+     	arcChoice.addItem(Arc.TYPE_CHORD);
+     	arcChoice.addItem(Arc.TYPE_PIE);
+     	arcChoice.addItemListener(f);
+     	
+     	return arcChoice;
+	}
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to get the style of the left arrow of the line
+	 * @return The style of the left arrow of the line
+	 */
+	public synchronized String getArrow1Style()
+	{
+		return arrowHead1.getArrowStyle();
+	}
+	
+
+	
+	
+	
+	/**
+	 * Allows to get the style of the right arrow of the line
+	 * @return The style of the left arrow of the line
+	 */
+	public synchronized String getArrow2Style()
+	{
+		return arrowHead2.getArrowStyle();
+	}
+	
+	
+	
+	
+	
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Arc a = (Arc) super.clone();
+
+		a.dEnd   = (Delimitor) dEnd.clone();
+		a.dStart = (Delimitor) dStart.clone();
+		a.type = type;
+		a.endAngle = endAngle;
+		a.startAngle = startAngle;
+		a.updateCenterStartEndDelimitors();
+		a.arrowHead1 = (ArrowHead)arrowHead1.clone();
+		a.arrowHead2 = (ArrowHead)arrowHead2.clone();
+		return a;
+	}
+
+	
+	
+	private void readObject(ObjectInputStream ois) throws IOException, 
+					ClassNotFoundException
+	{
+		canHaveShadow = true;
+		interiorColor = (Color) ois.readObject();
+		lineStyle = (String) ois.readObject();
+		rotationAngle = ois.readDouble();
+		thickness = ois.readFloat();
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		borders = (LaTeXDrawRectangle) ois.readObject();
+		endAngle = ois.readDouble();
+		startAngle = ois.readDouble();
+		dEnd   = (Delimitor) ois.readObject();
+		dStart = (Delimitor) ois.readObject();
+
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0) //$NON-NLS-1$
+		{
+			hasDoubleBoundary = ois.readBoolean();
+			doubleColor = (Color)ois.readObject();
+			doubleSep = ois.readDouble();
+			if(!(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0)) //$NON-NLS-1$
+				ois.readBoolean();
+			hatchingAngle = ois.readDouble();
+			hatchingColor = (Color)ois.readObject();
+			hatchingStyle = (String)ois.readObject();
+			hatchingWidth = ois.readFloat();
+			arrowHead1 = (ArrowHead)ois.readObject();
+			arrowHead2 = (ArrowHead)ois.readObject();
+			
+			if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0) //$NON-NLS-1$
+				showPoints = ois.readBoolean();
+			
+			arrowHead2.setArrowInset(arrowHead1.getArrowInset());
+			arrowHead2.setArrowLength(arrowHead1.getArrowLength());
+			arrowHead2.setArrowSizeDim(arrowHead1.getArrowSizeDim());
+			arrowHead2.setArrowSizeNum(arrowHead1.getArrowSizeNum());
+			arrowHead2.setBracketNum(arrowHead1.getBracketNum());
+			arrowHead2.setDotSizeDim(arrowHead1.getDotSizeDim());
+			arrowHead2.setDotSizeNum(arrowHead1.getDotSizeNum());
+			arrowHead2.setRBracketNum(arrowHead1.getRBracketNum());
+			arrowHead2.setTBarSizeDim(arrowHead1.getTBarSizeDim());
+			arrowHead2.setTBarSizeNum(arrowHead1.getTBarSizeNum());
+			
+			if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6") < 0)//$NON-NLS-1$
+			{
+				if(hatchingStyle.equals(DECREPETED_FILL_CROSS))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_CROSSHATCH;
+				else if(hatchingStyle.equals(DECREPETED_FILL_HORIZ))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_HLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_VERT))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_VLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_NO))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_NONE;
+			}
+		}
+		else
+		{
+			hasDoubleBoundary  = DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor = DEFAULT_DOUBLE_COLOR;
+			doubleSep   = DEFAULT_DOUBLESEP;
+			hatchingAngle = DEFAULT_HATCH_ANGLE;
+			hatchingColor = DEFAULT_HATCH_COL;
+			hatchingStyle = DEFAULT_HATCH_STYLE;
+			hatchingWidth = DEFAULT_HATCH_WIDTH;
+			arrowHead1 = new ArrowHead(this);
+			arrowHead2 = new ArrowHead(this);
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+		}
+		else
+		{
+			if(startAngle>endAngle)
+			{
+				double tmp = startAngle;
+				ArrowHead tmpAH = arrowHead1;
+				startAngle = endAngle;
+				endAngle = tmp;
+				arrowHead1 = arrowHead2;
+				arrowHead2 = tmpAH;
+			}
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+		{
+			hatchingSep = ois.readDouble();
+			type = ois.readInt();// fixing #1555339
+		}
+		else
+		{
+			hatchingSep = DEFAULT_HATCH_SEP;
+			type = Arc2D.OPEN;// fixing #1555339
+		}
+		
+		updateGravityCenter();
+		updateStyleOfDelimitors();
+		updateCenterStartEndDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+	/**
+	 * @return Returns the showPoints.
+	 */
+	public boolean isShowPoints()
+	{
+		return showPoints;
+	}
+
+
+
+	/**
+	 * @param showPoints The showPoints to set.
+	 */
+	public synchronized void setShowPoints(boolean showPoints)
+	{
+		this.showPoints = showPoints;
+	}
+
+
+
+	/**
+	 * @return Returns the arrowHead1.
+	 */
+	public ArrowHead getArrowHead1()
+	{
+		return arrowHead1;
+	}
+
+
+
+	/**
+	 * @return Returns the arrowHead2.
+	 */
+	public ArrowHead getArrowHead2()
+	{
+		return arrowHead2;
+	}
+	
+	
+	
+	
+	@Override
+	public Shape[] getDbleBoundariesOutside(Shape classicBord)
+	{
+		return getDbleBoundariesMiddle(classicBord);
+	}
+	
+	
+	
+	
+	
+	@Override
+	public Shape[] getDbleBoundariesInside(Shape classicBord)
+	{
+		return getDbleBoundariesMiddle(classicBord);
+	}
+	
+	
+	
+	
+	@Override
+	public Shape[] getDbleBoundariesMiddle(Shape classicBord)
+	{
+		/*
+		 * 
+		 * Dx = (doubleSep/2.+A'x2+A'y2-Ay2-Ax2+2bAy-2bAy)
+		 *      /(2*(A'x-Ax-aAy+aA'y)
+		 * 
+		 * 
+		 */
+		
+		
+		return null;
+	}
+	
+	
+	
+	
+	@Override
+	public Shape[] getDbleBoundariesOutInOrMiddle(Shape classicBord)
+	{
+		return getDbleBoundariesMiddle(classicBord);
+	}
+	
+	
+	
+	@Override
+	public Shape getOutsideBorders()
+	{
+		return getMiddleBorders();
+	}
+	
+	
+	
+	
+	@Override
+	public Shape getInsideBorders()
+	{
+		return getMiddleBorders();
+	}
+	
+	
+
+	@Override
+	public Shape getMiddleBorders()
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		double width = Math.max(Math.abs(NW.x - SE.x), 1);
+		double start =  Math.toDegrees(startAngle); 
+		double end   = startAngle>endAngle ? Math.toDegrees(2*Math.PI-startAngle+endAngle) : Math.toDegrees(endAngle-startAngle);
+		
+		return new Arc2D.Double(NW.x, NW.y, width, width, start, end, type);
+	}
+	
+	
+	
+	@Override
+	public Shape getInsideOutsideOrMiddleBorders()
+	{
+		return getMiddleBorders();
+	}
+
+
+
+	@Override
+	public boolean canHaveArrow()
+	{
+		return type==Arc2D.OPEN;
+	}
+
+
+
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		double tmp = startAngle;
+		ArrowHead tmpAH = arrowHead1;
+		
+		startAngle = Math.PI*2 - endAngle;
+		endAngle   = Math.PI*2 - tmp;
+		arrowHead1 = arrowHead2;
+		arrowHead2 = tmpAH;
+		
+		
+		super.mirrorHorizontal(origin);
+		updateCenterStartEndDelimitors();
+	}
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		double tmp = startAngle;
+		ArrowHead tmpAH = arrowHead1;
+		
+		startAngle = Math.PI*3 - endAngle;
+		endAngle   = Math.PI*3 - tmp;
+
+		arrowHead1 = arrowHead2;
+		arrowHead2 = tmpAH;
+		
+		super.mirrorVertical(origin);
+		updateCenterStartEndDelimitors();
+	}
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		super.updateToGrid(grid);
+		updateCenterStartEndDelimitors();
+	}
+	
+	
+	
+	/**
+	 * @return The coordinate of the start point of the arc.
+	 * @since 1.9
+	 */
+	public LaTeXDrawPoint2D getStartPoint(boolean rotation)
+	{
+		double radius = getRadius();
+		LaTeXDrawPoint2D pt = new LaTeXDrawPoint2D(gravityCenter.x+Math.cos(startAngle)*radius,
+												  gravityCenter.y-Math.sin(startAngle)*radius);
+		
+		if(rotation)
+			return rotateInvertPoint(pt);
+		
+		return pt;
+	}
+	
+	
+	
+	/**
+	 * @return The coordinate of the end point of the arc.
+	 * @since 1.9
+	 */
+	public LaTeXDrawPoint2D getEndPoint(boolean rotation)
+	{
+		double radius = getRadius();
+		LaTeXDrawPoint2D pt = new LaTeXDrawPoint2D(gravityCenter.x+Math.cos(endAngle)*radius,
+												   gravityCenter.y-Math.sin(endAngle)*radius);
+
+		if(rotation)
+			return rotateInvertPoint(pt);
+		
+		return pt;
+	}
+
+	
+	
+
+	@Override
+	public boolean intersected(Rectangle2D.Double r)
+	{
+		if(r==null)
+			return false;
+		
+		BasicStroke wideline = new BasicStroke(thickness);
+        Shape outline = wideline.createStrokedShape(shape);
+        boolean ok = outline.intersects(r);
+        
+        if(!ok && type==Arc2D.OPEN && (isFilled() || isHatched() || hasShadow() || hasGradient()))
+        {
+        	Line2D.Double l = new Line2D.Double(getStartPoint(true), getEndPoint(true));
+        	
+        	if(l.intersects(r))
+        		ok = true;
+        }
+        
+        return ok;
+	}
+
+
+
+	@Override
+	public int getSelectedDelimitorOrientation()
+	{
+		if(dSelected!=null && (dSelected==dStart || dSelected==dEnd))
+			return DELIMITOR_ORIENTATION_NONE;
+		
+		return super.getSelectedDelimitorOrientation();
+	}
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()^3^type;
+	}
+
+
+
+	public boolean hasTwoLeftArrows()
+	{
+		return true;
+	}
+}
diff --git a/current/latexDraw/figures/ArrowHead.java b/current/latexDraw/figures/ArrowHead.java
new file mode 100644
index 0000000..67ef7e6
--- /dev/null
+++ b/current/latexDraw/figures/ArrowHead.java
@@ -0,0 +1,1341 @@
+/*
+ * ArrowHead.java
+ */
+
+package latexDraw.figures;
+
+
+import java.awt.*;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Arc2D;
+import java.awt.geom.Ellipse2D;
+import java.awt.geom.Line2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
+
+import javax.swing.JLabel;
+
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.ui.components.LabelListCellRenderer;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+
+
+/** 
+ * This class defines an arrowhead.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ArrowHead implements Serializable, Cloneable
+{
+	private static final long serialVersionUID = 1L;
+	
+	public static final double DEFAULT_ARROW_SIZE_DIM = PSTricksConstants.DEFAULT_ARROW_SIZE_DIM*Figure.PPC;
+	public static final double DEFAULT_ARROW_SIZE_NUM = PSTricksConstants.DEFAULT_ARROW_SIZE_NUM;
+	public static final double DEFAULT_ARROW_LGTH     = PSTricksConstants.DEFAULT_ARROW_LENGTH;
+	public static final double DEFAULT_ARROW_INSET    = PSTricksConstants.DEFAULT_ARROW_INSET;
+	public static final double DEFAULT_DOT_SIZE_DIM   = PSTricksConstants.DEFAULT_ARROW_DOTSIZE_DIM*Figure.PPC;
+	public static final double DEFAULT_DOT_SIZE_NUM   = PSTricksConstants.DEFAULT_ARROW_DOTSIZE_NUM;
+	public static final double DEFAULT_TBAR_SIZE_DIM  = PSTricksConstants.DEFAULT_ARROW_TBARSIZE_DIM*Figure.PPC;
+	public static final double DEFAULT_TBAR_SIZE_NUM  = PSTricksConstants.DEFAULT_ARROW_TBARSIZE_NUM;
+	public static final double DEFAULT_BRACKET_NUM    = PSTricksConstants.DEFAULT_ARROW_BRACKET_LGTH;
+	public static final double DEFAULT_RBRACKET_NUM   = PSTricksConstants.DEFAULT_ARROW_RBRACKET_LGTH;
+	
+	public static final String DEFAULT_STYLE = PSTricksConstants.NONEARROW_STYLE;
+	
+	private Line line;
+	
+	private String currentArrowStyle;
+	private LaTeXDrawPoint2D position;
+	
+	private double arrowSizeDim;
+	private double arrowSizeNum;
+	private double arrowLength;
+	private double arrowInset;
+	private double dotSizeDim;
+	private double dotSizeNum;
+	private double tBarSizeDim;
+	private double tBarSizeNum;
+	private double bracketNum;
+	private double rBracketNum;
+	
+	/** The figure containing the arrow. @since 2.0.0 */
+	protected transient Figure figure;
+	
+	
+	
+	/**
+	 * The constructor taking an figure.
+	 * @param f The figure containing the arrow.
+	 * @throws IllegalArgumentException If f is null.
+	 */
+	public ArrowHead(Figure f)
+	{
+		this(new LaTeXDrawPoint2D(), new Line(false), f);	
+	}
+	
+	
+	
+	/**
+	 * The constructor taking a point.
+	 * @param position The position of the arrowhead. 
+	 * @param l the line of the arrow.
+	 * @param f The figure containing the arrow.
+	 * @throws IllegalArgumentException If f is null.
+	 */
+	public ArrowHead(LaTeXDrawPoint2D position, Line l, Figure f)
+	{
+		if(f==null)
+			throw new IllegalArgumentException();
+		
+		figure = f;
+		line = l;
+		this.position = position;
+		currentArrowStyle = DEFAULT_STYLE;
+		arrowInset   = DEFAULT_ARROW_INSET;
+		arrowLength  = DEFAULT_ARROW_LGTH;
+		arrowSizeDim = DEFAULT_ARROW_SIZE_DIM;
+		arrowSizeNum = DEFAULT_ARROW_SIZE_NUM;
+		dotSizeDim   = DEFAULT_DOT_SIZE_DIM;
+		dotSizeNum   = DEFAULT_DOT_SIZE_NUM;
+		tBarSizeDim  = DEFAULT_TBAR_SIZE_DIM;
+		tBarSizeNum  = DEFAULT_TBAR_SIZE_NUM;
+		bracketNum   = DEFAULT_BRACKET_NUM;
+		rBracketNum  = DEFAULT_RBRACKET_NUM;
+	}
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to create a list of the different style of arrowhead (left)
+	 * @return The list
+	 */
+	public static LaTeXDrawComboBox createLeftArrowStyleList()
+	{
+		LaTeXDrawComboBox lineArrowLChoice = new LaTeXDrawComboBox();
+		lineArrowLChoice.setRenderer(new LabelListCellRenderer());
+		JLabel label = new JLabel(PSTricksConstants.NONEARROW_STYLE);
+		label.setName(PSTricksConstants.NONEARROW_STYLE);
+		label.setIcon(LaTeXDrawResources.arrowStyleNoneLIcon);
+     	lineArrowLChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.BARIN_STYLE);
+     	label.setName(PSTricksConstants.BARIN_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleBarInLIcon);
+     	lineArrowLChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.BAREND_STYLE);
+		label.setName(PSTricksConstants.BAREND_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleBarEndLIcon);
+		lineArrowLChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.CIRCLEEND_STYLE);
+     	label.setName(PSTricksConstants.CIRCLEEND_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleCircleEndLIcon);
+     	lineArrowLChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.CIRCLEIN_STYLE);
+     	label.setName(PSTricksConstants.CIRCLEIN_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleCircleInLIcon);
+     	lineArrowLChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.DISKEND_STYLE);
+     	label.setName(PSTricksConstants.DISKEND_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleDiskEndLIcon);
+     	lineArrowLChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.DISKIN_STYLE);
+     	label.setName(PSTricksConstants.DISKIN_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleDiskInLIcon);
+		lineArrowLChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.LARROW_STYLE);
+		label.setName(PSTricksConstants.LARROW_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleArrowLIcon);
+     	lineArrowLChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.RARROW_STYLE);
+		label.setName(PSTricksConstants.RARROW_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleRArrowLIcon);
+		lineArrowLChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.LRBRACKET_STYLE);
+		label.setName(PSTricksConstants.LRBRACKET_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleArcLIcon);
+		lineArrowLChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.RRBRACKET_STYLE);
+		label.setName(PSTricksConstants.RRBRACKET_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleArcLRIcon);
+		lineArrowLChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.LSBRACKET_STYLE);
+		label.setName(PSTricksConstants.LSBRACKET_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleBrackLIcon);
+		lineArrowLChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.RSBRACKET_STYLE);
+		label.setName(PSTricksConstants.RSBRACKET_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleBrackLRIcon);
+		lineArrowLChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.DLARROW_STYLE);
+		label.setName(PSTricksConstants.DLARROW_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleDbleArrowLIcon);
+		lineArrowLChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.DRARROW_STYLE);
+		label.setName(PSTricksConstants.DRARROW_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleRDbleArrowLIcon);
+		lineArrowLChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.ROUNDIN_STYLE);
+     	label.setName(PSTricksConstants.ROUNDIN_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleRoundInLIcon);
+     	lineArrowLChoice.addItem(label);
+     	lineArrowLChoice.setPreferredSize(new Dimension(75, 30));
+     	lineArrowLChoice.setSize(new Dimension(75, 30));
+     	lineArrowLChoice.setMaximumSize(new Dimension(75, 30));
+     	lineArrowLChoice.setMinimumSize(new Dimension(75, 30));
+     	
+		return lineArrowLChoice;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create a list of the different style of arrowhead (right)
+	 * @return The list
+	 */
+	public static LaTeXDrawComboBox createRightArrowStyleList()
+	{
+		LaTeXDrawComboBox lineArrowRChoice = new LaTeXDrawComboBox();
+		lineArrowRChoice.setRenderer(new LabelListCellRenderer());
+		JLabel label = new JLabel(PSTricksConstants.NONEARROW_STYLE);
+		label.setName(PSTricksConstants.NONEARROW_STYLE);
+		label.setIcon(LaTeXDrawResources.arrowStyleNoneRIcon);
+		lineArrowRChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.BARIN_STYLE);
+     	label.setName(PSTricksConstants.BARIN_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleBarInRIcon);
+     	lineArrowRChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.BAREND_STYLE);
+		label.setName(PSTricksConstants.BAREND_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleBarEndRIcon);
+     	lineArrowRChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.CIRCLEEND_STYLE);
+     	label.setName(PSTricksConstants.CIRCLEEND_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleCircleEndRIcon);
+     	lineArrowRChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.CIRCLEIN_STYLE);
+     	label.setName(PSTricksConstants.CIRCLEIN_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleCircleInRIcon);
+     	lineArrowRChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.DISKEND_STYLE);
+     	label.setName(PSTricksConstants.DISKEND_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleDiskEndRIcon);
+     	lineArrowRChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.DISKIN_STYLE);
+     	label.setName(PSTricksConstants.DISKIN_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleDiskInRIcon);
+     	lineArrowRChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.RARROW_STYLE);
+		label.setName(PSTricksConstants.RARROW_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleArrowRIcon);
+     	lineArrowRChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.LARROW_STYLE);
+		label.setName(PSTricksConstants.LARROW_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleRArrowRIcon);
+     	lineArrowRChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.RRBRACKET_STYLE);
+		label.setName(PSTricksConstants.RRBRACKET_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleArcRIcon);
+     	lineArrowRChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.LRBRACKET_STYLE);
+		label.setName(PSTricksConstants.LRBRACKET_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleArcRRIcon);
+     	lineArrowRChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.RSBRACKET_STYLE);
+		label.setName(PSTricksConstants.RSBRACKET_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleBrackRIcon);
+     	lineArrowRChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.LSBRACKET_STYLE);
+		label.setName(PSTricksConstants.LSBRACKET_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleBrackRRIcon);
+     	lineArrowRChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.DRARROW_STYLE);
+		label.setName(PSTricksConstants.DRARROW_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleDbleArrowRIcon);
+     	lineArrowRChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.DLARROW_STYLE);
+		label.setName(PSTricksConstants.DLARROW_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleRDbleArrowRIcon);
+     	lineArrowRChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.ROUNDIN_STYLE);
+     	label.setName(PSTricksConstants.ROUNDIN_STYLE);
+     	label.setIcon(LaTeXDrawResources.arrowStyleRoundInRIcon);
+     	lineArrowRChoice.addItem(label);
+     	lineArrowRChoice.setPreferredSize(new Dimension(75, 30));
+     	lineArrowRChoice.setSize(new Dimension(75, 30));
+     	lineArrowRChoice.setMaximumSize(new Dimension(75, 30));
+     	lineArrowRChoice.setMinimumSize(new Dimension(75, 30));
+     	
+     	return lineArrowRChoice;
+	}
+	
+	
+
+	
+	
+	/**
+	 * Allows to set the style of the right arrow of the line
+	 * @param style The new style of the right arrow of the line
+	 */
+	public synchronized void setArrowStyle(String style)
+	{
+		if(PSTricksConstants.isValidArrowStyle(style))
+			currentArrowStyle = style;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the style of the left arrow of the line
+	 * @return The style of the left arrow of the line
+	 */
+	public synchronized String getArrowStyle()
+	{
+		return currentArrowStyle;
+	}
+	
+	
+	
+	/**
+	 * Allows to draw the arrowhead
+	 * @param g The graphics where the arrowhead is drawn
+	 * @param fColor The colour used to fill the circles.
+	 * @param asShadow If true, the arrow will be drawn as an arrow of the shadow figure. 
+	 */
+	public void draw(Graphics2D g, Color fColor, boolean asShadow)
+	{
+		if(currentArrowStyle.equals(PSTricksConstants.NONEARROW_STYLE) || !isDrawable())
+			return;
+	
+		line.updateAandB();
+		
+		LaTeXDrawPoint2D pt1 = line.getPt1(), pt2 = line.getPt2();
+		Color lineColor = asShadow ? figure.getShadowColor() : figure.getLinesColor();
+		Color fillColor = asShadow ? figure.getShadowColor() : fColor;
+		float lineWidth = getThickness();
+		double x, y, lineAngle, b = line.getB();
+		lineAngle = Math.atan(line.getA());
+		double xRot,yRot, c2x, c2y, c3x, c3y;
+		
+		if(Math.abs(lineAngle)==(Math.PI/2.))
+		{
+			yRot = position.y;
+			xRot = position.x;
+			double cx = position.x, cy = yRot;
+			c2x = Math.cos(lineAngle)*cx - Math.sin(lineAngle)*cy;
+			c2y = Math.sin(lineAngle)*cx + Math.cos(lineAngle)*cy;
+			c3x = Math.cos(-lineAngle)*(cx-c2x) - Math.sin(-lineAngle)*(cy-c2y);
+			c3y = Math.sin(-lineAngle)*(cx-c2x) + Math.cos(-lineAngle)*(cy-c2y);
+		}
+		else
+		{
+			xRot = Math.cos(-lineAngle)*position.x-Math.sin(-lineAngle)*(position.y-b); 
+			yRot = Math.sin(-lineAngle)*position.x+Math.cos(-lineAngle)*(position.y-b)+b;
+			c2x = - Math.sin(lineAngle)*b;
+			c2y = Math.cos(lineAngle)*b;
+			c3x = Math.cos(-lineAngle)*(-c2x) - Math.sin(-lineAngle)*(b-c2y);
+			c3y = Math.sin(-lineAngle)*(-c2x) + Math.cos(-lineAngle)*(b-c2y);
+		}
+		
+		if(lineAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(lineAngle);
+			g.translate(c3x,c3y);
+		}
+
+		if(currentArrowStyle.equals(PSTricksConstants.CIRCLEEND_STYLE) || currentArrowStyle.equals(PSTricksConstants.DISKEND_STYLE))
+		{
+			double arrowRadius = (dotSizeDim+dotSizeNum*lineWidth)/2.;
+			x = xRot - arrowRadius+lineWidth/2.;
+			y = yRot - arrowRadius+lineWidth/2.;
+
+			if(currentArrowStyle.equals(PSTricksConstants.DISKEND_STYLE))
+				 g.setColor(lineColor);
+			else g.setColor(fillColor);
+			
+			g.fill(new Ellipse2D.Double(x, y, arrowRadius*2-lineWidth, arrowRadius*2-lineWidth));
+			g.setColor(lineColor);
+			g.draw(new Ellipse2D.Double(x, y, arrowRadius*2-lineWidth, arrowRadius*2-lineWidth));
+	
+		}
+		else
+		if(currentArrowStyle.equals(PSTricksConstants.CIRCLEIN_STYLE) || currentArrowStyle.equals(PSTricksConstants.DISKIN_STYLE))
+		{
+			double arrowRadius = (dotSizeDim+dotSizeNum*lineWidth)/2.;
+			
+			if(position==pt1)
+			{
+				if(pt1.x<pt2.x) x = xRot+lineWidth/2.;
+				else 			x = xRot-2*arrowRadius+lineWidth/2.;
+			}
+			else
+				if(pt1.x>=pt2.x) x = xRot+lineWidth/2.;
+				else x = xRot-2*arrowRadius+lineWidth/2.;
+			
+			y = yRot - arrowRadius +lineWidth/2.;
+			
+			if(currentArrowStyle.equals(PSTricksConstants.DISKIN_STYLE))
+				 g.setColor(lineColor);
+			else g.setColor(fillColor);
+			
+			g.fill(new Ellipse2D.Double(x, y, arrowRadius*2-lineWidth, arrowRadius*2-lineWidth));
+			g.setColor(lineColor);
+			g.draw(new Ellipse2D.Double(x, y, arrowRadius*2-lineWidth, arrowRadius*2-lineWidth));
+		}
+		else
+		if(currentArrowStyle.equals(PSTricksConstants.BARIN_STYLE) ||
+		   currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE) ||
+		   currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+		{
+			double width = tBarSizeDim + tBarSizeNum*lineWidth;
+			double x1, x2, y1, y2;
+			
+			if((position==pt1 && pt1.x<pt2.x) || (position==pt2 && pt2.x<=pt1.x))
+				x1 = x2 = xRot+lineWidth/2.;
+			else
+				x1 = x2 = xRot-lineWidth/2.;
+			
+			y1 = yRot-width/2.;
+			y2 = yRot+width/2.;
+
+			g.setStroke(new BasicStroke(lineWidth, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			g.setColor(lineColor);
+			g.draw(new Line2D.Double(x1, y1, x2, y2));	
+			
+			if(currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE) || currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+			{
+				double lgth = bracketNum*width, x3, x4;
+				
+				if( (position==pt1 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE)) ||
+					(position==pt1 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE)) ||
+					(position==pt2 && pt2.x<=pt1.x && currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE)) ||
+					(position==pt2 && pt2.x>pt1.x && currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE)))
+				{
+					x3 = x1+lgth;
+					x4 = x2+lgth;
+				}	
+				else
+				{
+					x3 = x1-lgth;
+					x4 = x2-lgth;
+				}				
+				Stroke s = g.getStroke();
+				g.setStroke(new BasicStroke(lineWidth, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+				g.draw(new Line2D.Double(x1, y1+lineWidth/2., x3, y1+lineWidth/2.));
+				g.draw(new Line2D.Double(x2, y2-lineWidth/2., x4, y2-lineWidth/2.));
+				g.setStroke(s);
+			}	
+		}	
+		else
+		if(currentArrowStyle.equals(PSTricksConstants.BAREND_STYLE))
+		{
+			double width = tBarSizeDim + tBarSizeNum*lineWidth;
+			x = xRot;
+			y = yRot;
+			
+			g.setColor(lineColor);
+			g.draw(new Line2D.Double(x,y-width/2. ,x ,y+width/2.));
+		}
+		else
+		if(currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE) || currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+		{
+			double width  = arrowSizeNum*lineWidth + arrowSizeDim, length = arrowLength*width, inset  = arrowInset*length;
+			int nbPts = 4, xs[] = new int[nbPts], ys[] = new int[nbPts];
+				
+			if((position==pt1 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE)) || 
+				(position==pt2 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE)))
+			{
+				xs[0] = (int)xRot;				ys[0] = (int)yRot;
+				xs[1] = (int)(xRot+length);		ys[1] = (int)(yRot-width/2.);
+				xs[3] = (int)(xRot+length);		ys[3] = (int)(yRot+width/2.);
+				xs[2] = (int)(xRot+length-inset); ys[2] = (int)yRot;
+				
+				g.setColor(lineColor);
+				g.fillPolygon(xs, ys, nbPts);
+			}else{
+			if((position==pt1 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE)) || 
+				(position==pt2 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE)))
+			{
+				xs[0] = (int)xRot;				ys[0] = (int)yRot;
+				xs[1] = (int)(xRot-length);		ys[1] = (int)(yRot-width/2.);
+				xs[3] = (int)(xRot-length);		ys[3] = (int)(yRot+width/2.);
+				xs[2] = (int)(xRot-length+inset); ys[2] = (int)yRot;
+				
+				g.setColor(lineColor);
+				g.fillPolygon(xs, ys, nbPts);
+			}else{
+			if((position==pt1 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE)) || 
+				(position==pt2 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE)))
+			{
+				xs[0] = (int)(xRot+length);		ys[0] = (int)yRot;
+				xs[1] = (int)xRot;				ys[1] = (int)(yRot-width/2.);
+				xs[3] = (int)xRot;				ys[3] = (int)(yRot+width/2.);
+				xs[2] = (int)(xRot+inset); 		ys[2] = (int)yRot;
+				
+				g.setColor(lineColor);
+				g.fillPolygon(xs, ys, nbPts);
+			}else{
+			if((position==pt1 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE)) || 
+				(position==pt2 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE)))
+			{
+				xs[0] = (int)(xRot-length);		ys[0] = (int)yRot;
+				xs[1] = (int)xRot;				ys[1] = (int)(yRot-width/2.);
+				xs[3] = (int)xRot;				ys[3] = (int)(yRot+width/2.);
+				xs[2] = (int)(xRot-inset); 		ys[2] = (int)yRot;
+
+				g.setColor(lineColor);
+				g.fillPolygon(xs, ys, nbPts);	
+			}}}}}
+			else
+			if(currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE) || currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+			{
+				double width = tBarSizeDim + tBarSizeNum*lineWidth;
+				double lgth  = rBracketNum*width;
+				double xarc  = isInverted() ? xRot : xRot+lineWidth/2.;
+				double widtharc = lgth*2 + (isInverted() ? lineWidth/2. : 0.);
+				
+				Shape s = new Arc2D.Double(xarc, yRot-width/2., widtharc, width, 130, 100, Arc2D.OPEN);
+				
+				if( (position==pt1 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE)) ||
+					(position==pt1 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE)) ||
+					(position==pt2 && pt2.x<=pt1.x && currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE)) ||
+					(position==pt2 && pt2.x>pt1.x && currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE)))
+				{
+					double cx = xRot, cy = yRot;
+					double rotX = Math.cos(Math.PI)*cx - Math.sin(Math.PI)*cy;
+					double rotY = Math.sin(Math.PI)*cx + Math.cos(Math.PI)*cy;
+					
+					AffineTransform at = AffineTransform.getTranslateInstance(cx-rotX, cy-rotY);
+					at.rotate(Math.PI);
+					s = at.createTransformedShape(s);
+				}
+				
+				g.setColor(lineColor);	
+				Stroke stroke = g.getStroke();
+				g.setStroke(new BasicStroke(lineWidth, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+				g.draw(s);
+				g.setStroke(stroke);
+			}
+			else
+			if(currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE) || currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+			{
+				double width  = arrowSizeNum*lineWidth+arrowSizeDim, length = arrowLength*width, inset  = arrowInset*length;
+				int nbPts = 4, xs[] = new int[nbPts], ys[] = new int[nbPts];
+				int xs2[] = new int[nbPts];		
+				
+				if((position==pt1 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE)) || 
+					(position==pt2 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE)))
+				{
+					xs[0] = (int)xRot;				ys[0] = (int)yRot;
+					xs[1] = (int)(xRot+length);		ys[1] = (int)(yRot-width/2.);
+					xs[3] = (int)(xRot+length);		ys[3] = (int)(yRot+width/2.);
+					xs[2] = (int)(xRot+length-inset); ys[2] = (int)yRot;
+					xs2[0] = (int)(xRot+length);	
+					xs2[1] = (int)(xRot+2*length);		
+					xs2[3] = (int)(xRot+2*length);	
+					xs2[2] = (int)(xRot+2*length-inset); 
+				}else{
+				if((position==pt1 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE)) || 
+					(position==pt2 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE)))
+				{
+					xs[0] = (int)xRot;				ys[0] = (int)yRot;
+					xs[1] = (int)(xRot-length);		ys[1] = (int)(yRot-width/2.);
+					xs[3] = (int)(xRot-length);		ys[3] = (int)(yRot+width/2.);
+					xs[2] = (int)(xRot-length+inset); ys[2] = (int)yRot;
+					
+					xs2[0] = (int)(xRot-length);	
+					xs2[1] = (int)(xRot-2*length);	
+					xs2[3] = (int)(xRot-2*length);	
+					xs2[2] = (int)(xRot-2*length+inset); 	
+
+				}else{
+				if((position==pt1 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE)) || 
+					(position==pt2 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE)))
+				{
+					xs[0] = (int)(xRot+length);		ys[0] = (int)yRot;
+					xs[1] = (int)xRot;				ys[1] = (int)(yRot-width/2.);
+					xs[3] = (int)xRot;				ys[3] = (int)(yRot+width/2.);
+					xs[2] = (int)(xRot+inset); 		ys[2] = (int)yRot;
+					
+					xs2[0] = (int)(xRot+2*length);	
+					xs2[1] = (int)(xRot+length);	
+					xs2[3] = (int)(xRot+length);		
+					xs2[2] = (int)(xRot+length+inset);	
+
+				}else{
+				if((position==pt1 && pt1.x>=pt2.x && currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE)) || 
+					(position==pt2 && pt1.x<pt2.x && currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE)))
+				{
+					xs[0] = (int)(xRot-length);		ys[0] = (int)yRot;
+					xs[1] = (int)xRot;				ys[1] = (int)(yRot-width/2.);
+					xs[3] = (int)xRot;				ys[3] = (int)(yRot+width/2.);
+					xs[2] = (int)(xRot-inset); 		ys[2] = (int)yRot;
+					
+					xs2[0] = (int)(xRot-2*length);
+					xs2[1] = (int)(xRot-length);	
+					xs2[3] = (int)(xRot-length);
+					xs2[2] = (int)(xRot-length-inset); 
+			}}}}
+			
+				g.setColor(lineColor);
+				g.draw(new Line2D.Double(xs[2], ys[0], xs2[2], ys[0]));
+				g.fillPolygon(xs, ys, nbPts);	
+				g.fillPolygon(xs2, ys, nbPts);
+				
+			}else
+			if(currentArrowStyle.equals(PSTricksConstants.SQUAREEND_STYLE) || currentArrowStyle.equals(PSTricksConstants.ROUNDEND_STYLE))
+			{
+				Stroke s = g.getStroke();
+				g.setColor(lineColor);
+				
+				if(currentArrowStyle.equals(PSTricksConstants.ROUNDEND_STYLE))
+					g.setStroke(new BasicStroke(lineWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER));
+				else
+					g.setStroke(new BasicStroke(lineWidth, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+				
+				if((position==pt1 && pt1.x<pt2.x) || (position==pt2 && pt2.x<=pt2.x))
+					g.draw(new Line2D.Double(xRot+1, yRot, xRot, yRot));
+				else
+					g.draw(new Line2D.Double(xRot-1, yRot, xRot, yRot));
+
+				g.setStroke(s);
+			}else
+			if(currentArrowStyle.equals(PSTricksConstants.ROUNDIN_STYLE))
+			{
+				Stroke s = g.getStroke();
+				g.setColor(lineColor);
+				g.setStroke(new BasicStroke(lineWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER));
+				
+				if((position==pt1 && pt1.x<pt2.x) || (position==pt2 && pt2.x<=pt1.x))
+					g.draw(new Line2D.Double(xRot+lineWidth/2., yRot, xRot+lineWidth/2., yRot));
+				else
+					g.draw(new Line2D.Double(xRot-lineWidth/2., yRot, xRot-lineWidth/2., yRot));
+				
+				g.setStroke(s);
+			}
+		
+		if(lineAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x,-c3y);
+			g.rotate(-lineAngle);
+		}
+		
+	}
+	
+	
+	
+	
+	
+	public String getParametersCode()
+	{
+		double threshold = 0.001;
+		
+		if(currentArrowStyle.equals(PSTricksConstants.BARIN_STYLE) ||
+		   currentArrowStyle.equals(PSTricksConstants.BAREND_STYLE) ||
+		   currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE) ||
+		   currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE) ||
+		   currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+		   currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+		{
+			String code = "tbarsize="+LaTeXDrawNumber.getCutNumber((float)(getTBarSizeDim()/Figure.PPC), threshold)+"cm " +(float)getTBarSizeNum(); //$NON-NLS-1$ //$NON-NLS-2$
+			if(currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE) ||
+			   currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+				code+=",bracketlength="+(float)getBracketNum(); //$NON-NLS-1$
+			else
+				if(currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+				   currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+					code+=",rbracketlength="+(float)getRBracketNum(); //$NON-NLS-1$
+			
+			return code;
+		}
+		
+		if(currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+			return "arrowsize="+LaTeXDrawNumber.getCutNumber((float)(getArrowSizeDim()/Figure.PPC), threshold) +"cm " +//$NON-NLS-1$ //$NON-NLS-2$
+				(float)getArrowSizeNum()+",arrowlength="+   //$NON-NLS-1$
+				(float)getArrowLength()+",arrowinset="+(float)getArrowInset(); //$NON-NLS-1$
+		
+		if(currentArrowStyle.equals(PSTricksConstants.CIRCLEIN_STYLE) || 
+			currentArrowStyle.equals(PSTricksConstants.DISKIN_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.CIRCLEEND_STYLE) || 
+			currentArrowStyle.equals(PSTricksConstants.DISKEND_STYLE))
+			return "dotsize="+LaTeXDrawNumber.getCutNumber((float)(getDotSizeDim()/Figure.PPC), threshold)+"cm "+(float)getDotSizeNum(); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		return "";//$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * Allows to get the length of the arrow style
+	 * @return The length of the arrow style
+	 */
+	public double getArrowHeadLength()
+	{
+		if(currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+			return (arrowLength*getArrowSizeNum()*getThickness()+getArrowSizeDim())/2.;
+		
+		if(currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.BARIN_STYLE) ||
+		    currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE) ||
+		    currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+			return 0;
+		
+		if(currentArrowStyle.equals(PSTricksConstants.ROUNDIN_STYLE))
+			return getThickness()/2.;
+		
+		if(currentArrowStyle.equals(PSTricksConstants.CIRCLEIN_STYLE) || 
+			currentArrowStyle.equals(PSTricksConstants.DISKIN_STYLE))
+			return (getDotSizeDim()+getDotSizeNum()*getThickness())/2.;
+		
+		if(currentArrowStyle.equals(PSTricksConstants.CIRCLEEND_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.DISKEND_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.BAREND_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.SQUAREEND_STYLE))
+			return 0.;
+		
+		return 0;
+		
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get a clone of the arrow : beware : the pointer
+	 * on the line is the same like the pointer on the position
+	 * @return A clone of the arrowhead
+	 */
+	public ArrowHead clone(boolean cloneLine) throws CloneNotSupportedException
+	{
+		ArrowHead a;
+		
+		if(cloneLine)
+		{
+			Line l = (Line)line.clone();
+			
+			if(line.getPt1().equals(position))
+				 a = new ArrowHead(l.getPt1(), l, figure);
+			else a = new ArrowHead(l.getPt2(), l, figure);
+		}
+		else
+			a = new ArrowHead(position, line, figure);
+			
+		a.copyArrowParameters(this);
+		return a;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to get a clone of the arrow : beware : the pointer
+	 * on the line is the same like the pointer on the position
+	 * @return A clone of the arrowhead
+	 */
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		return clone(true);
+	}
+
+
+
+	
+	/**
+	 * Allows to get the position of the arrowhead
+	 * @return The position of the arrowhead
+	 */
+	public synchronized LaTeXDrawPoint2D getPosition() 
+	{
+		return position;
+	}
+
+
+
+	/**
+	 * Allows to know if the arrowhead is of the same type as the given arrowhead
+	 * (for example : square bracket is of the same type of round bracket and
+	 * bar).
+	 * @param ah The arrow to compare
+	 * @return True if the arrowhead is of the same type as the given arrowhead
+	 */
+	public boolean isOfTheSameTypeAs(ArrowHead ah)
+	{
+		if(currentArrowStyle.equals(ah.currentArrowStyle))
+			return true;
+		
+		if( (currentArrowStyle.equals(PSTricksConstants.BARIN_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.BAREND_STYLE)) &&
+			(ah.currentArrowStyle.equals(PSTricksConstants.BARIN_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.BAREND_STYLE)))
+				return true;
+		
+		if((currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE)) &&
+			(ah.currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE)))
+			return true;
+		
+		if((currentArrowStyle.equals(PSTricksConstants.CIRCLEEND_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.CIRCLEIN_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.DISKEND_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.DISKIN_STYLE)) &&
+			(ah.currentArrowStyle.equals(PSTricksConstants.CIRCLEEND_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.CIRCLEIN_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.DISKEND_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.DISKIN_STYLE)))
+				return true;
+		
+		if((currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE)) &&
+			(ah.currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE)))
+				return true;
+		
+		if((currentArrowStyle.equals(PSTricksConstants.ROUNDEND_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.ROUNDIN_STYLE)) &&
+			(ah.currentArrowStyle.equals(PSTricksConstants.ROUNDEND_STYLE) ||
+			ah.currentArrowStyle.equals(PSTricksConstants.ROUNDIN_STYLE)))
+				return true;
+		
+		return false;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the position of the arrowhead
+	 * @param pt The new position of the arrowhead
+	 */
+	public synchronized void setPosition(LaTeXDrawPoint2D pt) 
+	{
+		if(pt!=null)
+			position = pt;	
+	}
+	
+	
+
+	private void readObject(ObjectInputStream ois) throws IOException, 
+					ClassNotFoundException
+	{
+		line = (Line) ois.readObject();
+		
+		currentArrowStyle = (String) ois.readObject();
+		position = (LaTeXDrawPoint2D) ois.readObject();
+
+		arrowSizeDim = ois.readDouble();
+		arrowSizeNum = ois.readDouble();
+		arrowLength = ois.readDouble();
+		arrowInset = ois.readDouble();
+		dotSizeDim = ois.readDouble();
+		dotSizeNum = ois.readDouble();
+		tBarSizeDim = ois.readDouble();
+		tBarSizeNum = ois.readDouble();
+		bracketNum = ois.readDouble();
+		rBracketNum = ois.readDouble();
+	}
+
+
+
+	/**
+	 * @return Returns the arrowInset.
+	 */
+	public synchronized double getArrowInset()
+	{
+		return arrowInset;
+	}
+
+
+
+	/**
+	 * @param arrowInset The arrowInset to set.
+	 */
+	public synchronized void setArrowInset(double arrowInset)
+	{
+		if(arrowInset>=0)
+			this.arrowInset = arrowInset;
+	}
+
+
+
+	/**
+	 * @return Returns the arrowSizeDim.
+	 */
+	public synchronized double getArrowSizeDim()
+	{
+		return arrowSizeDim;
+	}
+
+
+
+	/**
+	 * @param arrowSizeDim The arrowSizeDim to set.
+	 */
+	public synchronized void setArrowSizeDim(double arrowSizeDim)
+	{
+		if(arrowSizeDim>=0)
+			this.arrowSizeDim = arrowSizeDim;
+	}
+
+
+
+	/**
+	 * @return Returns the arrowSizeNum.
+	 */
+	public synchronized double getArrowSizeNum()
+	{
+		return arrowSizeNum;
+	}
+
+
+
+	/**
+	 * @param arrowSizeNum The arrowSizeNum to set.
+	 */
+	public synchronized void setArrowSizeNum(double arrowSizeNum)
+	{
+		if(arrowSizeNum>=0.001)
+			this.arrowSizeNum = arrowSizeNum;
+	}
+
+
+
+	/**
+	 * @return Returns the bracketNumRight.
+	 */
+	public synchronized double getBracketNum()
+	{
+		return bracketNum;
+	}
+
+
+
+	/**
+	 * @param bracketNum The bracketNumRight to set.
+	 */
+	public synchronized void setBracketNum(double bracketNum)
+	{
+		if(bracketNum>0.001)
+			this.bracketNum = bracketNum;
+	}
+
+
+
+	/**
+	 * @return Returns the dotSizeDim.
+	 */
+	public synchronized double getDotSizeDim()
+	{
+		return dotSizeDim;
+	}
+
+
+
+	/**
+	 * @param dotSizeDim The dotSizeDim to set.
+	 */
+	public synchronized void setDotSizeDim(double dotSizeDim)
+	{
+		if(dotSizeDim>=0)
+			this.dotSizeDim = dotSizeDim;
+	}
+
+
+
+	/**
+	 * @return Returns the dotSizeNum.
+	 */
+	public synchronized double getDotSizeNum()
+	{
+		return dotSizeNum;
+	}
+
+
+
+	/**
+	 * @param dotSizeNum The dotSizeNum to set.
+	 */
+	public synchronized void setDotSizeNum(double dotSizeNum)
+	{
+		if(dotSizeNum>=0.1)
+			this.dotSizeNum = dotSizeNum;
+	}
+
+
+
+	/**
+	 * @return Returns the rBracketNum.
+	 */
+	public synchronized double getRBracketNum()
+	{
+		return rBracketNum;
+	}
+
+
+
+	/**
+	 * @param bracketNum The rBracketNum to set.
+	 */
+	public synchronized void setRBracketNum(double bracketNum)
+	{
+		if(bracketNum>=0.001)
+			rBracketNum = bracketNum;
+	}
+
+
+
+	/**
+	 * @return Returns the tBarSizeDim.
+	 */
+	public synchronized double getTBarSizeDim()
+	{
+		return tBarSizeDim;
+	}
+
+
+
+	/**
+	 * @param barSizeDim The tBarSizeDim to set.
+	 */
+	public synchronized void setTBarSizeDim(double barSizeDim)
+	{
+		if(barSizeDim>=0)
+			tBarSizeDim = barSizeDim;
+	}
+
+
+
+	/**
+	 * @return Returns the tBarSizeNum.
+	 */
+	public synchronized double getTBarSizeNum()
+	{
+		return tBarSizeNum;
+	}
+
+
+
+	/**
+	 * @param barSizeNum The tBarSizeNum to set.
+	 */
+	public synchronized void setTBarSizeNum(double barSizeNum)
+	{
+		if(tBarSizeDim>=0.1)
+			tBarSizeNum = barSizeNum;
+	}
+
+
+
+	/**
+	 * @param arrowLength The arrowLength to set.
+	 */
+	public void setArrowLength(double arrowLength)
+	{
+		if(arrowLength>=0)
+			this.arrowLength = arrowLength;
+	}
+
+
+
+	/**
+	 * @return Returns the line.
+	 */
+	public synchronized Line getLine()
+	{
+		return line;
+	}
+
+
+
+	/**
+	 * @param line The line to set.
+	 */
+	public synchronized void setLine(Line line)
+	{
+		if(line!=null)
+			this.line = line;
+	}
+
+
+
+	/**
+	 * @return the arrowLength
+	 */
+	public double getArrowLength()
+	{
+		return arrowLength;
+	}
+
+	
+	
+	
+	/**
+	 * @return True if the current style of the arrow is an arrow, a double arrow, ...
+	 */
+	public boolean needReduceLine()
+	{
+		return 	currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.ROUNDIN_STYLE);
+	}
+
+
+
+	@Override
+	public boolean equals(Object o)
+	{
+		if(o instanceof ArrowHead)
+		{
+			ArrowHead ah2 = (ArrowHead)o;
+			
+			return ((float)ah2.getArrowInset())==((float)getArrowInset()) && 
+				((float)ah2.getArrowLength())==((float)getArrowLength()) &&
+				((float)ah2.getArrowSizeDim())==((float)getArrowSizeDim()) && 
+				((float)ah2.getArrowSizeNum())==((float)getArrowSizeNum()) &&
+				ah2.getArrowStyle().equals(getArrowStyle()) && 
+				((float)ah2.getBracketNum())==((float)getBracketNum()) &&
+				((float)ah2.getDotSizeDim())==((float)getDotSizeDim()) && 
+				((float)ah2.getDotSizeNum())==((float)getDotSizeNum()) &&
+				((float)ah2.getRBracketNum())==((float)getRBracketNum()) && 
+				((float)ah2.getTBarSizeDim())==((float)getTBarSizeDim()) &&
+				((float)ah2.getTBarSizeNum())==((float)getTBarSizeNum());
+		}
+		return false;
+	}
+
+	
+	
+	/**
+	 * @return True if the arrow has no style.
+	 * @since 1.9
+	 */
+	public boolean isWithoutStyle()
+	{
+		return currentArrowStyle.equals(PSTricksConstants.NONEARROW_STYLE);
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return (int)(currentArrowStyle.hashCode()+getArrowInset()+getArrowLength()+
+				getRBracketNum()+getDotSizeDim()+getDotSizeDim());
+	}
+	
+	
+	/**
+	 * @return The parameters of the dot shape (even if the arrow has not currently the dot shape).
+	 * @since 1.9
+	 */
+	public String getDotParameters()
+	{
+		return "dotsize="+(float)(getDotSizeDim()/Figure.PPC)+"cm "+(float)getDotSizeNum(); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	
+	
+	/**
+	 * @return True if the current shape of the arrow is a dot.
+	 * @since 1.9
+	 */
+	public boolean isArrowShapeDot()
+	{
+		return currentArrowStyle.equals(PSTricksConstants.CIRCLEEND_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.CIRCLEIN_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.DISKEND_STYLE) ||
+				currentArrowStyle.equals(PSTricksConstants.DISKIN_STYLE);
+	}
+	
+	
+	
+	
+	/**
+	 * Copy the parameters of the arrowHead (style and parameters) <code>a</code> to the current arrowhead.
+	 * @param a The copied arrowhead
+	 * @since 1.9
+	 */
+	public void copyArrowParameters(ArrowHead a)
+	{
+		arrowInset   = a.arrowInset;
+		arrowLength  = a.arrowLength;
+		arrowSizeDim = a.arrowSizeDim;
+		arrowSizeNum = a.arrowSizeNum;
+		bracketNum   = a.bracketNum;
+		currentArrowStyle = a.currentArrowStyle;
+		dotSizeDim   = a.dotSizeDim;
+		dotSizeNum   = a.dotSizeNum;
+		rBracketNum  = a.rBracketNum;
+		tBarSizeDim  = a.tBarSizeDim;
+		tBarSizeNum  = a.tBarSizeNum;
+		arrowInset   = a.arrowInset;
+		arrowLength  = a.arrowLength;
+		arrowSizeDim = a.arrowSizeDim;
+		arrowSizeNum = a.arrowSizeNum;
+	}
+	
+	
+	
+	/**
+	 * Sometimes it is useful to have the inverse of an arrow style (e.g. when you have > or >> you
+	 * would like to get < or <<).
+	 * @param arrowS The arrow style to reverse.
+	 * @return The opposite of the given arrow.
+	 * @since 1.9.1
+	 */
+	public static String invertArrowStyle(String arrowS)
+	{
+		if(arrowS.equals(PSTricksConstants.DLARROW_STYLE))
+			return PSTricksConstants.DRARROW_STYLE;
+		if(arrowS.equals(PSTricksConstants.DRARROW_STYLE))
+			return PSTricksConstants.DLARROW_STYLE;
+		if(arrowS.equals(PSTricksConstants.RARROW_STYLE))
+			return PSTricksConstants.LARROW_STYLE;
+		if(arrowS.equals(PSTricksConstants.LARROW_STYLE))
+			return PSTricksConstants.RARROW_STYLE;
+		if(arrowS.equals(PSTricksConstants.LRBRACKET_STYLE))
+			return PSTricksConstants.RRBRACKET_STYLE;
+		if(arrowS.equals(PSTricksConstants.RRBRACKET_STYLE))
+			return PSTricksConstants.LRBRACKET_STYLE;
+		if(arrowS.equals(PSTricksConstants.RSBRACKET_STYLE))
+			return PSTricksConstants.LSBRACKET_STYLE;
+		if(arrowS.equals(PSTricksConstants.LSBRACKET_STYLE))
+			return PSTricksConstants.RSBRACKET_STYLE;
+		if(arrowS.equals(PSTricksConstants.NONEARROW_STYLE))
+			return PSTricksConstants.NONEARROW_STYLE;
+		
+		return arrowS;
+	}
+
+
+	
+	/**
+	 * @return True of the arrow can be drawn (if the two points of its line are not at the same location).
+	 * @since 1.9.4
+	 */
+	public boolean isDrawable()
+	{
+		LaTeXDrawPoint2D pt1 = line.getPt1(), pt2 = line.getPt2();
+		return pt1!=pt2 && (pt1.x!=pt2.x || pt1.y!=pt2.y);
+	}
+
+
+
+	/**
+	 * @return the figure.
+	 * @since 2.0.0
+	 */
+	public synchronized Figure getFigure()
+	{
+		return figure;
+	}
+
+
+
+	/**
+	 * @param figure the figure to set.
+	 * @throws IllegalArgumentException If figure is null.
+	 * @since 2.0.0
+	 */
+	public synchronized void setFigure(Figure figure)
+	{
+		if(figure==null)
+			throw new IllegalArgumentException();
+		
+		this.figure = figure;
+	}
+	
+	
+	
+	/**
+	 * @return The thickness of the arrowhead.
+	 * @since 2.0.0
+	 */
+	public float getThickness()
+	{
+		return (float)(figure.hasDoubleBoundary() ? figure.getThickness()*2 + figure.getDoubleSep() : figure.getThickness());
+	}
+
+
+
+	/**
+	 * @return True if the arrow style is inverted.
+	 * @since 2.0.0
+	 */
+	public boolean isInverted()
+	{
+		LaTeXDrawPoint2D p1  = line.getPt1();
+		LaTeXDrawPoint2D p2  = line.getPt2();
+		LaTeXDrawPoint2D pos = getPosition();
+		
+		if(currentArrowStyle.equals(PSTricksConstants.DLARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.LARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+			return pos==p1 ? false : true; 
+		
+		if(currentArrowStyle.equals(PSTricksConstants.DRARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.RARROW_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+			currentArrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+			return pos==p2 ? false : true;
+		
+		return false;
+	}
+	
+	
+	
+	/**
+	 * @return True if the arrow is a left arrow.
+	 * @since 2.0.0
+	 */
+	public boolean isLeftArrow()
+	{
+		return line.getPt1()==position ? true : false;
+	}
+}
diff --git a/current/latexDraw/figures/Axe.java b/current/latexDraw/figures/Axe.java
new file mode 100644
index 0000000..2dc55a2
--- /dev/null
+++ b/current/latexDraw/figures/Axe.java
@@ -0,0 +1,1459 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.Line2D;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+import javax.swing.JComboBox;
+
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines axes.<br>
+ *<br>
+ * TODO: it seems to have an redefinition of psaxes in the pstricks-add package, but this class
+ * define only the psaxes of the pst-plot package. It possible to add the possibility to choose
+ * which definition we want to use.<br><br>
+ * Ox and Oy parameters can be float, but it occurs problems; for this reason these parameters will
+ * be only integer in LaTeXDraw. cf. http://tug.org/mailman/htdig/pstricks/1998/000227.html<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 31/09/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @since 1.8<br>
+ * @version 2.0.0<br>
+ */
+public class Axe extends GridShape implements Arrowable
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** The increment of each axe; Dx and Dy in PSTricks. */
+	protected LaTeXDrawPoint2D increment;
+	
+	/** The distance between each label; if 0, the default value will be used; dx and oy in PSTricks (in cm). */
+	protected LaTeXDrawPoint2D distLabels;
+	
+	/** Define which labels must be displayed. */
+	protected int labelsDisplayed;
+	
+	/** Define the origin must be shown. */
+	protected boolean showOrigin;
+	
+	/** Define how the ticks must be shown. (use the LABELS_DISPLAYED_XXX constants to define its value).*/
+	protected int ticksDisplayed;
+	
+	/** Define the style of the ticks. */
+	protected int ticksStyle;
+	
+	/** The size of the ticks. */
+	protected double ticksSize;
+	
+	/** The style of the axes. */
+	protected int axesStyle;
+	
+	/** The first arrow. */
+	protected ArrowHead arrowHead1;
+	
+	/** The second arrow. */
+	protected ArrowHead arrowHead2;
+	
+	
+	public static final String ACTION_CMD_AXE_STYLE_CHOICE = "axeStyleCmd"; //$NON-NLS-1$
+	
+	public static final String ACTION_CMD_TICKS_STYLE_CHOICE = "ticksStyleCmd";//$NON-NLS-1$
+	
+	/** The value of axesStyle when the axes have the axes shape. */
+	public static final short AXES_STYLE_AXES_VALUE 	= 0;
+	
+	/** The value of axesStyle when the axes have the frame shape. */
+	public static final short AXES_STYLE_FRAME_VALUE 	= 1;
+	
+	/** The value of axesStyle when the axes must not be shown. */
+	public static final short AXES_STYLE_NONE_VALUE 	= 2;
+	
+	/** The value of ticksStyle when the ticks must be fully shown. */
+	public static final short TICKS_STYLE_FULL_VALUE 	= 0;
+	
+	/** The value of ticksStyle when only the top of the ticks must be shown. */
+	public static final short TICKS_STYLE_TOP_VALUE 	= 1;
+	
+	/** The value of ticksStyle when only the bottom of the ticks must be shown. */
+	public static final short TICKS_STYLE_BOTTOM_VALUE = 2;
+	
+	/** The value of labelsDisplayed when all the labels must be displayed. */
+	public static final short LABELS_DISPLAYED_ALL_VALUE 	= 0;
+	
+	/** The value of labelsDisplayed when only the X labels must be displayed. */
+	public static final short LABELS_DISPLAYED_X_VALUE 	= 1;
+	
+	/** The value of labelsDisplayed when only the Y labels must be displayed. */
+	public static final short LABELS_DISPLAYED_Y_VALUE 	= 2;
+	
+	/** The value of labelsDisplayed when no labels must be displayed. */
+	public static final short LABELS_DISPLAYED_NON_VALUE 	= 3;
+
+	public static final int DEFAULT_LABELSSIZE = 20;
+	
+	public static final String LABEL_STYLE_NONE = LaTeXDrawLang.getString1_8("Axe.0"); //$NON-NLS-1$
+	
+	public static final String LABEL_STYLE_AXE = LaTeXDrawLang.getString1_8("Axe.1"); //$NON-NLS-1$
+	
+	public static final String LABEL_STYLE_FRAME = LaTeXDrawLang.getString1_8("Axe.2"); //$NON-NLS-1$
+	
+	public static final String LABEL_STYLE_TICKS_FULL 	= LaTeXDrawLang.getString1_8("Axe.3"); //$NON-NLS-1$
+	
+	public static final String LABEL_STYLE_TICKS_TOP 	= LaTeXDrawLang.getString1_8("Axe.4"); //$NON-NLS-1$
+	
+	public static final String LABEL_STYLE_TICKS_BOTTOM = LaTeXDrawLang.getString1_8("Axe.5"); //$NON-NLS-1$
+	
+	/** The interval between the labels and the axes. */
+	public static final double GAP_LABEL = 5.;
+
+	
+	
+	/**
+	 * The constructor using two arguments.
+	 * @param pos The current position of the origin of the axes.
+	 */
+	public Axe(LaTeXDrawPoint2D pos, boolean increaseMeter)
+	{
+		super(pos, increaseMeter);
+		
+		canHaveArrow		= true;
+		isCustomizable 		= true;
+		isDashableOrDotable = true;
+		isThicknessable		= true;
+		showOrigin 	= PSTricksConstants.DEFAULT_SHOW_ORIGIN;
+		ticksSize 	= PSTricksConstants.DEFAULT_TICKS_SIZE*Figure.PPC;
+		distLabels	= new LaTeXDrawPoint2D(PSTricksConstants.DEFAULT_DIST_X_LABEL, 
+											PSTricksConstants.DEFAULT_DIST_Y_LABEL);
+		increment 	= new LaTeXDrawPoint2D(PSTricksConstants.DEFAULT_DX, PSTricksConstants.DEFAULT_DY);
+		arrowHead1 	= new ArrowHead(new LaTeXDrawPoint2D(pos), 
+									new Line(new LaTeXDrawPoint2D(pos), new LaTeXDrawPoint2D(pos), false), this);
+		arrowHead2 	= new ArrowHead(new LaTeXDrawPoint2D(pos), 
+									new Line(new LaTeXDrawPoint2D(pos), new LaTeXDrawPoint2D(pos), false), this);
+
+		BufferedImage bufferImage = new BufferedImage(2, 2, BufferedImage.TYPE_INT_RGB);
+		Graphics2D g = bufferImage.createGraphics();
+		font = new Font(g.getFont().getName(), Font.PLAIN, DEFAULT_LABELSSIZE);
+		
+		setAxesStyleToken(PSTricksConstants.DEFAULT_AXES_STYLE);
+		setTicksDisplayedToken(PSTricksConstants.DEFAULT_TICKS_DISPLAYED);
+		setTicksStyleToken(PSTricksConstants.DEFAULT_TICKS_STYLE);
+		setLabelsDisplayedToken(PSTricksConstants.DEFAULT_LABELS_DISPLAYED);
+
+		updateFonts();
+		updateShape();
+		
+		g.dispose();
+		bufferImage.flush();
+		g = null;
+		bufferImage = null;
+	}
+
+	
+
+	@Override
+	public void updateBorders()
+	{
+		if(borders==null)
+			borders = new LaTeXDrawRectangle(false);
+		
+		double minX, maxX, minY, maxY, add1X=0, add2X=0, add1Y=0, add2Y=0;
+		double ticks = ticksSize;
+		int ticksS = getTicksStyle();
+		boolean ticksTop = ticksS==TICKS_STYLE_TOP_VALUE || ticksS==TICKS_STYLE_FULL_VALUE;
+		boolean ticksBot = ticksS==TICKS_STYLE_BOTTOM_VALUE || ticksS==TICKS_STYLE_FULL_VALUE;
+		
+		if(gridEnd.x<gridStart.x)
+		{
+			minX = gridEnd.x;
+			maxX = gridStart.x;
+		}
+		else
+		{
+			minX = gridStart.x;
+			maxX = gridEnd.x;
+		}
+		
+		if(gridEnd.y<gridStart.y)
+		{
+			minY = gridEnd.y;
+			maxY = gridStart.y;
+		}
+		else
+		{
+			minY = gridStart.y;
+			maxY = gridEnd.y;
+		}
+		
+		if(minX>=0 && isYLabelWest)
+			add1X = Math.max(fontMetrics.stringWidth(String.valueOf(minY)), 
+							 fontMetrics.stringWidth(String.valueOf(maxY)))+(ticksBot?ticks:0);
+		
+		if(maxX<=0)
+			add2X = Math.max(fontMetrics.stringWidth(String.valueOf(minY)), 
+							 fontMetrics.stringWidth(String.valueOf(maxY)))+(ticksBot?ticks:0);
+		
+		if(minY>=0 && isXLabelSouth)
+			add2Y = fontMetrics.getHeight()+GAP_LABEL+(ticksBot?ticks:0);
+		
+		if(maxY<=0)
+			add1Y = fontMetrics.getHeight()+GAP_LABEL+(ticksTop?ticks:0);
+		
+		borders.setFirstPoint(position.x+Math.min(0, minX)*PPC-add1X,
+							  position.y-Math.max(0, maxY)*PPC-add1Y);
+		borders.setLastPoint(position.x+Math.max(0, maxX)*PPC+add2X,
+							 position.y-Math.min(0, minY)*PPC+add2Y);
+		
+		gravityCenter = borders.getGravityCenter();
+		updateShape();
+	}
+
+
+
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		Color formerColor = g.getColor();
+		Font formerFont = g.getFont();
+		double minX, maxX, minY, maxY, maxX3, minX3, maxY3, minY3;
+		double gapX = distLabels.x==0. ? PPC : (distLabels.x/increment.x)*PPC, i; 
+		double gapY = distLabels.y==0. ? PPC : (distLabels.y/increment.y)*PPC;
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint();
+		LaTeXDrawPoint2D SE = borders.getTheSEPoint();	
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+		double lgth;
+		boolean ticksBot = ticksStyle==TICKS_STYLE_BOTTOM_VALUE || ticksStyle==TICKS_STYLE_FULL_VALUE;
+		int j;
+
+		if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+		else 
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER,
+					1.f, new float[]{0,thickness+dotSep}, 0));
+		else
+		if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+					1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+
+		g.setColor(linesColor);
+		g.setFont(font);
+			
+		if(rotationAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}
+		
+		if(gridEnd.x<gridStart.x)
+		{
+			minX = gridEnd.x;
+			maxX = gridStart.x;
+		}
+		else
+		{
+			minX = gridStart.x;
+			maxX = gridEnd.x;
+		}
+		
+		if(gridEnd.y<gridStart.y)
+		{
+			minY = gridEnd.y;
+			maxY = gridStart.y;
+		}
+		else
+		{
+			minY = gridStart.y;
+			maxY = gridEnd.y;
+		}
+		
+		if(distLabels.x!=0.)
+		{
+			if(maxX!=0.)
+			{
+				maxX = maxX/distLabels.x;
+				if(maxX==0.)
+					maxX=0.1;
+			}
+			
+			if(minX!=0)
+			{
+				minX = minX/distLabels.x;
+				if(minX==0.)
+					minX=0.1;
+			}
+		}
+		
+		if(distLabels.y!=0.)
+		{
+			if(maxY!=0.)
+			{
+				maxY = maxY/distLabels.y;
+				if(maxY==0.)
+					maxY=0.1;
+			}
+			
+			if(minY!=0.)
+			{
+				minY = minY/distLabels.y;
+				if(minY==0.)
+					minY=0.1;
+			}
+		}
+		
+		boolean arrow1Ok = !arrowHead1.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE);
+		boolean arrow2Ok = !arrowHead2.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE);
+		
+		minX3 = axesStyle==AXES_STYLE_AXES_VALUE && ((arrow1Ok && isYLabelWest) || 
+				(arrow2Ok && !isYLabelWest)) && gridStart.x!=0 && 
+				(distLabels.x==0. || distLabels.x==1.)? minX+1 : minX; 		
+		
+		minY3 = axesStyle==AXES_STYLE_AXES_VALUE && ((arrow1Ok && isXLabelSouth) || 
+				(arrow2Ok && !isXLabelSouth)) && gridStart.y!=0 && 
+				(distLabels.y==0. || distLabels.y==1.)? minY+1 : minY; 			 
+					 
+		maxX3 = axesStyle==AXES_STYLE_AXES_VALUE &&
+		 		((arrow2Ok && isYLabelWest) || (arrow1Ok && !isYLabelWest)) && 
+		 		(distLabels.x==0. || distLabels.x==1.)? maxX-1 : maxX; 			 
+		maxY3 = axesStyle==AXES_STYLE_AXES_VALUE &&
+		 		((arrow2Ok && isXLabelSouth) || (arrow1Ok && !isXLabelSouth)) && 
+		 		(distLabels.y==0. || distLabels.y==1.)? maxY-1 : maxY; 	
+		
+		minX3 = minX>0 ? 0 : minX3;
+		maxX3 = maxX<0 ? 0 : maxX3;
+		minY3 = minY>0 ? 0 : minY3;
+		maxY3 = maxY<0 ? 0 : maxY3;
+		
+		switch(axesStyle)
+		{
+			case AXES_STYLE_AXES_VALUE:
+				
+				boolean arrowOk = (float)minX!=(float)maxX || (float)maxX!=(float)minY || (float)minY!=(float)maxY;
+				Line xLine = new Line(new LaTeXDrawPoint2D(position.x+gridStart.x*PPC, position.y), 
+										new LaTeXDrawPoint2D(position.x+gridEnd.x*PPC, position.y), true);
+				Line yLine = new Line(new LaTeXDrawPoint2D(position.x, position.y-gridEnd.y*PPC), 
+										new LaTeXDrawPoint2D(position.x, position.y-gridStart.y*PPC), true);
+
+				xLine.setLinesColor(linesColor);
+				xLine.setLineStyle(lineStyle);
+				xLine.setThickness(thickness);
+				yLine.setLinesColor(linesColor);
+				yLine.setLineStyle(lineStyle);
+				yLine.setThickness(thickness);
+				
+				if(!arrowHead1.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE) && arrowOk)
+				{
+					String arrowStyle = arrowHead1.getArrowStyle();
+					lgth = arrowHead1.getArrowHeadLength();
+					boolean isArrow = arrowHead1.needReduceLine();
+					
+					if((minX!=0 && isYLabelWest) || (maxX!=0 && !isYLabelWest) || maxY==minY)
+					{
+						if(isArrow && !isYLabelWest)
+						{
+							if(arrowStyle.equals(PSTricksConstants.RARROW_STYLE))
+								arrowStyle = PSTricksConstants.LARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+								arrowStyle = PSTricksConstants.RARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DLARROW_STYLE))
+								arrowStyle = PSTricksConstants.DRARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+								arrowStyle = PSTricksConstants.DLARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LSBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RSBRACKET_STYLE;
+						}
+						
+						if(isArrow)
+							if(isYLabelWest)
+								 xLine.getPt1().x-=lgth;
+							else xLine.getPt2().x+=lgth;
+						
+						if(isYLabelWest)
+							xLine.setArrow1Style(arrowStyle);
+						else
+							xLine.setArrow2Style(arrowStyle);
+					}
+					
+					if((minY!=0 && isXLabelSouth) || (maxY!=0 && !isXLabelSouth) || maxX==minX)
+					{
+						arrowStyle = arrowHead1.getArrowStyle();
+						
+						if(isArrow && isXLabelSouth)
+						{
+							if(arrowStyle.equals(PSTricksConstants.RARROW_STYLE))
+								arrowStyle = PSTricksConstants.LARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+								arrowStyle = PSTricksConstants.RARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DLARROW_STYLE))
+								arrowStyle = PSTricksConstants.DRARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+								arrowStyle = PSTricksConstants.DLARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LSBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RSBRACKET_STYLE;
+						}
+						
+						if(isArrow)
+							if(isXLabelSouth)
+								 yLine.getPt2().y+=lgth;
+							else yLine.getPt1().y-=lgth;
+						
+						if(isXLabelSouth)
+							yLine.setArrow2Style(arrowStyle);
+						else
+							yLine.setArrow1Style(arrowStyle);
+					}
+				}
+				
+				if(!arrowHead2.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE) && arrowOk)
+				{
+					String arrowStyle = arrowHead2.getArrowStyle();
+					lgth = arrowHead2.getArrowHeadLength();
+					boolean isArrow = arrowHead2.needReduceLine();
+					
+					if((maxY!=0 && isXLabelSouth) || (minY!=0 && !isXLabelSouth) || maxY==minY)
+					{
+						if(isArrow && !isXLabelSouth)
+						{
+							if(arrowStyle.equals(PSTricksConstants.RARROW_STYLE))
+								arrowStyle = PSTricksConstants.LARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+								arrowStyle = PSTricksConstants.RARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DLARROW_STYLE))
+								arrowStyle = PSTricksConstants.DRARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+								arrowStyle = PSTricksConstants.DLARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LSBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RSBRACKET_STYLE;
+						}
+						
+						if(maxY==minY && minY==0)
+						{
+							if(isArrow)
+								if(maxX>0)
+									 xLine.getPt1().y-=lgth;
+								else xLine.getPt2().y+=lgth;
+							
+							if(maxX>0)
+								xLine.setArrow1Style(arrowStyle);
+							else
+								xLine.setArrow2Style(arrowStyle);
+						}
+						else
+						{
+							if(isArrow)
+								if(isXLabelSouth)
+									 yLine.getPt1().y-=lgth;
+								else yLine.getPt2().y+=lgth;
+							
+							if(isXLabelSouth)
+								yLine.setArrow1Style(arrowStyle);
+							else
+								yLine.setArrow2Style(arrowStyle);
+						}
+					}
+					
+					if((maxX!=0 && isYLabelWest) || (minX!=0 && !isYLabelWest) || maxX==minX)
+					{
+						arrowStyle = arrowHead2.getArrowStyle();
+						
+						if(isArrow && isYLabelWest)
+						{
+							if(arrowStyle.equals(PSTricksConstants.RARROW_STYLE))
+								arrowStyle = PSTricksConstants.LARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+								arrowStyle = PSTricksConstants.RARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DLARROW_STYLE))
+								arrowStyle = PSTricksConstants.DRARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+								arrowStyle = PSTricksConstants.DLARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LSBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RSBRACKET_STYLE;
+						}
+						
+						if(maxX==minX && minX==0)
+						{
+							if(isArrow)
+								if(maxY>0)
+									 yLine.getPt2().x+=lgth;
+								else xLine.getPt1().x-=lgth;
+							
+							if(maxY>0)
+								yLine.setArrow2Style(arrowStyle);
+							else
+								yLine.setArrow1Style(arrowStyle);
+						}
+						else
+						{
+							if(isArrow)
+								if(isYLabelWest)
+									 xLine.getPt2().x+=lgth;
+								else xLine.getPt1().x-=lgth;
+							
+							if(isYLabelWest)
+								xLine.setArrow2Style(arrowStyle);
+							else
+								xLine.setArrow1Style(arrowStyle);
+						}
+					}
+				}
+
+				xLine.draw(g, antiAlias, rendering, alphaInter, colorRendering); // We draw the axes
+				yLine.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+				
+				break;
+				
+			case AXES_STYLE_FRAME_VALUE:
+				
+				if(gridEnd.x>0 || gridEnd.y>0)
+				{
+					double xMax = position.x+gridEnd.x*PPC;
+					double yMax = position.y-gridEnd.y*PPC;
+					
+					LaTeXDrawRectangle r = new LaTeXDrawRectangle(
+							new LaTeXDrawPoint2D(position.x, gridEnd.y>0?yMax:position.y), 
+							new LaTeXDrawPoint2D(gridEnd.x>0?xMax:position.x, position.y), false);
+					
+					r.setBordersPosition(PSTricksConstants.BORDERS_MIDDLE);
+					r.setLinesColor(linesColor);
+					r.setLineStyle(lineStyle);
+					r.setThickness(thickness);
+					r.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+				}
+				break;
+		}
+		
+		double endX = distLabels.x!=0. ? maxX3 : maxX3/increment.x;
+		double endY = distLabels.y!=0. ? maxY3 : maxY3/increment.y;
+		double startX = distLabels.x!=0. ? minX3 : minX3/increment.x;
+		double startY = distLabels.y!=0. ? minY3 : minY3/increment.y;
+		
+		if(ticksDisplayed!=LABELS_DISPLAYED_NON_VALUE)// We draw the ticks
+		{
+			if(ticksStyle==TICKS_STYLE_FULL_VALUE || (ticksStyle==TICKS_STYLE_TOP_VALUE && maxY>0) ||
+			  (ticksStyle==TICKS_STYLE_BOTTOM_VALUE && maxY<=0))
+				if(ticksDisplayed==LABELS_DISPLAYED_X_VALUE || ticksDisplayed==LABELS_DISPLAYED_ALL_VALUE)
+				{
+					for(j=1; j<=endX; j++)
+						g.draw(new Line2D.Double(position.x+j*gapX*increment.x, position.y, 
+								 position.x+j*gapX*increment.x, position.y-ticksSize-thickness/2.));
+					
+					for(j=-1; j>=startX; j--)
+						g.draw(new Line2D.Double(position.x+j*gapX*increment.x, position.y, 
+								position.x+j*gapX*increment.x, position.y-ticksSize-thickness/2.));
+				}
+			
+			if(ticksStyle==TICKS_STYLE_FULL_VALUE || (ticksStyle==TICKS_STYLE_TOP_VALUE && maxX>0) ||
+			  (ticksStyle==TICKS_STYLE_BOTTOM_VALUE && maxX<=0))
+				if(ticksDisplayed==LABELS_DISPLAYED_Y_VALUE || ticksDisplayed==LABELS_DISPLAYED_ALL_VALUE)
+				{
+					for(j=1; j<=endY; j++)
+						g.draw(new Line2D.Double(position.x, position.y-j*gapY*increment.y, 
+								 position.x+ticksSize+thickness/2., position.y-j*gapY*increment.y));
+					
+					for(j=-1; j>=startY; j--)
+						g.draw(new Line2D.Double(position.x, position.y-j*gapY*increment.y, 
+								position.x+ticksSize+thickness/2., position.y-j*gapY*increment.y));
+				}
+			
+			if(ticksStyle==TICKS_STYLE_FULL_VALUE || (ticksStyle==TICKS_STYLE_BOTTOM_VALUE && maxY>0) ||
+			  (ticksStyle==TICKS_STYLE_TOP_VALUE && maxY<=0))
+				if(ticksDisplayed==LABELS_DISPLAYED_X_VALUE || ticksDisplayed==LABELS_DISPLAYED_ALL_VALUE)
+				{
+					for(j=1; j<=endX; j++)
+						g.draw(new Line2D.Double(position.x+j*gapX*increment.x, position.y, 
+								 position.x+j*gapX*increment.x, position.y+ticksSize+thickness/2.));
+				
+					for(j=-1; j>=startX; j--)
+						g.draw(new Line2D.Double(position.x+j*gapX*increment.x, position.y, 
+								position.x+j*gapX*increment.x, position.y+ticksSize+thickness/2.));
+				}
+			
+			if(ticksStyle==TICKS_STYLE_FULL_VALUE || (ticksStyle==TICKS_STYLE_BOTTOM_VALUE && maxX>0) ||
+				(ticksStyle==TICKS_STYLE_TOP_VALUE && maxX<=0))
+				if(ticksDisplayed==LABELS_DISPLAYED_Y_VALUE || ticksDisplayed==LABELS_DISPLAYED_ALL_VALUE)
+				{
+					for(j=1; j<=endY; j++)
+						g.draw(new Line2D.Double(position.x, position.y-j*gapY*increment.y, 
+								 position.x-ticksSize-thickness/2., position.y-j*gapY*increment.y));
+					
+					for(j=-1; j>=startY; j--)
+						g.draw(new Line2D.Double(position.x, position.y-j*gapY*increment.y, 
+								position.x-ticksSize-thickness/2., position.y-j*gapY*increment.y));
+				}
+		}
+
+		g.setColor(Color.BLACK);
+		
+		if(labelsDisplayed==LABELS_DISPLAYED_ALL_VALUE || labelsDisplayed==LABELS_DISPLAYED_X_VALUE)
+		{// We show the labels on the X-axe.
+			float height 	= fontMetrics.getAscent();
+			double gap 		= ((ticksDisplayed==LABELS_DISPLAYED_ALL_VALUE||
+							  ticksDisplayed==LABELS_DISPLAYED_X_VALUE)&&
+							((isXLabelSouth && (ticksStyle==TICKS_STYLE_BOTTOM_VALUE || ticksStyle==TICKS_STYLE_FULL_VALUE)) ||
+							 (!isXLabelSouth && (ticksStyle==TICKS_STYLE_TOP_VALUE || ticksStyle==TICKS_STYLE_FULL_VALUE)))?
+							  ticksSize:0)+thickness/2.+GAP_LABEL;
+			double sep		= maxY<=0 || !isXLabelSouth? -gap-GAP_LABEL : gap+height;
+			String str;
+
+			if(((isXLabelSouth && gridStart.y>=0) || (!isXLabelSouth && 
+				gridEnd.y<=0)) && (gridStart.x!=gridEnd.x || gridStart.x!=0) && gridStart.y<=0 && showOrigin)
+					g.drawString(String.valueOf((int)origin.x), 
+							(int)(position.x-fontMetrics.stringWidth(String.valueOf((int)origin.x))/2.), (int)(position.y+sep));
+			
+			for(i=increment.x, j=1; j<=endX; i+=increment.x, j++)
+			{
+				str = (((int)increment.x)==increment.x?String.valueOf((int)(i+origin.x)) : String.valueOf(i+origin.x));
+				g.drawString(str, (int)(position.x+j*gapX*increment.x-fontMetrics.stringWidth(str)/2.), (int)(position.y+sep));
+			}
+			
+			for(i=-increment.x, j=-1; j>=startX; i-=increment.x, j--)
+			{
+				str = (((int)increment.x)==increment.x?String.valueOf((int)(i+origin.x)): String.valueOf(i+origin.x));
+				g.drawString(str, (int)(position.x+j*gapX*increment.x-fontMetrics.stringWidth(str)/2.), (int)(position.y+sep));
+			}
+		}
+		
+		if(labelsDisplayed==LABELS_DISPLAYED_ALL_VALUE || labelsDisplayed==LABELS_DISPLAYED_Y_VALUE)
+		{// We show the labels on the Y-axe.
+			float height = fontMetrics.getAscent();
+			String str;
+
+			if(maxX>0 && isYLabelWest)
+			{
+				double gap	= (ticksBot && (ticksDisplayed==LABELS_DISPLAYED_ALL_VALUE ||
+								ticksDisplayed==LABELS_DISPLAYED_Y_VALUE)?ticksSize:0)+thickness/2.;
+			
+				if(gridStart.x==0 && (gridStart.y!=gridEnd.y || gridStart.y!=0) && showOrigin)
+					g.drawString(String.valueOf((int)origin.y), 
+							(int)(position.x-gap-g.getFontMetrics().stringWidth(String.valueOf((int)origin.y))-GAP_LABEL), 
+							(int)(position.y+height/2.));
+				
+				for(i=increment.y, j=1; j<=endY; i+=increment.y, j++)
+				{
+					str = ((int)increment.y)==increment.y?String.valueOf((int)(i+origin.y)):String.valueOf(i+origin.y);
+					g.drawString(str, (int)(position.x-gap-fontMetrics.stringWidth(str)-GAP_LABEL), 
+								(int)(position.y+height/2.-j*gapY*increment.y));
+				}
+				
+				for(i=-increment.y, j=-1; j>=startY; i-=increment.y, j--)
+				{
+					str = ((int)increment.y)==increment.y?String.valueOf((int)(i+origin.y)):String.valueOf(i+origin.y);
+					g.drawString(str, (int)(position.x-gap-fontMetrics.stringWidth(str)-GAP_LABEL), 
+								(int)(position.y+height/2.-j*gapY*increment.y));
+				}
+			}
+			else
+			{
+				double gap	= ((!ticksBot || ticksStyle==TICKS_STYLE_FULL_VALUE) && (ticksDisplayed==LABELS_DISPLAYED_ALL_VALUE||
+								ticksDisplayed==LABELS_DISPLAYED_Y_VALUE)?ticksSize:0)+thickness/2.;
+				
+				if((!isYLabelWest && gridEnd.x<=0) || (isYLabelWest && gridStart.x>=0) && (gridStart.y!=gridEnd.y  || gridStart.y!=0) && showOrigin)
+					g.drawString(String.valueOf((int)origin.y), (int)(position.x+gap+GAP_LABEL), (int)(position.y+height/2.));
+				
+				for(i=increment.y, j=1; j<=endY; i+=increment.y, j++)
+					g.drawString(((int)increment.y)==increment.y?String.valueOf((int)(i+origin.y)):String.valueOf(i+origin.y), 
+								(int)(position.x+gap+GAP_LABEL), (int)(position.y+height/2.-j*gapY*increment.y));	
+				
+				for(i=-increment.y, j=-1; j>=startY; i-=increment.y, j--)
+					g.drawString(((int)increment.y)==increment.y?String.valueOf((int)(i+origin.y)):String.valueOf(i+origin.y), 
+								(int)(position.x+gap+GAP_LABEL), (int)(position.y+height/2.-j*gapY*increment.y));	
+			}
+		}
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+		
+		g.setColor(formerColor);
+		g.setFont(formerFont);
+		
+		if(isSelected)
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+
+
+
+
+	@Override
+	public String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		double startX, startY, endX, endY, x, y;
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		String start = "", end = "", arrowsCode = "";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+		String arrowHead1Style = arrowHead1.getArrowStyle(), add = "";//$NON-NLS-1$
+		String arrowHead2Style = arrowHead2.getArrowStyle();
+		double threshold = 0.001;
+		
+		if(isXLabelSouth)
+		{
+			startY = gridStart.y;
+			endY   = gridEnd.y;
+		}else
+		{
+			startY = gridEnd.y;
+			endY   = gridStart.y;
+
+		}
+		
+		if(isYLabelWest)
+		{
+			startX = gridStart.x;
+			endX   = gridEnd.x;
+		}else
+		{
+			startX = gridEnd.x;
+			endX   = gridStart.x;
+		}
+		
+		String coord = "("+(int)startX+","+(int)startY+")("+ //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$
+						(int)endX+","+(int)endY+")"; //$NON-NLS-1$ //$NON-NLS-2$
+
+		coord = "(" + 0 + "," + 0 + ")" + coord; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+		if(position.x!=0 || position.y!=0)
+		{
+			double posX = position.x, posY = position.y;
+			if(Math.abs(position.x) < 0.001) posX = 0;
+			if(Math.abs(position.x) < 0.001) posY = 0;
+			
+			end +="}"; //$NON-NLS-1$
+			start = "\\rput(" + LaTeXDrawNumber.getCutNumber((float)((posX-d.x)/ppc), threshold) + "," + //$NON-NLS-1$ //$NON-NLS-2$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-posY)/ppc), threshold) + "){" + start; //$NON-NLS-1$
+		}
+		
+		if(rotationAngle % (Math.PI*2) != 0.)
+		{
+			updateBorders();
+			updateGravityCenter();
+			double angle = -Math.toDegrees(rotationAngle);
+			double cx = (gravityCenter.x - position.x) / ppc;
+			double cy = (position.y - gravityCenter.y) / ppc;
+			x = -Math.cos(-rotationAngle) * cx + Math.sin(-rotationAngle) * cy + cx;
+			y = -Math.sin(-rotationAngle) * cx - Math.cos(-rotationAngle) * cy + cy;
+
+			start = start+"\\rput{" + (float)angle + "}(" + LaTeXDrawNumber.getCutNumber((float)x, threshold) + ',' + LaTeXDrawNumber.getCutNumber((float)y, threshold) + "){"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			end = end+"}"; //$NON-NLS-1$
+		}
+		
+		if(!arrowHead1Style.equals(PSTricksConstants.NONEARROW_STYLE) || 
+			!arrowHead2Style.equals(PSTricksConstants.NONEARROW_STYLE))
+		{
+			if(arrowHead2Style.equals(PSTricksConstants.DLARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.DRARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.DRARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.DLARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.RARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.LARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.LARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.RARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.DLARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.DRARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.LRBRACKET_STYLE))
+				arrowHead2Style = PSTricksConstants.RRBRACKET_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.RRBRACKET_STYLE))
+				arrowHead2Style = PSTricksConstants.LRBRACKET_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE))
+				arrowHead2Style = PSTricksConstants.LSBRACKET_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.LSBRACKET_STYLE))
+				arrowHead2Style = PSTricksConstants.RSBRACKET_STYLE;
+			
+			String paramsR = ","+ arrowHead1.getParametersCode(); //$NON-NLS-1$
+			String paramsL = ","+ arrowHead2.getParametersCode(); //$NON-NLS-1$
+			if(paramsR.equals(",")) paramsR = ""; //$NON-NLS-1$ //$NON-NLS-2$
+			if(paramsL.equals(",")) paramsL = ""; //$NON-NLS-1$ //$NON-NLS-2$
+			
+			if(!arrowHead1Style.equals(PSTricksConstants.NONEARROW_STYLE))
+			{
+				arrowsCode="{"+arrowHead1Style+'-'; //$NON-NLS-1$
+				
+				if(!arrowHead2Style.equals(PSTricksConstants.NONEARROW_STYLE))
+					arrowsCode+=arrowHead2Style;
+				arrowsCode+='}';
+				
+				if(!arrowHead1.isOfTheSameTypeAs(arrowHead2))
+				{
+					if((arrowHead2Style.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+						arrowHead2Style.equals(PSTricksConstants.RRBRACKET_STYLE)  ||
+						arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE)  ||
+						arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE))	&&
+						(arrowHead1Style.equals(PSTricksConstants.BAREND_STYLE) ||
+						arrowHead1Style.equals(PSTricksConstants.BARIN_STYLE) ||
+						arrowHead1Style.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+						arrowHead1Style.equals(PSTricksConstants.RRBRACKET_STYLE)  ||
+						arrowHead1Style.equals(PSTricksConstants.RSBRACKET_STYLE)  ||
+						arrowHead1Style.equals(PSTricksConstants.RSBRACKET_STYLE)))
+						add = paramsR;
+					else
+						add+= paramsL + paramsR;
+				}else add+=paramsR;
+			}
+			else 
+				if(!arrowHead2Style.equals(PSTricksConstants.NONEARROW_STYLE))
+				{
+					add+=paramsR;
+					arrowsCode="{-"+arrowHead2Style+'}'; //$NON-NLS-1$
+				}
+		}
+
+		String str = getPSTricksCodeLine(ppc);
+		if(str.length()>0) add=add+','+str;
+		
+		if(!getAxesStyleToken().equals(PSTricksConstants.DEFAULT_AXES_STYLE))
+			add+=",axesstyle="+getAxesStyleToken();//$NON-NLS-1$
+		
+		if(!getTicksStyleToken().equals(PSTricksConstants.DEFAULT_TICKS_STYLE))
+			add+=",tickstyle="+getTicksStyleToken();//$NON-NLS-1$
+		
+		if(!getLabelsDisplayedToken().equals(PSTricksConstants.DEFAULT_LABELS_DISPLAYED))
+			add+=",labels="+getLabelsDisplayedToken();//$NON-NLS-1$
+		
+		if(!getTicksDisplayedToken().equals(PSTricksConstants.DEFAULT_LABELS_DISPLAYED))
+			add+=",ticks="+getTicksDisplayedToken();//$NON-NLS-1$
+		
+		if(((float)ticksSize/ppc)!=((float)PSTricksConstants.DEFAULT_TICKS_SIZE))
+			add+=",ticksize="+LaTeXDrawNumber.getCutNumber((float)(ticksSize/ppc), threshold)+"cm";//$NON-NLS-1$//$NON-NLS-2$
+			
+		if(distLabels.x!=0.)
+			add+=",dx="+(float)distLabels.x+"cm";//$NON-NLS-1$//$NON-NLS-2$
+		
+		if(distLabels.y!=0.)
+			add+=",dy="+(float)distLabels.y+"cm";//$NON-NLS-1$//$NON-NLS-2$
+
+		if(increment.x!=PSTricksConstants.DEFAULT_DX)
+			add+=",Dx="+(((int)increment.x)==increment.x?String.valueOf((int)increment.x): //$NON-NLS-1$
+						String.valueOf((float)increment.x));
+		
+		if(increment.y!=PSTricksConstants.DEFAULT_DY)
+			add+=",Dy="+(((int)increment.y)==increment.y?String.valueOf((int)increment.y): //$NON-NLS-1$
+						String.valueOf((float)increment.y));
+
+		if(origin.x!=PSTricksConstants.DEFAULT_OX)
+			add+=",Ox="+(int)origin.x;//$NON-NLS-1$
+		
+		if(origin.y!=PSTricksConstants.DEFAULT_OY)
+			add+=",Oy="+(int)origin.y;//$NON-NLS-1$
+
+		if(showOrigin!=PSTricksConstants.DEFAULT_SHOW_ORIGIN)
+			add+=",showorigin="+showOrigin;//$NON-NLS-1$
+		
+		return start +"\\psaxes[linewidth="+ LaTeXDrawNumber.getCutNumber((thickness/ppc), threshold) + //$NON-NLS-1$ 
+				add + "]" + arrowsCode + coord + end;//$NON-NLS-1$
+	}
+
+
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Axe g = (Axe)super.clone();
+
+		g.axesStyle 		= axesStyle;
+		g.ticksDisplayed 	= ticksDisplayed;
+		g.ticksSize 		= ticksSize;
+		g.ticksStyle 		= ticksStyle;
+		g.increment 		= (LaTeXDrawPoint2D)increment.clone();
+		g.showOrigin 		= showOrigin;
+		g.distLabels 		= (LaTeXDrawPoint2D)distLabels.clone();
+		g.labelsDisplayed 	= labelsDisplayed;
+		g.arrowHead1		= (ArrowHead)arrowHead1.clone();
+		g.arrowHead2		= (ArrowHead)arrowHead2.clone();
+		
+		return g;
+	}
+
+	
+	
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		gridEnd 		= (LaTeXDrawPoint2D)ois.readObject();
+		gridStart 		= (LaTeXDrawPoint2D)ois.readObject();
+		position 		= (LaTeXDrawPoint2D)ois.readObject();
+		origin 			= (LaTeXDrawPoint2D)ois.readObject();
+		isXLabelSouth 	= ois.readBoolean();
+		isYLabelWest 	= ois.readBoolean();
+		borders 		= (LaTeXDrawRectangle)ois.readObject();
+		font 			= (Font)ois.readObject();
+		increment		= (LaTeXDrawPoint2D)ois.readObject();
+		ticksSize		= ois.readDouble();
+		showOrigin		= ois.readBoolean();
+		ticksDisplayed	= ois.readInt();
+		ticksStyle		= ois.readInt();
+		labelsDisplayed	= ois.readInt();
+		distLabels		= (LaTeXDrawPoint2D)ois.readObject();
+		axesStyle		= ois.readInt();
+		arrowHead1		= (ArrowHead)ois.readObject();
+		arrowHead2		= (ArrowHead)ois.readObject();
+		
+		updateFonts();
+		updateShape();
+	}
+	
+	
+
+
+	/**
+	 * @return the increment.
+	 */
+	public synchronized LaTeXDrawPoint2D getIncrement()
+	{
+		return increment;
+	}
+
+
+
+
+
+	/**
+	 * @param increment the X increment to set.
+	 */
+	public synchronized void setIncrementX(double increment)
+	{
+		this.increment.x = increment;
+	}
+	
+	
+	
+	/**
+	 * @param increment the Y increment to set.
+	 */
+	public synchronized void setIncrementY(double increment)
+	{
+		this.increment.y = increment;
+	}
+
+
+
+
+	/**
+	 * @return the distLabels.x.
+	 */
+	public synchronized double getDistLabelsX()
+	{
+		return distLabels.x;
+	}
+
+	
+	
+	/**
+	 * @return the distLabels.y.
+	 */
+	public synchronized double getDistLabelsY()
+	{
+		return distLabels.y;
+	}
+
+
+	
+	
+	/**
+	 * @param distLabelsX the distLabels.x to set.
+	 */
+
+	public synchronized void setDistLabelsX(double distLabelsX)
+	{
+		distLabels.x = distLabelsX;
+	}
+	
+	
+	
+	/**
+	 * @param distLabelsY the distLabels.y to set.
+	 */
+
+	public void setDistLabelsY(double distLabelsY)
+	{
+		distLabels.y = distLabelsY;
+	}
+
+
+
+
+	/**
+	 * @return the labelsDisplayed.
+	 */
+	public int getLabelsDisplayed()
+	{
+		return labelsDisplayed;
+	}
+
+	
+	
+	
+	/**
+	 * Allows to get the token of 'labelsDisplayed' (null if there is a problem).
+	 * @return The token.
+	 */
+	public String getLabelsDisplayedToken()
+	{
+		if(labelsDisplayed==LABELS_DISPLAYED_ALL_VALUE)
+			return PSTricksConstants.TOKEN_LABELS_DISPLAYED_ALL;
+		
+		if(labelsDisplayed==LABELS_DISPLAYED_NON_VALUE)
+			return PSTricksConstants.TOKEN_LABELS_DISPLAYED_NON;
+		
+		if(labelsDisplayed==LABELS_DISPLAYED_X_VALUE)
+			return PSTricksConstants.TOKEN_LABELS_DISPLAYED_X;
+		
+		if(labelsDisplayed==LABELS_DISPLAYED_Y_VALUE)
+			return PSTricksConstants.TOKEN_LABELS_DISPLAYED_Y;
+		
+		return null;
+	}
+
+	
+
+
+
+
+	/**
+	 * @param labelsDisplayed the labelsDisplayed to set.
+	 */
+	public synchronized void setLabelsDisplayed(short labelsDisplayed)
+	{
+		this.labelsDisplayed = labelsDisplayed;
+	}
+
+	
+
+
+	/**
+	 * @param labelsDisplayed the labelsDisplayed to set.
+	 */
+	public synchronized void setLabelsDisplayedToken(String labelsDisplayed)
+	{
+		if(labelsDisplayed.equals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_ALL))
+			this.labelsDisplayed = LABELS_DISPLAYED_ALL_VALUE;
+		else
+			if(labelsDisplayed.equals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_NON))
+				this.labelsDisplayed = LABELS_DISPLAYED_NON_VALUE;
+			else
+				if(labelsDisplayed.equals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_X))
+					this.labelsDisplayed = LABELS_DISPLAYED_X_VALUE;
+				else
+					if(labelsDisplayed.equals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_Y))
+						this.labelsDisplayed = LABELS_DISPLAYED_Y_VALUE;
+	}
+	
+
+
+	/**
+	 * @return the showOrigin.
+	 */
+	public synchronized boolean isShowOrigin()
+	{
+		return showOrigin;
+	}
+
+
+
+
+
+	/**
+	 * @param showOrigin the showOrigin to set.
+	 */
+	public synchronized void setShowOrigin(boolean showOrigin)
+	{
+		this.showOrigin = showOrigin;
+	}
+
+
+
+
+
+	/**
+	 * @return the ticksDisplayed.
+	 */
+	public synchronized int getTicksDisplayed()
+	{
+		return ticksDisplayed;
+	}
+
+	
+	
+	
+	/**
+	 * Allows to get the token of 'ticksDisplayed' (null if there is a problem).
+	 * @return The token.
+	 */
+	public synchronized String getTicksDisplayedToken()
+	{
+		if(ticksDisplayed==LABELS_DISPLAYED_ALL_VALUE)
+			return PSTricksConstants.TOKEN_LABELS_DISPLAYED_ALL;
+		
+		if(ticksDisplayed==LABELS_DISPLAYED_NON_VALUE)
+			return PSTricksConstants.TOKEN_LABELS_DISPLAYED_NON;
+		
+		if(ticksDisplayed==LABELS_DISPLAYED_X_VALUE)
+			return PSTricksConstants.TOKEN_LABELS_DISPLAYED_X;
+		
+		if(ticksDisplayed==LABELS_DISPLAYED_Y_VALUE)
+			return PSTricksConstants.TOKEN_LABELS_DISPLAYED_Y;
+		
+		return null;
+	}
+	
+	
+
+
+	/**
+	 * @param ticksDisplayed the ticksDisplayed to set.
+	 */
+	public synchronized void setTicksDisplayed(short ticksDisplayed)
+	{
+		this.ticksDisplayed = ticksDisplayed;
+	}
+
+
+
+	
+	/**
+	 * @param ticksDisplayed the ticksDisplayed to set.
+	 */
+	public synchronized void setTicksDisplayedToken(String ticksDisplayed)
+	{
+		if(ticksDisplayed.equals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_ALL))
+			this.ticksDisplayed = LABELS_DISPLAYED_ALL_VALUE;
+		else
+			if(ticksDisplayed.equals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_NON))
+				this.ticksDisplayed = LABELS_DISPLAYED_NON_VALUE;
+			else
+				if(ticksDisplayed.equals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_X))
+					this.ticksDisplayed = LABELS_DISPLAYED_X_VALUE;
+				else
+					if(ticksDisplayed.equals(PSTricksConstants.TOKEN_LABELS_DISPLAYED_Y))
+						this.ticksDisplayed = LABELS_DISPLAYED_Y_VALUE;
+	}
+	
+	
+
+
+	/**
+	 * @return the ticksStyle.
+	 */
+	public synchronized int getTicksStyle()
+	{
+		return ticksStyle;
+	}
+
+
+
+
+
+	/**
+	 * @param ticksStyle the ticksStyle to set.
+	 */
+	public synchronized void setTicksStyle(short ticksStyle)
+	{
+		this.ticksStyle = ticksStyle;
+	}
+
+	
+	
+	
+	/**
+	 * @param ticksStyle the ticksStyle to set.
+	 */
+	public synchronized void setTicksStyleToken(String ticksStyle)
+	{
+		if(ticksStyle.equals(PSTricksConstants.TOKEN_TICKS_STYLE_BOTTOM))
+			this.ticksStyle = TICKS_STYLE_BOTTOM_VALUE;
+		else
+			if(ticksStyle.equals(PSTricksConstants.TOKEN_TICKS_STYLE_FULL))
+				this.ticksStyle = TICKS_STYLE_FULL_VALUE;
+			else
+				if(ticksStyle.equals(PSTricksConstants.TOKEN_TICKS_STYLE_TOP))
+					this.ticksStyle = TICKS_STYLE_TOP_VALUE;
+	}
+
+	
+	
+	
+	/**
+	 * Allows to get the token of the ticks style (null if there is a problem).
+	 * @return The token.
+	 */
+	public synchronized String getTicksStyleToken()
+	{
+		if(ticksStyle==TICKS_STYLE_BOTTOM_VALUE)
+			return PSTricksConstants.TOKEN_TICKS_STYLE_BOTTOM;
+		
+		if(ticksStyle==TICKS_STYLE_FULL_VALUE)
+			return PSTricksConstants.TOKEN_TICKS_STYLE_FULL;
+		
+		if(ticksStyle==TICKS_STYLE_TOP_VALUE)
+			return PSTricksConstants.TOKEN_TICKS_STYLE_TOP;
+		
+		return null;
+	}
+
+	
+	
+	
+	/**
+	 * @return the ticksSize.
+	 */
+	public synchronized double getTicksSize()
+	{
+		return ticksSize;
+	}
+
+
+
+
+
+	/**
+	 * @param ticksSize the ticksSize to set.
+	 */
+	public synchronized void setTicksSize(double ticksSize)
+	{
+		this.ticksSize = ticksSize;
+	}
+
+
+
+
+
+	/**
+	 * @return the axesStyle.
+	 */
+	public synchronized int getAxesStyle()
+	{
+		return axesStyle;
+	}
+
+
+	
+	
+	/**
+	 * Allows to get the token of the axes style (null if there is a problem).
+	 * @return The token.
+	 */
+	public synchronized String getAxesStyleToken()
+	{
+		if(axesStyle==AXES_STYLE_AXES_VALUE)
+			return PSTricksConstants.TOKEN_AXES_STYLE_AXES;
+		
+		if(axesStyle==AXES_STYLE_FRAME_VALUE)
+			return PSTricksConstants.TOKEN_AXES_STYLE_FRAME;
+		
+		if(axesStyle==AXES_STYLE_NONE_VALUE)
+			return PSTricksConstants.TOKEN_AXES_STYLE_NONE;
+		
+		return null;
+	}
+
+
+
+	/**
+	 * @param axesStyle the axesStyle to set.
+	 */
+	public synchronized void setAxesStyle(short axesStyle)
+	{
+		this.axesStyle = axesStyle;
+	}
+
+
+	
+	
+	/**
+	 * @param axesStyle the axesStyle to set.
+	 */
+	public synchronized void setAxesStyleToken(String axesStyle)
+	{
+		if(axesStyle.equals(PSTricksConstants.TOKEN_AXES_STYLE_AXES))
+			this.axesStyle = AXES_STYLE_AXES_VALUE;
+		else
+			if(axesStyle.equals(PSTricksConstants.TOKEN_AXES_STYLE_FRAME))
+				this.axesStyle = AXES_STYLE_FRAME_VALUE;
+			else
+				if(axesStyle.equals(PSTricksConstants.TOKEN_AXES_STYLE_NONE))
+					this.axesStyle = AXES_STYLE_NONE_VALUE;
+	}
+	
+	
+
+
+	@Override
+	public void updateBorders(FontMetrics fm)
+	{
+		updateBorders();
+	}
+
+
+
+
+	public String getArrow1Style()
+	{
+		return arrowHead1.getArrowStyle();
+	}
+
+
+
+
+	public String getArrow2Style()
+	{
+		return arrowHead2.getArrowStyle();
+	}
+
+
+
+
+	public ArrowHead getArrowHead1()
+	{
+		return arrowHead1;
+	}
+
+
+
+
+	public ArrowHead getArrowHead2()
+	{
+		return arrowHead2;
+	}
+
+
+
+
+	public void setArrow1Style(String style)
+	{
+		arrowHead1.setArrowStyle(style);
+	}
+
+
+
+
+	public void setArrow2Style(String style)
+	{
+		arrowHead2.setArrowStyle(style);
+	}
+
+
+
+
+	/**
+	 * @return A combobox allowing to choice the style of the axes.
+	 */
+	public static JComboBox createAxeStyleChoice()
+	{
+		JComboBox choice = new LaTeXDrawComboBox();
+
+		choice.addItem(LABEL_STYLE_AXE);
+		choice.addItem(LABEL_STYLE_FRAME);
+		choice.addItem(LABEL_STYLE_NONE);
+		
+		choice.setActionCommand(ACTION_CMD_AXE_STYLE_CHOICE);
+		choice.setName(ACTION_CMD_AXE_STYLE_CHOICE);
+		choice.setMinimumSize(new Dimension(70,30));
+		choice.setPreferredSize(new Dimension(70,30));
+		choice.setMaximumSize(new Dimension(70,30));
+		
+		return choice;
+	}
+	
+	
+	
+	
+	/**
+	 * @return A combobox allowing to choice the style of the ticks.
+	 */
+	public static JComboBox createTicksStyleChoice()
+	{
+		JComboBox choice = new LaTeXDrawComboBox();
+		
+		choice.addItem(LABEL_STYLE_TICKS_FULL);
+		choice.addItem(LABEL_STYLE_TICKS_TOP);
+		choice.addItem(LABEL_STYLE_TICKS_BOTTOM);
+		
+		choice.setActionCommand(ACTION_CMD_TICKS_STYLE_CHOICE);
+		choice.setName(ACTION_CMD_TICKS_STYLE_CHOICE);
+		choice.setMinimumSize(new Dimension(70,30));
+		choice.setPreferredSize(new Dimension(70,30));
+		choice.setMaximumSize(new Dimension(70,30));
+		
+		return choice;
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		position.setLocation(grid.getTransformedPointToGrid(position, false));
+		updateBorders();
+		updateShape();
+	}
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()^4;
+	}
+	
+	
+	
+	public boolean hasTwoLeftArrows()
+	{
+		return true;
+	}
+}
+
+
+
+
diff --git a/current/latexDraw/figures/BezierCurve.java b/current/latexDraw/figures/BezierCurve.java
new file mode 100644
index 0000000..722d649
--- /dev/null
+++ b/current/latexDraw/figures/BezierCurve.java
@@ -0,0 +1,2695 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Line2D;
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import javax.swing.JLabel;
+
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.ui.components.LabelListCellRenderer;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawException;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/**
+ * The class defines a new kind of figure, Bézier curves.
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright(c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 07/25/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class BezierCurve extends LaTeXDrawPolygon implements Arrowable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** This vector contains the points which allows to change the angles of the curves */
+	protected Vector<LaTeXDrawPoint2D> ctrlPts;
+	
+	/** Contains the second control points of each points; useful for closed curve. @since 1.9 */
+	protected Vector<LaTeXDrawPoint2D> secondCtrlPts;
+	
+	/** This vector contains the lines which allows to change the angles of the curves */
+	protected Vector<Line> ctrlLines;
+	
+	/** Contains the second control lines of each point; useful for closed curve. @since 1.9 */
+	protected transient Vector<Line> secondCtrlLines;
+	
+	/** If true, the control lines are displayed */
+	protected boolean showPoints;
+	
+	/** the arrowhead of the first point. */
+	protected ArrowHead arrowHead1;
+	
+	/** The arrow head of the second point. */
+	protected ArrowHead arrowHead2;
+	
+	/** Define if the path must be closed or not. @since 1.9 */
+	protected boolean open;
+	
+	/** 
+	 * Define the shape of the closing path. 
+	 * @since 1.9
+	 * @see BezierCurve#CLOSE_TYPE_CURVE
+	 * @see BezierCurve#CLOSE_TYPE_LINE  
+	 */
+	protected int closeType;
+	
+	/** 
+	 * Define the gap between a control point and its point in pixel when using {@link #equilibrate()} 
+	 * method. 
+	 * @since 1.9
+	 */
+	protected int equilibrateGap;
+	
+	
+	public static final int DEFAULT_EQUILIBRATE_GAP = 50;
+	
+	/** The value of showPoints by default */
+	public static final boolean DEFAULT_SHOWPOINTS = false;
+	
+	/** The gap of the control point by default */
+	public static final int DEFAULT_POSITION_CTRL = 40;
+	
+	/** The value by default of <code>open</code>. */
+	public static final boolean DEFAULT_OPEN = false;
+	
+	/** The closing path will be a line. */
+	public static final short CLOSE_TYPE_LINE  = 0;
+	
+	/** The closing path will be a Bézier curve. */
+	public static final short CLOSE_TYPE_CURVE = 1;
+	
+	/** The value of <code>closeType</code> by default. */
+	public static final short DEFAULT_CLOSE_TYPE = CLOSE_TYPE_CURVE;
+	
+	public static final String LABEL_CLOSE_CHOICE = "closeBezierCh";//$NON-NLS-1$
+	
+	
+	
+	/** 
+	 * The constructor by default.
+	 */
+	public BezierCurve(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), increaseMeter);
+	}
+
+	
+	
+	
+	/**
+	 * @param pt1 The first point.
+	 * @param pt2 The second point.
+	 */
+	public BezierCurve(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, boolean increaseMeter)
+	{
+		this(pt1, pt2, DEFAULT_OPEN, increaseMeter);
+	}
+
+
+	
+	
+	/**
+	 * @param pt1 The first point.
+	 * @param pt2 The second point.
+	 * @param isOpen Defines if the curve will be open or not.
+	 * @since 1.9
+	 */
+	public BezierCurve(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, boolean isOpen, boolean increaseMeter)
+	{
+		super(pt1, pt2, increaseMeter);
+		equilibrateGap	= DEFAULT_EQUILIBRATE_GAP;
+		closeType		= DEFAULT_CLOSE_TYPE;
+		canHaveArrow 	= true;
+		isBordersMovable= false;
+		showPoints 		= DEFAULT_SHOWPOINTS;
+		LaTeXDrawPoint2D pt1b = new LaTeXDrawPoint2D(pt1), pt2b = new LaTeXDrawPoint2D(pt2);
+		arrowHead1 = new ArrowHead(pt1b, new Line(pt1b, getFirstControlPoint(0), false), this);
+		arrowHead2 = new ArrowHead(pt2b, new Line(pt2b, getFirstControlPoint(-1), false), this);
+		
+		updateBorders();
+		setOpen(isOpen);
+	}
+	
+	
+	/**
+	 * Allows to add a control line.
+	 * @param pt The new point of the Bézier curve.
+	 * @param ctrlPt The new control point of the new point pt.
+	 * @param pos The position of the new line in the vector (if -1 the line is
+	 * put at the end of the vector).
+	 */
+	protected void addCtrlLineAt(LaTeXDrawPoint2D pt, LaTeXDrawPoint2D ctrlPt, LaTeXDrawPoint2D ctrlPt2, int pos)
+	{
+		if(ctrlLines == null) 
+		{
+			secondCtrlLines	= new Vector<Line>();
+			ctrlLines		= new Vector<Line>();
+		}
+		
+		if(pos<-1 || pos>ctrlPts.size())
+			throw new IllegalArgumentException("Invalid position");//$NON-NLS-1$
+		
+		Line l  = new Line(pt, ctrlPt, false);
+		Line l2 = new Line(pt, ctrlPt2, false);
+		double dim = Math.max(6,1.33*thickness+3.33 +1.);
+		
+		if(pos==-1 || pos==ctrlPts.size()-1)
+		{
+			ctrlLines.add(l);
+			secondCtrlLines.add(l2);
+		}
+		else 
+		{
+			ctrlLines.add(pos, l);
+			secondCtrlLines.add(pos, l2);
+		}
+		
+		l.setLinesColor(Color.GRAY);
+		l.setLineStyle(PSTricksConstants.LINE_DASHED_STYLE);
+		l.setThickness(1);
+		l.delimiters.firstElement().setDim(dim);
+		l.delimiters.lastElement().setDim(dim);
+		l2.setLinesColor(Color.GRAY);
+		l2.setLineStyle(PSTricksConstants.LINE_DASHED_STYLE);
+		l2.setThickness(1);
+		l2.delimiters.firstElement().setDim(dim);
+		l2.delimiters.lastElement().setDim(dim);
+	}
+	
+
+	
+	
+	/**
+	 * Allows to add a control line at the end of the vector.
+	 * @param pt The new point of the Bézier curve.
+	 * @param ctrlPt The new control point of the new point point.
+	 */
+	protected void addCtrlLine(LaTeXDrawPoint2D pt, LaTeXDrawPoint2D ctrlPt, LaTeXDrawPoint2D ctrlPt2)
+	{
+		addCtrlLineAt(pt, ctrlPt, ctrlPt2, -1);
+	}
+	
+	
+
+
+	@Override
+	public boolean addPointAt(LaTeXDrawPoint2D pt, int id)
+	{
+		if(pt!=null)
+		{
+			if(ctrlPts==null) 
+			{
+				ctrlPts			= new Vector<LaTeXDrawPoint2D>();
+				secondCtrlPts	= new Vector<LaTeXDrawPoint2D>();
+			}
+			
+			if(super.addPointAt(pt, id))
+			{
+				LaTeXDrawPoint2D ctrlPt  = new LaTeXDrawPoint2D(pt.x, pt.y+DEFAULT_POSITION_CTRL);
+				LaTeXDrawPoint2D ctrlPt2 = ctrlPt.centralSymmetry(pt);
+				
+				if(id==pts.size()-2 || pts.isEmpty())
+				{
+					ctrlPts.add(ctrlPt);
+					secondCtrlPts.add(ctrlPt2);
+					addCtrlLine(pt, ctrlPt, ctrlPt2);
+				}
+				else
+				{
+					ctrlPts.add(id, ctrlPt);
+					secondCtrlPts.add(id, ctrlPt2);
+					addCtrlLineAt(pt, ctrlPt, ctrlPt2, id);
+				}
+				
+				if(id==0 && arrowHead1!=null)
+				{
+					LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D(pts.firstElement()); 
+					arrowHead1.setPosition(pt2);
+					arrowHead1.setLine(new Line(pt2, ctrlPts.firstElement(), false));
+				}
+				else
+					if(arrowHead2!=null && id==pts.size()-2)
+					{
+						LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D(pt); 
+						arrowHead2.setPosition(pt2);
+						arrowHead2.setLine(new Line(pt2, ctrlPts.lastElement(), false));
+					}
+
+				
+				return true;
+			}
+		}
+		return false;
+	}
+	
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		BezierCurve b 	= (BezierCurve)super.clone();
+		b.equilibrateGap= equilibrateGap;
+		b.ctrlPts 		= new Vector<LaTeXDrawPoint2D>();
+		b.secondCtrlPts = new Vector<LaTeXDrawPoint2D>();
+		b.ctrlLines 	= new Vector<Line>();
+		b.secondCtrlLines 	= new Vector<Line>();
+		b.arrowHead1 	= (ArrowHead)arrowHead1.clone();
+		b.arrowHead2 	= (ArrowHead)arrowHead2.clone();
+		int i, size 	= ctrlPts.size();
+		
+		for(i=0; i<size; i++)
+		{
+			b.ctrlPts.add((LaTeXDrawPoint2D)ctrlPts.elementAt(i).clone());
+			b.secondCtrlPts.add((LaTeXDrawPoint2D)secondCtrlPts.elementAt(i).clone());
+		}
+		
+		for(i=0; i<size; i++)
+			b.addCtrlLine(b.pts.elementAt(i), b.ctrlPts.elementAt(i), b.secondCtrlPts.elementAt(i));
+		
+		LaTeXDrawPoint2D pt1b = new LaTeXDrawPoint2D(b.getPoint(0));
+		LaTeXDrawPoint2D pt2b = new LaTeXDrawPoint2D(b.getPoint(-1));
+		
+		b.arrowHead1.setPosition(pt1b);
+		b.arrowHead2.setPosition(pt2b);
+		b.arrowHead1.setLine(new Line(pt1b, b.getFirstControlPoint(0), false));
+		b.arrowHead2.setLine(new Line(pt2b, b.getFirstControlPoint(-1), false));
+		b.arrowHead1.setFigure(b);
+		b.arrowHead2.setFigure(b);
+		
+		b.open 		= open;
+		b.closeType	= closeType;
+		b.updateBorders();
+		b.updateShape();
+		
+		return b;
+	}
+
+
+
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		Color formerCol = g.getColor();
+		double dx=0, dy=0;
+		LaTeXDrawPoint2D formerPt1 = new LaTeXDrawPoint2D(getPoint(0));
+		LaTeXDrawPoint2D formerPt2 = new LaTeXDrawPoint2D(getPoint(-1));
+		String arrowHead1Style = arrowHead1.getArrowStyle();
+		String arrowHead2Style = arrowHead2.getArrowStyle();
+		boolean arrow1Drawable = arrowHead1.isDrawable() && !arrowHead1Style.equals(PSTricksConstants.NONEARROW_STYLE) && pts.size()>1;
+		boolean arrow2Drawable = arrowHead2.isDrawable() && !arrowHead2Style.equals(PSTricksConstants.NONEARROW_STYLE) && 
+									pts.size()>1 && isOpen();
+
+		if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+		else 
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER,
+					1.f, new float[]{0,thickness+dotSep}, 0));
+		else
+		if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+					1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+		
+		int i, size = getNbPoints();
+		
+		if(shape==null)
+			shape = getSimpleShape();
+		
+		g.setColor(linesColor);
+		
+		boolean update=false;
+		
+		if(arrow1Drawable)
+		{
+			double lgth = arrowHead1.getArrowHeadLength();
+			
+			try
+			{
+				LaTeXDrawPoint2D[] points = arrowHead1.getLine().findPoints(arrowHead1.getPosition(), lgth);
+				LaTeXDrawPoint2D newPt=null;
+				
+				if(points.length==1)
+					newPt=points[0];
+				else
+					newPt=points[0].distance(getFirstControlPoint(0))<points[1].distance(getFirstControlPoint(0))
+								?points[0]:points[1];
+								
+				getPoint(0).setLocation(newPt);
+				update=true;
+				
+			}catch(LaTeXDrawException e)
+			{
+				e.printStackTrace();
+				return ;
+			}
+		}
+		
+		if(arrow2Drawable)
+		{
+			double lgth = arrowHead2.getArrowHeadLength();
+
+			try
+			{
+				LaTeXDrawPoint2D[] points = arrowHead2.getLine().findPoints(arrowHead2.getPosition(), lgth);
+				LaTeXDrawPoint2D newPt=null;
+				
+				if(points.length==1)
+					newPt=points[0];
+				else
+					newPt=points[0].distance(getFirstControlPoint(-1))<
+								points[1].distance(getFirstControlPoint(-1)) ? points[0]:points[1];
+				
+				getPoint(-1).setLocation(newPt);
+				update=true;
+				
+			}catch(LaTeXDrawException e)
+			{
+				e.printStackTrace();
+				return ;
+			}
+		}
+		
+		if(update)
+			shape = getSimpleShape();
+		
+		if(showPoints)// When show points, the curve must be dashed too :s.
+		{
+			double thick = hasDoubleBoundary?(float)(doubleSep+thickness*2.):thickness;
+			Stroke formerS = g.getStroke();
+			
+			g.setStroke(new BasicStroke((float)(thick/2.), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+						1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+			g.setColor(linesColor);
+			g.draw(shape);
+			g.setStroke(formerS);
+		}
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		if(hasDoubleBoundary)
+		{
+			g.setColor(linesColor);
+			BasicStroke wideline=null;
+			
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				wideline = new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
+			else 
+			if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+				wideline = new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_ROUND,
+						BasicStroke.JOIN_MITER, 1.f, new float[] { 0, (float)(thickness*2+doubleSep + dotSep) }, 0);
+			else
+				wideline = new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+						1.f, new float[]{blackDashLength, whiteDashLength}, 0);
+			
+			if(hasShadow)
+			{
+				BasicStroke wideline2 = new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_BUTT, 
+														BasicStroke.JOIN_MITER);
+				Shape outline2 = wideline2.createStrokedShape(shape);
+				Stroke stroke = g.getStroke();
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.translate(dx, dy);
+				g.setColor(shadowColor);
+				if(isFilled() || isHatched() || hasGradient()) g.fill(shape);
+				g.fill(outline2);
+				
+				if(arrow1Drawable)
+				{
+					Stroke stroke2 = g.getStroke();
+					g.setStroke(new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					arrowHead1.draw(g, interiorColor, true);
+					g.setStroke(stroke2);
+				}
+				
+				if(arrow2Drawable)
+				{
+					Stroke stroke2 = g.getStroke();
+					g.setStroke(new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					arrowHead2.draw(g, interiorColor, true);
+					g.setStroke(stroke2);
+				}
+				
+				g.translate(-dx, -dy);
+				
+				if(isFilled() || isHatched() || hasGradient()) 
+				{
+					g.setColor(interiorColor);
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.draw(shape);
+				}
+				
+				g.setStroke(stroke);
+			}
+				
+			Shape outline = wideline.createStrokedShape(shape);
+			fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, shape);
+			g.setColor(linesColor);
+			g.fill(outline);
+			g.setColor(doubleColor);
+			wideline = new BasicStroke((float)doubleSep, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
+	        outline = wideline.createStrokedShape(shape);
+			g.fill(outline);
+		}
+		else
+		{
+			if(hasShadow)
+			{
+				g.translate(dx, dy);
+				Stroke formerS = g.getStroke();
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.setColor(shadowColor);
+				
+				if(isFilled() || isHatched() || hasGradient()) 
+					g.fill(shape);
+				
+				g.draw(shape);
+				
+				if(arrow1Drawable)
+					arrowHead1.draw(g, interiorColor, true);
+				
+				if(arrow2Drawable)
+					arrowHead2.draw(g, interiorColor, true);
+
+				g.translate(-dx, -dy);
+				
+				if(isFilled() || isHatched() || hasGradient()) 
+				{
+					g.setColor(interiorColor);
+					g.draw(shape);
+				}
+				
+				g.setStroke(formerS);
+			}
+
+			fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, shape);
+			g.setColor(linesColor);
+			g.draw(shape);
+		}
+		
+		if(arrow1Drawable)
+		{
+			g.setStroke(new BasicStroke(hasDoubleBoundary?(float)(doubleSep+thickness*2.):thickness, 
+										BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			arrowHead1.draw(g, interiorColor, false);
+		}
+		
+		if(arrow2Drawable)
+		{
+			g.setStroke(new BasicStroke(hasDoubleBoundary?(float)(doubleSep+thickness*2.):thickness, 
+					BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			arrowHead2.draw(g, interiorColor, false);
+		}
+		
+		if(showPoints)
+		{
+			double thick = hasDoubleBoundary?(float)(doubleSep+thickness*2.):thickness;
+			float width = (float)(arrowHead1.getDotSizeDim() + arrowHead1.getDotSizeNum()*thick);
+			Dot d = new Dot(false);
+			Line2D.Double line = new Line2D.Double();
+			
+			d.setLinesColor(linesColor);
+			d.setWidth(width);
+			
+			g.setStroke(new BasicStroke((float)(thick/2.), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+					1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+			g.setColor(linesColor);
+		
+			for(i=3; i<size; i+=2)
+			{
+				line.setLine(getPoint(i-1), getSecondControlPoint(i-1));
+				g.draw(line);
+				line.setLine(getSecondControlPoint(i-1), getFirstControlPoint(i));
+				g.draw(line);
+				line.setLine(getFirstControlPoint(i), getPoint(i));
+				g.draw(line);
+			}
+			
+			for(i=2; i<size; i+=2)
+			{
+				line.setLine(getPoint(i-1), getSecondControlPoint(i-1));
+				g.draw(line);
+				line.setLine(getSecondControlPoint(i-1), getFirstControlPoint(i));
+				g.draw(line);
+				line.setLine(getFirstControlPoint(i), getPoint(i));
+				g.draw(line);
+			}
+			
+			if(!open && closeType==CLOSE_TYPE_CURVE)
+			{
+				line.setLine(getPoint(-1), getSecondControlPoint(-1));
+				g.draw(line);
+				line.setLine(getSecondControlPoint(-1), getSecondControlPoint(0));
+				g.draw(line);
+				line.setLine(getSecondControlPoint(0), getPoint(0));
+				g.draw(line);
+			}
+			
+			line.setLine(getPoint(0), getFirstControlPoint(0));
+			g.draw(line);
+			line.setLine(getFirstControlPoint(0), getFirstControlPoint(1));
+			g.draw(line);
+			line.setLine(getFirstControlPoint(1), getPoint(1));
+			g.draw(line);
+			
+			if(!arrow1Drawable || (!open && closeType==CLOSE_TYPE_CURVE))
+			{
+				d.setCenter(getPoint(0));
+				d.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+			}
+			
+			if(!arrow2Drawable || (!open && closeType==CLOSE_TYPE_CURVE))
+			{
+				d.setCenter(getPoint(-1));
+				d.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+			}
+			
+			for(i=1; i<size-1; i++)
+			{
+				d.setCenter(pts.elementAt(i));
+				d.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+				d.setCenter(secondCtrlPts.elementAt(i));
+				d.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+			}
+			
+			for(i=0; i<size; i++)
+			{
+				d.setCenter(ctrlPts.elementAt(i));
+				d.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+			}
+			
+			if(!open && closeType==CLOSE_TYPE_CURVE)
+			{
+				d.setCenter(secondCtrlPts.lastElement());
+				d.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+				d.setCenter(secondCtrlPts.firstElement());
+				d.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+			}
+		}
+		
+		g.setColor(formerCol);
+		getPoint(0).setLocation(formerPt1);
+		getPoint(-1).setLocation(formerPt2);
+
+		if(isSelected)
+		{
+			int sizeD = delimiters.size();
+			for(i=0; i<sizeD; i++)
+				delimiters.elementAt(i).draw(g);
+			
+			if(!isOnRotation)
+				if(open)
+				{
+					if(size>1)
+					{
+						ctrlLines.firstElement().draw(g, antiAlias, rendering, alphaInter, colorRendering);
+						ctrlLines.firstElement().delimiters.elementAt(1).draw(g);
+						
+						for(i=1; i<size-1; i++)
+						{
+							ctrlLines.elementAt(i).draw(g, antiAlias, rendering, alphaInter, colorRendering);
+							ctrlLines.elementAt(i).delimiters.elementAt(1).draw(g);
+							secondCtrlLines.elementAt(i).draw(g, antiAlias, rendering, alphaInter, colorRendering);
+							secondCtrlLines.elementAt(i).delimiters.elementAt(1).draw(g);
+						}
+						
+						ctrlLines.lastElement().draw(g, antiAlias, rendering, alphaInter, colorRendering);
+						ctrlLines.lastElement().delimiters.elementAt(1).draw(g);
+					}
+				}
+				else
+					for(i=0; i<size; i++)
+					{
+						ctrlLines.elementAt(i).draw(g, antiAlias, rendering, alphaInter, colorRendering);
+						ctrlLines.elementAt(i).delimiters.elementAt(1).draw(g);
+						secondCtrlLines.elementAt(i).draw(g, antiAlias, rendering, alphaInter, colorRendering);
+						secondCtrlLines.elementAt(i).delimiters.elementAt(1).draw(g);
+					}
+			
+			if(borders!=null)
+				borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+		}//if(selected)
+	}
+
+
+
+
+
+	@Override
+	public void onClick(Point pt)
+	{
+		super.onClick(pt);
+
+		if(dSelected!=null)
+			return ;
+		
+		int i, size = ctrlLines.size(), j;
+		boolean ok = false;
+		Line l;
+		
+		for(i = 0; i<size && !ok; i++)
+		{
+			l  = ctrlLines.elementAt(i);
+
+			if(dSelected==null)
+				for(j=0; j<Line.LINE_NB_POINTS && !ok; j++)
+					if(l.delimiters.elementAt(j).isIn(pt))
+					{
+						dSelected = l.delimiters.elementAt(j);
+						ok = true;
+					}
+		}//for
+		
+		if(open)
+		{
+			i=1;
+			size--;
+		}
+		else
+			i=0;
+		
+		for(; i<size && !ok; i++)
+		{
+			l = secondCtrlLines.elementAt(i);
+			
+			for(j=0; j<Line.LINE_NB_POINTS && !ok; j++)
+				if(l.delimiters.elementAt(j).isIn(pt))
+				{
+					dSelected = l.delimiters.elementAt(j);
+					ok = true;
+				}
+		}
+	}
+
+
+
+
+	
+
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt)
+	{
+		int i, size = ctrlLines.size();
+		
+		if(isSelected)
+		{
+			if(borders.dNE.isIn(pt) || borders.dNW.isIn(pt) || borders.dSE.isIn(pt) || borders.dSW.isIn(pt) || borders.dS.isIn(pt) || 
+				borders.dN.isIn(pt) || borders.dE.isIn(pt) || borders.dW.isIn(pt))
+					return true;
+			
+			for(Delimitor d : delimiters)
+				if(d.isIn(pt))
+					return true;
+			
+			if(open)
+			{
+				for(i=0; i<size; i++)
+					if(ctrlLines.elementAt(i).delimiters.elementAt(1).isIn(pt)) 
+						return true;
+				
+				for(i=1; i<size-1; i++)
+					if(secondCtrlLines.elementAt(i).delimiters.elementAt(1).isIn(pt)) 
+						return true;
+			}
+			else
+				for(i=0; i<size; i++)
+				{
+					if(ctrlLines.elementAt(i).delimiters.elementAt(1).isIn(pt)) 
+						return true;
+					if(secondCtrlLines.elementAt(i).delimiters.elementAt(1).isIn(pt)) 
+						return true;
+				}		
+		}
+		
+		boolean in=false;
+		BasicStroke wideline = new BasicStroke(hasDoubleBoundary ? (float)(doubleSep/2.+thickness*2) : thickness);
+		in = wideline.createStrokedShape(shape).contains(pt);
+		
+		if(in) return true;
+		
+		if(isFilled() || hasGradient() || isHatched())
+			in = shape.contains(pt);
+		
+		return in;
+	}
+
+
+
+	
+	
+
+	@Override
+	public void onDragged(Point formerPt, Point newPt) throws Exception
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		if(isOnRotation || dSelected==null)
+			super.onDragged(formerPt, newPt);
+		else
+		{
+			boolean again = true;
+			int size = pts.size(), i=0;
+			
+			while(again && i<size)
+				if(dSelected.getCenter().equals(secondCtrlPts.elementAt(i)))
+					again = false;
+				else
+					i++;
+
+			if(again)// no second ctrl pt selected
+			{
+				i=0;
+				while(again && i<size)
+					if(dSelected.getCenter().equals(pts.elementAt(i)))
+					{
+						ctrlPts.elementAt(i).x += newPt.x-formerPt.x;
+						ctrlPts.elementAt(i).y += newPt.y-formerPt.y;
+						secondCtrlPts.elementAt(i).x += newPt.x-formerPt.x;
+						secondCtrlPts.elementAt(i).y += newPt.y-formerPt.y;
+						again = false;
+					}
+					else
+						i++;
+				
+				if(again)//no point selected
+				{
+					i=0;
+					while(again && i<size)
+						if(dSelected.getCenter().equals(ctrlPts.elementAt(i)))
+						{
+							secondCtrlPts.elementAt(i).x += formerPt.x-newPt.x;
+							secondCtrlPts.elementAt(i).y += formerPt.y-newPt.y;
+							again = false;
+						}
+						else
+							i++;
+				}
+				
+				dSelected.getCenter().x = newPt.x;
+				dSelected.getCenter().y = newPt.y;
+			}
+			else
+			{
+				dSelected.getCenter().x += newPt.x-formerPt.x;
+				dSelected.getCenter().y += newPt.y-formerPt.y;
+				ctrlPts.elementAt(i).x += formerPt.x-newPt.x;
+				ctrlPts.elementAt(i).y += formerPt.y-newPt.y;
+			}
+			
+			updateBorders();
+			updateShape();
+		}
+
+		updateSecondControlPoints();
+		arrowHead1.getPosition().setLocation(getPoint(0));
+		arrowHead2.getPosition().setLocation(getPoint(-1));
+	}
+
+
+	
+	
+	/**
+	 * Update the second control points by using the first control points.
+	 * @since 1.9
+	 */
+	public void updateSecondControlPoints()
+	{
+		int size = pts.size(), i;
+		
+		for(i=0; i<size; i++)
+			secondCtrlPts.elementAt(i).setLocation(ctrlPts.elementAt(i).centralSymmetry(pts.elementAt(i)));
+	}
+	
+	
+	
+	/**
+	 * Create the shape of the Bézier curve without double boundaries.
+	 * @return The shape.
+	 */
+	private GeneralPath getSimpleShape()
+	{
+		if(ctrlPts==null || getNbPoints()<2 || ctrlPts.size()<2)
+			return null;
+		
+		int size = pts.size(), i;
+		GeneralPath gp = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
+		LaTeXDrawPoint2D ctrl1;
+		
+		//JAVA6 : put in moveto(double, double,...)
+		gp.moveTo((float)pts.elementAt(0).x, (float)pts.elementAt(0).y);
+		gp.curveTo((float)ctrlPts.elementAt(0).x, (float)ctrlPts.elementAt(0).y, 
+				   (float)ctrlPts.elementAt(1).x, (float)ctrlPts.elementAt(1).y, 
+				   (float)pts.elementAt(1).x, (float)pts.elementAt(1).y);
+		
+		for(i=2; i<size; i++)
+		{
+			ctrl1 = secondCtrlPts.elementAt(i-1);
+			gp.curveTo((float)ctrl1.x, (float)ctrl1.y, 
+					   (float)ctrlPts.elementAt(i).x, (float)ctrlPts.elementAt(i).y, 
+					   (float)pts.elementAt(i).x, (float)pts.elementAt(i).y);
+		}
+		
+		if(!open)
+		{
+			if(getCloseType()==CLOSE_TYPE_CURVE)
+			{
+				LaTeXDrawPoint2D ctrl1b = ctrlPts.firstElement().centralSymmetry(pts.firstElement());
+				LaTeXDrawPoint2D ctrl2b = ctrlPts.lastElement().centralSymmetry(pts.lastElement());
+				
+				gp.curveTo((float)ctrl2b.x, (float)ctrl2b.y, (float)ctrl1b.x, 
+						(float)ctrl1b.y, (float)pts.firstElement().x, (float)pts.firstElement().y);
+			}
+			
+			gp.closePath();
+		}
+
+		if(gp.getBounds().width==0 && gp.getBounds().height==0)
+			gp.lineTo((float)getPoint(0).x+1, (float)getPoint(0).y+1);
+		
+		return gp;
+	}
+	
+	
+
+
+	@Override
+	public Shape createShape2D()
+	{
+		Shape s = getSimpleShape();
+		
+		if(hasDoubleBoundary)
+		{
+			BasicStroke wideline = new BasicStroke((float)(doubleSep+thickness));
+	        Shape outline = wideline.createStrokedShape(s);
+	        return outline;
+		}
+		
+		return s;
+	}
+
+
+
+
+	@Override
+	public void removePointAt(int id)
+	{
+		super.removePointAt(id);
+
+		if(ctrlLines.isEmpty()||ctrlPts.isEmpty())
+			return ;
+		
+		if(id>=ctrlLines.size() || id<-1)
+			throw new IllegalArgumentException();
+
+		if(id==-1)
+			id = ctrlLines.size()-1;
+		
+		ctrlLines.remove(id);
+		secondCtrlLines.remove(id);
+		ctrlPts.remove(id);		
+		secondCtrlPts.remove(id);
+		
+		if(id==pts.size())
+		{
+			LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D(pts.lastElement());
+			arrowHead2.setPosition(pt2);
+			arrowHead2.setLine(new Line(pt2, ctrlPts.lastElement(), false));
+		}
+		
+		updateBorders();
+		updateShape();
+	}
+
+
+
+
+	@Override
+	public synchronized void setLastPoint(LaTeXDrawPoint2D pt)
+	{
+		double oldX = pts.lastElement().x;
+		double oldY = pts.lastElement().y;
+		
+		super.setLastPoint(pt);
+		// We move the last ctrl points of the Bézier curve
+		if(!ctrlPts.isEmpty())
+		{
+			LaTeXDrawPoint2D lastPt = ctrlPts.lastElement();
+			lastPt.x += pt.x - oldX;
+			lastPt.y += pt.y - oldY;
+			
+			secondCtrlPts.lastElement().setLocation(lastPt.centralSymmetry(pts.lastElement()));
+			arrowHead2.getPosition().setLocation(pt.x, pt.y);
+			updateBorders();
+			updateShape();
+			updateGravityCenter();
+		}	
+	}
+
+
+
+
+	@Override
+	public synchronized void setPointAt(LaTeXDrawPoint2D pt, int id)
+	{
+		super.setPointAt(pt, id);
+		
+		if(id<0 || id>=ctrlPts.size())
+			throw new IllegalArgumentException("Invalid id");//$NON-NLS-1$
+		
+		LaTeXDrawPoint2D ctrlPt  = new LaTeXDrawPoint2D(pt.x, pt.y+DEFAULT_POSITION_CTRL);
+		LaTeXDrawPoint2D ctrlPt2 = ctrlPt.centralSymmetry(pt);
+		ctrlPts.setElementAt(ctrlPt, id);
+		secondCtrlPts.setElementAt(ctrlPt2, id);
+		addCtrlLineAt(pt, ctrlPt, ctrlPt2, id);
+		arrowHead1.getPosition().setLocation(getPoint(0));
+		arrowHead2.getPosition().setLocation(getPoint(-1));
+		shape = getSimpleShape();
+	}
+
+
+	
+	
+	@Override
+	public String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		String coord, add="", arrowsCode = ""; //$NON-NLS-1$ //$NON-NLS-2$
+		int i, size = getNbPoints();
+		String start = "";//$NON-NLS-1$ 
+		LaTeXDrawPoint2D pt, ctrlPt1, ctrlPt2;
+		String showPointsCode = "";//$NON-NLS-1$ 
+		String arrowParams = "";//$NON-NLS-1$ 
+		boolean hasArrow1Style = !arrowHead1.isWithoutStyle();
+		boolean hasArrow2Style = !arrowHead2.isWithoutStyle() && isOpen();
+		double threshold = 0.001;
+		
+		if(size<2) return null;
+		
+		if(!linesColor.equals(PSTricksConstants.DEFAULT_LINE_COLOR))
+		{
+			String name = DviPsColors.getColourName(linesColor);
+			if(name==null)
+			{
+				name = "color"+number;//$NON-NLS-1$
+				DviPsColors.addUserColour(linesColor, name); 
+			}
+			add += ",linecolor="+name; //$NON-NLS-1$
+		}
+		
+		if(hasShadow)
+		{
+			add+=",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				add+=",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+			
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				add+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC), threshold);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				add += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+		}
+		
+		String arrowHead1Style = arrowHead1.getArrowStyle();
+		String arrowHead2Style = arrowHead2.getArrowStyle();
+		
+		if(!isOpen())
+			arrowHead2Style = PSTricksConstants.NONEARROW_STYLE;
+		
+		if(hasArrow1Style || hasArrow2Style)
+		{
+			if(arrowHead2Style.equals(PSTricksConstants.DLARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.DRARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.DRARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.DLARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.RARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.LARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.LARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.RARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.DLARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.DRARROW_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.LRBRACKET_STYLE))
+				arrowHead2Style = PSTricksConstants.RRBRACKET_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.RRBRACKET_STYLE))
+				arrowHead2Style = PSTricksConstants.LRBRACKET_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE))
+				arrowHead2Style = PSTricksConstants.LSBRACKET_STYLE;
+			else if(arrowHead2Style.equals(PSTricksConstants.LSBRACKET_STYLE))
+				arrowHead2Style = PSTricksConstants.RSBRACKET_STYLE;
+			
+			String paramsR = ","+ arrowHead1.getParametersCode(); //$NON-NLS-1$
+			String paramsL = ","+ arrowHead2.getParametersCode(); //$NON-NLS-1$
+			if(paramsR.equals(",")) paramsR = ""; //$NON-NLS-1$ //$NON-NLS-2$
+			if(paramsL.equals(",")) paramsL = ""; //$NON-NLS-1$ //$NON-NLS-2$
+			
+			if(hasArrow1Style)
+			{
+				arrowsCode="{"+arrowHead1Style+'-'; //$NON-NLS-1$
+				
+				if(hasArrow2Style)
+					arrowsCode+=arrowHead2Style;
+				arrowsCode+='}';
+				
+				if(!arrowHead1.isOfTheSameTypeAs(arrowHead2))
+				{
+					if((arrowHead2Style.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+						arrowHead2Style.equals(PSTricksConstants.RRBRACKET_STYLE)  ||
+						arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE)  ||
+						arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE))	&&
+						(arrowHead1Style.equals(PSTricksConstants.BAREND_STYLE) ||
+						arrowHead1Style.equals(PSTricksConstants.BARIN_STYLE) ||
+						arrowHead1Style.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+						arrowHead1Style.equals(PSTricksConstants.RRBRACKET_STYLE)  ||
+						arrowHead1Style.equals(PSTricksConstants.RSBRACKET_STYLE)  ||
+						arrowHead1Style.equals(PSTricksConstants.RSBRACKET_STYLE)))
+						arrowParams = paramsR;
+					else
+						arrowParams = paramsL + paramsR;
+				}else arrowParams = paramsR;
+			}
+			else 
+				if(hasArrow2Style)
+				{
+					arrowParams = paramsL;
+					arrowsCode = "{-"+arrowHead2Style+'}'; //$NON-NLS-1$
+				}
+		}
+		
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) add=add+','+str;
+		
+		if(showPoints)
+		{
+			showPointsCode=",showpoints=true"; //$NON-NLS-1$
+			
+			if(!arrowHead1.isArrowShapeDot() && !arrowHead2.isArrowShapeDot())
+				showPointsCode += ',' + arrowHead1.getDotParameters();
+		}
+		
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			add += ",linestyle="+lineStyle+",dotsep="+ //$NON-NLS-1$ //$NON-NLS-2$
+			LaTeXDrawNumber.getCutNumber(dotSep/ppc, threshold)+ "cm";	//$NON-NLS-1$
+		else
+		if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+			add += ",linestyle="+lineStyle+",dash=" + //$NON-NLS-1$ //$NON-NLS-2$
+			LaTeXDrawNumber.getCutNumber(blackDashLength/ppc, threshold) + "cm "+ //$NON-NLS-1$
+			LaTeXDrawNumber.getCutNumber(whiteDashLength/ppc, threshold) + "cm";//$NON-NLS-1$
+
+		if(hasDoubleBoundary)
+		{
+			add+=",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc), threshold); //$NON-NLS-1$
+			
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name); 
+				}
+				add+= ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}		
+		
+		if(!isFilled && hasShadow() && isHatched())
+		{
+			String name = DviPsColors.getColourName(interiorColor);
+			if(name==null)
+			{
+				name = "color"+number+'b';//$NON-NLS-1$
+				DviPsColors.addUserColour(interiorColor, name); 
+			}
+			add += ",fillcolor=" + name; //$NON-NLS-1$
+		}
+		
+		coord = "(" + LaTeXDrawNumber.getCutNumber((float)((pts.firstElement().x-d.x)/ppc), threshold) +","+ //$NON-NLS-1$ //$NON-NLS-2$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-pts.firstElement().y)/ppc), threshold)+")("+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((ctrlPts.firstElement().x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-ctrlPts.firstElement().y)/ppc), threshold)+")("+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((ctrlPts.elementAt(1).x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-ctrlPts.elementAt(1).y)/ppc), threshold)+")("+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((pts.elementAt(1).x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-pts.elementAt(1).y)/ppc), threshold)+')';
+
+		for(i=2; i<size; i++)
+		{
+			ctrlPt1 = ctrlPts.elementAt(i);
+			ctrlPt2 = secondCtrlPts.elementAt(i-1);
+			pt = pts.elementAt(i-1);
+			
+			coord += "("+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((ctrlPt2.x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-ctrlPt2.y)/ppc), threshold)+")("+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((ctrlPt1.x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-ctrlPt1.y)/ppc), threshold)+")("; //$NON-NLS-1$
+			
+			pt = pts.elementAt(i);
+			coord += LaTeXDrawNumber.getCutNumber((float)((pt.x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-pt.y)/ppc), threshold)+')';
+		}
+		
+		if(!isOpen())
+			if(closeType==CLOSE_TYPE_CURVE)
+			{
+				ctrlPt1 = secondCtrlPts.firstElement();
+				ctrlPt2 = secondCtrlPts.lastElement();
+				pt = pts.lastElement();
+				
+				coord += "(" + LaTeXDrawNumber.getCutNumber((float)((ctrlPt2.x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$//$NON-NLS-2$
+						LaTeXDrawNumber.getCutNumber((float)((d.y-ctrlPt2.y)/ppc), threshold)+")("+ //$NON-NLS-1$
+						LaTeXDrawNumber.getCutNumber((float)((ctrlPt1.x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+					    LaTeXDrawNumber.getCutNumber((float)((d.y-ctrlPt1.y)/ppc), threshold)+")("; //$NON-NLS-1$
+		
+				pt = pts.firstElement();
+				coord += LaTeXDrawNumber.getCutNumber((float)((pt.x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+						 LaTeXDrawNumber.getCutNumber((float)((d.y-pt.y)/ppc), threshold)+')';
+			}
+			else
+			{
+				LaTeXDrawPoint2D tmp = pts.lastElement();
+				pt = pts.firstElement();
+				
+				start = "\\psline[linewidth=" + LaTeXDrawNumber.getCutNumber(thickness/ppc, threshold)+add+"](" +//$NON-NLS-1$//$NON-NLS-2$
+						LaTeXDrawNumber.getCutNumber((float)((tmp.x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+						LaTeXDrawNumber.getCutNumber((float)((d.y-tmp.y)/ppc), threshold)+")("+ //$NON-NLS-1$
+						LaTeXDrawNumber.getCutNumber((float)((pt.x-d.x)/ppc), threshold)+","+ //$NON-NLS-1$
+					    LaTeXDrawNumber.getCutNumber((float)((d.y-pt.y)/ppc), threshold)+")\n"; //$NON-NLS-1$
+			}
+		
+		if(!isFilled && !interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR))
+		{
+			String name = DviPsColors.getColourName(interiorColor);
+			
+			if(name==null)
+			{
+				name = "color"+number+'b';//$NON-NLS-1$
+				DviPsColors.addUserColour(interiorColor, name);
+			}
+			add += ",fillcolor="+name; //$NON-NLS-1$
+		}
+		
+		return start + "\\psbezier[linewidth=" + LaTeXDrawNumber.getCutNumber(thickness/ppc, threshold) + add + showPointsCode +  //$NON-NLS-1$
+				arrowParams + "]" + arrowsCode + coord; //$NON-NLS-1$
+	}
+	
+
+
+
+	@Override
+	public void shift(double shiftX, double shiftY)
+	{
+		if(shiftX==0 && shiftY==0) return ;
+		
+		int i, size = ctrlPts.size();
+		LaTeXDrawPoint2D pt;
+		
+		for(i=0; i<size; i++)
+		{
+			pt = pts.elementAt(i);
+			pt.x+=shiftX;
+			pt.y+=shiftY;
+			pt = ctrlPts.elementAt(i);
+			pt.x+=shiftX;
+			pt.y+=shiftY;
+			pt = secondCtrlPts.elementAt(i);
+			pt.x+=shiftX;
+			pt.y+=shiftY;
+		}
+		
+		shape = getSimpleShape();
+		updateBorders();
+		updateGravityCenter();
+		arrowHead1.getPosition().setLocation(getPoint(0));
+		arrowHead2.getPosition().setLocation(getPoint(-1));
+	}
+
+
+
+
+	@Override
+	public void updateBorders()
+	{
+		if(!pts.isEmpty())
+		{
+			LaTeXDrawPoint2D pt = getPoint(0);
+			int i, size = pts.size();
+			double NWx, NWy, SEy, SEx;
+			NWx = SEx = pt.x;		
+			SEy = NWy = pt.y;
+			
+			for(i=0; i<size; i++)
+			{
+				pt = getPoint(i);
+				
+				if(pt.x<NWx) NWx = pt.x;
+				else if(pt.x>SEx) SEx = pt.x;
+				if(pt.y<NWy) NWy = pt.y;
+				else if(pt.y>SEy) SEy = pt.y;
+			}
+			
+			size = ctrlPts.size();
+			for(i=0; i<size; i++)
+			{					
+				pt = ctrlPts.elementAt(i);
+				
+				if(pt.x<NWx) NWx = pt.x;
+				else if(pt.x>SEx) SEx = pt.x;
+				if(pt.y<NWy) NWy = pt.y;
+				else if(pt.y>SEy) SEy = pt.y;
+			}
+			
+			if(!open && size>0)
+			{
+				pt = secondCtrlPts.firstElement();
+				
+				if(pt.x<NWx) NWx = pt.x;
+				else if(pt.x>SEx) SEx = pt.x;
+				if(pt.y<NWy) NWy = pt.y;
+				else if(pt.y>SEy) SEy = pt.y;
+				
+				pt = secondCtrlPts.lastElement();
+				
+				if(pt.x<NWx) NWx = pt.x;
+				else if(pt.x>SEx) SEx = pt.x;
+				if(pt.y<NWy) NWy = pt.y;
+				else if(pt.y>SEy) SEy = pt.y;
+			}
+			
+			for(i=1; i<size-1; i++)
+			{
+				pt = secondCtrlPts.elementAt(i);
+				
+				if(pt.x<NWx) NWx = pt.x;
+				else if(pt.x>SEx) SEx = pt.x;
+				if(pt.y<NWy) NWy = pt.y;
+				else if(pt.y>SEy) SEy = pt.y;
+			}
+			
+			if(showPoints)
+			{
+				double width = (arrowHead1.getDotSizeDim() + arrowHead1.getDotSizeNum()*thickness)/2.;
+				NWx-=width;
+				NWy-=width;
+				SEx+=width;
+				SEy+=width;
+			}
+			
+			if(borders==null)
+				borders = new LaTeXDrawRectangle(new LaTeXDrawPoint2D(NWx, NWy),
+												new LaTeXDrawPoint2D(SEx, SEy), false);
+			else
+			{
+				borders.setLastPoint(SEx, SEy);
+				borders.setFirstPoint(NWx, NWy);
+			}
+		}
+	}
+
+
+
+
+	@Override
+	public void updateBorders(LaTeXDrawPoint2D pt)
+	{
+		updateBorders();
+	}
+
+
+
+
+	@Override
+	public void addRotationAngle(double theta)
+	{
+		int i, size = pts.size();
+		LaTeXDrawPoint2D p, pRot;
+		LaTeXDrawPoint2D cg = (LaTeXDrawPoint2D)gravityCenter.clone();
+		theta%=(Math.PI*2);
+
+		for(i=0; i<size; i++)
+		{
+			p = getPoint(i);
+			pRot = rotatePoint(p, cg, theta);
+			p.setLocation(pRot.x, pRot.y);
+			
+			p = ctrlPts.elementAt(i);
+			pRot = rotatePoint(p, cg, theta);
+			p.setLocation(pRot.x, pRot.y);
+			
+			p = secondCtrlPts.elementAt(i);
+			pRot = rotatePoint(p, cg, theta);
+			p.setLocation(pRot.x, pRot.y);
+		}
+		
+		arrowHead1.getPosition().setLocation(rotatePoint(arrowHead1.getPosition(), cg, theta));
+		arrowHead2.getPosition().setLocation(rotatePoint(arrowHead2.getPosition(), cg, theta));
+		
+		rotationAngle+=theta;
+		rotationAngle%=(Math.PI*2);
+		
+		updateShape();
+		updateBorders();
+		updateGravityCenter();
+		
+		if(gravityCenter.equals(cg, 0.0000001))
+		{
+			shift(gravityCenter, cg);
+			gravityCenter.setLocation(cg);
+		}
+	}
+
+
+
+
+	/**
+	 * @return Returns the showPoints.
+	 */
+	public boolean isShowPoints()
+	{
+		return showPoints;
+	}
+
+
+
+
+	/**
+	 * @param showPoints The showPoints to set.
+	 */
+	public synchronized void setShowPoints(boolean showPoints)
+	{
+		this.showPoints = showPoints;
+		updateShape();
+		updateBorders();
+		updateGravityCenter();
+	}
+
+	
+	
+	/**
+	 * Allow to get the first control point at the identifier <code>id</code> in the vector <code>ctrlPts</code>.
+	 * @param id The identifier of the asked point (-1 = the last point).
+	 * @return The point asked.
+	 */
+	public LaTeXDrawPoint2D getFirstControlPoint(int id)
+	{
+		if(ctrlPts==null) return null;
+		
+		if(id==-1) return ctrlPts.lastElement();
+		if(id<0 || id>=ctrlPts.size())
+			throw new ArrayIndexOutOfBoundsException(id);
+		
+		return ctrlPts.elementAt(id);
+	}
+	
+	
+	
+	/**
+	 * Allow to get the second control point at the identifier <code>id</code> in the vector <code>ctrlPts</code>.
+	 * @param id The identifier of the asked point (-1 = the last point).
+	 * @return The point asked.
+	 */
+	public LaTeXDrawPoint2D getSecondControlPoint(int id)
+	{
+		if(secondCtrlPts==null) return null;
+		
+		if(id==-1) return secondCtrlPts.lastElement();
+		if(id<0 || id>=secondCtrlPts.size())
+			throw new ArrayIndexOutOfBoundsException(id);
+		
+		return secondCtrlPts.elementAt(id);
+	}
+	
+	
+	
+	@Override
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound)
+	{
+		if(percent==1.) return ;
+		
+		if(bound==null) 
+			throw new IllegalArgumentException();
+		
+		int i, size = getNbPoints();
+
+		if(size>0)
+		{
+			LaTeXDrawPoint2D NW = bound.getTheNWPoint(), SE = bound.getTheSEPoint(),farest,p;
+	
+			if(formerX == SE.x)
+				farest = NW;
+			else
+				if(formerX == NW.x)
+					farest = SE;
+				else
+					throw new IllegalArgumentException();
+			
+			for(i=0; i<size; i++)
+			{// We rescale each point
+				p = getPoint(i);
+				if(p.x!=farest.x)
+					p.x = farest.x+(p.x-farest.x)*percent;
+				
+				p = getFirstControlPoint(i);
+				if(p.x!=farest.x)
+					p.x = farest.x+(p.x-farest.x)*percent;
+				
+				p = getSecondControlPoint(i);
+				if(p.x!=farest.x)
+					p.x = farest.x+(p.x-farest.x)*percent;
+			}
+			updateBorders();
+			arrowHead1.getPosition().setLocation(getPoint(0));
+			arrowHead2.getPosition().setLocation(getPoint(-1));
+			updateShape();
+		}
+	}
+	
+	
+	
+	
+	
+	
+
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound)
+	{
+		if(percent==1.) return ;
+		
+		if(bound==null) 
+			throw new IllegalArgumentException();
+		
+		int i, size = getNbPoints();
+		
+		if(size>0)
+		{
+			LaTeXDrawPoint2D NW = bound.getTheNWPoint(), SE = bound.getTheSEPoint(),farest,p;
+	
+			if(formerY == SE.y)
+				farest = NW;
+			else
+				if(formerY == NW.y)
+					farest = SE;
+				else
+					throw new IllegalArgumentException();
+			
+			for(i=0; i<size; i++)
+			{// We rescale each point
+				p = getPoint(i);
+				if(p.y!=farest.y)
+					p.y = farest.y+(p.y-farest.y)*percent;
+				
+				p = getFirstControlPoint(i);
+				if(p.y!=farest.y)
+					p.y = farest.y+(p.y-farest.y)*percent;
+				
+				p = getSecondControlPoint(i);
+				if(p.y!=farest.y)
+					p.y = farest.y+(p.y-farest.y)*percent;
+			}
+			updateBorders();
+			arrowHead1.getPosition().setLocation(getPoint(0));
+			arrowHead2.getPosition().setLocation(getPoint(-1));
+			updateShape();
+		}
+	}
+	
+	
+	
+	
+	
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow 	= true;
+		canHaveArrow 	= true;
+		canBeFilled		= true;
+		interiorColor 	= (Color) ois.readObject();
+		lineStyle 		= (String) ois.readObject();
+		rotationAngle 	= ois.readDouble();
+		thickness 		= ois.readFloat();
+		isFilled 		= ois.readBoolean();
+		isSelected 		= ois.readBoolean();
+		isOnRotation 	= ois.readBoolean();
+		linesColor 		= (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep 			= ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		
+		pts 				= (Vector<LaTeXDrawPoint2D>) ois.readObject();
+		ctrlPts				= (Vector<LaTeXDrawPoint2D>) ois.readObject();
+		hasDoubleBoundary 	= ois.readBoolean();
+		doubleColor 		= (Color)ois.readObject();
+		doubleSep 			= ois.readDouble();
+		showPoints 			= ois.readBoolean();
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+		{
+			hatchingAngle = ois.readDouble();
+			hatchingColor = (Color)ois.readObject();
+			hatchingStyle = (String)ois.readObject();
+			hatchingWidth = ois.readFloat();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+			hatchingSep = ois.readDouble();
+			arrowHead1 = (ArrowHead)ois.readObject();
+			arrowHead2 = (ArrowHead)ois.readObject();
+		}
+		else
+		{
+			hatchingSep = DEFAULT_HATCH_SEP;
+			hatchingAngle = DEFAULT_HATCH_ANGLE;
+			hatchingColor = DEFAULT_HATCH_COL;
+			hatchingStyle = DEFAULT_HATCH_STYLE;
+			hatchingWidth = DEFAULT_HATCH_WIDTH;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+			LaTeXDrawPoint2D pt1 = new LaTeXDrawPoint2D(getPoint(0));
+			LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D(getPoint(-1));
+			arrowHead1 = new ArrowHead(pt1, new Line(pt1, getFirstControlPoint(0), false), this);
+			arrowHead2 = new ArrowHead(pt2, new Line(pt2, getFirstControlPoint(-1), false), this);
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.9")>=0) //$NON-NLS-1$
+		{
+			closeType		= ois.readInt();
+			open			= ois.readBoolean();
+			secondCtrlPts	= (Vector<LaTeXDrawPoint2D>) ois.readObject();
+			equilibrateGap	= ois.readInt();
+		}
+		else
+		{
+			int i, size = pts.size();
+			
+			closeType		= DEFAULT_CLOSE_TYPE;
+			open			= true;
+			secondCtrlPts	= new Vector<LaTeXDrawPoint2D>();
+			equilibrateGap	= DEFAULT_EQUILIBRATE_GAP;
+			
+			for(i=0; i<size; i++)
+				secondCtrlPts.add(ctrlPts.elementAt(i).centralSymmetry(pts.elementAt(i)));
+		}
+		
+		delimiters = new Vector<Delimitor>();
+		for(int i=0, size = pts.size();i<size; i++)
+		{
+			addCtrlLine(pts.elementAt(i), ctrlPts.elementAt(i), secondCtrlPts.elementAt(i));
+			delimiters.add(new Delimitor(pts.elementAt(i)));
+		}
+		
+		setThickness(thickness);
+		updateSecondControlPoints();
+		updateShape();
+	}
+	
+	
+	
+	
+	@Override
+	public Shape[] getDbleBoundariesMiddle(Shape classicBord)
+	{
+		return null;
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setThickness(float val) 
+	{
+		super.setThickness(val);
+		
+		if(!Double.isInfinite(val) && !Double.isNaN(val) && val>0 && delimiters!=null && !delimiters.isEmpty() && ctrlLines!=null)
+		{
+			double dim = delimiters.elementAt(0).getDim();
+	
+			for(Line l : ctrlLines)
+				for(Delimitor d : l.delimiters)
+					d.setDim(dim);
+			
+			for(Line l : secondCtrlLines)
+				for(Delimitor d : l.delimiters)
+					d.setDim(dim);
+			
+			updateBorders();
+			shape = getSimpleShape();
+		}
+	}
+
+
+	
+	@Override
+	protected GeneralPath getBorders(double gap, boolean into)
+	{
+		return getSimpleShape();
+	}
+	
+	
+	
+	@Override
+	public Shape createShadowShape()
+	{
+		if(!hasShadow) return shape;
+		
+		double dx, dy;
+		LaTeXDrawPoint2D cg = getGravityCenter();
+		LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+		shadowCg.setLocation(cg.x+shadowSize, cg.y);
+		shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+		dx = shadowCg.x-cg.x;
+		dy = cg.y-shadowCg.y;
+		Shape outline = null;
+		
+		if(hasDoubleBoundary)
+		{
+			Stroke wideline = new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_BUTT, 
+										BasicStroke.JOIN_MITER);
+			outline = wideline.createStrokedShape(shape);
+		}
+		else outline = shape;
+	
+		AffineTransform at = new AffineTransform();
+		at.translate(dx, dy);
+		return at.createTransformedShape(outline);
+	}
+
+	
+
+	public String getArrow1Style()
+	{
+		return arrowHead1.getArrowStyle();
+	}
+
+	
+
+	public String getArrow2Style()
+	{
+		return arrowHead2.getArrowStyle();
+	}
+
+	
+	
+
+	public ArrowHead getArrowHead1()
+	{
+		return arrowHead1;
+	}
+
+	
+	
+
+	public ArrowHead getArrowHead2()
+	{
+		return arrowHead2;
+	}
+
+
+	
+	public void setArrow1Style(String style)
+	{
+		arrowHead1.setArrowStyle(style);	
+		updateShape();
+		updateBorders();
+	}
+
+	
+
+	public void setArrow2Style(String style)
+	{
+		arrowHead2.setArrowStyle(style);	
+		updateShape();
+		updateBorders();
+	}
+
+
+
+
+	@Override
+	public synchronized void setFirstPoint(double x, double y)
+	{
+		super.setFirstPoint(x, y);
+		updateBorders();
+		arrowHead1.getPosition().setLocation(x, y);
+	}
+
+
+
+
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		for(LaTeXDrawPoint2D pt : ctrlPts)
+			pt.setLocation(pt.horizontalSymmetry(origin));
+		
+		arrowHead1.getPosition().setLocation(arrowHead1.getPosition().horizontalSymmetry(origin));
+		arrowHead2.getPosition().setLocation(arrowHead2.getPosition().horizontalSymmetry(origin));
+		
+		super.mirrorHorizontal(origin);
+		
+		updateSecondControlPoints();
+		updateShape();
+		updateBorders();
+	}
+
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		for(LaTeXDrawPoint2D pt : ctrlPts)
+			pt.setLocation(pt.verticalSymmetry(origin));
+		
+		arrowHead1.getPosition().setLocation(arrowHead1.getPosition().verticalSymmetry(origin));
+		arrowHead2.getPosition().setLocation(arrowHead2.getPosition().verticalSymmetry(origin));
+		
+		super.mirrorVertical(origin);
+		
+		updateSecondControlPoints();
+		updateShape();
+		updateBorders();
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		super.updateToGrid(grid);
+		
+		for(LaTeXDrawPoint2D pt : ctrlPts)
+			pt.setLocation(grid.getTransformedPointToGrid(pt, false));
+		
+		updateBorders();
+		updateShape();
+	}
+
+
+	
+	/**
+	 * @return The borders of the Bézier curve but without the control points, just the curve.
+	 */
+	public Rectangle2D getBezierBorders()
+	{
+		if(getNbPoints()<2 || ctrlPts==null || ctrlPts.size()<2)
+			return new Rectangle2D.Double();
+		
+		Vector<LaTeXDrawPoint2D> points = new Vector<LaTeXDrawPoint2D>();
+		points.add(pts.elementAt(0));
+		points.add(ctrlPts.elementAt(0));
+		points.add(ctrlPts.elementAt(1));
+		points.add(pts.elementAt(1));
+		double[] minMax = getBezierCurveMinMax(points, 3);
+		
+		return new Rectangle2D.Double(minMax[0], minMax[1], minMax[2]-minMax[0], minMax[3]-minMax[1]);
+	}
+
+	
+	
+	/**
+	 * Define the min and the max coordinates of the borders of the Bézier curve.
+	 * @param points The initial control points.
+	 * @param level The level of resolution.
+	 * @return The maximum and the minimum coordinates of the Bézier curve; 
+	 * <code>[minX, minY, maxX, maxY]</code> 
+	 */
+	protected double[] getBezierCurveMinMax(Vector<LaTeXDrawPoint2D> points, int level)
+	{
+		if(level<=0)
+		{
+			double x1 = points.elementAt(0).x + 0.5;
+			double y1 = points.elementAt(0).y + 0.5;
+			double x2 = points.elementAt(3).x + 0.5;
+			double y2 = points.elementAt(3).y + 0.5;
+			
+			return new double[]{Math.min(x1, x2), Math.min(y1, y2), Math.max(x1, x2), Math.max(y1, y2)};
+		}
+		
+		Vector<LaTeXDrawPoint2D> left 	= new Vector<LaTeXDrawPoint2D>();
+		Vector<LaTeXDrawPoint2D> right 	= new Vector<LaTeXDrawPoint2D>();    
+		
+		LaTeXDrawPoint2D l1 = new LaTeXDrawPoint2D(), l2 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D l3 = new LaTeXDrawPoint2D(), l4 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D r1 = new LaTeXDrawPoint2D(), r2 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D r3 = new LaTeXDrawPoint2D(), r4 = new LaTeXDrawPoint2D();
+		LaTeXDrawPoint2D p0 = points.elementAt(0);
+		LaTeXDrawPoint2D p1 = points.elementAt(1);
+		LaTeXDrawPoint2D p2 = points.elementAt(2);
+		LaTeXDrawPoint2D p3 = points.elementAt(3);
+		
+		l1.x = p0.x;
+		l1.y = p0.y;
+		l2.x = (p0.x + p1.x) / 2;
+		l2.y = (p0.y + p1.y) / 2;
+		l3.x = (p0.x + 2*p1.x + p2.x) / 4;
+		l3.y = (p0.y + 2*p1.y + p2.y) / 4;
+		l4.x = (p0.x + 3*p1.x + 3*p2.x + p3.x) / 8;
+		l4.y = (p0.y + 3*p1.y + 3*p2.y + p3.y) / 8;
+		r1.x = p3.x;
+		r1.y = p3.y;
+		r2.x = (p1.x + 2*p2.x + p3.x) / 4;
+		r2.y = (p1.y + 2*p2.y + p3.y) / 4;
+		r3.x = (p2.x + p3.x) / 2;
+		r3.y = (p2.y + p3.y) / 2;
+		r4.x = p3.x;
+		r4.y = p3.y;
+        
+		left.add(l1);
+		left.add(l2);
+		left.add(l3);
+		left.add(l4);
+		right.add(r1);
+		right.add(r2);
+		right.add(r3);
+		right.add(r4);
+		
+        double mmLeft[] 	= getBezierCurveMinMax(left, level-1);
+        double mmRight[] 	= getBezierCurveMinMax(right, level-1);
+		
+		return new double[] {Math.min(mmLeft[0], mmRight[0]), Math.min(mmLeft[1], mmRight[1]),
+							 Math.max(mmLeft[2], mmRight[2]), Math.max(mmLeft[3], mmRight[3])};
+	}
+
+	
+	
+	/**
+	 * Create a list of choice in order to select the type of closing of the curve.
+	 * @return The created list.
+	 * @since 1.9
+	 */
+	public static LaTeXDrawComboBox createTypeChoice()
+	{
+		LaTeXDrawComboBox typeChoice = new LaTeXDrawComboBox();
+		typeChoice.setRenderer(new LabelListCellRenderer());
+		typeChoice.setName(LABEL_CLOSE_CHOICE);
+		typeChoice.setActionCommand(LABEL_CLOSE_CHOICE);
+		
+		JLabel l = new JLabel(String.valueOf(CLOSE_TYPE_CURVE));
+		l.setIcon(LaTeXDrawResources.closeCurveIcon);
+		typeChoice.addItem(l);
+		l = new JLabel(String.valueOf(CLOSE_TYPE_LINE));
+		l.setIcon(LaTeXDrawResources.closeLineIcon);
+		typeChoice.addItem(l);
+		
+		return typeChoice;
+	}
+
+
+
+	/**
+	 * @return the open.
+	 * @since 1.9
+	 */
+	public synchronized boolean isOpen()
+	{
+		return open;
+	}
+
+
+
+	/**
+	 * @param open the open to set.<br>When the curve is closed, it cannot have double boundaries yet.
+	 * @since 1.9
+	 */
+	public synchronized void setOpen(boolean open)
+	{
+		this.open = open;
+		updateShape();
+	}
+
+
+
+	/**
+	 * @return the closeType.
+	 * @since 1.9
+	 */
+	public synchronized int getCloseType()
+	{
+		return closeType;
+	}
+
+
+
+	/**
+	 * @param closeType the closeType to set.
+	 * @since 1.9
+	 * @exception IllegalArgumentException If the type is not valid.
+	 */
+	public synchronized void setCloseType(int closeType)
+	{
+		if(closeType==CLOSE_TYPE_CURVE || closeType==CLOSE_TYPE_LINE)
+		{
+			this.closeType = closeType;
+			updateShape();
+		}
+		else
+			throw new IllegalArgumentException();
+	}
+
+
+
+	@Override
+	public int getSelectedDelimitorOrientation()
+	{
+		int del = super.getSelectedDelimitorOrientation();
+		
+		if(del!=DELIMITOR_ORIENTATION_NONE)
+			return del;
+		
+		boolean again = true;
+		int i, size = pts.size();
+		
+		if(size<2)
+			return DELIMITOR_ORIENTATION_NONE;
+		
+		again = ctrlLines.firstElement().delimiters.lastElement()!=dSelected &&
+				ctrlLines.lastElement().delimiters.lastElement()!=dSelected;
+		
+		if(!open)
+			again &= secondCtrlLines.firstElement().delimiters.lastElement()!=dSelected &&
+					 secondCtrlLines.lastElement().delimiters.lastElement()!=dSelected;
+		
+		for(i=1; i<size-1 && again; i++)
+			again = ctrlLines.elementAt(i).delimiters.lastElement()!=dSelected &&
+					secondCtrlLines.elementAt(i).delimiters.lastElement()!=dSelected;
+		
+		if(!again)
+			return DELIMITOR_ORIENTATION_NONE;
+		
+		if(borders.dSelected!=null)
+			return borders.getSelectedDelimitorOrientation();
+		
+		return DELIMITOR_ORIENTATION_NONE;
+	}
+	
+	
+	
+	/**
+	 * Set the X-coordinate of one of the first control point.
+	 * @param x The new X-coordinate.
+	 * @param id The position of the point to set.
+	 * @since 1.9
+	 */
+	public void setXCoordFirstCtrl(double x, int id)
+	{
+		if(id<0 || id>=getNbPoints())
+			throw new IllegalArgumentException();
+		
+		ctrlPts.elementAt(id).x = x;
+		secondCtrlPts.elementAt(id).setLocation(ctrlPts.elementAt(id).centralSymmetry(pts.elementAt(id)));
+		updateBorders();
+		updateShape();
+	}
+	
+	
+	/**
+	 * Set the Y-coordinate of one of the first control point.
+	 * @param y The new Y-coordinate.
+	 * @param id The position of the point to set.
+	 * @since 1.9
+	 */
+	public void setYCoordFirstCtrl(double y, int id)
+	{
+		if(id<0 || id>=getNbPoints())
+			throw new IllegalArgumentException();
+		
+		ctrlPts.elementAt(id).y = y;
+		secondCtrlPts.elementAt(id).setLocation(ctrlPts.elementAt(id).centralSymmetry(pts.elementAt(id)));
+		updateBorders();
+		updateShape();
+	}
+	
+	
+	
+	/**
+	 * Set the X-coordinate of one of the second control point.
+	 * @param x The new X-coordinate.
+	 * @param id The position of the point to set.
+	 * @since 1.9
+	 */
+	public void setXCoordSecondCtrl(double x, int id)
+	{
+		if(id<0 || id>=getNbPoints())
+			throw new IllegalArgumentException();
+		
+		LaTeXDrawPoint2D pt = secondCtrlPts.elementAt(id);
+		
+		pt.x = x;
+		ctrlPts.elementAt(id).setLocation(pt.centralSymmetry(pts.elementAt(id)));
+		updateBorders();
+		updateShape();
+	}
+	
+	
+	
+	/**
+	 * Set the Y-coordinate of one of the second control point.
+	 * @param y The new Y-coordinate.
+	 * @param id The position of the point to set.
+	 * @since 1.9
+	 */
+	public void setYCoordSecondCtrl(double y, int id)
+	{
+		if(id<0 || id>=getNbPoints())
+			throw new IllegalArgumentException();
+		
+		LaTeXDrawPoint2D pt = secondCtrlPts.elementAt(id);
+		
+		pt.y = y;
+		ctrlPts.elementAt(id).setLocation(pt.centralSymmetry(pts.elementAt(id)));
+		updateBorders();
+		updateShape();
+	}
+
+
+
+
+	/**
+	 * Balance all the control points in order the create a round curve.
+	 * @since 1.9
+	 */
+	public void equilibrate()
+	{
+		int size = pts.size();
+		
+		if(size>2)//Works only with more than 2 points.
+		{
+			Vector<Line> lines = new Vector<Line>();
+			int i;
+			
+			for(i=0; i<size-1; i++)// Creates the lines of the polygon.
+				lines.add(new Line(pts.elementAt(i), pts.elementAt(i+1), false));
+			lines.add(new Line(pts.lastElement(), pts.firstElement(), false));
+			
+			try
+			{
+				size = lines.size();
+				Line l1, l2;
+				
+				/*
+				 * It works by creating the angle bisectors of each points. It creates the perpendicular
+				 * line of the angle bisector and shift it to the current point. Then you have a line
+				 * allowing to get the two control points.
+				 */
+				for(i=1; i<size; i++)
+				{
+					l1 = lines.elementAt(i-1);
+					l2 = lines.elementAt(i);
+					// To create the angle bisector, we must have one point one each of the two lines
+					// at equal distance.
+					LaTeXDrawPoint2D[] pts1 = l1.findPoints(l1.getPt2(), equilibrateGap);
+					LaTeXDrawPoint2D[] pts2 = l2.findPoints(l2.getPt1(), equilibrateGap);
+					LaTeXDrawPoint2D pt1, pt2;
+				
+					if(pts1==null || pts2==null)
+						continue;
+					
+					pt1 = pts1.length==1 ? pts1[0] : pts1[0].distance(l1.getPt1())<
+													 pts1[1].distance(l1.getPt1()) ? pts1[0] : pts1[1];
+					
+					pt2 = pts2.length==1 ? pts2[0] : pts2[0].distance(l2.getPt2())<
+													 pts2[1].distance(l2.getPt2()) ? pts2[0] : pts2[1];
+		
+					// This line is perpendicular to the angle bisector (and consequently
+					// parallel to the wanted control points), so it is useless to create it.
+					Line l = new Line(pt1, pt2, false);
+					
+					if(Double.isNaN(l.getA()))
+						return ;
+				
+					// We translate the line to the current point.
+					double b = l2.getPt1().y - l.getA()*l2.getPt1().x;
+					Line l3  = new Line(b, l2.getPt1(), false);
+					LaTeXDrawPoint2D[] ctrlP = l3.findPoints(l3.getPt1(), equilibrateGap);
+				
+					if(ctrlP==null)
+						continue;
+
+					if(ctrlP.length==1)
+						continue;
+
+					// We just have to get the two control points.
+					LaTeXDrawPoint2D oldCtrl1 = ctrlPts.elementAt(i);
+					
+					if(oldCtrl1.distance(ctrlP[0])<oldCtrl1.distance(ctrlP[1]))
+					{
+						ctrlPts.elementAt(i).setLocation(ctrlP[0]);
+						secondCtrlPts.elementAt(i).setLocation(ctrlP[1]);
+					}
+					else
+					{
+						ctrlPts.elementAt(i).setLocation(ctrlP[1]);
+						secondCtrlPts.elementAt(i).setLocation(ctrlP[0]);
+					}
+				}//for
+				
+				if(!open)
+				{
+					// We repeat the same process for the first point with the first and the last line.
+					l1 = lines.lastElement();
+					l2 = lines.firstElement();
+					
+					//We move the control points of the first point.
+					LaTeXDrawPoint2D[] pts1 = l1.findPoints(l1.getPt2(), equilibrateGap);
+					LaTeXDrawPoint2D[] pts2 = l2.findPoints(l2.getPt1(), equilibrateGap);
+					LaTeXDrawPoint2D pt1, pt2;
+					
+					if(pts1!=null && pts2!=null)
+					{
+						pt1 = pts1.length==1 ? pts1[0] : pts1[0].distance(l1.getPt1())<
+								 					pts1[1].distance(l1.getPt1()) ? pts1[0] : pts1[1];
+	
+						pt2 = pts2.length==1 ? pts2[0] : pts2[0].distance(l2.getPt2())<
+													 pts2[1].distance(l2.getPt2()) ? pts2[0] : pts2[1];
+								
+						Line l = new Line(pt1, pt2, false);
+						
+						if(Double.isNaN(l.getA()))
+							return ;
+						
+						double b = l2.getPt1().y - l.getA()*l2.getPt1().x;
+						Line l3  = new Line(b, lines.firstElement().getPt1(), false);
+						LaTeXDrawPoint2D[] ctrlP = l3.findPoints(l3.getPt1(), equilibrateGap);
+						
+						if(ctrlP!=null && ctrlP.length>1)
+						{
+							LaTeXDrawPoint2D oldCtrl1 = ctrlPts.firstElement();
+							
+							if(oldCtrl1.distance(ctrlP[0])<oldCtrl1.distance(ctrlP[1]))
+							{
+								ctrlPts.firstElement().setLocation(ctrlP[0]);
+								secondCtrlPts.firstElement().setLocation(ctrlP[1]);
+							}
+							else
+							{
+								ctrlPts.firstElement().setLocation(ctrlP[1]);
+								secondCtrlPts.firstElement().setLocation(ctrlP[0]);
+							}
+						}
+					}
+				}//if(!open)
+				
+				updateShape();
+				
+				// The position of the resulting control points can be inverted; so we have to invert
+				// the inverted control points (if there are inverted, the curve has a loop).
+				BasicStroke wideline;
+				
+				if(hasDoubleBoundary && open)
+					wideline = new BasicStroke((float)(doubleSep/2.+thickness*2));
+				else
+					wideline = new BasicStroke(thickness);
+				
+				Shape outline = wideline.createStrokedShape(shape);
+				LaTeXDrawPoint2D pt1, pt2;
+				
+				for(i=1; i<pts.size(); i++)
+				{
+					pt1 = ctrlPts.elementAt(i);
+					pt2 = secondCtrlPts.elementAt(i);
+					
+					// A loop can occurred only when the two control points are outside the shape.
+					if(!outline.contains(pt1) && !outline.contains(pt2))
+						// The first control point must be closer than the second control point
+						// to the previous point. Else we invert them.
+						if(pt1.distance(pts.elementAt(i-1)) > pt2.distance(pts.elementAt(i-1)))
+						{
+							LaTeXDrawPoint2D tmp = new LaTeXDrawPoint2D(pt1);
+							pt1.setLocation(pt2);
+							pt2.setLocation(tmp);
+						}
+				}
+				
+				if(!open)
+				{// We treat the first point (if the curve is closed).
+					pt1 = ctrlPts.firstElement();
+					pt2 = secondCtrlPts.firstElement();
+				
+					// A loop can occurred only when the two control points are outside the shape.
+					if(!outline.contains(pt1) && !outline.contains(pt2))
+						// The first control point must be closer than the second control point
+						// to the previous point. Else we invert them.
+						if(pt1.distance(pts.elementAt(1)) > pt2.distance(pts.elementAt(1)))
+						{
+							LaTeXDrawPoint2D tmp = new LaTeXDrawPoint2D(pt1);
+							pt1.setLocation(pt2);
+							pt2.setLocation(tmp);
+						}
+				}
+				
+				updateShape();
+				
+			}catch(Exception e)
+			{
+				e.printStackTrace();
+			}
+		}
+	}
+
+
+
+
+	/**
+	 * @return the equilibrateGap.
+	 * @since 1.9
+	 */
+	public synchronized int getEquilibrateGap()
+	{
+		return equilibrateGap;
+	}
+
+
+
+
+	/**
+	 * @param equilibrateGap the equilibrateGap to set.
+	 * @exception IllegalArgumentException If the value is lesser than 1.
+	 * @since 1.9
+	 */
+	public synchronized void setEquilibrateGap(int equilibrateGap)
+	{
+		if(equilibrateGap<1)
+			throw new IllegalArgumentException();
+		
+		this.equilibrateGap = equilibrateGap;
+	}
+
+
+
+
+	/**
+	 * Check if the two Bézier curves have, at least, one extremity in common; if it is the case,
+	 * the control points must be symmetric. Curves are not considered as joined if at the joining point
+	 * there is an arrow.
+	 * @param bc The second Bézier curve.
+	 * @return 1, if the two Bézier curves have, at least, one extremity in common and symmetric 
+	 * control points;<br>
+	 * 0, if the two Bézier curves don't have any extremity shared;<br>
+	 * 2, if they have an extremity shared but the control points are not symmetric.
+	 * @since 1.9
+	 */
+	public int isJoined(BezierCurve bc)
+	{
+		boolean isStrictJoined  = false;
+		boolean isJoined		= false;
+		boolean hasB1NoArrow1 = arrowHead1.isWithoutStyle();
+		boolean hasB1NoArrow2 = arrowHead2.isWithoutStyle();
+		boolean hasB2NoArrow1 = bc.arrowHead1.isWithoutStyle();
+		boolean hasB2NoArrow2 = bc.arrowHead2.isWithoutStyle();
+		
+		if(pts.firstElement().equals(bc.pts.firstElement(), 0.0001) && hasB1NoArrow1 && hasB2NoArrow1)
+		{
+			isJoined = true;
+			
+			if(ctrlPts.firstElement().equals(bc.secondCtrlPts.firstElement(), 5))
+				isStrictJoined = true;
+		}
+		
+		if(pts.firstElement().equals(bc.pts.lastElement(), 0.0001) && hasB1NoArrow1 && hasB2NoArrow2)
+		{
+			isJoined = true;
+			
+			if(ctrlPts.firstElement().equals(bc.secondCtrlPts.lastElement(), 5))
+				isStrictJoined = true;
+		}
+		
+		if(pts.lastElement().equals(bc.pts.firstElement(), 0.0001) && hasB1NoArrow2 && hasB2NoArrow1)
+		{
+			isJoined = true;
+			
+			if(ctrlPts.lastElement().equals(bc.secondCtrlPts.firstElement(), 5))
+				isStrictJoined = true;
+		}
+		
+		if(pts.lastElement().equals(bc.pts.lastElement(), 0.0001) && hasB1NoArrow2 && hasB2NoArrow2)
+		{
+			isJoined = true;
+			
+			if(ctrlPts.lastElement().equals(bc.secondCtrlPts.lastElement(), 5))
+				isStrictJoined = true;
+		}
+
+		if(isStrictJoined && isJoined)
+			return 1;
+		
+		if(isJoined)
+			return 2;
+		
+		return 0;
+	}
+
+
+
+
+	/**
+	 * Join the second curve to the first (the second curve is not changed, points are added to the first);
+	 * if they are at all joined, two points are added to the given
+	 * curve. If they are joined at one point and if at this point the controls points are symmetric,
+	 * only one point is added; if the control points are not symmetric, a point is added to solve this
+	 * problem.
+	 * TODO For the moment only the case where the Bézier curve have a point in common and if at this
+	 * point the control points are symmetric is managed.
+	 * @param bc The Bézier curve to
+	 * @since 1.9
+	 */
+	public void join(BezierCurve bc)
+	{
+		if(bc==null)
+			throw new IllegalArgumentException();
+		
+		switch(isJoined(bc))
+		{
+			case 0:
+				break;
+				
+			case 1:
+				LaTeXDrawPoint2D p1a = pts.firstElement(), p1b = pts.lastElement();
+				LaTeXDrawPoint2D p2a = bc.pts.firstElement(), p2b = bc.pts.lastElement();
+				int i, size = bc.pts.size();
+				
+				if(p1b.equals(p2b, 0.0001) && ctrlPts.lastElement().equals(bc.secondCtrlPts.lastElement(), 5))
+				{
+				
+					for(i=size-2; i>=0; i--)
+					{
+						addPoint((LaTeXDrawPoint2D)bc.pts.elementAt(i).clone());
+						ctrlPts.lastElement().setLocation(bc.ctrlPts.elementAt(i));
+					}
+				
+					if(!bc.arrowHead2.isWithoutStyle() && arrowHead2.isWithoutStyle())
+						arrowHead2.copyArrowParameters(bc.arrowHead1);
+					
+					if(!bc.arrowHead1.isWithoutStyle() && arrowHead1.isWithoutStyle())
+						arrowHead1.copyArrowParameters(bc.arrowHead2);
+				}	
+				else
+				if(p1a.equals(p2a, 0.0001) && ctrlPts.firstElement().equals(bc.secondCtrlPts.firstElement(), 5))
+				{
+					ctrlPts.firstElement().setLocation(secondCtrlPts.firstElement());
+					
+					for(i=1; i<size; i++)
+					{
+						addPointAt((LaTeXDrawPoint2D)bc.pts.elementAt(i).clone(), 0);
+						ctrlPts.firstElement().setLocation(bc.secondCtrlPts.elementAt(i));
+					}
+					
+					ctrlPts.firstElement().setLocation(bc.ctrlPts.lastElement());
+					
+					if(!bc.arrowHead2.isWithoutStyle() && arrowHead1.isWithoutStyle())
+						arrowHead1.copyArrowParameters(bc.arrowHead2);
+					
+					if(!bc.arrowHead1.isWithoutStyle() && arrowHead2.isWithoutStyle())
+						arrowHead2.copyArrowParameters(bc.arrowHead1);
+				}
+				else
+				if(p1a.equals(p2b, 0.0001) && ctrlPts.firstElement().equals(bc.secondCtrlPts.lastElement(), 5))
+				{
+					ctrlPts.firstElement().setLocation(secondCtrlPts.firstElement());
+					
+					for(i=size-2; i>=0; i--)
+					{
+						addPointAt((LaTeXDrawPoint2D)bc.pts.elementAt(i).clone(), 0);
+						ctrlPts.firstElement().setLocation(bc.ctrlPts.elementAt(i));
+					}
+			
+					if(!bc.arrowHead2.isWithoutStyle() && arrowHead2.isWithoutStyle())
+						arrowHead2.copyArrowParameters(bc.arrowHead2);
+					
+					if(!bc.arrowHead1.isWithoutStyle() && arrowHead1.isWithoutStyle())
+						arrowHead1.copyArrowParameters(bc.arrowHead1);
+				}
+				else
+				if(p1b.equals(p2a, 0.0001) && ctrlPts.lastElement().equals(bc.secondCtrlPts.firstElement(), 5))
+				{
+				
+					for(i=1; i<size; i++)
+					{
+						addPoint((LaTeXDrawPoint2D)bc.pts.elementAt(i).clone());
+						ctrlPts.lastElement().setLocation(bc.ctrlPts.elementAt(i));
+					}
+				
+					if(!bc.arrowHead2.isWithoutStyle() && arrowHead2.isWithoutStyle())
+						arrowHead2.copyArrowParameters(bc.arrowHead2);
+					
+					if(!bc.arrowHead1.isWithoutStyle() && arrowHead1.isWithoutStyle())
+						arrowHead1.copyArrowParameters(bc.arrowHead1);
+				}
+				
+				updateSecondControlPoints();
+				updateShape();
+				updateBorders();
+				break;
+				
+			case 2:
+				break;
+		}
+	}
+	
+	
+	
+	/**
+	 * If the last and the first point are equals (their control points too), the last point
+	 * is replaced by a automatic closing (attribute <code>open</code> is set the false).
+	 * @since 1.9
+	 */
+	public void replaceLastPointByClosing()
+	{
+		if(pts.firstElement().equals(pts.lastElement(), 1) &&
+			ctrlPts.firstElement().equals(secondCtrlPts.lastElement(), 5) && getNbPoints()>1)
+		{
+			int last = pts.size()-1;
+			pts.remove(last);
+			ctrlPts.remove(last);
+			secondCtrlPts.remove(last);
+			secondCtrlLines.remove(last);
+			ctrlLines.remove(last);
+			delimiters.remove(last);
+			LaTeXDrawPoint2D pt = new LaTeXDrawPoint2D(pts.lastElement());
+			arrowHead2.setPosition(pt);
+			arrowHead2.setLine(new Line(pt, ctrlPts.lastElement(), false));
+			setOpen(false);
+			updateShape();
+		}
+	}
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()*5;
+	}
+	
+	
+	
+	
+	/**
+	 * @param line The line to check.
+	 * @return True if the given line closes the Bézier curve (and return false if the line is null or if
+	 * the curve is closed).
+	 * @since 1.9
+	 */
+	public boolean isLineClosingCurve(Line line)
+	{
+		if(line==null || !isOpen())
+			return false;
+		
+		LaTeXDrawPoint2D pt1 = line.getPt1();
+		LaTeXDrawPoint2D pt2 = line.getPt2();
+		LaTeXDrawPoint2D pt1b = pts.firstElement();
+		LaTeXDrawPoint2D pt2b = pts.lastElement();
+		double gap = 0.0001;
+		
+		return (pt1.equals(pt1b, gap) && pt2.equals(pt2b, gap)) ||
+				(pt1.equals(pt2b, gap) && pt2.equals(pt1b, gap));
+	}
+	
+	
+	
+	
+	@Override
+	public void setPoint(double x, double y, int id)
+	{
+		if(id<0 || id>=pts.size())
+			throw new IllegalArgumentException();
+		
+		LaTeXDrawPoint2D old = (LaTeXDrawPoint2D)pts.elementAt(id).clone();
+		super.setPoint(x, y, id);
+		double diffX = pts.elementAt(id).x - old.x;
+		double diffY = pts.elementAt(id).y - old.y;
+		
+		ctrlPts.elementAt(id).x += diffX;
+		ctrlPts.elementAt(id).y += diffY;
+		secondCtrlPts.elementAt(id).x += diffX;
+		secondCtrlPts.elementAt(id).y += diffY;
+		
+		if(id==0)
+			arrowHead1.getPosition().setLocation(x, y);
+		else
+			if(id==pts.size()-1)
+				arrowHead2.getPosition().setLocation(x, y);
+		
+		updateShape();
+		updateBorders();
+		updateGravityCenter();
+	}
+
+
+	
+	/**
+	 * @see #setPoint(double, double, int)
+	 * @param moveAll True: the control point move too.
+	 * @since 1.9.2
+	 */
+	public void setPoint(double x, double y, int id, boolean moveAll)
+	{
+		if(moveAll)
+			setPoint(x, y, id);
+		
+		if(id<0 || id>=pts.size())
+			throw new IllegalArgumentException();
+		
+		super.setPoint(x, y, id);
+		
+		secondCtrlPts.elementAt(id).setLocation(ctrlPts.elementAt(id).centralSymmetry(pts.elementAt(id)));
+		
+		if(id==0)
+			arrowHead1.getPosition().setLocation(x, y);
+		else
+			if(id==pts.size()-1)
+				arrowHead2.getPosition().setLocation(x, y);
+		
+		updateShape();
+		updateBorders();
+		updateGravityCenter();
+	}
+	
+
+
+	
+	/**
+	 * @param bc The given curve.
+	 * @return 1 if, the given curve closes the initial curve and if their control points coincide.
+	 * 0, if the given curve closes the initial curve but if one of the control points of the closure
+	 * does not coincide. -1 if the given curve does not close the initial curve.<br>
+	 * It does not take care of the arrows.
+	 * @since 1.9
+	 */
+	public int isCurveClosingCurve(BezierCurve bc)
+	{
+		if(pts.firstElement().equals(bc.pts.firstElement(), 5) && 
+			pts.lastElement().equals(bc.pts.lastElement(), 5))
+		{
+			if(ctrlPts.firstElement().equals(bc.secondCtrlPts.firstElement(), 5) &&
+				ctrlPts.lastElement().equals(bc.secondCtrlPts.lastElement(), 5))
+				return 1;
+			return 0;
+		}
+		
+		if(pts.firstElement().equals(bc.pts.lastElement(), 5) &&
+			pts.lastElement().equals(bc.pts.firstElement(), 5))
+		{
+			if(ctrlPts.firstElement().equals(bc.secondCtrlPts.lastElement(), 5) &&
+				ctrlPts.lastElement().equals(bc.secondCtrlPts.firstElement(), 5))
+				return 1;
+			return 0;
+		}
+		
+		return -1;
+	}
+	
+	
+	public boolean hasTwoLeftArrows()
+	{
+		return true;
+	}
+	
+	
+	
+	@Override
+	public boolean intersected(Rectangle2D.Double r)
+	{
+		if(r==null)
+			return false;
+		
+		BasicStroke wideline = new BasicStroke(hasDoubleBoundary() ? (float)(thickness*2+doubleSep) : thickness);
+        Shape outline = wideline.createStrokedShape(shape);
+        
+        boolean ok = outline.intersects(r);
+        
+        if(!ok && isOpen() && (isFilled() || isHatched() || hasGradient()))
+        {
+        	Line2D.Double l = new Line2D.Double(pts.firstElement(), pts.lastElement());
+        	
+        	if(l.intersects(r))
+        		ok = true;
+        }
+        
+        return ok;
+	}
+	
+	
+	@Override
+	public boolean shadowFillsShape()
+	{
+		return false;
+	}
+}
diff --git a/current/latexDraw/figures/Circle.java b/current/latexDraw/figures/Circle.java
new file mode 100644
index 0000000..f745ea3
--- /dev/null
+++ b/current/latexDraw/figures/Circle.java
@@ -0,0 +1,537 @@
+package latexDraw.figures;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.Ellipse2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines a circle.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Circle extends Ellipse
+{
+	private static final long serialVersionUID = 1L;
+
+
+	/**
+	 * @param f The figure to copy.
+	 * @param sameNumber True if the figure will have the same number of the copy.
+	 */
+	public Circle(Figure f, boolean sameNumber)
+	{
+		super(f, sameNumber);
+		
+		double b = Math.abs(borders.getPoint(0).y-borders.getPoint(2).y)/2.;
+		double a = Math.abs(borders.getPoint(0).x-borders.getPoint(1).x)/2.;
+		double radius = Math.max(b, a);
+		LaTeXDrawPoint2D cg = borders.getGravityCenter();
+		
+		borders = new Square(new LaTeXDrawPoint2D(cg.x-radius, cg.y-radius), 
+							new LaTeXDrawPoint2D(cg.x+radius, cg.y-radius),
+							new LaTeXDrawPoint2D(cg.x-radius, cg.y+radius), 
+							new LaTeXDrawPoint2D(cg.x+radius, cg.y+radius), false);
+		updateGravityCenter();
+		updateShape();
+	}
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public Circle(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D() , increaseMeter);
+	}	
+	
+
+	
+	/** 
+	 * The constructor using two points
+	 * @param pt1 The top left point of the rectangle containing the ellipse
+	 * @param pt2 The bottom right point of the rectangle containing the ellipse
+	 */
+	public Circle(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, LaTeXDrawPoint2D pt3, LaTeXDrawPoint2D pt4, boolean increaseMeter)
+	{
+		super(pt1, pt2, pt3, pt4, increaseMeter);
+		borders = new Square(pt1, pt2, pt3, pt4, false);
+		gravityCenter = borders.getGravityCenter();
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+
+		
+	
+	
+	@Override
+	public String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		LaTeXDrawPoint2D pt1 = borders.getPoint(0), pt2 = borders.getPoint(1);
+		LaTeXDrawPoint2D pt3 = borders.getPoint(2);
+		String add = "", addBegin="", addEnd="", fillType=""; //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$//$NON-NLS-4$
+		boolean isFilledWasChanged = false;
+		double x = (pt1.x+pt2.x)/2. - d.x, y = d.y - (pt1.y+pt3.y)/2. ;
+		double width = Math.abs(pt1.x-pt2.x);
+		double threshold = 0.001;
+		
+		if(hasShadow)
+		{
+			fillType+=",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				fillType+=",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+			
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				fillType+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC), threshold);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				fillType += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+			if(!isFilled)
+			{
+				isFilled = true;
+				isFilledWasChanged = true;
+			}
+		}
+		
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) fillType=fillType+','+str;
+		
+		str = getPSTricksCodeLine(ppc);
+		if(str.length()>0) add=add+','+str;
+		
+		if(rotationAngle%(Math.PI*2)!=0.)
+		{
+			double angle = -Math.toDegrees(rotationAngle);
+			double cx = (gravityCenter.x-d.x)/ppc;
+			double cy = (d.y-gravityCenter.y)/ppc;
+			double x2 = -Math.cos(-rotationAngle)*cx+
+						Math.sin(-rotationAngle)*cy+cx;
+			double y2 =  -Math.sin(-rotationAngle)*cx-
+						Math.cos(-rotationAngle)*cy+cy;
+			
+			addBegin +="\\rput{"+(float)angle+ "}("+LaTeXDrawNumber.getCutNumber((float)x2,threshold)+','+LaTeXDrawNumber.getCutNumber((float)y2,threshold)+"){"; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-3$
+			addEnd = "}"; //$NON-NLS-1$
+		}
+		
+		add+=",dimen="+bordersPosition;  //$NON-NLS-1$		
+		
+		if(hasDoubleBoundary)
+		{
+			add+=",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc), threshold); //$NON-NLS-1$
+			
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name); 
+				}
+				add+= ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}
+		
+		if(isFilledWasChanged) isFilled = false;
+		
+		return addBegin+"\\pscircle[linewidth=" + LaTeXDrawNumber.getCutNumber(thickness/ppc, threshold) +  //$NON-NLS-1$
+				add + fillType + "]("  //$NON-NLS-1$
+				+ LaTeXDrawNumber.getCutNumber((float)(x/ppc),threshold) + ',' + LaTeXDrawNumber.getCutNumber((float)(y/ppc),threshold) + "){"  //$NON-NLS-1$
+				+ LaTeXDrawNumber.getCutNumber((float)((width/2)/ppc),threshold) + '}'+addEnd;
+	}
+
+	
+	
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D p)
+	{
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);	
+		
+		if(isSelected && (borders.dNE.isIn(pt) || borders.dNW.isIn(pt) 
+				   || borders.dSE.isIn(pt) || borders.dSW.isIn(pt)))
+			return true;
+		
+		LaTeXDrawPoint2D NW = getTheNWNonRotatedBoundPoint();
+		LaTeXDrawPoint2D SE = getTheSENonRotatedBoundPoint();
+		Ellipse2D.Double s = new Ellipse2D.Double(NW.x, NW.y, Math.abs(NW.x - SE.x), Math.abs(NW.y - SE.y));
+
+		if(!s.contains(pt))
+			return false;
+
+		if(isFilled || hasShadow || hasGradient())
+			return true;
+
+		Shape s2;
+
+		if (hasDoubleBoundary)
+			s2 = new Ellipse2D.Double(NW.x + thickness * 2 + doubleSep, NW.y + thickness * 2 + doubleSep, 
+						Math.abs(NW.x - SE.x)- 4 * thickness - 2 * doubleSep, 
+						Math.abs(NW.y- SE.y) - 4 * thickness - 2 * doubleSep);
+		else
+			s2 = new Ellipse2D.Double(NW.x + thickness, NW.y + thickness, Math.abs(NW.x - SE.x) - 2 * thickness, 
+						Math.abs(NW.y- SE.y)- 2 * thickness);
+
+		return !s2.contains(pt);
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint(), SE = borders.getTheSEPoint();
+		Color formerCol = g.getColor();
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+		double dx=0, dy=0;
+		boolean changeFillStyle = false;
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		if(hasDoubleBoundary)
+		{
+			Shape s0 = shape;
+			Shape s[] = getDbleBoundariesOutInOrMiddle(s0);
+			Shape s1, s2, s3;
+
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			{
+				s1 = s0;
+				s2 = s[0];
+				s3 = s[1];
+			}
+			else
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				{
+					s1 = s[0];
+					s2 = s0;
+					s3 = s[1];
+				}
+				else
+				{
+					s1 = s[0];
+					s2 = s[1];
+					s3 = s0;
+				}
+
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				if(hasShadow)
+				{
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(s1);
+					g.draw(s1);
+					g.translate(-dx, -dy);
+					
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+				}
+
+				g.setColor(doubleColor);
+				g.setStroke(new BasicStroke((float)(doubleSep + thickness), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.draw(s2);
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering,s3);
+				g.setColor(linesColor);
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.draw(s1);
+				g.draw(s3);
+			}
+			else
+			{
+				if(hasShadow)
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(s1);
+					g.draw(s1);
+					g.translate(-dx, -dy);
+					g.setColor(interiorColor);
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.draw(s2);
+					
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+				}
+
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_ROUND,
+							BasicStroke.JOIN_MITER, 1.f, new float[] { 0, (float)(thickness*2+doubleSep + dotSep) }, 0));
+				else
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep),
+							BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+							new float[] { blackDashLength, whiteDashLength }, 0));
+					
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, s2);
+				g.setColor(linesColor);
+				g.draw(s2);
+				g.setStroke(new BasicStroke((float)doubleSep, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.setColor(doubleColor);
+				g.draw(s2);
+			}				
+		}
+		else
+		{
+			Shape shape2 = shape;
+			if(hasShadow)
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.translate(dx, dy);
+				g.setColor(shadowColor);
+				g.fill(shape);
+				g.draw(shape);
+				g.translate(-dx, -dy);
+				
+				if(!isFilled)
+				{
+					changeFillStyle = true;
+					isFilled = true;
+				}
+				g.setColor(interiorColor);
+				g.draw(shape);
+			}
+
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			else
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND,
+							BasicStroke.JOIN_MITER, 1.f, new float[] { 0, thickness + dotSep }, 0));
+				else
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+							new float[] { blackDashLength, whiteDashLength }, 0));
+			
+			fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, shape2);
+			g.setColor(linesColor);
+			g.draw(shape);
+		}
+		
+		g.setColor(formerCol);
+		if(changeFillStyle) isFilled = false;
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+		
+		if(isSelected)
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+	
+	
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		return super.clone();
+	}
+
+	
+	
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow = true;
+		interiorColor = (Color) ois.readObject();
+		lineStyle = (String) ois.readObject();
+		rotationAngle = ois.readDouble();
+		thickness = ois.readFloat();
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		borders = (LaTeXDrawRectangle) ois.readObject();
+
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0) //$NON-NLS-1$
+		{
+			hasDoubleBoundary = ois.readBoolean();
+			doubleColor = (Color)ois.readObject();
+			doubleSep = ois.readDouble();
+			bordersPosition = (String)ois.readObject();
+			if(!(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0)) //$NON-NLS-1$
+				ois.readBoolean();
+			hatchingAngle = ois.readDouble();
+			hatchingColor = (Color)ois.readObject();
+			hatchingStyle = (String)ois.readObject();
+			hatchingWidth = ois.readFloat();
+			
+			if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6") < 0)//$NON-NLS-1$
+			{
+				if(hatchingStyle.equals(DECREPETED_FILL_CROSS))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_CROSSHATCH;
+				else if(hatchingStyle.equals(DECREPETED_FILL_HORIZ))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_HLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_VERT))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_VLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_NO))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_NONE;
+			}
+		}
+		else
+		{
+			hasDoubleBoundary  = DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor = DEFAULT_DOUBLE_COLOR;
+			doubleSep   = DEFAULT_DOUBLESEP;
+			bordersPosition = DEFAULT_BORDERS_POSITION;
+			hatchingAngle = DEFAULT_HATCH_ANGLE;
+			hatchingColor = DEFAULT_HATCH_COL;
+			hatchingStyle = DEFAULT_HATCH_STYLE;
+			hatchingWidth = DEFAULT_HATCH_WIDTH;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+			hatchingSep = ois.readDouble();
+		else
+			hatchingSep = DEFAULT_HATCH_SEP;
+		
+		updateGravityCenter();
+		updateStyleOfDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	/**
+	 * Compute the intersection points between a circle and a line.
+	 * @param coeffA The a of y=ax+b of the second line
+	 * @param coeffB The b of y=ax+b of the second line
+	 * @return Null if there is no point ; else the two points.
+	 */
+	public LaTeXDrawPoint2D[] getIntersectionPoints(double coeffA, double coeffB)
+	{
+		double R = Math.abs(gravityCenter.x-getTheNWPoint().x);
+		double c = coeffB*coeffB-R*R;
+		double b = 2*coeffA*coeffB;
+		double a = (1+coeffA)*(1+coeffA);
+		double delta = b*b - 4*a*c;
+		
+		if(delta<=0) return null;
+		
+		double x1 = (-b-Math.sqrt(delta))/(2*a);
+		double x2 = (-b+Math.sqrt(delta))/(2*a);
+						
+		LaTeXDrawPoint2D[] pts = new LaTeXDrawPoint2D[2];
+		pts[0] = new LaTeXDrawPoint2D(x1, coeffA*x1+coeffB);
+		pts[1] = new LaTeXDrawPoint2D(x2, coeffA*x2+coeffB);
+		
+		return pts;
+	}
+
+	
+	
+	@Override
+	public synchronized void setThickness(float value)
+	{
+		super.setThickness(value);
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	/**
+	 * @return The radius of the circle.
+	 * @since 1.9
+	 */
+	public synchronized double getRadius()
+	{
+		return Math.abs(borders.getPoint(0).x-borders.getPoint(1).x)/2.;
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()^((int)getRadius());
+	}
+}
diff --git a/current/latexDraw/figures/Dot.java b/current/latexDraw/figures/Dot.java
new file mode 100644
index 0000000..9254e1a
--- /dev/null
+++ b/current/latexDraw/figures/Dot.java
@@ -0,0 +1,1383 @@
+package latexDraw.figures;
+
+import static java.lang.Math.PI;
+import static java.lang.Math.cos;
+import static java.lang.Math.sin;
+
+import java.awt.*;
+import java.awt.geom.*;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+import javax.swing.JLabel;
+
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.ui.components.LabelListCellRenderer;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/**
+ * This class defines a kind of figure: dots<br>
+ *<br>
+ *  This file is part of LaTeXDraw<br>
+ *  Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Dot extends Figure
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The centre of the dot */
+	private LaTeXDrawPoint2D center;
+	
+	/** The thickness of the dot by default */
+	public static final int DEFAULT_WIDTH = 6;
+	
+	/** Useful to calculate the thickness of dot with o style */
+	public static final float THICKNESS_o_STYLE_FACTOR = 16 ;
+	
+	/** The style of the dot by default */
+	public static final String DEFAULT_DOT_STYLE = PSTricksConstants.DEFAULT_DOT_STYLE;
+	
+	/** Corresponds to the golden angle (Useful for golden diamond) */
+	public final double GOLDEN_ANGLE = 0.553574;
+	
+	/** The gap used to draw a plus */
+	private double plusGap;
+	
+	/** The thickness of the plus shape is computes with that coefficient */
+	public static final double PLUS_COEFF_WIDTH = 6.5;
+	
+	/** The gap used to draw a cross */
+	private double crossGap;
+	
+	/** The gap used to draw a vertical bar */
+	private double barGap;
+	
+	/** The thickness used to draw a vertical bar */
+	private double barThickness;
+
+	/** The current style of the circle */
+	private String currentStyle;
+	
+	/** The width of the circle */
+	private float width;
+	
+	private Delimitor d;
+	
+	
+	/**
+	 * The constructor by default.
+	 */
+	public Dot(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), increaseMeter);
+	}
+	
+	
+	
+	
+	/**
+	 * The constructor by copy.
+	 * @param pt The new centre of the dot.
+	 */
+	public Dot(LaTeXDrawPoint2D pt, boolean increaseMeter)
+	{
+		this(pt, DEFAULT_DOT_STYLE, DEFAULT_WIDTH, increaseMeter);
+	}
+	
+	
+	
+	
+	/**
+	 * The constructor by copy.
+	 * @param pt The new centre of the dot.
+	 * @param style The style of the dot.
+	 * @param size The size of the dot.
+	 */
+	public Dot(LaTeXDrawPoint2D pt, String style, float size, boolean increaseMeter)
+	{
+		super(increaseMeter);
+		
+		canHaveShadow 		= false;
+		isBordersMovable 	= false;
+		isDashableOrDotable = false;
+		isDoubleBoundaryable= false;
+		isResizable = false;
+		isThicknessable = false;
+		d = new Delimitor();
+		center = pt;
+		width = size;
+		updateGap();
+		currentStyle = style;
+		updateDelimitor();
+		updateBorders();
+		updateShape();
+		updateCanBeFilled();
+		updateGravityCenter();
+	}
+	
+	
+	
+	@Deprecated
+	@Override
+	public void setIsFilled(boolean state)
+	{
+		/*
+		 * A dot is always filled.
+		 */
+	}
+	
+	
+	
+	/**
+	 * Allows to update the delimiter following the size of the dot
+	 */
+	public void updateDelimitor()
+	{
+		if(width<30)
+			d.setCoordinates(center.x+width*2./3., center.y-width*2./3.);
+		else 
+			d.setCoordinates(center.x+width/2., center.y-width/2.);
+	}
+	
+	
+	
+	/**
+	 * Allows to get the centre of the dot
+	 * @return The centre of the dot
+	 */
+	public synchronized LaTeXDrawPoint2D getCenter()
+	{
+		return center;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update the values of the gaps
+	 */
+	public void updateGap()
+	{
+		plusGap  = width/160.;
+		crossGap = width/10.; 
+		barGap   = width/3.75;
+		barThickness = width/8.;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the width of the dot
+	 * @param w The width of the dot
+	 */
+	public synchronized void setWidth(float w)
+	{ 
+		if(w<=0)
+			throw new IllegalArgumentException();
+		
+		width = w;
+		updateGap();
+		updateDelimitor();
+		updateBorders();
+		updateShape();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the width of the circle
+	 * @return The width of the circle
+	 */
+	public synchronized float getWidth()
+	{
+		return width;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the style of the dot
+	 * @param newStyle The new style of the dot
+	 * @throws IllegalArgumentException If the new style is not valid.
+	 */
+	public synchronized void setCurrentStyle(String newStyle)
+	{
+		if(!PSTricksConstants.isValidDotStyle(newStyle))
+			throw new IllegalArgumentException();
+		
+		currentStyle = newStyle;
+		updateCanBeFilled();
+		updateBorders();
+		updateShape();
+		updateGravityCenter();
+	}
+	
+	
+	
+	
+	public void updateBorders()
+	{
+		updateGap();
+		
+		Shape s = createNonRotatedShape2D();
+		
+		Rectangle2D rec = s.getBounds2D();
+		
+		if(borders==null)
+			borders = new LaTeXDrawRectangle(false);
+	
+		borders.setFirstPoint(new LaTeXDrawPoint2D(rec.getMinX(), rec.getMinY()));
+		borders.setLastPoint(new LaTeXDrawPoint2D(rec.getMaxX(), rec.getMaxY()));
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the current style of the dot
+	 * @return The current style of the dot
+	 */
+	public synchronized String getCurrentStyle()
+	{
+		return currentStyle;
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void onDragged(Point formerPt, Point newPt)
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		if(dSelected==d)
+		{
+			if(isOnRotation)
+				rotate(formerPt, newPt);
+			else
+			{
+				LaTeXDrawPoint2D pt = Figure.rotatePoint(new LaTeXDrawPoint2D(newPt), borders.gravityCenter, -rotationAngle);
+				float w = (float)(Math.abs(pt.x-center.x)*2.);
+				
+				if(w>0)
+					setWidth(w);
+				
+				updateDelimitor();
+			}
+			updateShape();
+		}
+		else
+			shift(formerPt, newPt);
+	}
+
+	
+	
+	@Override
+	public Color getInteriorColor()
+	{
+		if(canBeFilled)
+			return interiorColor;
+		
+		return Color.BLACK;
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		LaTeXDrawPoint2D NW = new LaTeXDrawPoint2D(center.x-width/2., center.y-width/2.);
+		LaTeXDrawPoint2D SE = new LaTeXDrawPoint2D(center.x+width/2., center.y+width/2.);
+		LaTeXDrawPoint2D NW2 = getTheNWPoint(), SE2 = getTheSEPoint();
+		float dec = width/THICKNESS_o_STYLE_FACTOR;
+		double cx = (NW2.x+SE2.x)/2., cy = (NW2.y+SE2.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}
+		
+		Color formerCol = g.getColor();
+
+		if(currentStyle.equals(PSTricksConstants.DOT_STYLE))
+		{	
+			g.setColor(linesColor);
+			Ellipse2D.Double e = new Ellipse2D.Double(NW.x, NW.y, width, width);
+			g.fill(e); 
+		}
+		else if(currentStyle.equals(PSTricksConstants.O_STYLE) || currentStyle.equals(PSTricksConstants.OPLUS_STYLE) ||
+				currentStyle.equals(PSTricksConstants.OTIMES_STYLE))
+		{
+			if(currentStyle.equals(PSTricksConstants.O_STYLE))
+				dec = (float)(width*(0.1/3.6))*2;
+			else
+				dec = (float)(width*(0.1/2.6))*2;
+			
+			Ellipse2D.Double e = new Ellipse2D.Double(NW.x+dec/2., NW.y+dec/2., width-dec, width-dec);
+			
+			if(!currentStyle.equals(PSTricksConstants.OPLUS_STYLE) && !currentStyle.equals(PSTricksConstants.OTIMES_STYLE))
+			{
+				g.setColor(isFilled ? interiorColor : Color.WHITE);
+				g.fill(e);
+			}
+			
+			g.setColor(linesColor);
+			g.setStroke(new BasicStroke(dec, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			g.draw(e); 
+			
+			if(currentStyle.equals(PSTricksConstants.OPLUS_STYLE))
+			{
+				g.draw(new Line2D.Double((NW.x+SE.x)/2., NW.y+dec*2, (NW.x+SE.x)/2., SE.y-dec*2));
+				g.draw(new Line2D.Double(NW.x+dec*2, (NW.y+SE.y)/2., SE.x-dec*2, (NW.y+SE.y)/2.));
+			}
+			else if(currentStyle.equals(PSTricksConstants.OTIMES_STYLE))
+			{
+				LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D((NW.x+SE.x)/2., NW.y+dec*2);
+				LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D((NW.x+SE.x)/2., SE.y-dec*2);
+				
+				p1 = rotatePoint(p1, Math.PI/4.);
+				p2 = rotatePoint(p2, Math.PI/4.);
+				
+				g.draw(new Line2D.Double(p1.x, p1.y, p2.x, p2.y));
+				
+				p1.setLocation(NW.x+dec*2, (NW.y+SE.y)/2.);
+				p2.setLocation(SE.x-dec*2, (NW.y+SE.y)/2.);
+				p1 = rotatePoint(p1, Math.PI/4.);
+				p2 = rotatePoint(p2, Math.PI/4.);
+				
+				g.draw(new Line2D.Double(p1.x, p1.y, p2.x, p2.y));
+			}			
+		}
+		else if(currentStyle.equals(PSTricksConstants.BAR_STYLE))
+		{
+			g.setColor(linesColor);
+			g.setStroke(new BasicStroke((float)barThickness, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+			g.draw(new Line2D.Double((NW.x+SE.x)/2.,NW.y+barThickness/2.,(NW.x+SE.x)/2., SE.y+ barGap));
+		}
+		else if(currentStyle.equals(PSTricksConstants.PLUS_STYLE))
+		{
+			g.setColor(linesColor);
+			g.setStroke(new BasicStroke((float) (width/PLUS_COEFF_WIDTH), BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+
+			GeneralPath gp = new GeneralPath();
+			
+			gp.moveTo((float)((NW.x+SE.x)/2.), (float)(NW.y-plusGap));
+			gp.lineTo((float)((NW.x+SE.x)/2.), (float)(SE.y+plusGap));
+			gp.moveTo((float)(NW.x-plusGap), (float)((NW.y+SE.y)/2.));
+			gp.lineTo((float)(SE.x+plusGap), (float)((NW.y+SE.y)/2.));
+			g.draw(gp);
+		}
+		else if(currentStyle.equals(PSTricksConstants.SQUARE_STYLE) || currentStyle.equals(PSTricksConstants.FSQUARE_STYLE))
+		{
+			if(currentStyle.equals(PSTricksConstants.SQUARE_STYLE))
+				if(isFilled)
+					 g.setColor(interiorColor);
+				else
+				     g.setColor(Color.WHITE);
+			else 
+				g.setColor(linesColor);
+			
+			dec = (float)(width*(0.1/4))*2;
+			
+			g.fill(new Rectangle2D.Double(NW.x+dec*1.5, NW.y+dec*1.5, width-dec*3, width-dec*3));
+			g.setStroke(new BasicStroke(dec, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			g.setColor(linesColor);
+			g.draw(new Rectangle2D.Double(NW.x+dec+dec/2., NW.y+dec+dec/2., width-dec*3, width-dec*3));
+		}
+		else if(currentStyle.equals(PSTricksConstants.TRIANGLE_STYLE) || currentStyle.equals(PSTricksConstants.FTRIANGLE_STYLE) ||
+				currentStyle.equals(PSTricksConstants.DIAMOND_STYLE) || currentStyle.equals(PSTricksConstants.FDIAMOND_STYLE) ||
+				currentStyle.equals(PSTricksConstants.PENTAGON_STYLE) || currentStyle.equals(PSTricksConstants.FPENTAGON_STYLE))
+		{
+			Polygon p;
+			
+			if(currentStyle.equals(PSTricksConstants.TRIANGLE_STYLE) || currentStyle.equals(PSTricksConstants.FTRIANGLE_STYLE))
+				p = createTriangle();
+			else
+				if(currentStyle.equals(PSTricksConstants.DIAMOND_STYLE) || currentStyle.equals(PSTricksConstants.FDIAMOND_STYLE))
+					p = createDiamond();
+				else
+					p = createPentagon();
+			
+			if(currentStyle.equals(PSTricksConstants.TRIANGLE_STYLE) || currentStyle.equals(PSTricksConstants.DIAMOND_STYLE) ||
+				currentStyle.equals(PSTricksConstants.PENTAGON_STYLE))
+				if(isFilled)
+					 g.setColor(interiorColor);
+				else
+					 g.setColor(Color.WHITE);
+			else 
+				g.setColor(linesColor);
+			
+			g.fill(p);			
+			g.setStroke(new BasicStroke(dec, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+			g.setColor(linesColor);
+			g.draw(p);			
+		}
+		else if(currentStyle.equals(PSTricksConstants.X_STYLE))
+		{
+			g.setColor(linesColor);
+			g.setStroke(new BasicStroke((float)crossGap, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+
+			GeneralPath gp = new GeneralPath();
+			
+			gp.moveTo((float)(NW.x+crossGap), (float)(NW.y+crossGap));
+			gp.lineTo((float)(SE.x-crossGap), (float)(SE.y-crossGap));
+			gp.moveTo((float)(SE.x-crossGap), (float)(NW.y+crossGap));
+			gp.lineTo((float)(NW.x+crossGap), (float)(SE.y-crossGap));
+			g.draw(gp);
+		}
+		else if(currentStyle.equals(PSTricksConstants.ASTERISK_STYLE))
+		{
+			g.setColor(linesColor);
+			g.setStroke(new BasicStroke(dec, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+			
+			double xCenter = (NW.x+SE.x)/2., yCenter = (NW.y+SE.y)/2.;
+			double radius = Math.abs((NW.y+width/10.)-(SE.y-width/10.))/2. + dec;
+			g.draw(new Line2D.Double((NW.x+SE.x)/2.,NW.y+width/10.-dec, (NW.x+SE.x)/2.,SE.y-width/10.+dec));
+			g.draw(new Line2D.Double((Math.cos(Math.PI/6.)*radius+xCenter), radius/2. + yCenter,
+						Math.cos(7*Math.PI/6.)*radius+xCenter, Math.sin(7*Math.PI/6.)*radius+yCenter));
+			g.draw(new Line2D.Double((Math.cos(5*Math.PI/6.)*radius+xCenter),
+						Math.sin(5*Math.PI/6.)*radius+yCenter,
+						Math.cos(11*Math.PI/6.)*radius+xCenter, Math.sin(11*Math.PI/6.)*radius+yCenter));
+		}
+		
+		if(d!=null && isSelected)
+			d.draw(g);
+		
+		g.setColor(formerCol);		
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x,-c3y);
+			g.rotate(-rotationAngle);
+		}
+	}
+
+	
+	
+	
+	/**
+	 * Allows to create a triangle (one of the possibles shapes of a dot).
+	 * @return The triangle
+	 */
+	public Polygon createTriangle()
+	{
+		double NWx = center.x-width/2., NWy = center.y-width/2.;
+		double SEx = center.x+width/2., SEy = center.y+width/2.;
+		float dec = width/THICKNESS_o_STYLE_FACTOR;
+		int nbPts = 3, xs[] = new int[nbPts], ys[] = new int[nbPts];
+		
+		xs[0] = (int) ((SEx + NWx)/2);	ys[0] = (int) (NWy-1.5*dec);	
+		xs[1] = (int) ((int) (NWx)-0.3*dec);	ys[1] = (int) (SEy-3*dec);
+		xs[2] = (int) ((int) (SEx)+0.3*dec);	ys[2] = (int) (SEy-3*dec);
+		
+		return new Polygon(xs, ys, nbPts);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create a pentagon (one of the possibles shapes of a dot)
+	 * @return The pentagon
+	 */
+	public Polygon createPentagon()
+	{
+		double NWx = center.x-width/2., NWy = center.y-width/2.;
+		double SEx = center.x+width/2., SEy = center.y+width/2.;
+		float dec = width/THICKNESS_o_STYLE_FACTOR;
+		int nbPts = 5, xs[] = new int[nbPts], ys[] = new int[nbPts];
+		double yCenter = (NWy+SEy)/2. - dec;
+		double xCenter = (NWx+SEx)/2.;
+		double dist = Math.abs(NWy-SEy)/2. + dec;
+		double  c1 = 0.25*(Math.sqrt(5)-1.)*dist, 
+				s1 = Math.sin(2*Math.PI/5.)*dist, 
+				c2 = 0.25*(Math.sqrt(5)+1.)*dist, 
+				s2 = Math.sin(4*Math.PI/5.)*dist;
+
+		xs[0] = (int)xCenter;
+		xs[1] = (int)(s1 + xCenter);
+		xs[2] = (int)(s2 + xCenter);
+		xs[3] = (int)(-s2 + xCenter);
+		xs[4] = (int)(-s1 + xCenter);
+		ys[0] = (int)(NWy-dec);
+		ys[1] = ys[4] = (int) (-c1 + yCenter + dec); 
+		ys[2] = ys[3] = (int) (c2 + yCenter + dec);	
+		
+		return new Polygon(xs, ys, nbPts);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create a list of the different style of the dot
+	 * @return The list
+	 */
+	public static LaTeXDrawComboBox createDotStyleChoice()
+	{
+		LaTeXDrawComboBox dotChoice = new LaTeXDrawComboBox();
+		dotChoice.setRenderer(new LabelListCellRenderer());
+		JLabel label = new JLabel(PSTricksConstants.DOT_STYLE);
+		label.setName(PSTricksConstants.DOT_STYLE);
+		label.setIcon(LaTeXDrawResources.dotStyleNoneIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.ASTERISK_STYLE);
+     	label.setName(PSTricksConstants.ASTERISK_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleAsteriskIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.BAR_STYLE);
+     	label.setName(PSTricksConstants.BAR_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleBarIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.DIAMOND_STYLE);
+     	label.setName(PSTricksConstants.DIAMOND_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleDiamondIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.FDIAMOND_STYLE);
+     	label.setName(PSTricksConstants.FDIAMOND_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleDiamondFIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.O_STYLE);
+     	label.setName(PSTricksConstants.O_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleOIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.OPLUS_STYLE);
+     	label.setName(PSTricksConstants.OPLUS_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleOPlusIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.OTIMES_STYLE);
+     	label.setName(PSTricksConstants.OTIMES_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleOCrossIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.PLUS_STYLE);
+     	label.setName(PSTricksConstants.PLUS_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStylePlusIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.X_STYLE);
+     	label.setName(PSTricksConstants.X_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleCrossIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.TRIANGLE_STYLE);
+     	label.setName(PSTricksConstants.TRIANGLE_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleTriangleIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.FTRIANGLE_STYLE);
+     	label.setName(PSTricksConstants.FTRIANGLE_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleTriangleFIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.PENTAGON_STYLE);
+     	label.setName(PSTricksConstants.PENTAGON_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStylePentagonIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.FPENTAGON_STYLE);
+     	label.setName(PSTricksConstants.FPENTAGON_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStylePentagonFIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.SQUARE_STYLE);
+     	label.setName(PSTricksConstants.SQUARE_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleSquareIcon);
+     	dotChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.FSQUARE_STYLE);
+     	label.setName(PSTricksConstants.FSQUARE_STYLE);
+     	label.setIcon(LaTeXDrawResources.dotStyleSquareFIcon);
+     	dotChoice.addItem(label);
+     	
+     	return dotChoice;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to create a diamond (one of the possibles shapes of a dot)
+	 * @return The golden diamond
+	 */
+	public Polygon createDiamond()
+	{
+		double NWx = center.x-width/2., NWy = center.y-width/2.;
+		double SEx = center.x+width/2., SEy = center.y+width/2.;
+		float dec = width/THICKNESS_o_STYLE_FACTOR;
+		
+		// This diamond is a golden diamond 
+		// cf. http://mathworld.wolfram.com/GoldenRhombus.html
+		int nbPts = 4, xs[] = new int[nbPts], ys[] = new int[nbPts];
+		double a = Math.abs((NWx-SEx))/(2.*Math.sin(GOLDEN_ANGLE));
+		double p = 2*a*Math.cos(GOLDEN_ANGLE);
+		
+		xs[1] = (int) ((SEx)-dec-.5*dec);		ys[1] = (int)(NWy+SEy)/2;
+		xs[3] = (int) ((NWx)+dec+.5*dec);		ys[3] = (int)(NWy+SEy)/2;
+		xs[0] = (xs[1]+xs[3])>>>1;
+		ys[0] = (int) ((NWy+SEy)/2+p/2.-dec-.5*dec);	
+		xs[2] = (xs[1]+xs[3])>>>1;	
+		ys[2] = (int) ((NWy+SEy)/2-p/2.+dec+.5*dec);
+		
+		return new Polygon(xs, ys, nbPts);
+	}
+	
+	
+	
+	
+
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt) 
+	{
+		if(isSelected() && d.isIn(Figure.rotatePoint(pt, borders.gravityCenter, -rotationAngle))) 
+			return true;
+		
+		if(shape==null)
+			updateShape();
+		
+		boolean ok = shape.contains(pt);
+	
+		if(!ok && isFilled)
+			ok = createUnstrokedShape2D().contains(pt);
+		
+		return ok;
+	}
+
+	
+	
+	@Override
+	public String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		double threshold = 0.001;
+		LaTeXDrawPoint2D o = drawBorders.getOriginPoint();
+		double x = center.x - o.x, y = o.y - center.y;
+		String start = "", end = "", add = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+		if(!linesColor.equals(PSTricksConstants.DEFAULT_LINE_COLOR))
+		{ // add colour code
+			String name = DviPsColors.getColourName(linesColor);
+			if(name==null)
+			{
+				name = "color"+number;//$NON-NLS-1$
+				DviPsColors.addUserColour(linesColor, name); 
+			}
+			add += ",linecolor="+name;	 //$NON-NLS-1$		
+		}
+		
+		if(canBeFilled)
+		{
+			add+= ",fillstyle=solid"; //$NON-NLS-1$
+			if(!interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR))
+			{
+				String name = DviPsColors.getColourName(interiorColor);
+				if(name==null)
+				{
+					name = "color"+number+'b';//$NON-NLS-1$
+					DviPsColors.addUserColour(interiorColor, name); 
+				}
+				add+= ",fillcolor="+name; //$NON-NLS-1$
+			}
+		}
+		
+		if(rotationAngle%(Math.PI*2)!=0.)
+		{
+			LaTeXDrawPoint2D tmp = Figure.rotatePoint(center, borders.gravityCenter, rotationAngle);
+			float tmpX = (float)(tmp.x-center.x), tmpY = (float)(center.y-tmp.y) ;
+			add +=",dotangle="+(float)(Math.toDegrees(-rotationAngle)); //$NON-NLS-1$
+			
+			if(tmpX!=0f && tmpY!=0f)
+			{
+				start = "\\rput("+LaTeXDrawNumber.getCutNumber(tmpX/ppc,threshold)+", "+ LaTeXDrawNumber.getCutNumber(tmpY/ppc,threshold) +"){";  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+				end = "}"; //$NON-NLS-1$
+			}
+		}
+		
+		if(!currentStyle.equals(PSTricksConstants.DOT_STYLE))
+			add +=",dotstyle="+currentStyle; //$NON-NLS-1$
+		
+		return start + "\\psdots[dotsize=" +  LaTeXDrawNumber.getCutNumber(width/ppc,threshold) + add  //$NON-NLS-1$
+				+ "](" + LaTeXDrawNumber.getCutNumber((float)(x/ppc),threshold) + ',' + LaTeXDrawNumber.getCutNumber((float)(y/ppc),threshold) + ')' + end;//$NON-NLS-1$
+	}
+
+	
+
+	
+
+	@Override
+	public void onClick(Point p) 
+	{
+		isSelected = true;
+		LaTeXDrawPoint2D pt = Figure.rotatePoint(new LaTeXDrawPoint2D(p), borders.gravityCenter, -rotationAngle);
+		if(d.isIn(pt)) dSelected = d;
+	}
+
+	
+	
+
+	@Override
+	public void onRelease() 
+	{
+		isSelected = false;
+		dSelected = null;
+		setOnRotation(false);
+	}
+
+
+	
+
+	@Override
+	public void shift(double shiftX, double shiftY)
+	{
+		if(shiftX==0 && shiftY==0) return ;
+		
+		center.x+=shiftX;
+		center.y+=shiftY;
+		updateDelimitor();
+		updateBorders();
+		updateShape();
+		updateGravityCenter();
+	}
+
+	
+	
+	@Override
+	@Deprecated
+	public synchronized void setLastPoint(double x, double y)
+	{
+		/*
+		 * Nothing to do.
+		 */
+	}
+
+	
+	@Override
+	@Deprecated
+	public synchronized void setFirstPoint(double x, double y)
+	{
+		/*
+		 * Nothing to do.
+		 */
+	}
+	
+
+	
+	
+	
+	@Override
+	public boolean canBeHatched()
+	{
+		return false;
+	}
+	
+	
+	
+	
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Dot dot = (Dot) super.clone();
+		dot.center = (LaTeXDrawPoint2D)center.clone();
+		dot.barGap = barGap;
+		dot.barThickness = barThickness;
+		dot.crossGap = crossGap;
+		dot.currentStyle = currentStyle;
+		dot.plusGap = plusGap;
+		dot.width = width;
+		dot.d = (Delimitor) d.clone();
+		dot.updateShape();
+		dot.borders = null;
+		dot.updateBorders();
+		dot.updateCanBeFilled();
+		dot.updateGravityCenter();
+		
+		return dot;
+	}
+
+
+
+
+	@Override
+	public void updateStyleOfDelimitors() 
+	{
+		if(isOnRotation)
+			 d.setColorSet4();
+		else d.setColorSet1();
+	}
+
+
+
+
+
+	@Override
+	public Shape createNonRotatedShape2D() 
+	{
+		LaTeXDrawPoint2D NW = new LaTeXDrawPoint2D(center.x-width/2., center.y-width/2.);
+		LaTeXDrawPoint2D SE = new LaTeXDrawPoint2D(center.x+width/2., center.y+width/2.);
+		float dec = width/THICKNESS_o_STYLE_FACTOR;
+
+		if(currentStyle.equals(PSTricksConstants.DOT_STYLE) ||
+			currentStyle.equals(PSTricksConstants.O_STYLE) || 
+			currentStyle.equals(PSTricksConstants.OPLUS_STYLE) ||
+			currentStyle.equals(PSTricksConstants.OTIMES_STYLE))
+			return new Ellipse2D.Double(NW.x, NW.y, width, width);
+		
+		if(currentStyle.equals(PSTricksConstants.BAR_STYLE))
+		{
+			BasicStroke wideline = new BasicStroke((float)barThickness);
+	        Shape outline = wideline.createStrokedShape(new Line2D.Double((NW.x+SE.x)/2.,
+	        					NW.y+barThickness/2.,(NW.x+SE.x)/2., SE.y + barGap));
+	        
+			return outline;
+		}
+
+		if(currentStyle.equals(PSTricksConstants.PLUS_STYLE))
+		{
+			GeneralPath gp = new GeneralPath();
+			
+			gp.moveTo((float)((NW.x+SE.x)/2.), (float)(NW.y-plusGap));
+			gp.lineTo((float)((NW.x+SE.x)/2.), (float)(SE.y+plusGap));
+			gp.moveTo((float)(NW.x-plusGap), (float)((NW.y+SE.y)/2.));
+			gp.lineTo((float)(SE.x+plusGap), (float)((NW.y+SE.y)/2.));
+			
+			BasicStroke wideline = new BasicStroke((float) (width/PLUS_COEFF_WIDTH));
+	        Shape outline = wideline.createStrokedShape(gp);
+	        
+			return outline;
+		}
+		
+		if(currentStyle.equals(PSTricksConstants.SQUARE_STYLE) || 
+			currentStyle.equals(PSTricksConstants.FSQUARE_STYLE))
+		{
+			BasicStroke wideline = new BasicStroke(dec);
+	        Shape outline = wideline.createStrokedShape(
+	        	new Rectangle2D.Double(NW.x+dec, NW.y+dec, Math.abs(NW.x-SE.x)-2*dec, Math.abs(NW.y - SE.y)-2*dec));
+	        
+			return outline;
+		}
+		
+		if(currentStyle.equals(PSTricksConstants.TRIANGLE_STYLE) || 
+			currentStyle.equals(PSTricksConstants.FTRIANGLE_STYLE))
+		{
+			BasicStroke wideline = new BasicStroke(dec);
+	        Shape outline = wideline.createStrokedShape(createTriangle());
+	        
+			return outline;
+		}
+		
+		if(currentStyle.equals(PSTricksConstants.DIAMOND_STYLE) || 
+			currentStyle.equals(PSTricksConstants.FDIAMOND_STYLE))
+		{
+			BasicStroke wideline = new BasicStroke(dec);
+	        Shape outline = wideline.createStrokedShape(createDiamond());
+	        
+			return outline;
+		}
+		
+		if(currentStyle.equals(PSTricksConstants.PENTAGON_STYLE) || 
+			currentStyle.equals(PSTricksConstants.FPENTAGON_STYLE))
+		{
+			BasicStroke wideline = new BasicStroke(dec);
+	        Shape outline = wideline.createStrokedShape(createPentagon());
+	        
+			return outline;
+		}
+		
+		if(currentStyle.equals(PSTricksConstants.X_STYLE))
+		{
+			GeneralPath gp = new GeneralPath();
+			
+			gp.moveTo((float)(NW.x+crossGap), (float)(NW.y+crossGap));
+			gp.lineTo((float)(SE.x-crossGap), (float)(SE.y-crossGap));
+			gp.moveTo((float)(SE.x-crossGap), (float)(NW.y+crossGap));
+			gp.lineTo((float)(NW.x+crossGap), (float)(SE.y-crossGap));
+			
+			BasicStroke wideline = new BasicStroke((float)crossGap);
+	        Shape outline = wideline.createStrokedShape(gp);
+	        
+			return outline;
+		}
+		
+		if(currentStyle.equals(PSTricksConstants.ASTERISK_STYLE))
+		{
+			double xCenter = (NW.x+SE.x)/2., yCenter = (NW.y+SE.y)/2.;
+			double radius = Math.abs((NW.y+width/10.)-(SE.y-width/10.))/2. + dec;
+			GeneralPath gp = new GeneralPath();
+			
+			gp.moveTo((float)((NW.x+SE.x)/2.), (float)(NW.y+width/10.)-dec);
+			gp.lineTo((float)((NW.x+SE.x)/2.), (float)(SE.y-width/10.)+dec);
+			gp.moveTo((float)((Math.cos(Math.PI/6.)*radius+xCenter)), (float)(radius/2. + yCenter));
+			gp.lineTo((float)(Math.cos(7*Math.PI/6.)*radius+xCenter), (float)(Math.sin(7*Math.PI/6.)*radius+yCenter));
+			gp.moveTo((float)(Math.cos(5*Math.PI/6.)*radius+xCenter), (float)(Math.sin(5*Math.PI/6.)*radius+yCenter));
+			gp.lineTo((float)(Math.cos(11*Math.PI/6.)*radius+xCenter), (float)(Math.sin(11*Math.PI/6.)*radius+yCenter));
+			
+			BasicStroke wideline = new BasicStroke(dec);
+	        Shape outline = wideline.createStrokedShape(gp);
+	        
+			return outline;
+		}
+		
+		return null;
+	}
+
+	
+	
+	
+	/**
+	 * @return The rotated shape of the dot but the stroke is not taken in account.
+	 * @since 1.9.1
+	 */
+	public synchronized Shape createUnstrokedShape2D()
+	{
+		Shape area = createNonRotatedUnstrokedShape2D();
+
+		if((rotationAngle % (2*PI)) != 0)
+		{
+			LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+			double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+			double c2x = cos(rotationAngle)*cx - sin(rotationAngle)*cy;
+			double c2y = sin(rotationAngle)*cx + cos(rotationAngle)*cy;
+			AffineTransform at = AffineTransform.getTranslateInstance(cx - c2x, cy - c2y);
+			at.rotate(rotationAngle);
+			area = at.createTransformedShape(area);
+		}
+
+		return area;
+	}
+	
+
+	
+	/**
+	 * @return The shape of the dot but the stroke is not taken in account.
+	 * @since 1.9.1
+	 */
+	public Shape createNonRotatedUnstrokedShape2D() 
+	{
+		LaTeXDrawPoint2D NW = new LaTeXDrawPoint2D(center.x-width/2., center.y-width/2.);
+		LaTeXDrawPoint2D SE = new LaTeXDrawPoint2D(center.x+width/2., center.y+width/2.);
+		float dec = width/THICKNESS_o_STYLE_FACTOR;
+		
+		if(currentStyle.equals(PSTricksConstants.DOT_STYLE) ||
+			currentStyle.equals(PSTricksConstants.O_STYLE) || 
+			currentStyle.equals(PSTricksConstants.OPLUS_STYLE) ||
+			currentStyle.equals(PSTricksConstants.OTIMES_STYLE))
+			return new Ellipse2D.Double(NW.x, NW.y, width, width);
+		
+		if(currentStyle.equals(PSTricksConstants.BAR_STYLE))
+	        return new Line2D.Double((NW.x+SE.x)/2.,NW.y+barThickness/2.,(NW.x+SE.x)/2., SE.y + barGap);
+
+		if(currentStyle.equals(PSTricksConstants.PLUS_STYLE))
+		{
+			GeneralPath gp = new GeneralPath();
+			
+			gp.moveTo((float)((NW.x+SE.x)/2.), (float)(NW.y-plusGap));
+			gp.lineTo((float)((NW.x+SE.x)/2.), (float)(SE.y+plusGap));
+			gp.moveTo((float)(NW.x-plusGap), (float)((NW.y+SE.y)/2.));
+			gp.lineTo((float)(SE.x+plusGap), (float)((NW.y+SE.y)/2.));
+	        
+			return gp;
+		}
+		
+		if(currentStyle.equals(PSTricksConstants.SQUARE_STYLE) || 
+			currentStyle.equals(PSTricksConstants.FSQUARE_STYLE))
+			return new Rectangle2D.Double(NW.x+dec, NW.y+dec, Math.abs(NW.x-SE.x)-2*dec, Math.abs(NW.y - SE.y)-2*dec);
+		
+		if(currentStyle.equals(PSTricksConstants.TRIANGLE_STYLE) || 
+			currentStyle.equals(PSTricksConstants.FTRIANGLE_STYLE))
+			return createTriangle();
+		
+		if(currentStyle.equals(PSTricksConstants.DIAMOND_STYLE) || 
+			currentStyle.equals(PSTricksConstants.FDIAMOND_STYLE))
+			return createDiamond();
+		
+		if(currentStyle.equals(PSTricksConstants.PENTAGON_STYLE) || 
+			currentStyle.equals(PSTricksConstants.FPENTAGON_STYLE))
+			return createPentagon();
+		
+		if(currentStyle.equals(PSTricksConstants.X_STYLE))
+		{
+			GeneralPath gp = new GeneralPath();
+			
+			gp.moveTo((float)(NW.x+crossGap), (float)(NW.y+crossGap));
+			gp.lineTo((float)(SE.x-crossGap), (float)(SE.y-crossGap));
+			gp.moveTo((float)(SE.x-crossGap), (float)(NW.y+crossGap));
+			gp.lineTo((float)(NW.x+crossGap), (float)(SE.y-crossGap));
+	        
+			return gp;
+		}
+		
+		if(currentStyle.equals(PSTricksConstants.ASTERISK_STYLE))
+		{
+			double xCenter = (NW.x+SE.x)/2., yCenter = (NW.y+SE.y)/2.;
+			double radius = Math.abs((NW.y+width/10.)-(SE.y-width/10.))/2. + dec;
+			GeneralPath gp = new GeneralPath();
+			
+			gp.moveTo((float)((NW.x+SE.x)/2.), (float)(NW.y+width/10.)-dec);
+			gp.lineTo((float)((NW.x+SE.x)/2.), (float)(SE.y-width/10.)+dec);
+			gp.moveTo((float)((Math.cos(Math.PI/6.)*radius+xCenter)), (float)(radius/2. + yCenter));
+			gp.lineTo((float)(Math.cos(7*Math.PI/6.)*radius+xCenter), (float)(Math.sin(7*Math.PI/6.)*radius+yCenter));
+			gp.moveTo((float)(Math.cos(5*Math.PI/6.)*radius+xCenter), (float)(Math.sin(5*Math.PI/6.)*radius+yCenter));
+			gp.lineTo((float)(Math.cos(11*Math.PI/6.)*radius+xCenter), (float)(Math.sin(11*Math.PI/6.)*radius+yCenter));
+	        
+			return gp;
+		}
+		
+		return null;
+	}
+	
+	
+
+
+	@Override
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound) 
+	{
+		if(percent==1.) return ;
+
+		LaTeXDrawPoint2D NW = bound.getTheNWPoint(), SE = bound.getTheSEPoint(),farest;
+
+		if(Math.abs(newX-SE.x)<Math.abs(newX-NW.x))
+			  farest = NW;
+		else  farest = SE;
+
+		// We rescale the centre
+		center.x = farest.x+(center.x-farest.x)*percent;
+
+		updateDelimitor();
+		updateShape();
+		updateBorders();
+		updateGravityCenter();
+	}
+
+
+
+
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound) 
+	{
+		if(percent==1.) return ;
+
+		LaTeXDrawPoint2D NW = bound.getTheNWPoint(), SE = bound.getTheSEPoint(),farest;
+
+		if(Math.abs(newY-SE.y)<Math.abs(newY-NW.y))
+			  farest = NW;
+		else  farest = SE;
+
+		// We rescale the centre
+		center.y = farest.y+(center.y-farest.y)*percent;
+
+		updateDelimitor();
+		updateShape();
+		updateBorders();
+		updateGravityCenter();
+	}
+	
+	
+	
+	
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		interiorColor = (Color) ois.readObject();
+		lineStyle = (String) ois.readObject();
+		rotationAngle = ois.readDouble();
+		thickness = ois.readFloat();
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color) ois.readObject();
+		
+		barGap = ois.readDouble();
+		barThickness = ois.readDouble();
+		crossGap = ois.readDouble();
+		plusGap = ois.readDouble();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		width = ois.readFloat();
+		center = (LaTeXDrawPoint2D) ois.readObject();
+		currentStyle = (String) ois.readObject();
+		
+		d = new Delimitor();
+		updateDelimitor();
+		updateShape();
+		gravityCenter = new LaTeXDrawPoint2D();
+		borders = new LaTeXDrawRectangle(false);
+		updateGap();
+		updateStyleOfDelimitors();
+		updateShape();
+		updateBorders();
+		updateGravityCenter();
+		updateCanBeFilled();
+	}
+
+
+
+	@Override
+	public void updateShape()
+	{
+		shape = createShape2D();
+	}
+
+
+
+	
+
+	@Override
+	public boolean isTooSmallToBeRescaled()
+	{
+		return false;
+	}
+
+
+
+
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		LaTeXDrawPoint2D tmp = (LaTeXDrawPoint2D)borders.gravityCenter.horizontalSymmetry(origin);
+		shift(borders.gravityCenter, tmp);
+		rotationAngle=2*Math.PI-rotationAngle;
+		updateBorders();
+		updateShape();
+		updateDelimitor();
+		updateGravityCenter();
+	}
+
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		LaTeXDrawPoint2D tmp = (LaTeXDrawPoint2D)borders.gravityCenter.verticalSymmetry(origin);
+		shift(borders.gravityCenter, tmp);
+		setRotationAngle(2*Math.PI-rotationAngle);
+		updateBorders();
+		updateShape();
+		updateDelimitor();
+		updateGravityCenter();
+	}
+
+
+
+
+	@Override
+	public synchronized LaTeXDrawPoint2D getLastPoint()
+	{
+		return null;
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		center.setLocation(grid.getTransformedPointToGrid(center, false));
+		updateDelimitor();
+		updateBorders();
+		updateShape();
+		updateGravityCenter();
+	}
+
+
+
+
+	@Override
+	public int getSelectedDelimitorOrientation()
+	{
+		int del = super.getSelectedDelimitorOrientation();
+		
+		if(del!=DELIMITOR_ORIENTATION_NONE)
+			return del;
+		
+		return DELIMITOR_ORIENTATION_NE;
+	}
+
+
+
+	/**
+	 * Set the centre. Warning: change the pointer, the former is replace by the newer,
+	 * the method {@link Point#setLocation(double, double)} is not used.
+	 * @param centre
+	 * @exception IllegalArgumentException If centre is null.
+	 * @since 1.9
+	 * @see #setCenter(double, double)
+	 */
+	public synchronized void setCenter(LaTeXDrawPoint2D centre)
+	{
+		if(centre==null)
+			throw new IllegalArgumentException();
+		
+		this.center = centre;
+		updateDelimitor();
+		updateBorders();
+		updateShape();
+		updateGravityCenter();
+	}
+	
+	
+	
+	/**
+	 * Set the centre.
+	 * @param x The new X-coordinate
+	 * @param y The new Y-coordinate
+	 * @since 1.9
+	 */
+	public synchronized void setCenter(double x, double y)
+	{
+		center.setLocation(x, y);
+		updateDelimitor();
+		updateBorders();
+		updateShape();
+		updateGravityCenter();
+	}
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()^(int)width;
+	}
+	
+	
+	
+	/**
+	 * Define if the dot can be filled or not (depends of its current shape).
+	 * @since 1.9
+	 */
+	public void updateCanBeFilled()
+	{
+		String current = getCurrentStyle();
+		
+		canBeFilled = current.equals(PSTricksConstants.DIAMOND_STYLE) ||
+						current.equals(PSTricksConstants.PENTAGON_STYLE) ||
+						current.equals(PSTricksConstants.SQUARE_STYLE) ||
+						current.equals(PSTricksConstants.TRIANGLE_STYLE) ||
+						currentStyle.equals(PSTricksConstants.O_STYLE);
+		
+		isFilled = canBeFilled || current.equals(PSTricksConstants.FDIAMOND_STYLE) ||
+					current.equals(PSTricksConstants.FPENTAGON_STYLE) ||
+					current.equals(PSTricksConstants.FSQUARE_STYLE) ||
+					current.equals(PSTricksConstants.FTRIANGLE_STYLE);
+	}
+	
+	
+	
+	
+	@Override
+	public boolean isFilled()
+	{
+		return canBeFilled && isFilled;
+	}
+	
+	
+	
+	@Override
+	public synchronized Shape createShape2D()
+	{
+		Shape area = createNonRotatedShape2D();
+
+		if((rotationAngle % (2*PI)) != 0)
+		{
+			LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+			double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+			double c2x = cos(rotationAngle)*cx - sin(rotationAngle)*cy;
+			double c2y = sin(rotationAngle)*cx + cos(rotationAngle)*cy;
+			AffineTransform at = AffineTransform.getTranslateInstance(cx - c2x, cy - c2y);
+			at.rotate(rotationAngle);
+			area = at.createTransformedShape(area);
+		}
+
+		return area;
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void updateGravityCenter()
+	{
+		if(gravityCenter==null)
+			gravityCenter = new LaTeXDrawPoint2D();
+		
+		gravityCenter.setLocation(center);
+	}
+	
+	
+	
+	
+	@Override
+	public void rotate(LaTeXDrawPoint2D gravityC, double angle)
+	{
+		if(!gravityC.equals(borders.gravityCenter))
+		{// We must rotate the position of the figure
+			LaTeXDrawPoint2D rotGC = rotatePoint(borders.gravityCenter, gravityC, angle);
+			shift(borders.gravityCenter, rotGC);
+			updateGravityCenter();
+		}
+		
+		setRotationAngle(rotationAngle+angle);
+	}
+
+
+	/**
+	 * @return the crossGap.
+	 * @since 2.0.0
+	 */
+	public synchronized double getCrossGap()
+	{
+		return crossGap;
+	}
+
+
+	/**
+	 * @return the plusGap.
+	 * @since 2.0.0
+	 */
+	public synchronized double getPlusGap()
+	{
+		return plusGap;
+	}
+
+
+	/**
+	 * @return the barGap.
+	 * @since 2.0.0
+	 */
+	public synchronized double getBarGap()
+	{
+		return barGap;
+	}
+
+
+	/**
+	 * @return the barThickness.
+	 * @since 2.0.0
+	 */
+	public synchronized double getBarThickness()
+	{
+		return barThickness;
+	}
+}
diff --git a/current/latexDraw/figures/Draw.java b/current/latexDraw/figures/Draw.java
new file mode 100644
index 0000000..d079466
--- /dev/null
+++ b/current/latexDraw/figures/Draw.java
@@ -0,0 +1,2124 @@
+package latexDraw.figures;
+
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.Shape;
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.LinkedList;
+import java.util.Vector;
+
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Draw extends Figure
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** All the figures which constitute the drawing. */
+	protected Vector<Figure> figures;
+	
+	/** Defines the borders of the draw without taking account of the thickness of the figures. */
+	protected LaTeXDrawRectangle minBorders;
+
+	/** True: the figures of the drawing must be drawn (and the method get code get there code. */
+	protected boolean drawFigures;
+	
+	/** The point is useful to rotate the selection. */
+	protected transient LaTeXDrawPoint2D formerGravityC = null;
+	
+	/** The value by default of the attribute drawFigure */
+	public static final boolean DEFAULT_DRAWFIGURE = false;
+	
+	
+	
+	
+	/**
+	 * The constructor by default.
+	 */
+	public Draw(boolean drawFigures, boolean increaseMeter)
+	{
+		this(null, drawFigures, increaseMeter);
+	}
+	
+	
+	
+	public Draw(Vector<Figure> figs, boolean drawFigures, boolean increaseMeter, boolean cloneFigures)
+	{
+		super(increaseMeter);
+		
+		canHaveShadow = true;
+		isResizable = true;
+		isBordersMovable = true;
+		isDashableOrDotable  = true;
+		isDoubleBoundaryable = true;
+		this.drawFigures = drawFigures;
+		canBeFilled     = true;
+		isCustomizable  = true;
+		isThicknessable = true;
+		
+		initializeBorders();
+		figures = new Vector<Figure>();
+		
+		if(figs!=null)
+			if(cloneFigures)
+			{
+				for(Figure f : figs)
+					if(f!=null)
+						try { addFigure((Figure)f.clone()); }
+						catch(CloneNotSupportedException e) { e.printStackTrace(); }
+			}
+			else
+				for(Figure f : figs)
+					if(f!=null)
+						addFigure(f);
+		
+		shape = createShape2D();
+	}
+	
+	
+	
+	public Draw(Vector<Figure> figs, boolean drawFigures, boolean increaseMeter)
+	{
+		this(figs, drawFigures, increaseMeter, false);
+	}
+	
+	
+	
+
+	/**
+	 * Initialise the minBorders and the borders (colour, style, ...).
+	 */
+	protected void initializeBorders()
+	{	
+		if(minBorders==null)
+			minBorders = new LaTeXDrawRectangle(false);
+		
+		if(borders==null)
+			borders = new LaTeXDrawRectangle(false);
+		
+		borders.setLinesColor(Color.gray);
+		borders.setLineStyle(PSTricksConstants.LINE_DASHED_STYLE);
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to add a figure to the drawing.
+	 * @param f The figure to add.
+	 * @throws IllegalArgumentException If f is null.
+	 */
+	public void addFigure(Figure f)
+	{
+		if(f==null)
+			throw new IllegalArgumentException("f is null.");//$NON-NLS-1$
+		
+		f.onRelease();
+		figures.add(f);
+		updateBorders();
+		updateGravityCenter();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to add a figure to the drawing at a given position.
+	 * @param f The figure to add.
+	 * @param index THe position where insert the figure.
+	 * @throws IllegalArgumentException If f is null or if the index is bad.
+	 */
+	public void addFigure(Figure f, int index)
+	{
+		if(index<0 || (index>=figures.size() && index>0))
+			throw new IllegalArgumentException("Bad index.");//$NON-NLS-1$
+		
+		if(f==null)
+			throw new IllegalArgumentException("f is null.");//$NON-NLS-1$
+		
+		f.onRelease();
+		figures.add(index, f);
+		updateBorders();
+		updateGravityCenter();
+	}
+	
+	
+
+
+
+	@Override
+	public synchronized void setOnRotation(boolean on)
+	{
+		super.setOnRotation(on);
+		int i, size=figures.size();
+		
+		for(i=0; i<size; i++)
+			figures.elementAt(i).setOnRotation(on);
+		
+		if(!on)
+		{
+			borders.rotationAngle = 0;
+			updateBorders();
+			updateGravityCenter();
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to remove a figure of the drawing.
+	 * @param f The figure to remove.
+	 */
+	public void removeFigure(Figure f)
+	{
+		if(f!=null && figures.contains(f))
+		{
+			figures.remove(f);
+			updateBorders();
+		}
+	}
+
+
+	/**
+	 * Allows to remove a figure of the drawing.
+	 * @param id the position of the figure in the vector.
+	 * @exception IllegalArgumentException if the <code>id</code> is invalid.
+	 * @return The deleted figure.
+	 * @since 1.9.1
+	 */
+	public Figure removeFigureAt(int id)
+	{
+		if(id<0 || id>=figures.size())
+			throw new IllegalArgumentException();
+		
+		Figure f = figures.remove(id);
+		updateBorders();
+		
+		return f;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update the dimension and the position of the borders of the drawing.
+	 */
+	public void updateBorders()
+	{
+		if(minBorders==null) initializeBorders();
+		if(borders==null) initializeBorders();
+		
+		if(figures.isEmpty())
+		{
+			borders.setFirstPoint(0, 0);
+			borders.setLastPoint(0, 0);
+			minBorders.setFirstPoint(0, 0);
+			minBorders.setLastPoint(0, 0);
+		}
+		else
+		{
+			int size = figures.size(), i;
+			LaTeXDrawPoint2D NW, SE, NW2, SE2;
+			LaTeXDrawPoint2D NWb, SEb, NW2b, SE2b;
+			Figure f = figures.firstElement();
+
+			NW = (LaTeXDrawPoint2D) f.getTheNWBoundPoint().clone();
+			SE = (LaTeXDrawPoint2D) f.getTheSEBoundPoint().clone();
+			
+			if(f instanceof Draw)
+			{
+				NWb = (LaTeXDrawPoint2D)((Draw)f).minBorders.getTheNWPoint().clone();
+				SEb = (LaTeXDrawPoint2D)((Draw)f).minBorders.getTheSEPoint().clone();
+			}
+			else
+			{
+				NWb = (LaTeXDrawPoint2D) f.getTheNWPoint().clone();
+				SEb = (LaTeXDrawPoint2D) f.getTheSEPoint().clone();
+			}
+
+			for(i=1; i<size; i++)
+			{
+				f = figures.elementAt(i);
+
+				NW2 = f.getTheNWBoundPoint();
+				SE2 = f.getTheSEBoundPoint();
+				
+				if(f instanceof Draw)
+				{
+					NW2b = (LaTeXDrawPoint2D)((Draw)f).minBorders.getTheNWPoint().clone();
+					SE2b = (LaTeXDrawPoint2D)((Draw)f).minBorders.getTheSEPoint().clone();
+				}
+				else
+				{
+					NW2b = (LaTeXDrawPoint2D) f.getTheNWPoint().clone();
+					SE2b = (LaTeXDrawPoint2D) f.getTheSEPoint().clone();
+				}
+				
+				if(NW2.x<NW.x) NW.x = NW2.x;
+				if(NW2.y<NW.y) NW.y = NW2.y;
+				if(SE2.x>SE.x) SE.x = SE2.x;
+				if(SE2.y>SE.y) SE.y = SE2.y;
+				
+				if(NW2b.x<NWb.x) NWb.x = NW2b.x;
+				if(NW2b.y<NWb.y) NWb.y = NW2b.y;
+				if(SE2b.x>SEb.x) SEb.x = SE2b.x;
+				if(SE2b.y>SEb.y) SEb.y = SE2b.y;
+			}
+			
+			borders.setFirstPoint(NW.x, NW.y);
+			borders.setLastPoint(SE);
+			minBorders.setFirstPoint(NWb);
+			minBorders.setLastPoint(SEb);
+			shape = createShape2D();
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public void onDragged(Point formerPt, Point newPt) throws Exception 
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		int i, size = figures.size();
+		
+		if(figures.size()==1 && !drawFigures)
+		{
+			figures.firstElement().onDragged(formerPt, newPt);
+			updateBorders();
+			updateGravityCenter();
+			return;
+		}
+		
+		if(borders.dSelected!=null)
+		{
+			if(isOnRotation)
+			{
+				double angle = computeRotationAngle(formerPt, newPt);
+				
+				rotationAngle+=angle;
+				rotationAngle%=(2*Math.PI);
+				
+				if(formerGravityC==null)
+					throw new IllegalArgumentException("beginRotate must be called before to initialise the rotation"); //$NON-NLS-1$
+				
+				for(i=0; i<size; i++)
+					figures.elementAt(i).rotate(formerGravityC, angle);
+				
+				return ;
+			}
+			
+			if((borders.dSelected==borders.dNE || borders.dSelected==borders.dNW ||
+				borders.dSelected==borders.dN) && newPt.y>=borders.dS.getY()) 
+					return ;
+			if((borders.dSelected==borders.dSE || borders.dSelected==borders.dSW ||
+				borders.dSelected==borders.dS) && newPt.y<=borders.dN.getY()) 
+					return ;
+			if((borders.dSelected==borders.dSE || borders.dSelected==borders.dNE ||
+				borders.dSelected==borders.dE) && newPt.x<=borders.dW.getX()) 
+					return ;
+			if((borders.dSelected==borders.dSW || borders.dSelected==borders.dNW ||
+				borders.dSelected==borders.dW) && newPt.x>=borders.dE.getX()) 
+					return ;
+				
+			boolean rescalable;
+			Figure f;
+
+			if(borders.dSelected==borders.dE || borders.dSelected==borders.dNE || borders.dSelected==borders.dSE)
+			{
+				
+				double dEx = borders.dE.getX(), dWx = borders.dW.getX();
+				double percent = Math.abs((newPt.x-dWx)/(dEx-dWx));
+				rescalable = true;
+				i=0;
+
+				while(i<size && rescalable)
+				{
+					f = getFigureAt(i);
+					if(f.isResizable())
+					{
+						if(f.isTooSmallToBeRescaled() && dEx>=newPt.x)
+							rescalable = false;
+					}
+					else rescalable = false;
+					i++;
+				}
+
+				// The user must not be able to reduce too much to figure
+				if(rescalable)
+					rescaleX(minBorders.getTheSEPoint().x, 
+						minBorders.getTheSEPoint().x+dEx-newPt.x, percent, minBorders);
+			}
+			if(borders.dSelected==borders.dW || borders.dSelected==borders.dNW || borders.dSelected==borders.dSW)
+			{
+				double dEx = borders.dE.getX(), dWx = borders.dW.getX();
+				double percent = Math.abs((newPt.x-dEx)/(dWx-dEx));
+				rescalable = true;							
+				i=0;
+				
+				while(i<size && rescalable)
+				{
+					f = getFigureAt(i);
+					if(f.isResizable())
+					{
+						if(f.isTooSmallToBeRescaled() && dWx<=newPt.x)
+							rescalable = false;
+					}
+					else rescalable = false;
+					i++;
+				}
+				
+				if(rescalable)
+					rescaleX(minBorders.getTheNWPoint().x, 
+							minBorders.getTheNWPoint().x+dWx-newPt.x, percent, minBorders);
+			}
+			if(borders.dSelected==borders.dN || borders.dSelected==borders.dNW || borders.dSelected==borders.dNE)
+			{
+				double dNy = borders.dN.getY(), dSy = borders.dS.getY();
+				double percent = Math.abs((newPt.y-dSy)/(dNy-dSy));
+				rescalable = true;	
+				i=0;
+				
+				while(i<size && rescalable)
+				{
+					f = getFigureAt(i);
+					if(f.isResizable())
+					{
+						if(f.isTooSmallToBeRescaled() && dNy<=newPt.y)
+							rescalable = false;
+					}
+					else rescalable = false;
+					i++;
+				}
+				
+				if(rescalable)
+				//	 The user must not be able to reduce too much to figure
+					rescaleY(minBorders.getTheNWPoint().y, 
+							minBorders.getTheNWPoint().y, percent, minBorders);
+			}
+			if(borders.dSelected==borders.dS || borders.dSelected==borders.dSW || borders.dSelected==borders.dSE)
+			{
+				double dNy = borders.dN.getY(), dSy = borders.dS.getY();
+				double percent = Math.abs((newPt.y-dNy)/(dSy-dNy));
+				rescalable = true;	
+				i=0;
+				
+				while(i<size && rescalable)
+				{
+					f = getFigureAt(i);
+					if(f.isResizable())
+					{
+						if(f.isTooSmallToBeRescaled() && dSy>=newPt.y)
+							rescalable = false;
+					}
+					else rescalable = false;
+					i++;
+				}
+				
+				if(rescalable)
+				//	 The user must not be able to reduce too much to figure
+					rescaleY(minBorders.getTheSEPoint().y, 
+								minBorders.getTheSEPoint().y-dSy+newPt.y, percent, minBorders);
+			}
+		}//if(borders.dSelected==null)
+		else
+			for(i=0; i<size; i++)
+				figures.elementAt(i).onDragged(formerPt, newPt);
+
+		updateBorders();
+		updateGravityCenter();
+	}
+
+	
+	
+	
+	
+	/**
+	 * Allows to know if a figure is in the drawing.
+	 * @param f The figure that we want to know if it's in the drawing .
+	 * @return True if the figure is in the drawing.
+	 */
+	public boolean contains(Figure f)
+	{
+		if(f!=null)
+			return figures.contains(f);
+		return false;
+	}
+	
+
+
+
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		if(drawFigures)
+		{
+			int i, size = size();
+			
+			for(i=0; i<size; i++)
+				figures.elementAt(i).draw(g, antiAlias, rendering, alphaInter, colorRendering);
+		}
+		
+		if(figures.size()>1 && isSelected && borders!=null)
+			borders.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+
+
+
+
+	/**
+	 * Allows to know if there is a figure in the drawing.
+	 * @return True if there is at least one figure in the drawing.
+	 */
+	public boolean isEmpty()
+	{
+		return figures.isEmpty();
+	}
+
+
+
+
+
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt) 
+	{
+		int i, size = figures.size();
+		boolean in = false;
+		
+		for(i=0; i<size && !in; i++)
+			in = figures.elementAt(i).isIn(pt);
+
+		if(in) return true;
+		
+		return borders.isIn(pt);
+	}
+
+	
+	
+	
+	
+	/**
+	 * Allows to get the figure which contains the point <code>point</code>.
+	 * @param pt The point of reference.
+	 * @return The figure which contains the point.
+	 */
+	public Figure whereIsIt(Point pt) 
+	{
+		int i, size = figures.size();
+		boolean here = false;
+		
+		for(i=0; i<size && !here; i++)
+			here = figures.elementAt(i).isIn(pt);
+		
+		if(here) return figures.elementAt(i-1);
+		return null;
+			
+	}
+	
+	
+	
+	/**
+	 * Allows to get the figure placed at the position <code>id</code> in the vector <code>Figures</code>.
+	 * @param id The position of the figure in the vector Figures.
+	 * @return The figure corresponding to the identifier.
+	 */
+	public Figure getFigureAt(int id)
+	{
+		if(id<0 || id>=figures.size())
+			throw new ArrayIndexOutOfBoundsException(id);
+		
+		return figures.elementAt(id);
+	}
+	
+	
+	
+	/**
+	 * Allows to get the number of figures which contains the drawing.
+	 * @return The number of figures in the drawing.
+	 */
+	public int size()
+	{
+		return figures.size();
+	}
+	
+	
+	
+	
+	
+	@Override
+	public String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		int i, size = figures.size();
+		if(drawFigures && size>0)
+		{
+			String code=""; //$NON-NLS-1$
+			
+			for(i=0; i<size-1; i++)
+				code+=figures.elementAt(i).getCodePSTricks(drawBorders, ppc)+"\n"; //$NON-NLS-1$
+			code+= figures.lastElement().getCodePSTricks(drawBorders, ppc);
+			
+			return code;
+		}
+
+		return null;
+	}
+
+	
+	
+	@Override
+	public void onClick(Point pt) 
+	{
+		super.onClick(pt);
+
+		if(!drawFigures && size()==1)
+				figures.elementAt(0).onClick(pt);
+	}
+
+	
+	
+	@Override
+	public void onRelease() 
+	{
+		super.onRelease();		
+		
+		int i,size=figures.size();
+		
+		for(i=0; i<size; i++)
+			figures.elementAt(i).onRelease();
+	}
+
+	
+	
+	@Override
+	public void onDelimitorRelease()
+	{
+		super.onDelimitorRelease();	
+		
+		int i,size=figures.size();
+		
+		for(i=0; i<size; i++)
+			figures.elementAt(i).onDelimitorRelease();
+	}
+	
+	
+
+
+	@Override
+	public void shift(double shiftX, double shiftY)
+	{
+		if(shiftX==0 && shiftY==0) return ;
+		
+		for(Figure f: figures)
+			f.shift(shiftX, shiftY);
+		
+		updateBorders();
+		updateGravityCenter();
+	}
+
+
+	
+	@Override
+	public synchronized void setSelected(boolean state)
+	{
+		super.setSelected(state);
+
+		if(drawFigures || !state)
+			for(Figure f : figures)
+				f.setSelected(false);
+		else
+			if(size()>=1)
+				figures.firstElement().setSelected(size()==1);
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setRotationAngle(double theta)
+	{
+		double angle = theta - rotationAngle;
+		super.setRotationAngle(theta);
+		
+		if(drawFigures)
+		{
+			int i, size = figures.size();
+			
+			for(i=0; i<size; i++)
+				figures.elementAt(i).rotate(gravityCenter, angle);
+		}
+		
+		borders.setRotationAngle(0);
+		updateBorders();
+		updateGravityCenter();
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setLastPoint(double x, double y) 
+	{
+		updateGravityCenter();
+	}
+
+	
+	
+	
+	@Override
+	public synchronized void setFirstPoint(double x, double y) 
+	{
+		updateGravityCenter();
+	}
+	
+	
+	
+	/**
+	 * Allows to clear the drawing: remove and unselect all the figures of the vector <code>figures</code>.
+	 */
+	public void clear()
+	{
+		setSelected(false);
+		figures.removeAllElements();
+		shape = createShape2D();
+	}
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Draw d = (Draw) super.clone();
+		d.drawFigures = drawFigures;
+		
+		int i, size = size();
+		d.figures = new Vector<Figure>();
+
+		for(i=0; i<size; i++)
+			d.addFigure((Figure) getFigureAt(i).clone());
+
+		d.borders = (LaTeXDrawRectangle) borders.clone();
+		d.updateBorders();
+		d.updateGravityCenter();
+
+		return d;
+	}
+
+
+
+
+	@Override
+	public void updateGravityCenter() 
+	{
+		LaTeXDrawPoint2D nw = new LaTeXDrawPoint2D(Double.MAX_VALUE, Double.MAX_VALUE);
+		LaTeXDrawPoint2D se = new LaTeXDrawPoint2D(Double.MIN_VALUE, Double.MIN_VALUE);
+		LaTeXDrawPoint2D nw2, se2;
+		
+		for(Figure f : figures)
+		{
+			nw2 = f.getTheNWRotatedPoint();
+			se2 = f.getTheSERotatedPoint();
+			
+			if(nw2.x<nw.x) nw.x = nw2.x;
+			if(nw2.y<nw.y) nw.y = nw2.y;
+			if(se2.x>se.x) se.x = se2.x;
+			if(se2.y>se.y) se.y = se2.y;
+		}
+		
+		gravityCenter.x = (nw.x+se.x)/2.;
+		gravityCenter.y = (nw.y+se.y)/2.;
+	}
+
+
+
+
+	@Override
+	public void updateStyleOfDelimitors() 
+	{
+		super.updateStyleOfDelimitors();
+		
+		for(int i=0, size=figures.size(); i<size; i++)
+			figures.elementAt(i).updateStyleOfDelimitors();
+	}
+
+
+
+
+	@Override
+	public boolean intersected(Rectangle2D.Double r) 
+	{
+		boolean inter = false;
+		int i=0, size = figures.size();
+		
+		while(!inter && i<size)
+			if(figures.elementAt(i).intersected(r))
+					inter = true;
+			else i++;
+
+		return inter;
+	}
+
+
+
+
+
+	@Override
+	public Shape createShape2D() 
+	{
+		return borders.shape;
+	}
+
+
+
+
+
+	@Override
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound) 
+	{
+		if(percent==1.) return ;
+		if(bound==null) throw new IllegalArgumentException();
+		
+		int i, size = figures.size();
+		
+		for(i=0; i<size; i++)
+			figures.elementAt(i).rescaleX(formerX, newX, percent, bound);
+		
+		updateBorders();
+	}
+
+
+
+
+
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound) 
+	{
+		if(percent==1.) return ;
+		if(bound==null) throw new IllegalArgumentException();
+		
+		int i, size = figures.size();
+		
+		for(i=0; i<size; i++)
+			figures.elementAt(i).rescaleY(formerY, newY, percent, bound);
+		
+		updateBorders();
+	}
+
+	
+	
+	
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		rotationAngle = ois.readDouble();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		borders =(LaTeXDrawRectangle) ois.readObject();
+
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")<0) //$NON-NLS-1$
+			ois.readDouble();
+		figures = (Vector<Figure>) ois.readObject();
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0)//$NON-NLS-1$
+			drawFigures = ois.readBoolean();
+		else
+		{
+			ois.readObject();
+			drawFigures = DEFAULT_DRAWFIGURE;
+		}
+			
+		updateStyleOfDelimitors();
+		canBeFilled = false;	
+		initializeBorders();
+		
+		if(linesColor==null)
+		{
+			linesColor 		= DEFAULT_BORDERS_COL;
+			doubleColor 	= DEFAULT_DOUBLE_COLOR;
+			interiorColor 	= DEFAULT_INTERIOR_COL;
+			hatchingColor	= DEFAULT_HATCH_COL;
+			gradientEndColor	= PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor	= PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			shadowColor		= DEFAULT_SHADOW_COLOR;
+		}
+	}
+
+
+	
+	/**
+	 * @return Returns the drawFigures.
+	 */
+	public boolean isDrawFigures()
+	{
+		return drawFigures;
+	}
+
+
+
+
+	/**
+	 * @param drawFigures The drawFigures to set.
+	 */
+	public synchronized void setDrawFigures(boolean drawFigures)
+	{
+		this.drawFigures = drawFigures;
+	}
+
+
+
+	@Override
+	public Shape createNonRotatedShape2D()
+	{
+		return borders.createNonRotatedShape2D();
+	}
+
+
+
+
+	@Override
+	@Deprecated
+	public void updateShape()
+	{
+		/* The shape is not used by a drawing. */
+	}
+
+
+
+	/**
+	 * @return the minBorders.
+	 */
+	public LaTeXDrawRectangle getMinBorders()
+	{
+		return minBorders;
+	}
+
+
+
+
+	/**
+	 * @param minBorders the minBorders to set.
+	 */
+	public void setMinBorders(LaTeXDrawRectangle minBorders)
+	{
+		this.minBorders = minBorders;
+	}
+
+
+
+
+	@Override
+	public boolean isTooSmallToBeRescaled()
+	{
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+
+
+	@Override
+	public void rotate(LaTeXDrawPoint2D gravityC, double angle)
+	{
+		for(Figure f : figures)
+			f.rotate(gravityC, angle);
+		
+		updateBorders();
+	}
+
+
+
+
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		for(Figure f : figures)
+			f.mirrorHorizontal(origin);
+		
+		updateBorders();
+		updateGravityCenter();
+	}
+
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		for(Figure f : figures)
+			f.mirrorVertical(origin);
+		
+		updateBorders();
+		updateGravityCenter();
+	}
+
+
+
+
+	@Override
+	public synchronized LaTeXDrawPoint2D getLastPoint()
+	{
+		return null;
+	}
+	
+
+	
+	
+	/**
+	 * @since 1.9
+	 * @return The figures of the drawing.
+	 */
+	public synchronized Vector<Figure> getFigures()
+	{
+		return figures;
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		for(Figure figure : figures)
+			figure.updateToGrid(grid);
+		
+		updateBorders();
+	}
+
+
+
+
+	@Override
+	public int getSelectedDelimitorOrientation()
+	{
+		if(size()==1)
+			return getFigureAt(0).getSelectedDelimitorOrientation();
+		
+		return borders.getSelectedDelimitorOrientation();
+	}
+
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()^5;
+	}
+	
+	
+	
+	
+	/**
+	 * This method must be called before each rotation of the selection. Initialize the rotation.
+	 * @since 1.9
+	 */
+	public void beginRotation()
+	{
+		updateGravityCenter();
+		formerGravityC = (LaTeXDrawPoint2D)gravityCenter.clone();
+		
+		if(!drawFigures)
+			for(Figure f : figures)
+				if(f instanceof Draw)
+					((Draw)f).beginRotation();
+	}
+	
+	
+
+	/**
+	 * This method must be called after each rotation of the selection. Deinitialize the rotation.
+	 * @since 1.9
+	 */
+	public void endRotation()
+	{
+		updateGravityCenter();
+		updateBorders();
+		formerGravityC = null;
+		
+		if(!drawFigures)
+			for(Figure f : figures)
+				if(f instanceof Draw)
+					((Draw)f).endRotation();
+	}
+
+
+	@Override
+	public synchronized float getThickness()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.getThickness();
+		
+		return figures.firstElement().getThickness();
+	}
+
+
+
+
+	@Override
+	public synchronized void setThickness(float value)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				f.setThickness(value);
+	}
+
+
+
+
+	@Override
+	public synchronized Color getDoubleColor()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.getDoubleColor();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).isDoubleBoundaryable())
+				ok = false;
+			else
+				i++;
+		
+		if(!ok && size>1)
+			return figures.elementAt(i).getDoubleColor();
+			
+		return figures.firstElement().getDoubleColor();
+	}
+
+
+
+
+	@Override
+	public synchronized Color getGradientEndColor()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.getGradientEndColor();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).canBeHatched())
+				ok = false;
+			else
+				i++;
+		
+		if(!ok && size>1)
+			return figures.elementAt(i).getGradientEndColor();
+			
+		return figures.firstElement().getGradientEndColor();
+	}
+
+
+
+
+	@Override
+	public synchronized Color getGradientStartColor()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.getGradientStartColor();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).canBeHatched())
+				ok = false;
+			else
+				i++;
+		
+		if(!ok && size>1)
+			return figures.elementAt(i).getGradientStartColor();
+		
+		return figures.firstElement().getGradientStartColor();
+	}
+
+
+
+
+	@Override
+	public synchronized Color getHatchingColor()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.getHatchingColor();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).canBeHatched())
+				ok = false;
+			else
+				i++;
+		
+		if(!ok && size>1)
+			return figures.elementAt(i).getHatchingColor();
+		
+		return figures.firstElement().getHatchingColor();
+	}
+
+
+
+
+	@Override
+	public synchronized String getHatchingStyle()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.getHatchingStyle();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).canBeHatched())
+				ok = false;
+			else
+				i++;
+
+		if(!ok && size>1)
+			return figures.elementAt(i).getHatchingStyle();
+
+		return figures.firstElement().getHatchingStyle();
+	}
+
+
+
+
+	@Override
+	public synchronized Color getInteriorColor()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.getInteriorColor();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).canBeFilled())
+				ok = false;
+			else
+				i++;
+		
+		if(!ok && size>1)
+			return figures.elementAt(i).getInteriorColor();
+			
+		return figures.firstElement().getInteriorColor();
+	}
+
+
+
+
+	@Override
+	public synchronized Color getLinesColor()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.getLinesColor();
+		
+		return figures.firstElement().getLinesColor();
+	}
+
+
+
+
+	@Override
+	public synchronized String getLineStyle()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.getLineStyle();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).isDashableOrDotable())
+				ok = false;
+			else
+				i++;
+		
+		if(!ok && size>1)
+			return figures.elementAt(i).getLineStyle();
+			
+		return figures.firstElement().getLineStyle();
+	}
+
+
+
+
+	@Override
+	public synchronized boolean hasDoubleBoundary()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.hasDoubleBoundary();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).isDoubleBoundaryable())
+				ok = false;
+			else
+				i++;
+		
+		if(!ok && size>1)
+			return figures.elementAt(i).hasDoubleBoundary();
+					
+		return figures.firstElement().hasDoubleBoundary();
+	}
+
+
+
+
+	@Override
+	public synchronized boolean hasShadow()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.hasShadow();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).canHaveShadow())
+				ok = false;
+			else
+				i++;
+		
+		if(!ok && size>1)
+			return figures.elementAt(i).hasShadow();
+		
+		return figures.firstElement().hasShadow();
+	}
+
+
+
+
+	@Override
+	public synchronized boolean isFilled()
+	{
+		if(figures==null || figures.isEmpty())
+			return super.isFilled();
+		
+		int i=0, size = figures.size();
+		boolean ok=true;
+		
+		while(ok && i<size)
+			if(figures.elementAt(i).canBeFilled())
+				ok = false;
+			else
+				i++;
+		
+		if(!ok && size>1)
+			return figures.elementAt(i).isFilled();
+
+		return figures.firstElement().isFilled();
+	}
+
+
+	
+	@Override
+	public String toString()
+	{
+		String str = "["; //$NON-NLS-1$
+		
+		for(int i=0, size=figures.size()-1; i<size; i++)
+			str += figures.elementAt(i).getClass().getName() + '(' + figures.elementAt(i).getNumber() + "), " ;  //$NON-NLS-1$
+		
+		if(!figures.isEmpty())
+			str += figures.lastElement().getClass().getCanonicalName() + '(' + figures.lastElement().getNumber() + ")" ; //$NON-NLS-1$
+		
+		return str + ']';
+	}
+	
+	
+
+
+	@Override
+	public synchronized void setDoubleColor(Color doublecolor)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.isDoubleBoundaryable())
+					f.setDoubleColor(doublecolor);
+	}
+
+
+
+
+	@Override
+	public synchronized void setGradientEndColor(Color gradientEndColor)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.canBeFilled())
+					f.setGradientEndColor(gradientEndColor);
+	}
+
+
+
+
+	@Override
+	public synchronized void setGradientStartColor(Color gradientStartColor)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.canBeFilled())
+					f.setGradientStartColor(gradientStartColor);
+	}
+
+
+
+
+	@Override
+	public synchronized void setHasDoubleBoundary(boolean hasDoubleBoundary)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.isDoubleBoundaryable())
+					f.setHasDoubleBoundary(hasDoubleBoundary);
+	}
+
+
+
+
+	@Override
+	public synchronized void setHasShadow(boolean hasShadow)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.canHaveShadow())
+					f.setHasShadow(hasShadow);
+	}
+
+
+
+
+	@Override
+	public synchronized void setHatchingColor(Color color)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.canBeHatched())
+					f.setHatchingColor(color);
+	}
+
+
+
+
+	@Override
+	public synchronized void setHatchingStyle(String style)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.canBeHatched())
+					f.setHatchingStyle(style);
+	}
+
+
+
+
+	@Override
+	public synchronized void setInteriorColor(Color c)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.canBeFilled())
+					f.setInteriorColor(c);
+	}
+
+
+
+
+	@Override
+	public synchronized void setLinesColor(Color c)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				f.setLinesColor(c);
+	}
+
+
+
+
+	@Override
+	public synchronized void setLineStyle(String style)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.isDashableOrDotable())
+					f.setLineStyle(style);
+	}
+
+
+
+
+	@Override
+	public synchronized void setShadowColor(Color shadowColor)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.canHaveShadow())
+					f.setShadowColor(shadowColor);
+	}
+	
+	
+	
+	@Override
+	public synchronized void setIsFilled(boolean filled)
+	{
+		if(figures!=null)
+			for(Figure f : figures)
+				if(f.canBeFilled())
+					f.setIsFilled(filled);
+	}
+	
+	
+
+
+	/**
+	 * Distributes vertically at equal distance between the bottom sides of the selected figures.
+	 * @since 2.0.0
+	 */
+	public void distributeVertBottom()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<Figure> sortedF = new LinkedList<Figure>();
+		LinkedList<Double> ses = new LinkedList<Double>();
+		LaTeXDrawPoint2D pt;
+		boolean ok;
+		double gap;
+		int i, size;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheSERotatedPoint();
+			ok = true;
+			
+			for(i=0, size=sortedF.size(); i<size && ok; i++)
+				if(pt.y<ses.get(i))
+					ok = false;
+			
+			if(ok)
+			{
+				sortedF.addLast(f);
+				ses.addLast(pt.y);
+			}
+			else
+			{
+				sortedF.add(i-1, f);
+				ses.add(i-1, pt.y);
+			}
+		}
+		
+		gap = (ses.getLast()-ses.getFirst())/(size()-1);
+		size = sortedF.size()-1;
+		
+		for(i=1; i<size; i++)
+			sortedF.get(i).shift(0, (ses.getFirst()+i*gap)-ses.get(i));
+		
+		updateBorders();
+	}
+	
+	
+	
+	/**
+	 * Distributes vertically at equal distance between the middle of the selected figures. 
+	 * @since 2.0.0
+	 */
+	public void distributeVertMiddle()
+	{
+		LinkedList<Figure> sortedF = new LinkedList<Figure>();
+		LinkedList<Double> gcs = new LinkedList<Double>();
+		LaTeXDrawPoint2D pt;
+		int i, size;
+		boolean ok;
+		double gap;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getGravityCenter();
+			ok = true;
+			
+			for(i=0, size=sortedF.size(); i<size && ok; i++)
+				if(pt.y<gcs.get(i))
+					ok = false;
+			
+			if(ok)
+			{
+				sortedF.addLast(f);
+				gcs.addLast(pt.y);
+			}
+			else
+			{
+				sortedF.add(i-1, f);
+				gcs.add(i-1, pt.y);
+			}
+		}
+		
+		gap = (gcs.getLast()-gcs.getFirst())/(size()-1);
+		size = sortedF.size()-1;
+		
+		for(i=1; i<size; i++)
+			sortedF.get(i).shift(0, (gcs.getFirst()+i*gap)-gcs.get(i));
+		
+		updateBorders();
+	}
+	
+	
+	
+	/**
+	 * Distributes vertically at equal distance between the top sides of the selected figures. 
+	 * @since 2.0.0
+	 */
+	public void distributeVertTop()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<Figure> sortedF = new LinkedList<Figure>();
+		LinkedList<Double> nws = new LinkedList<Double>();
+		LaTeXDrawPoint2D pt;
+		int i, size;
+		boolean ok;
+		double gap;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheNWRotatedPoint();
+			ok = true;
+			
+			for(i=0, size=sortedF.size(); i<size && ok; i++)
+				if(pt.y<nws.get(i))
+					ok = false;
+			
+			if(ok)
+			{
+				sortedF.addLast(f);
+				nws.addLast(pt.y);
+			}
+			else
+			{
+				sortedF.add(i-1, f);
+				nws.add(i-1, pt.y);
+			}
+		}
+		
+		gap = (nws.getLast()-nws.getFirst())/(size()-1);
+		size = sortedF.size()-1;
+		
+		for(i=1; i<size; i++)
+			sortedF.get(i).shift(0, (nws.getFirst()+i*gap)-nws.get(i));
+		
+		updateBorders();
+	}
+	
+	
+	
+	/**
+	 * Distributes horizontally at equal distance between the selected figures. 
+	 * @since 2.0.0
+	 */
+	public void distributeVertEqual()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<Figure> sortedF = new LinkedList<Figure>();
+		LinkedList<Double> tops = new LinkedList<Double>();
+		LinkedList<Double> bots = new LinkedList<Double>();
+		LaTeXDrawPoint2D pt;
+		int i, size;
+		boolean ok;
+		double gap;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheNWRotatedPoint();
+				
+			ok = true;
+			for(i=0, size=tops.size(); i<size && ok; i++)
+				if(pt.y<tops.get(i))
+					ok = false;
+			
+			if(ok)
+			{
+				sortedF.addLast(f);
+				tops.addLast(pt.y);
+				bots.addLast(f.getTheSERotatedPoint().y);
+			}
+			else
+			{
+				sortedF.add(i-1, f);
+				tops.add(i-1, pt.y);
+				bots.add(i-1, f.getTheSERotatedPoint().y);
+			}
+		}
+		
+		gap = tops.getLast() - bots.getFirst();
+		size = sortedF.size()-1;
+		
+		for(i=1; i<size; i++)
+			gap -= bots.get(i) - tops.get(i);
+		
+		gap/=size;
+		
+		for(i=1; i<size; i++)
+			sortedF.get(i).shift(0, (sortedF.get(i-1).getTheSERotatedPoint().y + gap) - tops.get(i));
+		
+		updateBorders();
+	}
+	
+	
+	
+	/**
+	 * Distributes vertically at equal distance between the left sides of the selected figures.
+	 * @since 2.0.0
+	 */
+	public void distributeHorizLeft()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<Figure> sortedF = new LinkedList<Figure>();
+		LinkedList<Double> nws = new LinkedList<Double>();
+		LaTeXDrawPoint2D pt;
+		int i, size;
+		boolean ok;
+		double gap;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheNWRotatedPoint();
+			ok = true;
+			
+			for(i=0, size=sortedF.size(); i<size && ok; i++)
+				if(pt.x<nws.get(i))
+					ok = false;
+			
+			if(ok)
+			{
+				sortedF.addLast(f);
+				nws.addLast(pt.x);
+			}
+			else
+			{
+				sortedF.add(i-1, f);
+				nws.add(i-1, pt.x);
+			}
+		}
+		
+		gap = (nws.getLast()-nws.getFirst())/(size()-1);
+		size = sortedF.size()-1;
+		
+		for(i=1; i<size; i++)
+			sortedF.get(i).shift((nws.getFirst()+i*gap)-nws.get(i), 0);
+		
+		updateBorders();
+	}
+	
+	
+	
+	/**
+	 * Distributes vertically at equal distance between the middle of the selected figures. 
+	 * @since 2.0.0
+	 */
+	public void distributeHorizMiddle()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<Figure> sortedF = new LinkedList<Figure>();
+		LinkedList<Double> gcs = new LinkedList<Double>();
+		LaTeXDrawPoint2D pt;
+		int i, size;
+		boolean ok;
+		double gap;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getGravityCenter();
+			ok = true;
+			
+			for(i=0, size=sortedF.size(); i<size && ok; i++)
+				if(pt.x<gcs.get(i))
+					ok = false;
+			
+			if(ok)
+			{
+				sortedF.addLast(f);
+				gcs.addLast(pt.x);
+			}
+			else
+			{
+				sortedF.add(i-1, f);
+				gcs.add(i-1, pt.x);
+			}
+		}
+		
+		gap = (gcs.getLast()-gcs.getFirst())/(size()-1);
+		size = sortedF.size()-1;
+		
+		for(i=1; i<size; i++)
+			sortedF.get(i).shift((gcs.getFirst()+i*gap)-gcs.get(i), 0);
+		
+		updateBorders();
+	}
+	
+	
+	
+	/**
+	 * Distributes vertically at equal distance between the right sides of the selected figures. 
+	 * @since 2.0.0
+	 */
+	public void distributeHorizRight()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<Figure> sortedF = new LinkedList<Figure>();
+		LinkedList<Double> ses = new LinkedList<Double>();
+		LaTeXDrawPoint2D pt;
+		int i, size;
+		boolean ok;
+		double gap;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheSERotatedPoint();
+			
+			ok = true;
+			for(i=0, size=sortedF.size(); i<size && ok; i++)
+				if(pt.x<ses.get(i))
+					ok = false;
+			
+			if(ok)
+			{
+				sortedF.addLast(f);
+				ses.addLast(pt.x);
+			}
+			else
+			{
+				sortedF.add(i-1, f);
+				ses.add(i-1, pt.x);
+			}
+		}
+		
+		gap = (ses.getLast()-ses.getFirst())/(size()-1);
+		size = sortedF.size()-1;
+		
+		for(i=1; i<size; i++)
+			sortedF.get(i).shift((ses.getFirst()+i*gap)-ses.get(i), 0);
+		
+		updateBorders();
+	}
+	
+	
+	
+	/**
+	 * Distributes vertically at equal distance between the selected figures. 
+	 * @since 2.0.0
+	 */
+	public void distributeHorizEqual()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<Figure> sortedF 	= new LinkedList<Figure>();
+		LinkedList<Double> rights 	= new LinkedList<Double>();
+		LinkedList<Double> lefts 	= new LinkedList<Double>();
+		LaTeXDrawPoint2D pt;
+		int i, size;
+		boolean ok;
+		double gap;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheNWRotatedPoint();
+			ok = true;
+			
+			for(i=0, size=lefts.size(); i<size && ok; i++)
+				if(pt.x<lefts.get(i))
+					ok = false;
+			
+			if(ok)
+			{
+				sortedF.addLast(f);
+				lefts.addLast(pt.x);
+				rights.addLast(f.getTheSERotatedPoint().x);
+			}
+			else
+			{
+				sortedF.add(i-1, f);
+				lefts.add(i-1, pt.x);
+				rights.add(i-1, f.getTheSERotatedPoint().x);
+			}
+		}
+		
+		gap = lefts.getLast() - rights.getFirst();
+		size = sortedF.size()-1;
+		
+		for(i=1; i<size; i++)
+			gap -= rights.get(i) - lefts.get(i);
+		
+		gap/=size;
+
+		for(i=1; i<size; i++)
+			sortedF.get(i).shift((sortedF.get(i-1).getTheSERotatedPoint().x + gap) - lefts.get(i), 0);
+	}
+
+
+	
+
+	/**
+	 * Align the selected figures to the figure on the left. 
+	 * @since 2.0.0
+	 */
+	public void alignLeft()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<LaTeXDrawPoint2D> nws = new LinkedList<LaTeXDrawPoint2D>();
+		double minX = Double.MAX_VALUE;
+		LaTeXDrawPoint2D pt;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheNWRotatedPoint();
+			nws.add(pt);
+			
+			if(pt.x<minX)
+				minX = pt.x;
+		}
+		
+		for(Figure f : figures)
+		{
+			pt = nws.poll();
+			
+			if(((float)minX)!=((float)pt.x))
+				f.shift(minX-pt.x, 0);
+		}
+		
+		updateBorders();
+	} 
+
+	
+	
+	
+	/**
+	 * Align the selected figures to the figure on the right. 
+	 * @since 2.0.0
+	 */
+	public void alignRight()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<LaTeXDrawPoint2D> ses = new LinkedList<LaTeXDrawPoint2D>();
+		double maxX = Double.MIN_VALUE;
+		LaTeXDrawPoint2D pt;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheSERotatedPoint();
+			ses.add(pt);
+			
+			if(pt.x>maxX)
+				maxX = pt.x;
+		}
+		
+		for(Figure f : figures)
+		{
+			pt = ses.poll();
+			
+			if(((float)maxX)!=((float)pt.x))
+				f.shift(maxX-pt.x, 0);
+		}
+		
+		updateBorders();
+	} 
+	
+	
+	
+	/**
+	 * Align the selected figures to the figure on the top. 
+	 * @since 2.0.0
+	 */
+	public void alignTop()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<LaTeXDrawPoint2D> nws = new LinkedList<LaTeXDrawPoint2D>();
+		double minY = Double.MAX_VALUE;
+		LaTeXDrawPoint2D pt;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheNWRotatedPoint();
+			nws.add(pt);
+			
+			if(pt.y<minY)
+				minY = pt.y;
+		}
+		
+		for(Figure f : figures)
+		{
+			pt = nws.poll();
+			
+			if(((float)minY)!=((float)pt.x))
+				f.shift(0, minY-pt.y);
+		}
+		
+		updateBorders();
+	} 
+	
+	
+	
+	/**
+	 * Align the selected figures to the figure on the bottom. 
+	 * @since 2.0.0
+	 */
+	public void alignBottom()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<LaTeXDrawPoint2D> ses = new LinkedList<LaTeXDrawPoint2D>();
+		double maxY = Double.MIN_VALUE;
+		LaTeXDrawPoint2D pt;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheSERotatedPoint();
+			ses.add(pt);
+			
+			if(pt.y>maxY)
+				maxY = pt.y;
+		}
+		
+		for(Figure f : figures)
+		{
+			pt = ses.poll();
+			
+			if(((float)maxY)!=((float)pt.y))
+				f.shift(0, maxY-pt.y);
+		}
+		
+		updateBorders();
+	} 
+	
+	
+	
+	/**
+	 * Align vertically the selected figures to the figure in the middle. 
+	 * @since 2.0.0
+	 */
+	public void alignMiddleVertically()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<Double> middles = new LinkedList<Double>();
+		double maxX = Double.MIN_VALUE;
+		double minX = Double.MAX_VALUE, middle, middle2;
+		LaTeXDrawPoint2D pt, pt2;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheNWRotatedPoint();
+			pt2 = f.getTheSERotatedPoint();
+			
+			if(pt.x<minX)
+				minX = pt.x;
+			
+			if(pt2.x>maxX)
+				maxX = pt2.x;
+			
+			middles.add((pt.x+pt2.x)/2.);
+		}
+		
+		middle = (minX+maxX)/2.;
+		
+		for(Figure f : figures)
+		{
+			middle2 = middles.poll();
+			
+			if(((float)middle2)!=((float)middle))
+				f.shift(middle-middle2, 0);
+		}
+		
+		updateBorders();
+	} 
+	
+	
+	
+	/**
+	 * Align horizontally the selected figures to the figure in the middle. 
+	 * @since 2.0.0
+	 */
+	public void alignMiddleHorizontally()
+	{
+		if(size()<2)
+			return ;
+		
+		LinkedList<Double> middles = new LinkedList<Double>();
+		double maxY = Double.MIN_VALUE;
+		double minY = Double.MAX_VALUE, middle, middle2;
+		LaTeXDrawPoint2D pt, pt2;
+		
+		for(Figure f : figures)
+		{
+			pt = f.getTheNWRotatedPoint();
+			pt2 = f.getTheSERotatedPoint();
+			
+			if(pt.y<minY)
+				minY = pt.y;
+			
+			if(pt2.y>maxY)
+				maxY = pt2.y;
+			
+			middles.add((pt.y+pt2.y)/2.);
+		}
+		
+		middle = (minY+maxY)/2.;
+		
+		for(Figure f : figures)
+		{
+			middle2 = middles.poll();
+			
+			if(((float)middle2)!=((float)middle))
+				f.shift(0, middle-middle2);
+		}
+		
+		updateBorders();
+	}
+
+}
diff --git a/current/latexDraw/figures/DrawBorders.java b/current/latexDraw/figures/DrawBorders.java
new file mode 100644
index 0000000..ab3e2d9
--- /dev/null
+++ b/current/latexDraw/figures/DrawBorders.java
@@ -0,0 +1,239 @@
+package latexDraw.figures;
+
+import java.awt.Color;
+import java.awt.Point;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/**
+ * A DrawBorders allows the user to define the position of the origin
+ * of his drawing (the point (0,0)) and to define too the dimensions
+ * (the borders) of his drawing.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>>
+ */
+public class DrawBorders extends LaTeXDrawRectangle
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Correspond to the origin point (0,0) */
+	private LaTeXDrawPoint2D originPoint;
+	
+	/** The colour of the rectangle */
+	public static final Color color = Color.DARK_GRAY;
+	
+	/** 
+	 * The constructor by default 
+	 */
+	public DrawBorders(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), false, false, increaseMeter);
+	}
+
+
+
+	/**
+	 * The constructor using 2 points
+	 * @param NWpt The North-West point of the rectangle
+	 * @param SEpt The South-East point of the rectangle
+	 */
+	public DrawBorders(LaTeXDrawPoint2D NWpt, LaTeXDrawPoint2D SEpt, boolean autoAdjust,
+			boolean inSelection, boolean increaseMeter)
+	{
+
+		super(NWpt,new LaTeXDrawPoint2D(SEpt.x, NWpt.y), new LaTeXDrawPoint2D(NWpt.x, SEpt.y), SEpt, increaseMeter);
+	
+		isBordersMovable = false;
+		isDashableOrDotable = false;
+		canHaveShadow = false;
+		isDoubleBoundaryable = false;
+		originPoint = new LaTeXDrawPoint2D(NWpt.x, (NWpt.y+SEpt.y)/2);
+		isSelected = autoAdjust && inSelection;
+		setLinesColor(color);
+	}
+	
+	
+
+	
+	/**
+	 * Allows to get the bottom left point of the drawing (South-West point)
+	 * @return The bottom left point of the drawing
+	 */
+	public LaTeXDrawPoint2D getTheSWPoint()
+	{
+		LaTeXDrawPoint2D p1 = getPoint(0), p2 = getPoint(1);
+		LaTeXDrawPoint2D p3 = getPoint(2), p4 = getPoint(3);
+
+		if(p1.x<p2.x)
+		{
+			if(p1.y>p3.y)
+				 return p1;
+			return p3;
+		}
+		
+		if(p2.y>p4.y)
+			 return p2;
+		return p4;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the top right point of the drawing (North-East point)
+	 * @return The top right point of the drawing
+	 */	
+	public LaTeXDrawPoint2D getTheNEPoint()
+	{
+		LaTeXDrawPoint2D p1 = getPoint(0), p2 = getPoint(1);
+		LaTeXDrawPoint2D p3 = getPoint(2), p4 = getPoint(3);
+
+		if(p1.x>p2.x)
+		{
+			if(p1.y<p3.y)
+				 return p1;
+			return p3;
+		}
+		
+		if(p2.y<p4.y)
+			 return p2;
+		return p4;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the origin point (the reference point of axes)
+	 * @return The origin point
+	 */
+	public LaTeXDrawPoint2D getOriginPoint()
+	{
+		return originPoint;
+	}
+	
+	
+
+	@Override
+	public void onDragged(Point formerPt, Point newPt) 
+	{
+		super.onDragged(formerPt, newPt);
+		updateOriginPoint();
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		return null;
+	}
+
+
+
+	@Override
+	public void onRelease() 
+	{		
+		System.out.println("DrawBorders : empty method !");//$NON-NLS-1$
+	}
+
+
+
+	@Override
+	public void shift(double shiftX, double shiftY) 
+	{
+		if(shiftX==0 && shiftY==0) return ;
+		super.shift(shiftX, shiftY);
+		updateOriginPoint();
+	}
+
+
+
+	@Override
+	public synchronized void setLastPoint(LaTeXDrawPoint2D pt)
+	{
+		super.setLastPoint(pt);
+		updateOriginPoint();
+	}
+	
+	
+
+	
+	@Override
+	public synchronized void setFirstPoint(LaTeXDrawPoint2D pt)
+	{
+		super.setFirstPoint(pt);
+		updateOriginPoint();
+	}
+	
+	
+	
+	
+	public void updateOriginPoint()
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		
+		originPoint.x = NW.x;
+		originPoint.y = (NW.y+SE.y)/2;
+	}
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		DrawBorders d = (DrawBorders) super.clone();
+		if(borders!=null)
+			d.borders = (LaTeXDrawRectangle) borders.clone();
+		d.originPoint = (LaTeXDrawPoint2D) originPoint.clone();
+		
+		return d;
+	}
+
+
+
+	@Override
+	public void updateGravityCenter() 
+	{
+		/* This function is disable. */
+	}
+
+
+
+	@Override
+	public void updateStyleOfDelimitors() 
+	{
+		/* This function is disable : no style for delimiters. */
+	}
+	
+	
+	
+	
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		isSelected = ois.readBoolean();
+		borders = (LaTeXDrawRectangle) ois.readObject();
+		originPoint = (LaTeXDrawPoint2D) ois.readObject();
+
+		updateGravityCenter();
+		updateStyleOfDelimitors();
+	}
+}
diff --git a/current/latexDraw/figures/Ellipse.java b/current/latexDraw/figures/Ellipse.java
new file mode 100644
index 0000000..cb1c9d8
--- /dev/null
+++ b/current/latexDraw/figures/Ellipse.java
@@ -0,0 +1,982 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.*;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+import latexDraw.figures.properties.BordersMovable;
+import latexDraw.figures.properties.DoubleBoundaryable;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines an Ellipse.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Ellipse extends Figure implements BordersMovable, DoubleBoundaryable
+{
+	private static final long serialVersionUID = 1L;
+
+
+	/**
+	 * The constructor by default
+	 */
+	public Ellipse(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), increaseMeter);
+	}
+	
+	
+		
+	/**
+	 * The constructor using four points
+	 * @param pt1 The top left point of rectangle containing the ellipse
+	 * @param pt2 The top right point of the rectangle containing the ellipse
+	 * @param pt3 The bottom left point
+	 * @param pt4 The bottom right point
+	 */
+	public Ellipse(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, LaTeXDrawPoint2D pt3, LaTeXDrawPoint2D pt4, boolean increaseMeter)
+	{
+		super(increaseMeter);
+		borders = new LaTeXDrawRectangle(pt1, pt2, pt3, pt4, false);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	/**
+	 * @param f The figure to copy
+	 * @param sameNumber True if the figure will have the same number of the copy.
+	 */
+	public Ellipse(Figure f, boolean sameNumber)
+	{
+		super(f, sameNumber);
+		
+		try 
+		{ 
+			borders = new LaTeXDrawRectangle((LaTeXDrawPoint2D)f.getBordersPoint(0).clone(),
+								(LaTeXDrawPoint2D)f.getBordersPoint(-1).clone(), false);
+			updateGravityCenter();
+			updateShape();
+			LaTeXDrawPoint2D nw = borders.getTheNWPoint();
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			double c = Math.abs(cg.x-nw.x)*3./2.25;
+			double a = (Math.sqrt((cg.x-nw.x+c)*(cg.x-nw.x+c)+((cg.y-nw.y)*(cg.y-nw.y)))+
+						Math.sqrt((cg.x-nw.x-c)*(cg.x-nw.x-c)+((cg.y-nw.y)*(cg.y-nw.y))))/2.;
+			double b = Math.sqrt(a*a-c*c);
+			borders.setFirstPoint(cg.x-a, cg.y-b);
+			borders.setLastPoint(cg.x+a, cg.y+b);
+		} 
+		catch (Exception e)
+		{ borders = new LaTeXDrawRectangle(false); }
+		
+		updateGravityCenter();
+		updateShape();
+	}
+
+
+
+	@Override
+	public void onDragged(Point formerPt, Point newPt) 
+	{
+		if(formerPt.equals(newPt)) return;
+
+		borders.onDragged(formerPt, newPt);
+		rotationAngle = borders.getRotationAngle();//update the angle(when rotation)
+		updateGravityCenter();//update centre of gravity when reshaping
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint(), SE = borders.getTheSEPoint();
+		Color formerCol = g.getColor();
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+		double dx=0, dy=0;
+		boolean changeFillStyle = false;
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+
+		if(hasDoubleBoundary)
+		{
+			Shape s0 = shape;
+			Shape s[] = getDbleBoundariesOutInOrMiddle(s0);
+			Shape s1, s2, s3;
+
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			{
+				s1 = s0;
+				s2 = s[0];
+				s3 = s[1];
+			}
+			else
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				{
+					s1 = s[0];
+					s2 = s0;
+					s3 = s[1];
+				}
+				else
+				{
+					s1 = s[0];
+					s2 = s[1];
+					s3 = s0;
+				}
+			
+			Shape sTooSmall = getTooSmallShape(s1);
+
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				if(hasShadow)
+				{
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(s1);
+					
+					if(sTooSmall==null)
+						g.draw(s1);
+					else
+						g.draw(sTooSmall);
+					
+					g.translate(-dx, -dy);
+					
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+				}
+				
+				g.setColor(doubleColor);
+				g.setStroke(new BasicStroke((float)(doubleSep + thickness), 
+								BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.draw(s2);
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, s3);
+				g.setColor(linesColor);
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				
+				if(sTooSmall==null)
+					g.draw(s1);
+				else
+					g.draw(sTooSmall);
+				
+				g.draw(s3);
+			}
+			else
+			{
+				if(hasShadow)
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(s1);
+					
+					if(sTooSmall==null)
+						g.draw(s1);
+					else
+						g.draw(sTooSmall);
+					
+					g.translate(-dx, -dy);
+					g.setColor(interiorColor);
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), 
+							BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.draw(s2);
+					
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+				}
+				
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_ROUND,
+							BasicStroke.JOIN_MITER, 1.f, new float[] { 0, (float)(thickness*2+doubleSep + dotSep) }, 0));
+				else
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep),
+							BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+							new float[] { blackDashLength, whiteDashLength }, 0));
+					
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, s2);
+				g.setColor(linesColor);
+				
+				Shape sTooSmall2 = getTooSmallShape(s2);
+				if(sTooSmall2==null)
+					g.draw(s2);
+				else
+					g.draw(sTooSmall2);
+				
+				g.setStroke(new BasicStroke((float)doubleSep, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.setColor(doubleColor);
+				
+				if(sTooSmall2==null)
+					g.draw(s2);
+				else
+					g.draw(sTooSmall2);
+			}				
+		}
+		else
+		{
+			Shape sTooSmall = getTooSmallShape(shape);
+			
+			if(hasShadow)
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.translate(dx, dy);
+				g.setColor(shadowColor);
+				g.fill(shape);
+				
+				if(sTooSmall==null)
+					g.draw(shape);
+				else
+					g.draw(sTooSmall);
+				
+				g.translate(-dx, -dy);
+				if(!isFilled)
+				{
+					changeFillStyle = true;
+					isFilled = true;
+				}
+				g.setColor(interiorColor);
+				g.draw(shape);
+			}
+			
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			else
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND,
+								BasicStroke.JOIN_MITER, 1.f, new float[] { 0, thickness + dotSep }, 0));
+				}
+				else
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+								new float[] { blackDashLength, whiteDashLength }, 0));
+			
+			fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, shape);
+			g.setColor(linesColor);
+			
+			if(sTooSmall==null)
+				g.draw(shape);
+			else
+				g.draw(sTooSmall);
+		}
+		 
+		if(changeFillStyle) isFilled = false;
+		g.setColor(formerCol);
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+		
+		if(isSelected)
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+	
+		
+	
+	@Override
+	public synchronized void setLastPoint(double x, double y)
+	{
+		borders.setLastPoint(x, y);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+	
+	
+	@Override
+	public synchronized void setFirstPoint(double x, double y)
+	{
+		borders.setFirstPoint(x, y);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	@Override
+	public synchronized void setBordersPosition(String doubleLinePosition)
+	{
+		super.setBordersPosition(doubleLinePosition);
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D p) 
+	{		
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);
+		
+		if(isSelected && (borders.dNE.isIn(pt) || borders.dNW.isIn(pt) || borders.dSE.isIn(pt) || 
+			borders.dSW.isIn(pt) || borders.dS.isIn(pt)  || borders.dN.isIn(pt)   || borders.dE.isIn(pt)  || borders.dW.isIn(pt)))
+			return true;
+		
+		LaTeXDrawPoint2D NW = getTheNWNonRotatedBoundPoint();
+		LaTeXDrawPoint2D SE = getTheSENonRotatedBoundPoint();
+		Shape s = new Ellipse2D.Double(NW.x, NW.y, Math.abs(NW.x - SE.x), Math.abs(NW.y - SE.y));
+
+		Rectangle2D bounds = s.getBounds2D();
+	
+		if(bounds.getHeight()<=1)
+		{
+			Line l;
+			if(bounds.getWidth()<=1)
+				l = new Line(bounds.getMaxX(), Math.max(1, bounds.getMaxY()), bounds.getMaxX(), Math.max(1, bounds.getMaxY()), false);
+			else
+				l = new Line(bounds.getMinX(), Math.max(1, bounds.getMinY()), bounds.getMaxX(), Math.max(1, bounds.getMaxY()), false);
+			
+			return l.isIn(pt);
+		}
+		
+		if(bounds.getWidth()<=1)
+		{
+			Line l = new Line(Math.max(1, bounds.getMaxX()), bounds.getMinY(), Math.max(1, bounds.getMaxX()), bounds.getMaxY(), false);
+			
+			return l.isIn(pt);
+		}
+		
+		if(!s.contains(pt))
+			return false;
+
+		if(isFilled || hasShadow || hasGradient())
+			return true;
+
+		Shape s2;
+
+		if(hasDoubleBoundary)
+			s2 = new Ellipse2D.Double(NW.x + thickness * 2 + doubleSep, NW.y + thickness * 2 + doubleSep, 
+						Math.abs(NW.x - SE.x)- 4 * thickness - 2 * doubleSep, Math.abs(NW.y- SE.y) - 4 * thickness - 2 * doubleSep);
+		else
+			s2 = new Ellipse2D.Double(NW.x + thickness, NW.y + thickness, Math.abs(NW.x - SE.x) - 2 * thickness, 
+									Math.abs(NW.y- SE.y)- 2 * thickness);
+
+		return !s2.contains(pt);
+	}
+
+	
+	
+	
+	@Override
+	public String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		LaTeXDrawPoint2D pt1 = borders.getPoint(0), pt2 = borders.getPoint(1);
+		LaTeXDrawPoint2D pt3 = borders.getPoint(2);
+		String add = "", addBegin="", addEnd="", fillType=""; //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-4$
+		double x = (pt1.x+pt2.x)/2. - d.x, y = d.y - (pt1.y+pt3.y)/2. ;
+		double width  = Math.abs(pt1.x-pt2.x);
+		double height = Math.abs(pt1.y-pt3.y);
+		boolean isFilledWasChanged = false;
+		double threshold = 0.001;
+		
+		if(hasShadow)
+		{
+			fillType+=",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				fillType+=",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+			
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				fillType+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC),threshold);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				add += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+			if(!isFilled)
+			{
+				isFilled = true;
+				isFilledWasChanged = true;
+			}
+		}
+		
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) fillType=fillType+','+str;
+		
+		str = getPSTricksCodeLine(ppc);
+		if(str.length()>0) add=add+','+str;
+		
+		if(rotationAngle%(Math.PI*2)!=0.)
+		{
+			double angle = -Math.toDegrees(rotationAngle);
+			double cx = (gravityCenter.x-d.x)/ppc;
+			double cy = (d.y-gravityCenter.y)/ppc;
+			double x2 = -Math.cos(-rotationAngle)*cx+
+						Math.sin(-rotationAngle)*cy+cx;
+			double y2 =  -Math.sin(-rotationAngle)*cx-
+						Math.cos(-rotationAngle)*cy+cy;
+
+			addBegin +="\\rput{"+(float)angle+ "}("+LaTeXDrawNumber.getCutNumber((float)x2,threshold)+','+LaTeXDrawNumber.getCutNumber((float)y2,threshold)+"){"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			addEnd = "}"; //$NON-NLS-1$
+		}
+		
+		add+=",dimen="+bordersPosition;  //$NON-NLS-1$
+		
+		if(hasDoubleBoundary)
+		{
+			add+=",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc),threshold); //$NON-NLS-1$
+			
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name); 
+				}
+				add+= ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}
+		
+		if(isFilledWasChanged) isFilled = false;
+		
+		return addBegin+"\\psellipse[linewidth=" + (thickness/ppc) +  //$NON-NLS-1$
+			add + fillType + "](" + LaTeXDrawNumber.getCutNumber((float)(x/ppc),threshold) + ',' + LaTeXDrawNumber.getCutNumber((float)(y/ppc),threshold) + ")("  //$NON-NLS-1$ //$NON-NLS-2$
+				+ LaTeXDrawNumber.getCutNumber((float)((width/2.)/ppc),threshold) + ',' + LaTeXDrawNumber.getCutNumber((float)((height/2.)/ppc),threshold) + ')'+addEnd;
+	}
+
+
+
+	@Override
+	public void shift(double shiftX,double shiftY)
+	{
+		if(shiftX==0 && shiftY==0) return ;
+
+		borders.shift(shiftX, shiftY);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Ellipse e = (Ellipse) super.clone();
+		e.borders = (LaTeXDrawRectangle) borders.clone();
+		e.gravityCenter = (LaTeXDrawPoint2D)gravityCenter.clone();
+		e.shape = getInsideOutsideOrMiddleBorders();
+		
+		return e;
+	}
+
+	
+	
+	@Override
+	public Shape createShape2D()
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		Shape area = createNonRotatedShape2D();
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+
+			double c2x = Math.cos(rotationAngle)*cx-Math.sin(rotationAngle)*cy;
+			double c2y = Math.sin(rotationAngle)*cx+Math.cos(rotationAngle)*cy;
+
+			AffineTransform at = AffineTransform.getTranslateInstance(cx-c2x, cy-c2y);
+			at.rotate(rotationAngle);
+			area = at.createTransformedShape(area);
+		}
+
+		return area;
+	}
+
+
+
+
+	@Override
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound) 
+	{
+		if(percent==1.) return ;
+		
+		borders.rescaleX(formerX, newX, percent, bound);
+		updateGravityCenter();//update centre of gravity when reshaping
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound) 
+	{
+		if(percent==1.) return ;
+		
+		borders.rescaleY(formerY, newY, percent, bound);
+		updateGravityCenter();//update centre of gravity when reshaping
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+	
+	
+	
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow = true;
+		interiorColor = (Color) ois.readObject();
+		lineStyle = (String) ois.readObject();
+		rotationAngle = ois.readDouble();
+		thickness = ois.readFloat();
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		borders = (LaTeXDrawRectangle) ois.readObject();
+
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0)//$NON-NLS-1$
+		{
+			hasDoubleBoundary = ois.readBoolean();
+			doubleColor = (Color)ois.readObject();
+			doubleSep = ois.readDouble();
+			bordersPosition = (String)ois.readObject();
+			if(!(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0)) //$NON-NLS-1$
+				ois.readBoolean();
+			hatchingAngle = ois.readDouble();
+			hatchingColor = (Color)ois.readObject();
+			hatchingStyle = (String)ois.readObject();
+			hatchingWidth = ois.readFloat();
+			
+			if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6") < 0)//$NON-NLS-1$
+			{
+				if(hatchingStyle.equals(DECREPETED_FILL_CROSS))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_CROSSHATCH;
+				else if(hatchingStyle.equals(DECREPETED_FILL_HORIZ))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_HLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_VERT))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_VLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_NO))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_NONE;
+			}
+		}
+		else
+		{
+			hasDoubleBoundary  = DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor = DEFAULT_DOUBLE_COLOR;
+			doubleSep   = DEFAULT_DOUBLESEP;
+			bordersPosition = DEFAULT_BORDERS_POSITION;
+			hatchingAngle = DEFAULT_HATCH_ANGLE;
+			hatchingColor = DEFAULT_HATCH_COL;
+			hatchingStyle = DEFAULT_HATCH_STYLE;
+			hatchingWidth = DEFAULT_HATCH_WIDTH;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+			hatchingSep = ois.readDouble();
+		else
+			hatchingSep = DEFAULT_HATCH_SEP;
+		
+		updateGravityCenter();
+		updateStyleOfDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create the tangent to the ellipse at the point point
+	 * @param angle The position of the tangent point in radian
+	 * @param orientation Change the orientation of the tangent
+	 * @return The tangent
+	 */
+	public Line2D.Double getTangenteAt(double angle, boolean orientation)
+	{
+		Line2D.Double l = new Line2D.Double();
+		LaTeXDrawPoint2D NW = getTheNWPoint();
+		LaTeXDrawPoint2D SE = getTheSEPoint();
+		LaTeXDrawPoint2D grav = getGravityCenter();
+		LaTeXDrawPoint2D pt = rotatePoint(new LaTeXDrawPoint2D(SE.x, (SE.y+NW.y)/2.), -angle);
+		double a = Math.abs(NW.x-grav.x);
+		double b = Math.abs(NW.y-grav.y);
+		double dec = 5.;
+		
+		l.x1 = pt.x;
+		l.y1 = pt.y;
+	
+		if(((float)angle)%((float)Math.PI)<=0.01)//0. is not possible
+		{
+			l.x2 = pt.x;
+			if(orientation)
+				l.y2 = pt.y - dec;
+			else
+				l.y2 = pt.y + dec;
+		}
+		else
+		{
+			if(orientation)
+				l.x2 = pt.x-dec;
+			else
+				l.x2 = pt.x+dec;
+			
+			if(((float)angle)%((float)Math.PI/2f)<=0.01)//0. is not possible
+				l.y2 = pt.y;
+			else
+				l.y2 = - (b*(pt.x-grav.x)*(l.x2-pt.x))/(a*(pt.y-grav.y)) + pt.y;
+		}
+		
+		return l;
+	}
+
+
+
+
+	public Shape getInsideBorders()
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+
+		return new Ellipse2D.Double(NW.x + thickness / 2., NW.y + thickness/ 2., 
+							Math.max(Math.abs(NW.x - SE.x) - thickness, 1), Math.max(Math.abs(NW.y - SE.y) - thickness, 1));
+	}
+
+	
+
+
+	public Shape getOutsideBorders()
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+
+		return new Ellipse2D.Double(NW.x - thickness / 2., NW.y - thickness/ 2., 
+							Math.max(Math.abs(NW.x - SE.x) + thickness, 1), Math.max(Math.abs(NW.y - SE.y) + thickness, 1));
+	}
+
+	
+
+
+	public Shape getMiddleBorders()
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+
+		return new Ellipse2D.Double(NW.x, NW.y, Math.max(Math.abs(NW.x - SE.x), 1), Math.max(Math.abs(NW.y - SE.y), 1));
+	}
+
+
+
+
+	public Shape getInsideOutsideOrMiddleBorders()
+	{
+		Shape s;
+
+		if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			s = getInsideBorders();
+		else
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_OUTSIDE))
+				s = getOutsideBorders();
+			else
+				s = getMiddleBorders();
+
+		return s;
+	}
+
+
+
+
+
+	public Shape[] getDbleBoundariesOutside(Shape classicBord)
+	{
+		if(classicBord == null)
+			return null;
+
+		Ellipse2D.Double r = (Ellipse2D.Double)classicBord;
+		Shape[] s = new Shape[2];
+
+		s[0] = new Ellipse2D.Double(r.x - doubleSep - thickness, r.y- doubleSep - thickness, 
+									r.width + 2*(doubleSep + thickness), r.height + 2*(doubleSep + thickness));
+		s[1] = new Ellipse2D.Double(r.x - (doubleSep + thickness) / 2., r.y - (doubleSep + thickness) / 2.,
+									r.width + doubleSep+ thickness, r.height + doubleSep + thickness);
+
+		return s;
+	}
+
+
+
+
+	public Shape[] getDbleBoundariesInside(Shape classicBord)
+	{
+		if(classicBord == null)
+			return null;
+
+		Ellipse2D.Double r = (Ellipse2D.Double)classicBord;
+		Shape[] s = new Shape[2];
+
+		s[0] = new Ellipse2D.Double(r.x + (doubleSep + thickness) / 2., r.y + (doubleSep + thickness) / 2., 
+									r.width - doubleSep- thickness, r.height - doubleSep - thickness);
+		s[1] = new Ellipse2D.Double(r.x + doubleSep + thickness, r.y + doubleSep + thickness, 
+					r.width - 2*(doubleSep + thickness), r.height - 2 * (doubleSep + thickness));
+
+		return s;
+	}
+
+
+
+
+	public Shape[] getDbleBoundariesMiddle(Shape classicBord)
+	{
+		if(classicBord == null)
+			return null;
+
+		Ellipse2D.Double r = (Ellipse2D.Double)classicBord;
+		Shape[] s = new Shape[2];
+		double add = (doubleSep + thickness) / 2.;
+
+		s[0] = new Ellipse2D.Double(r.x - add, r.y - add, r.width + doubleSep + thickness, r.height + doubleSep + thickness);
+		s[1] = new Ellipse2D.Double(r.x + add, r.y + add, r.width - doubleSep - thickness, r.height - doubleSep - thickness);
+
+		return s;
+	}
+
+
+
+
+	public Shape[] getDbleBoundariesOutInOrMiddle(Shape classicBord)
+	{
+		Shape[] s;
+
+		if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			s = getDbleBoundariesInside(classicBord);
+		else
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_OUTSIDE))
+				s = getDbleBoundariesOutside(classicBord);
+			else
+				s = getDbleBoundariesMiddle(classicBord);
+
+		return s;
+	}
+
+
+	
+
+
+	@Override
+	public Shape createNonRotatedShape2D()
+	{
+		Shape area;
+		Shape s = getInsideOutsideOrMiddleBorders();
+
+		if(hasDoubleBoundary)
+		{
+			Shape[] s2 = getDbleBoundariesOutInOrMiddle(s);
+			Shape min;
+			Shape max;
+
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			{
+				max = s;
+				min = s2[1];
+			}
+			else
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				{
+					max = s2[0];
+					min = s2[1];
+				}
+				else
+				{
+					max = s2[0];
+					min = s;
+				}
+
+			area = new Area(max);
+			((Area)area).exclusiveOr(new Area(min));
+			
+			Shape tooSmallShape = getTooSmallShape(area);
+			
+			if(tooSmallShape!=null)
+			{
+				Rectangle2D bounds = max.getBounds2D();
+				area = new Line2D.Double(Math.max(1, bounds.getMinX()), Math.max(1, bounds.getMinY()),
+						Math.max(1, bounds.getMaxX()), Math.max(1, bounds.getMaxY()));
+			}
+		}
+		else
+			area = s;
+
+		return area;
+	}
+
+
+
+
+	@Override
+	public synchronized void setThickness(float value)
+	{
+		super.setThickness(value);
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+	@Override
+	public void updateShape()
+	{
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+	
+	@Override
+	public boolean isTooSmallToBeRescaled()
+	{
+		return borders.isTooSmallToBeRescaled();
+	}
+
+
+
+	
+	
+	@Override
+	public Shape createShadowShape()
+	{
+		if(!canHaveShadow || !hasShadow) return shape;
+		
+		Rectangle2D b = createShape2D().getBounds2D();
+		double dx=0, dy=0;
+		LaTeXDrawPoint2D cg = getGravityCenter();
+		LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+		
+		shadowCg.setLocation(cg.x+shadowSize, cg.y);
+		shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+		dx = shadowCg.x-cg.x;
+		dy = cg.y-shadowCg.y;
+		
+		return new Ellipse2D.Double(b.getX()+dx-thickness/2.,b.getY()+dy-thickness/2.,
+									b.getWidth()+thickness, b.getHeight()+thickness);
+	}
+
+
+
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		borders.mirrorHorizontal(origin);
+		updateShape();
+	}
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		borders.mirrorVertical(origin);
+		updateShape();
+	}
+
+
+
+	@Override
+	public synchronized LaTeXDrawPoint2D getLastPoint()
+	{
+		return borders.getLastPoint();
+	}
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		borders.updateToGrid(grid);
+		updateShape();
+	}
+
+
+
+	
+	@Override
+	public int getSelectedDelimitorOrientation()
+	{
+		return borders.getSelectedDelimitorOrientation();
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return (int)(super.hashCode()*1.5);
+	}
+}
diff --git a/current/latexDraw/figures/Figure.java b/current/latexDraw/figures/Figure.java
new file mode 100644
index 0000000..a216a4e
--- /dev/null
+++ b/current/latexDraw/figures/Figure.java
@@ -0,0 +1,2839 @@
+package latexDraw.figures;
+
+import static java.lang.Math.PI;
+import static java.lang.Math.atan;
+import static java.lang.Math.toDegrees;
+
+import java.awt.*;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Line2D;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.io.Serializable;
+
+import javax.swing.JLabel;
+
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.figures.properties.Drawable;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.ui.components.LabelListCellRenderer;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawException;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+/**
+ * This class defines what it is, in general, a figure.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ * LaTeXDraw is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.<br>
+ * <br>
+ * LaTeXDraw is distributed without any warranty; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.<br>
+ * <br>
+ * 03/17/2007<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class Figure implements Serializable, Cloneable, Drawable
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** The number by default of pixels per cm. */
+	public static final int PPC = 50;
+	
+	/** Corresponds to the thickness of the borders of the figure (in pixels). */
+	protected float thickness;
+
+	/** Corresponds to the selected delimiter (if there is a one selected) */
+	protected Delimitor dSelected;
+
+	/** Allows to know if the figure is selected */
+	protected boolean isSelected;
+
+	/** Allows to know if the figure can be filled by a colour */
+	protected boolean canBeFilled;
+
+	/** Allows to know if the figure is filled by a colour */
+	protected boolean isFilled;
+
+	/** Allows to know if the thickness of the figure can be changed */
+	protected boolean isThicknessable;
+
+	/** Allows to know if the borders of the figure are movable */
+	protected boolean isBordersMovable;
+
+	/** The colour of the borders */
+	protected Color linesColor;
+
+	/** The colour of the interior of the figure */
+	protected Color interiorColor;
+
+	/** The number of the figure. */
+	protected int number;
+
+	/** The meter of figures */
+	private static int meter = 0;
+
+	/** Allows to know if the figure is customisable or not */
+	protected boolean isCustomizable;
+
+	/** Allows to know if the bounds are double */
+	protected boolean hasDoubleBoundary;
+
+	/** Allows to know if the figure can have double boundary */
+	protected boolean isDoubleBoundaryable;
+
+	/** The colour of the double boundary */
+	protected Color doubleColor;
+
+	/** The position of the double boundary */
+	protected String bordersPosition;
+
+	/** Allows to know if the figure can be dotted or dashed */
+	protected boolean isDashableOrDotable;
+
+	/** The colour of the hatch */
+	protected Color hatchingColor;
+
+	/** The angle of the hatch (in rad). */
+	protected double hatchingAngle;
+
+	/** The width of the lines of the hatch (in pixels). */
+	protected float hatchingWidth;
+
+	/** Allows to know if the figure is resizable or not */
+	protected boolean isResizable;
+
+	/** The kind of hatch used by the figure */
+	protected String hatchingStyle;
+
+	/** True if the figure has a shadow. */
+	protected boolean hasShadow;
+	
+	/** The size of the shadow (in pixels). */
+	protected double shadowSize;
+	
+	/** The angle of the shadow (in rad). */
+	protected double shadowAngle;
+	
+	/** The colour of the shadow. */
+	protected Color shadowColor;
+	
+	/** Define if the figure can have a shadow. */
+	protected boolean canHaveShadow;
+	
+	/** The angle of the gradient (in rad). */
+	protected double gradientAngle;
+	
+	/** The position of the midpoint, as a fraction of the distance from
+		top to bottom. Should be between 0 and 1. */
+	protected double gradientMidPoint;
+	
+	/** The first colour of the gradient. */
+	protected Color gradientStartColor;
+	
+	/** The second colour of the gradient. */
+	protected Color gradientEndColor;
+	
+	/** The position of the midpoint, as a fraction of the distance from
+	top to bottom. Should be between 0 and 1. */
+	public static final double DEFAULT_GRADIENT_MID_POINT = 1;
+	
+	/** The angle of the gradient in radian. */
+	public static final double DEFAULT_GRADIENT_ANGLE = Math.toRadians(PSTricksConstants.DEFAULT_GRADIENT_ANGLE);
+	
+	/** The value by default of hasShadow. */
+	public static final boolean DEFAULT_SHADOW_HAS =  PSTricksConstants.DEFAULT_SHADOW;
+	
+	/** The value by default of shadowSize (in pixels). */
+	public static final double DEFAULT_SHADOW_SIZE =  PSTricksConstants.DEFAULT_SHADOW_SIZE*PPC;
+	
+	/** The value by default of shadowAngle (in rad). */
+	public static final double DEFAULT_SHADOW_ANGLE =  Math.toRadians(PSTricksConstants.DEFAULT_SHADOW_ANGLE);
+	
+	/** The value by default of shadowAngle. */
+	public static final Color DEFAULT_SHADOW_COLOR =  PSTricksConstants.DEFAULT_SHADOW_COLOR;
+	
+	/** The position by default of the double boundary */
+	public static final String DEFAULT_BORDERS_POSITION = PSTricksConstants.BORDERS_INSIDE;
+
+	/** The colour of the double boundary of the figure by default */
+	public static final Color DEFAULT_DOUBLE_COLOR = PSTricksConstants.DEFAULT_DOUBLE_COLOR;
+
+	/** The value by default of the attribute hasDoubleBoudary */
+	public static final boolean DEFAULT_HAS_DOUBLE_BOUNDARY = false;
+
+	/** The angle of the lines of the hatch by default */
+	public static final double DEFAULT_HATCH_ANGLE = 0.;
+	
+	/** The size of the separation between the hatching by default. */
+	public static final double DEFAULT_HATCH_SEP = PSTricksConstants.DEFAULT_HATCH_SEP*PPC;
+
+	/** A figure is customisable by default ? */
+	public static final boolean DEFAULT_IS_CUSTOMISABLE = true;
+
+	/** The borders of the figure are movable by default */
+	public static final boolean DEFAULT_IS_BORDERS_MOVABLE = true;
+
+	/** The colour by default of the borders of the figure */
+	public static final Color DEFAULT_BORDERS_COL = Color.BLACK;
+
+	/** The colour by default of the interior of the figure */
+	public static final Color DEFAULT_INTERIOR_COL = Color.WHITE;
+
+	/** The colour by default of the hatch of the figure */
+	public static final Color DEFAULT_HATCH_COL = Color.BLACK;
+
+	/** The value by default of the attribute isThicknessable */
+	public static final boolean DEFAULT_IS_THICKNESSABLE = true;
+
+	/** value of the thickness by default (in pixels). */
+	public static final float DEFAULT_THICKNESS = 2; 
+
+	/** The style of the lines of the figure */
+	protected String lineStyle;
+
+	/** The style of lines by default */
+	public static final String DEFAULT_LINE_STYLE = PSTricksConstants.LINE_NONE_STYLE;
+
+	/** If a figure is filled by default */
+	public static final boolean DEFAULT_IS_FILLED = false;
+
+	/** The label of the ComboBox containing all kinds of hatches */
+	public static final String LABEL_HATCH_CHOICE = "Hatch choice"; //$NON-NLS-1$
+
+	/** The label of the field which allows to change the width of the hatch */
+	public static final String LABEL_HATCH_WIDTH = "Hatch width"; //$NON-NLS-1$
+
+	/** The label of the hatch used by default */
+	public static final String DEFAULT_HATCH_STYLE = PSTricksConstants.TOKEN_FILL_NONE;
+
+	/** The value by default of the width of the hatch (in pixels). */
+	public static final float DEFAULT_HATCH_WIDTH = DEFAULT_THICKNESS;
+
+	/** The value by default of the attribute isResizable */
+	public static final boolean DEFAULT_ISRESIZABLE = true;
+
+	/** The value by default of the attribute isHatched */
+	public static final boolean DEFAULT_IS_HATCHED = false;
+
+	/** The label of double boundary choice */
+	public static final String LABEL_BORDERS_POSITION_CHOICE = LaTeXDrawLang.getOthersString("Figure.boundPos"); //$NON-NLS-1$
+
+	/** The centre of the rotation */
+	protected LaTeXDrawPoint2D gravityCenter;
+
+	/** The angle of rotation (in rad) */
+	public double rotationAngle;
+
+	/** Allows to know if the figure is on rotation */
+	protected boolean isOnRotation;
+
+	/** The size of the separation between the double line in pixels */
+	protected double doubleSep;
+
+	/** The value by default of the attribute doubleLine */
+	public static final boolean DEFAULT_DOUBLELINE = false;
+
+	/** The value by default of the attribute doubleSep (in pixels). */
+	public static final double DEFAULT_DOUBLESEP = 6;
+
+	/** The angle of rotation by default */
+	public static final double DEFAULT_ROTATION_ANGLE = 0.;
+
+	public static final float DEFAULT_BLACK_DASH_LGTH = 8;
+
+	public static final float DEFAULT_WHITE_DASH_LGTH = 8;
+
+	/** The separator between dots by default (in pixels). */
+	public static final float DEFAULT_DOT_SEP = 8;
+
+	/** The length of the black dash of a line (in pixels). */
+	protected float blackDashLength;
+
+	/** The length of the white dash of a line (in pixels). */
+	protected float whiteDashLength;
+
+	/** The separation between two dots in a dotted line (in pixels). */
+	protected float dotSep;
+
+	/** The borders of the figure */
+	protected LaTeXDrawRectangle borders;
+
+	/** The shape of the figure */
+	protected transient Shape shape; 
+
+	/** The size of the separation between the hatching (in pixels). */
+	protected double hatchingSep;
+	
+	/** Define if the shape can have arrows. */
+	protected boolean canHaveArrow;
+	
+	/** The token used for Horizontal hatch in LaTeXDraw 1.5.1.1, 1.5.1 and 1.5.<br>
+	 * Useful to read file ldp of these versions of LaTeXDraw.*/
+	public static final String DECREPETED_FILL_HORIZ = "Horizontal hatch";//$NON-NLS-1$
+	
+	/** The token used for Vertical hatch in LaTeXDraw 1.5.1.1, 1.5.1 and 1.5.<br>
+	 * Useful to read file ldp of these versions of LaTeXDraw.*/
+	public static final String DECREPETED_FILL_VERT  = "Vertical hatch";//$NON-NLS-1$
+	
+	/** The token used for Cross hatch in LaTeXDraw 1.5.1.1, 1.5.1 and 1.5.<br>
+	 * Useful to read file ldp of these versions of LaTeXDraw.*/
+	public static final String DECREPETED_FILL_CROSS = "Cross hatch";//$NON-NLS-1$
+	
+	/** The token used for No hatch in LaTeXDraw 1.5.1.1, 1.5.1 and 1.5.<br>
+	 * Useful to read file ldp of these versions of LaTeXDraw.*/
+	public static final String DECREPETED_FILL_NO    = "No hatch";//$NON-NLS-1$
+
+	public static final short DELIMITOR_ORIENTATION_NONE 	= -1;
+	
+	public static final short DELIMITOR_ORIENTATION_WEST 	= 0;
+	
+	public static final short DELIMITOR_ORIENTATION_EAST	= 2;
+	
+	public static final short DELIMITOR_ORIENTATION_NORTH = 3;
+	
+	public static final short DELIMITOR_ORIENTATION_SOUTH = 8;
+	
+	public static final short DELIMITOR_ORIENTATION_NW 	= 4;
+	
+	public static final short DELIMITOR_ORIENTATION_SW 	= 5;
+	
+	public static final short DELIMITOR_ORIENTATION_NE 	= 6;
+	
+	public static final short DELIMITOR_ORIENTATION_SE 	= 7;
+	
+	public static final short DELIMITOR_ROTATION		= 9;
+	
+	
+
+	/**
+	 * The constructor.
+	 * @param increaseMeter If the figure must increase the meter of figure {@literal number}.
+	 */
+	protected Figure(boolean increaseMeter)
+	{
+		canHaveArrow = false;
+		hatchingSep = DEFAULT_HATCH_SEP;
+		isBordersMovable = DEFAULT_IS_BORDERS_MOVABLE;
+		bordersPosition = DEFAULT_BORDERS_POSITION;
+		doubleColor = DEFAULT_DOUBLE_COLOR;
+		isResizable = DEFAULT_ISRESIZABLE;
+		doubleSep = DEFAULT_DOUBLESEP;
+		isDashableOrDotable = true;
+		isDoubleBoundaryable = true;
+		isCustomizable = DEFAULT_IS_CUSTOMISABLE;
+		isOnRotation = false;
+		isThicknessable = DEFAULT_IS_THICKNESSABLE;
+		rotationAngle = DEFAULT_ROTATION_ANGLE;
+		isSelected = false;
+		interiorColor = DEFAULT_INTERIOR_COL;
+		linesColor = DEFAULT_BORDERS_COL;
+		hatchingColor = DEFAULT_BORDERS_COL;
+		hatchingStyle = DEFAULT_HATCH_STYLE;
+		isFilled = DEFAULT_IS_FILLED;
+		canBeFilled = true;
+		dSelected = null;
+		number = increaseMeter ? meter++ : -1;
+		blackDashLength = DEFAULT_BLACK_DASH_LGTH;
+		whiteDashLength = DEFAULT_WHITE_DASH_LGTH;
+		lineStyle = PSTricksConstants.LINE_NONE_STYLE;
+		dotSep = DEFAULT_DOT_SEP;
+		thickness = DEFAULT_THICKNESS;
+		hatchingWidth = DEFAULT_HATCH_WIDTH;
+		gravityCenter = new LaTeXDrawPoint2D();
+		isResizable = true;
+		shadowAngle = DEFAULT_SHADOW_ANGLE;
+		shadowColor = DEFAULT_SHADOW_COLOR;
+		shadowSize  = DEFAULT_SHADOW_SIZE;
+		hasShadow   = DEFAULT_SHADOW_HAS;
+		canHaveShadow = true;
+		gradientAngle 		= DEFAULT_GRADIENT_ANGLE;
+		gradientEndColor 	= PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+		gradientStartColor 	= PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+		gradientMidPoint 	= DEFAULT_GRADIENT_MID_POINT;
+	}
+
+
+
+	
+	/**
+	 * Creates a figure from one another (but do not create the gravity centre, the border and the shape).
+	 * @param f The figure to copy.
+	 * @param sameNumber True is the new figure must have the same number as the other.
+	 * @throws IllegalArgumentException If f is null.
+	 */
+	protected Figure(Figure f, boolean sameNumber)
+	{
+		if(f==null)
+			throw new IllegalArgumentException();
+		
+		canBeFilled		= f.canBeFilled;
+		canHaveShadow	= f.canHaveShadow;
+		isBordersMovable= f.isBordersMovable;
+		isCustomizable	= f.isCustomizable;
+		isDashableOrDotable = f.isDashableOrDotable;
+		isDoubleBoundaryable= f.isDoubleBoundaryable;
+		isFilled		= f.isFilled;
+		isOnRotation	= f.isOnRotation;
+		isResizable		= f.isResizable;
+		isSelected		= f.isSelected;
+		interiorColor	= f.interiorColor;
+		isThicknessable	= f.isThicknessable;
+		blackDashLength = f.blackDashLength;
+		bordersPosition = f.bordersPosition;
+		dotSep 			= f.dotSep;
+		doubleColor 	= f.doubleColor;
+		doubleSep 		= f.doubleSep;
+		gradientAngle	= f.gradientAngle;
+		gradientEndColor= f.gradientEndColor;
+		gradientMidPoint= f.gradientMidPoint;
+		gradientStartColor=f.gradientStartColor;
+		hasDoubleBoundary=f.hasDoubleBoundary;
+		hasShadow		= f.hasShadow;
+		hatchingAngle	= f.hatchingAngle;
+		hatchingColor	= f.hatchingColor;
+		hatchingStyle	= f.hatchingStyle;
+		hatchingWidth	= f.hatchingWidth;
+		hatchingSep		= f.hatchingSep;
+		linesColor		= f.linesColor;
+		lineStyle		= f.lineStyle;
+		number			= sameNumber ? f.number : meter++;
+		rotationAngle	= f.rotationAngle;
+		shadowAngle		= f.shadowAngle;
+		shadowColor		= f.shadowColor;
+		shadowSize		= f.shadowSize;
+		thickness		= f.thickness;
+		whiteDashLength	= f.whiteDashLength;
+	}
+	
+	
+
+	/**
+	 * Allows to know if the new position is a valid borders position.
+	 * @param pos The position to check.
+	 * @return True is the position is valid.
+	 */
+	public static boolean isValidBordersPosition(String pos)
+	{
+		return pos.equals(PSTricksConstants.BORDERS_INSIDE)
+				|| pos.equals(PSTricksConstants.BORDERS_MIDDLE)
+				|| pos.equals(PSTricksConstants.BORDERS_OUTSIDE);
+	}
+
+
+
+
+	/**
+	 * @return True if the figure is in rotation.
+	 */
+	public boolean isOnRotation()
+	{
+		return isOnRotation;
+	}
+
+
+
+
+	/**
+	 * @return True if the figure is hatched.
+	 */
+	public synchronized boolean isHatched()
+	{
+		return !hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_NONE) &&
+				!hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_SOLID) &&
+				!hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_GRADIENT) ;
+	}
+
+
+
+
+	/**
+	 * Allows to set if the figure must be in rotation or not.
+	 * @param on True : the figure must be on rotation.
+	 */
+	public synchronized void setOnRotation(boolean on)
+	{
+		if(borders != null)
+			borders.setOnRotation(on);
+		
+		isOnRotation = on;
+		updateStyleOfDelimitors();
+	}
+
+
+
+
+	/**
+	 * Allows to change the style of the delimiters following the actions to do (rotation, ...).
+	 */
+	public void updateStyleOfDelimitors()
+	{
+		if(borders != null)
+			borders.updateStyleOfDelimitors();
+	}
+
+
+
+
+	/**
+	 * Allows to create a Java Swing shape from the figure.
+	 * @return The Java Swing shape.
+	 */
+	public abstract Shape createShape2D();
+
+
+	
+	/**
+	 * Allows to create a java swing shape from the figure (without any rotation).
+	 * @return The java swing shape.
+	 */
+	public abstract Shape createNonRotatedShape2D();
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Figure f = (Figure)super.clone();
+		f.dSelected = null;
+		f.isOnRotation = isOnRotation;
+		f.rotationAngle = rotationAngle;
+		f.isSelected = isSelected;
+		f.interiorColor = interiorColor;
+		f.linesColor = linesColor;
+		f.isFilled = isFilled;
+		f.canBeFilled = canBeFilled;
+		f.number = meter++;
+		f.blackDashLength = blackDashLength;
+		f.whiteDashLength = whiteDashLength;
+		f.lineStyle = lineStyle;
+		f.dotSep = dotSep;
+		f.thickness = thickness;
+		f.gravityCenter = (LaTeXDrawPoint2D)gravityCenter.clone();
+		
+		f.doubleColor = doubleColor;
+		f.doubleSep = doubleSep;
+		f.hasDoubleBoundary = hasDoubleBoundary;
+		f.hatchingAngle = hatchingAngle;
+		f.hatchingColor = hatchingColor;
+		f.hatchingStyle = hatchingStyle;
+		f.hatchingWidth = hatchingWidth;
+		f.isBordersMovable = isBordersMovable;
+		f.isCustomizable = isCustomizable;
+		f.isDashableOrDotable = isDashableOrDotable;
+		f.isDoubleBoundaryable = isDoubleBoundaryable;
+		f.isResizable = isResizable;
+		f.isThicknessable = isThicknessable;
+		f.bordersPosition = bordersPosition;
+		
+		f.hasShadow 	= hasShadow;
+		f.shadowAngle 	= shadowAngle;
+		f.shadowColor 	= shadowColor;
+		f.shadowSize 	= shadowSize;
+		f.canHaveShadow = canHaveShadow;
+		f.gradientAngle = gradientAngle;
+		f.gradientEndColor 		= gradientEndColor;
+		f.gradientStartColor 	= gradientStartColor;
+		f.gradientMidPoint 		= gradientMidPoint;
+
+		f.hatchingSep = hatchingSep;
+		
+		return f;
+	}
+
+
+
+
+	/**
+	 * Allows to know if the figure can be filled or not.
+	 * @return True if the figure can be filled.
+	 */
+	public boolean canBeFilled()
+	{
+		return canBeFilled;
+	}
+
+
+
+
+	/**
+	 * Allows to know if the figure can be hatched or not
+	 * @return True if the figure can be hatched (for most of figures, if it can be filled, it can be hatched)
+	 */
+	public boolean canBeHatched()
+	{
+		return canBeFilled;
+	}
+
+
+
+
+	/**
+	 * Allows to get the number of the figure
+	 * @return The number of the figure
+	 */
+	public synchronized int getNumber()
+	{
+		return number;
+	}
+
+
+
+
+	/**
+	 * Allows to get a point of the borders
+	 * @param id The position of the point (-1 : return the last point, in fact  the south-east point)
+	 * @return The point
+	 */
+	public synchronized LaTeXDrawPoint2D getBordersPoint(int id)
+	{
+		if(borders == null)
+			return null;
+
+		if(id == -1)
+			return borders.getPoint(borders.getNbPoints()-1);
+
+		if(id<0 || id>LaTeXDrawRectangle.NB_POINTS_FRAME-1)
+			throw new IllegalArgumentException();
+
+		return borders.getPoint(id);
+	}
+
+
+
+
+	/**
+	 * Allows to get the angle of rotation (in rad).
+	 * @return The angle of rotation.
+	 */
+	public synchronized double getRotationAngle()
+	{
+		return rotationAngle;
+	}
+
+
+
+
+	/**
+	 * Allows to set the angle of rotation
+	 * @param theta The new angle of rotation in radian.
+	 */
+	public synchronized void setRotationAngle(double theta)
+	{
+		if(!Double.isInfinite(theta) && !Double.isNaN(theta))
+		{
+			rotationAngle = theta%(PI*2.);
+			
+			if(borders != null)
+				borders.setRotationAngle(rotationAngle);
+		}
+	}
+
+
+
+
+	/**
+	 * Allows to set the variable isSelected
+	 * @param state The new value of isSelected
+	 */
+	public synchronized void setSelected(boolean state)
+	{
+		if(!state)
+		{
+			onRelease();
+			onDelimitorRelease();
+		}
+		else
+		{
+			isSelected = state;
+			if(borders != null)
+				borders.setSelected(state);
+		}
+	}
+
+
+
+
+
+	/**
+	 * Allows to set the colour of the borders of the figure
+	 * @param c The new colour of the borders
+	 */
+	public synchronized void setLinesColor(Color c)
+	{
+		if(c!=null)
+			linesColor = c;
+	}
+
+
+
+
+	/**
+	 * Allows to set the colour of the interior of the figure
+	 * @param c The new colour of the interior
+	 */
+	public synchronized void setInteriorColor(Color c)
+	{
+		if(c!=null)
+			interiorColor = c;
+	}
+
+
+
+
+
+	/**
+	 * Allows to set the style of the lines of the figure
+	 * @param style The new style of the lines of the figure
+	 * @throws IllegalArgumentException If the style is invalid.
+	 */
+	public synchronized void setLineStyle(String style)
+	{
+		if(isValidStyle(style))
+			lineStyle = style;
+		else
+			throw new IllegalArgumentException();
+	}
+
+
+
+
+	/**
+	 * Allows to change the kid of hatch of the figure.
+	 * @param style The new style.
+	 * @throws IllegalArgumentException If the style is invalid.
+	 */
+	public synchronized void setHatchingStyle(String style)
+	{
+		if(PSTricksConstants.isValidFillStyle(style))
+			hatchingStyle = style;
+		else
+			throw new IllegalArgumentException();
+	}
+
+
+
+
+	/**
+	 * Allows to set the attribute isFilled
+	 * @param state The new value of
+	 */
+	public synchronized void setIsFilled(boolean state)
+	{
+		isFilled = state;
+	}
+
+
+
+
+	/**
+	 * Allows to set the colour of the hatch of the figure
+	 * @param color The new colour of the hatch
+	 */
+	public synchronized void setHatchingColor(Color color)
+	{
+		if(canBeFilled() && color!=null)
+			hatchingColor = color;
+	}
+
+
+
+
+	/**
+	 * Allows to set the width of the hatch.
+	 * @param width The new width of the hatch.
+	 */
+	public synchronized void setHatchingWidth(float width)
+	{
+		if(width>0 && !Double.isInfinite(width) && !Double.isNaN(width))
+			hatchingWidth = width;
+	}
+
+
+
+
+	/**
+	 * Allows to set the thickness of the figure
+	 * @param value The new
+	 */
+	public synchronized void setThickness(float value) 
+	{
+		if(value<=0 || Float.isInfinite(value) || Float.isNaN(value))
+			return ;
+
+		if(borders != null)
+			borders.setThickness(value);
+		
+		thickness = value;
+	}
+
+
+
+
+	/**
+	 * Defines the actions to do when the figure is dragged.
+	 * @param formerPt The former position of the cursor.
+	 * @param newPt The new position of the cursor.
+	 * @throws Exception
+	 */
+	public abstract void onDragged(Point formerPt, Point newPt) throws Exception;
+
+
+
+
+	/**
+	 * Allows to draw the figure.
+	 * @param g The graphic
+	 * @param antiAlias The antialiasing value
+	 * @param rendering The rendering value
+	 * @param alphaInter The alpha interpolation value
+	 * @param colorRendering The colour rendering value
+	 */
+	public abstract void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering);
+
+
+
+
+	/**
+	 * Allows to set the last point of the figure
+	 * @param pt The new point
+	 */
+	public synchronized void setLastPoint(LaTeXDrawPoint2D pt)
+	{
+		setLastPoint(pt.x, pt.y);
+	}
+
+
+
+
+	/**
+	 * Allows to set the last point of the figure
+	 * @param x The X-coordinates of the new point
+	 * @param y The Y-coordinates of the new point
+	 */
+	public abstract void setLastPoint(double x, double y);
+
+
+	
+	/**
+	 * @return The last point, null if there is no last point.
+	 */
+	public abstract LaTeXDrawPoint2D getLastPoint();
+	
+	
+	
+	/**
+	 * Allows to set the first point of the figure
+	 * @param pt The new point
+	 */
+	public synchronized void setFirstPoint(LaTeXDrawPoint2D pt)
+	{
+		setFirstPoint(pt.x, pt.y);
+	}
+
+
+
+
+	/**
+	 * Allows to set the first point of the figure
+	 * @param x The X-coordinates of the new point
+	 * @param y The Y-coordinates of the new point
+	 */
+	public abstract void setFirstPoint(double x, double y);
+
+
+
+
+	/**
+	 * Allows to gap the figure
+	 * @param shiftX The X-coordinates gap
+	 * @param shiftY The Y-coordinates gap
+	 */
+	public abstract void shift(double shiftX, double shiftY);
+
+
+
+
+	/**
+	 * Allows to gap the figure.
+	 * @param formerPt The former position of the figure.
+	 * @param newPt The new position of the figure.
+	 * @throws IllegalArgumentException If one of the point is null.
+	 */
+	public void shift(LaTeXDrawPoint2D formerPt, LaTeXDrawPoint2D newPt)
+	{
+		if(formerPt==null || newPt==null)
+			throw new IllegalArgumentException();
+		
+		shift(newPt.x - formerPt.x, newPt.y - formerPt.y);
+	}
+
+
+
+
+	/**
+	 * Allows to gap the figure
+	 * 
+	 * @param formerPt The former position of the figure
+	 * @param newPt The new position of the figure
+	 */
+	public void shift(Point formerPt, Point newPt)
+	{
+		shift(newPt.x - formerPt.x, newPt.y - formerPt.y);
+	}
+
+
+
+
+	/**
+	 * Allows to rescale the polygon in width
+	 * @param formerX The old value of the X-coordinate to change
+	 * @param newX The X-coordinate of the point which rescale the figure. It's
+	 * Useful for determinate of which side (east or west) we must enlarge thecfigure
+	 * @param percent The new width of the figure in percent
+	 * @param bound The reference for moving points (the borders of the figure
+	 * or, for example, the borders of the drawing containing the figure)
+	 */
+	public abstract void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound);
+
+
+
+
+	/**
+	 * Allows to rescale the polygon in width
+	 * @param formerY The former value of the y
+	 * @param newY The Y-coordinate of the point which rescale the polygon. It's
+	 * Useful for determinate of which side (east or west) we must enlarge the polygon
+	 * @param percent The new width of the polygon in percent
+	 * @param bound The reference for moving points (the borders of the figure
+	 * or, for example, the borders of the drawing containing the figure)
+	 */
+	public abstract void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound);
+
+
+
+
+	/**
+	 * Allows to rotate, following the angle of rotation, the given point.
+	 * @param p The point to rotate.
+	 * @return The new point rotated.
+	 */
+	public LaTeXDrawPoint2D rotatePoint(LaTeXDrawPoint2D p)
+	{
+		return rotatePoint(p, gravityCenter, rotationAngle);
+	}
+
+
+
+
+	/**
+	 * Allows to rotate a point with the gravity centre of the figure.
+	 * @param p The point to rotate.
+	 * @param theta The angle of rotation.
+	 * @return The rotated point.
+	 */
+	public synchronized LaTeXDrawPoint2D rotatePoint(LaTeXDrawPoint2D p, double theta)
+	{
+		return rotatePoint(p, getGravityCenter(), theta);
+	}
+
+
+	
+	
+	/**
+	 * Allows to rotate a point with as reference an other point.
+	 * @param p The point to rotate.
+	 * @param gravityC The point of reference.
+	 * @param theta The angle of rotation (in rad).
+	 * @return The rotated point.
+	 */
+	public static LaTeXDrawPoint2D rotatePoint(LaTeXDrawPoint2D p, LaTeXDrawPoint2D gravityC, double theta)
+	{
+		LaTeXDrawPoint2D pt = new LaTeXDrawPoint2D();
+		double cosTheta;
+		double sinTheta;
+		
+		if(theta<0.)
+			theta = 2.*PI + theta;
+		
+		if((theta%(2.*PI))==0.)
+			return (LaTeXDrawPoint2D)p.clone();
+		
+		if(Math.abs(theta%(2.*PI)-PI/2.)<0.000001)
+		{	
+			cosTheta = 0.;
+			sinTheta = 1.;
+		}
+		else
+		{
+			if(Math.abs(theta%(2.*PI)-PI)<0.000001)
+			{
+				cosTheta = -1.;
+				sinTheta = 0.;
+			}
+			else
+			{
+				if(Math.abs(theta%(2.*PI)-(3.*PI/2.))<0.000001)
+				{
+					cosTheta = 0.;
+					sinTheta = -1.;
+				}
+				else
+				{
+					cosTheta = Math.cos(theta);
+					sinTheta = Math.sin(theta);
+				}
+			}
+		}
+
+		pt.x = cosTheta * (p.x - gravityC.x) - sinTheta * (p.y - gravityC.y) + gravityC.x;
+		pt.y = sinTheta * (p.x - gravityC.x) + cosTheta * (p.y - gravityC.y) + gravityC.y;
+
+		return pt;
+	}
+	
+	
+
+
+	/**
+	 * Allows to rotate, following the negation of angle of rotation, the given point.
+	 * @param p The point to rotate.
+	 * @return The new point rotated.
+	 */
+	public LaTeXDrawPoint2D rotateInvertPoint(LaTeXDrawPoint2D p)
+	{
+		LaTeXDrawPoint2D pt = new LaTeXDrawPoint2D();
+		double angle = -rotationAngle;
+		double cosTheta;
+		double sinTheta;
+
+		if(angle<0)
+			angle = 2.*PI + angle;
+		
+		angle = angle%(2.*PI);
+		
+		if(angle==0.)
+			return (LaTeXDrawPoint2D)p.clone();
+		
+		if(Math.abs(angle-(PI/2.))<0.000001)
+		{	
+			cosTheta = 0.;
+			sinTheta = 1.;
+		}
+		else
+		{
+			if(Math.abs(angle-PI)<0.000001)
+			{
+				cosTheta = -1.;
+				sinTheta = 0.;
+			}
+			else
+			{
+				if(Math.abs(angle-(3.*PI/2.))<0.000001)
+				{
+					cosTheta = 0.;
+					sinTheta = -1.;
+				}
+				else
+				{
+					cosTheta = Math.cos(angle);
+					sinTheta = Math.sin(angle);
+				}
+			}
+		}
+		
+		pt.x = cosTheta * (p.x - gravityCenter.x) - sinTheta * (p.y - gravityCenter.y) + gravityCenter.x;
+		pt.y = sinTheta * (p.x - gravityCenter.x) + cosTheta * (p.y - gravityCenter.y) + gravityCenter.y;
+
+		return pt;
+	}
+
+
+
+
+	/**
+	 * Allows to rotate, following the angle of rotation, the given point.
+	 * @param p The point to rotate.
+	 * @return The new point rotated.
+	 */
+	public LaTeXDrawPoint2D rotatePoint(Point p)
+	{
+		return rotatePoint(new LaTeXDrawPoint2D(p.x, p.y));
+	}
+
+
+
+
+	/**
+	 * Allows to rotate, following the negation of the angle of rotation, the given point.
+	 * @param p The point to rotate.
+	 * @return The new point rotated.
+	 */
+	public LaTeXDrawPoint2D rotateInvertPoint(Point p)
+	{
+		return rotateInvertPoint(new LaTeXDrawPoint2D(p.x, p.y));
+	}
+
+
+
+
+	/**
+	 * Actions to do when the figure is released.
+	 */
+	public synchronized void onDelimitorRelease()
+	{
+		updateStyleOfDelimitors();
+		dSelected = null;
+		if(borders != null)
+			borders.onDelimitorRelease();
+	}
+
+
+
+
+	/**
+	 * Fills a figure.
+	 * @param g The graphics.
+	 * @param antiAlias The antialiasing value.
+	 * @param rendering The rendering value.
+	 * @param alphaInter The alpha interpolation value.
+	 * @param colorRendering The colour rendering value.
+	 * @param s The pattern of the figure to fill.
+	 */
+	protected void fillFigure(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering, Shape s)
+	{
+		Color formerColor = g.getColor();
+		GeneralPath p = new GeneralPath(s);
+		p.setWindingRule(GeneralPath.WIND_NON_ZERO);
+		
+		try
+		{
+			if(!hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_NONE))
+			{
+				if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_SOLID))
+				{
+					g.setColor(interiorColor);
+					g.fill(shape);
+					g.setColor(formerColor);
+					return;
+				}
+				
+				if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_GRADIENT))
+				{
+					LaTeXDrawPoint2D NW = getTheNWPoint();
+					LaTeXDrawPoint2D SE = getTheSEPoint();
+					LaTeXDrawPoint2D pt1 = new LaTeXDrawPoint2D((NW.x+SE.x)/2., NW.y);
+					LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D((NW.x+SE.x)/2., SE.y);
+					double angle = gradientAngle%(2*PI);
+					double gradMidPt = gradientMidPoint;
+					if(angle<0)
+						angle = 2*PI + angle;
+					
+					if(angle>=PI)
+					{
+						gradMidPt = 1 - gradientMidPoint;
+						angle = angle-PI;
+					}
+					
+					if(angle!=0)
+					{
+						if((angle%(PI/2.))==0)
+						{
+							pt1 = new LaTeXDrawPoint2D(NW.x, (NW.y+SE.y)/2.);
+							pt2 = new LaTeXDrawPoint2D(SE.x, (NW.y+SE.y)/2.);
+							if(gradMidPt<0.5)
+								pt1.x = pt2.x - Point2D.distance(pt2.x, pt2.y, SE.x,(NW.y+SE.y)/2.);
+							pt2.x = (NW.x+(SE.x-NW.x)*gradMidPt);
+						}
+						else
+						{
+							LaTeXDrawPoint2D cg = getGravityCenter();
+							Line l2, l;
+							
+							pt1 = Figure.rotatePoint(pt1, cg, -angle);
+							pt2 = Figure.rotatePoint(pt2, cg, -angle);
+							l = new Line(pt1, pt2, false);
+							
+							if(angle>=0 && angle<(PI/2.))
+								 l2 = l.getPerpendicularLine(NW, false);
+							else l2 = l.getPerpendicularLine(new LaTeXDrawPoint2D(NW.x,SE.y), false);
+							
+							pt1 = l.getIntersection(l2);
+							double distance = Point2D.distance(cg.x, cg.y, pt1.x, pt1.y);
+							l.setPointAt(pt1, 0);
+							LaTeXDrawPoint2D[] pts = l.findPoints(pt1, 2*distance*gradMidPt);
+							pt2 = pts[0];
+							
+							if(gradMidPt<0.5)
+								pt1 = Figure.rotatePoint(pt1, gravityCenter, PI);
+						}
+					}//if(angle!=0)
+					else 
+					{
+						if(gradMidPt<0.5)
+							pt1.y = pt2.y - Point2D.distance(pt2.x, pt2.y, (NW.x+SE.x)/2.,SE.y);
+						pt2.y = (NW.y+(SE.y-NW.y)*gradMidPt);
+					}
+					
+					g.setPaint(new GradientPaint(
+							(float)pt1.x, (float)pt1.y, gradientStartColor, 
+							(float)pt2.x, (float)pt2.y, gradientEndColor,true));
+					g.fill(p);
+					g.setColor(formerColor);
+					return;
+				}
+				
+				Shape oldClip 		= g.getClip();
+				Rectangle2D bounds  = s.getBounds2D();
+				g.setClip(s);
+				
+				if(isFilled() || hasShadow())
+				{
+					g.setColor(interiorColor);
+					g.fill(bounds);
+				}
+				
+				if(isHatched())
+				{
+					Stroke oldStroke = g.getStroke();
+					
+					if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_VLINES) || 
+						hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_VLINES_F)) 
+						paintHatchings2(g, hatchingAngle, bounds);
+					else 
+						if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_HLINES) || 
+						   hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_HLINES_F)) 
+						paintHatchings2(g, hatchingAngle>0?hatchingAngle-Math.PI/2.:hatchingAngle+Math.PI/2., bounds);
+					else 
+						if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH) ||
+						   hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH_F)) 
+						{
+							paintHatchings2(g, hatchingAngle, bounds);
+							paintHatchings2(g, hatchingAngle>0?hatchingAngle-Math.PI/2.:hatchingAngle+Math.PI/2., bounds);
+						}
+					
+					g.setStroke(oldStroke);
+				}
+				
+				g.setClip(oldClip);
+			}
+			else
+				if(isFilled)
+				{
+					g.setColor(interiorColor);
+					g.fill(p);
+				}
+		}catch(LaTeXDrawException e)
+		{
+			e.printStackTrace();
+		}
+		g.setColor(formerColor);
+	}
+
+	
+	
+	/**
+	 * Paints the hatchings.
+	 * @param g The graphics to paint.
+	 * @param angle The angle of the hatchings (in radian).
+	 * @param clip The clip box.
+	 */
+	private void paintHatchings2(Graphics2D g, double angle, Rectangle2D clip)
+	{
+		if(g==null || clip==null)
+			return ;
+	
+		double angle2 = angle%(Math.PI*2.);
+		float halphPI = (float)(Math.PI/2.);
+		
+		if(angle2>0)
+		{
+			if((float)angle2>3f*halphPI)
+				angle2 = angle2-Math.PI*2.;
+			else
+				if((float)angle2>halphPI)
+					angle2 = angle2-Math.PI;
+		}
+		else
+			if((float)angle2<-3f*halphPI)
+				angle2 = angle2+Math.PI*2.;
+			else
+				if((float)angle2<-halphPI)
+					angle2 = angle2+Math.PI;
+		
+		Line2D.Double line  = new Line2D.Double();
+		double val			= hatchingWidth+hatchingSep;
+		float fAngle		= (float)angle2;
+		
+		g.setStroke(new BasicStroke(hatchingWidth, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+		g.setPaint(getHatchingColor());
+		
+		if(fAngle==0f)
+		{
+			line.y1 	= clip.getMinY();
+			line.y2 	= clip.getMaxY();
+			double maxX = clip.getMaxX();
+			
+			for(double x = clip.getMinX(); x<maxX; x+=val)
+			{
+				line.x1 = line.x2 = x;
+				g.draw(line);
+			}
+		}
+		else 
+			if(fAngle==halphPI || fAngle==-halphPI)
+			{
+				line.x1 	= clip.getMinX();
+				line.x2 	= clip.getMaxX();
+				double maxY = clip.getMaxY();
+				
+				for(double y = clip.getMinY(); y<maxY; y+=val)
+				{
+					line.y1 = line.y2 = y;
+					g.draw(line);
+				}
+			}
+			else 
+			{
+				double incX = val/Math.cos(angle2);
+				double incY = val/Math.sin(angle2);
+				double maxX;
+				
+				if(fAngle>0f) 
+				{
+					line.y1 = clip.getMinY();
+					maxX 	= clip.getMaxX() + (clip.getMaxY()-(clip.getMinY()<0?clip.getMinY():0)) * Math.tan(angle2);
+				}
+				else 
+				{
+					line.y1 = clip.getMaxY();
+					maxX 	= clip.getMaxX() - clip.getMaxY() * Math.tan(angle2);
+				}
+				
+				line.x1 = clip.getMinX();
+				line.x2 = line.x1;
+				line.y2 = line.y1;
+				
+				if(((float)incX)<=0f)
+					return ;
+				
+				while(line.x2 < maxX)
+				{
+					line.x2 += incX;
+					line.y1 += incY;
+					g.draw(line);
+				}
+			}
+	}
+	
+
+
+	/**
+	 * Allows to know if the point pt is in (or on) the figure.
+	 * @param pt The point
+	 * @return true: if the point is in or on the figure.
+	 */
+	public boolean isIn(Point pt)
+	{
+		return isIn(new LaTeXDrawPoint2D(pt.x, pt.y));
+	}
+
+
+
+
+	/**
+	 * Allows to know if the point pt is in(or on) the figure.
+	 * @param pt The point
+	 * @return true : if the point is in or on the figure.
+	 */
+	public abstract boolean isIn(LaTeXDrawPoint2D pt);
+
+
+
+
+	/**
+	 * @return True if the figure is filled by a colour.
+	 */
+	public synchronized boolean isFilled()
+	{
+		return isFilled;
+	}
+
+
+
+
+	/**
+	 * @return True if a delimiter is selected.
+	 */
+	public synchronized boolean isADelimitorSelected()
+	{
+		return dSelected != null;
+	}
+
+
+
+
+	/**
+	 * Allows to know if the figure intersects the given shape.
+	 * @param r The shape.
+	 * @return True if the figure intersects the shape.
+	 */
+	public boolean intersected(Rectangle2D.Double r)
+	{
+		if(r==null)
+			return false;
+		
+		Shape s = createShape2D();
+			
+		Shape sTooSmall = getTooSmallShape(s);
+		
+		if(sTooSmall!=null)
+			s = sTooSmall;
+		
+		BasicStroke wideline = new BasicStroke(thickness);
+        Shape outline = wideline.createStrokedShape(s);
+		
+		return outline.intersects(r) && !outline.contains(r);
+	}
+
+
+
+
+	/**
+	 * Allows to check if the style is possible.
+	 * @param style The style to check.
+	 * @return True if the style is valid.
+	 */
+	public static boolean isValidStyle(String style)
+	{
+		if(style.equals(PSTricksConstants.LINE_NONE_STYLE)|| 
+			style.equals(PSTricksConstants.LINE_DASHED_STYLE) || 
+			style.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			return true;
+
+		return false;
+	}
+
+
+
+
+	/**
+	 * Allows to create a list of the different position of the borders.
+	 * @return The list.
+	 */
+	public static LaTeXDrawComboBox createBordersPositionChoice()
+	{
+		LaTeXDrawComboBox dbPositionChoice = new LaTeXDrawComboBox();
+		dbPositionChoice.setRenderer(new LabelListCellRenderer());
+
+		JLabel label = new JLabel(PSTricksConstants.BORDERS_OUTSIDE);
+		label.setName(PSTricksConstants.BORDERS_OUTSIDE);
+		label.setIcon(LaTeXDrawResources.innerIcon);
+		dbPositionChoice.addItem(label);
+
+		label = new JLabel(PSTricksConstants.BORDERS_INSIDE);
+		label.setName(PSTricksConstants.BORDERS_INSIDE);
+		label.setIcon(LaTeXDrawResources.outerIcon);
+		dbPositionChoice.addItem(label);
+
+		label = new JLabel(PSTricksConstants.BORDERS_MIDDLE);
+		label.setName(PSTricksConstants.BORDERS_MIDDLE);
+		label.setIcon(LaTeXDrawResources.middleIcon);
+		dbPositionChoice.addItem(label);
+
+		dbPositionChoice.setName(Figure.LABEL_BORDERS_POSITION_CHOICE);
+		dbPositionChoice.setActionCommand(Figure.LABEL_BORDERS_POSITION_CHOICE);
+		dbPositionChoice.setSelectedItem(Figure.DEFAULT_BORDERS_POSITION);
+
+		return dbPositionChoice;
+	}
+
+
+	
+	
+	/**
+	 * Allows to create a list of the different style of line.
+	 * @return The list.
+	 */
+	public static LaTeXDrawComboBox createStyleLineChoice()
+	{
+		LaTeXDrawComboBox lineChoice  = new LaTeXDrawComboBox();
+		lineChoice.setRenderer(new LabelListCellRenderer());
+		JLabel label = new JLabel(PSTricksConstants.LINE_NONE_STYLE);
+		label.setName(PSTricksConstants.LINE_NONE_STYLE);
+		label.setIcon(LaTeXDrawResources.lineStyleNoneIcon);
+     	lineChoice.addItem(label);
+		label = new JLabel(PSTricksConstants.LINE_DASHED_STYLE);
+		label.setName(PSTricksConstants.LINE_DASHED_STYLE);
+		label.setIcon(LaTeXDrawResources.lineStyleDashedIcon);
+     	lineChoice.addItem(label);
+     	label = new JLabel(PSTricksConstants.LINE_DOTTED_STYLE);
+     	label.setName(PSTricksConstants.LINE_DOTTED_STYLE);
+		label.setIcon(LaTeXDrawResources.lineStyleDottedIcon);
+     	lineChoice.addItem(label);    	
+     	
+     	lineChoice.setSelectedItem(PSTricksConstants.LINE_NONE_STYLE);
+     	
+     	return lineChoice;
+	}
+	
+	
+
+
+	/**
+	 * Allows to create a list containing all kinds of hatch.
+	 * @return A JComboBox.
+	 */
+	public static LaTeXDrawComboBox createFillChoice()
+	{
+		LaTeXDrawComboBox list = new LaTeXDrawComboBox();
+		list.setRenderer(new LabelListCellRenderer());
+		list.setName(LABEL_HATCH_CHOICE);
+		list.setActionCommand(LABEL_HATCH_CHOICE);
+
+		JLabel l = new JLabel(PSTricksConstants.TOKEN_FILL_NONE);
+		l.setName(PSTricksConstants.TOKEN_FILL_NONE);
+		l.setIcon(LaTeXDrawResources.hatchNoneIcon);
+		list.addItem(l);
+		l = new JLabel(PSTricksConstants.TOKEN_FILL_CROSSHATCH);
+		l.setName(PSTricksConstants.TOKEN_FILL_CROSSHATCH);
+		l.setIcon(LaTeXDrawResources.hatchCrossIcon);
+		list.addItem(l);
+		l = new JLabel(PSTricksConstants.TOKEN_FILL_HLINES);
+		l.setName(PSTricksConstants.TOKEN_FILL_HLINES);
+		l.setIcon(LaTeXDrawResources.hatchHorizIcon);
+		list.addItem(l);
+		l = new JLabel(PSTricksConstants.TOKEN_FILL_VLINES);
+		l.setName(PSTricksConstants.TOKEN_FILL_VLINES);
+		l.setIcon(LaTeXDrawResources.hatchVertIcon);
+		list.addItem(l);
+		l = new JLabel(PSTricksConstants.TOKEN_FILL_GRADIENT);
+		l.setName(PSTricksConstants.TOKEN_FILL_GRADIENT);
+		l.setIcon(LaTeXDrawResources.gradientIcon);
+		list.addItem(l);
+
+		return list;
+	}
+
+
+
+
+	/**
+	 * Allows to obtain the point most to the North and on the West of the figure.
+	 * @return the point most to the North and on the West of the figure.
+	 */
+	public LaTeXDrawPoint2D getTheNWPoint()
+	{
+		if(borders != null)
+			return borders.getTheNWPoint();
+		return null;
+	}
+
+
+
+
+	/**
+	 * Allows to get the south-east point by taking into account the angle of rotation.
+	 * @return The south-east point of the rotated rectangle.
+	 */
+	public synchronized LaTeXDrawPoint2D getTheSERotatedPoint()
+	{
+		if(borders != null)
+			return borders.getTheSERotatedPoint();
+		return null;
+	}
+
+
+
+
+	/**
+	 * Allows to get the north-west point by taking into account the angle of rotation.
+	 * @return The north-west point of the rotated rectangle.
+	 */
+	public LaTeXDrawPoint2D getTheNWRotatedPoint()
+	{
+		if(borders != null)
+			return borders.getTheNWRotatedPoint();
+		return null;
+	}
+
+
+
+
+	/**
+	 * Allows to get a clone of the centre of gravity of the figure.
+	 * @return The centre of gravity of the figure.
+	 */
+	public synchronized LaTeXDrawPoint2D getGravityCenter()
+	{
+		updateGravityCenter();
+		return (LaTeXDrawPoint2D)gravityCenter.clone();
+	}
+
+
+
+
+	/**
+	 * Allows to get the LaTeX code of the figure.
+	 * @return the LaTeX code of the figure.
+	 */
+	public abstract String getCodePSTricks(DrawBorders drawBorders, float ppc);
+
+
+
+
+	/**
+	 * Allows to get the colour of the borders of the figure.
+	 * @return The colour of the borders of the figure.
+	 */
+	public synchronized Color getLinesColor()
+	{
+		return linesColor;
+	}
+
+
+
+
+	/**
+	 * @return The borders of the figure.
+	 */
+	public synchronized LaTeXDrawRectangle getBorders()
+	{
+		return borders;
+	}
+
+
+
+	/**
+	 * @return The colour of the interior of the figure.
+	 */
+	public synchronized Color getInteriorColor()
+	{
+		return interiorColor;
+	}
+
+
+
+	/**
+	 * @return The style of the lines of the figure.
+	 */
+	public synchronized String getLineStyle()
+	{
+		return lineStyle;
+	}
+
+
+
+	/**
+	 * @return The kind of hatch.
+	 */
+	public synchronized String getHatchingStyle()
+	{
+		return hatchingStyle;
+	}
+
+
+
+	/**
+	 * @return The colour of the hatch.
+	 */
+	public synchronized Color getHatchingColor()
+	{
+		return hatchingColor;
+	}
+
+
+
+	/**
+	 * @return The width of the lines of the hatch.
+	 */
+	public synchronized float getHatchingWidth()
+	{
+		return hatchingWidth;
+	}
+
+
+
+	/**
+	 * @return The thickness of the figure.
+	 */
+	public synchronized float getThickness()
+	{
+		return thickness;
+	}
+
+
+
+	/**
+	 * Corresponds to what to do when the user click on the figure.
+	 * @param pt The clicked point.
+	 */
+	public synchronized void onClick(Point pt)
+	{
+		isSelected = true;
+
+		if (borders != null)
+			borders.onClick(pt);
+	}
+
+
+
+
+	/**
+	 * Corresponds to what to do when the user release the mouse.
+	 */
+	public synchronized void onRelease()
+	{
+		setOnRotation(false);
+		isSelected = false;
+		dSelected = null;
+		if(borders != null)
+			borders.onRelease();
+	}
+
+
+
+
+	/**
+	 * Allows to obtain the point most to the South and on the East of the figure.
+	 * @return the point most to the South and on the East of the figure.
+	 */
+	public synchronized LaTeXDrawPoint2D getTheSEPoint()
+	{
+		if(borders != null)
+			return borders.getTheSEPoint();
+		return null;
+	}
+
+
+
+
+	/**
+	 * @return True if the figure is selected.
+	 */
+	public synchronized boolean isSelected()
+	{
+		return isSelected;
+	}
+
+
+
+
+	/**
+	 * Allows to update the centre of gravity of the figure (Useful for rotation).
+	 */
+	public synchronized void updateGravityCenter()
+	{
+		if(borders==null)
+			return ;
+		
+		borders.updateGravityCenter();
+		
+		LaTeXDrawPoint2D gc = borders.getGravityCenter();
+		
+		if(gravityCenter!=null)
+		{
+			if(gc!=null)
+				gravityCenter.setLocation(gc);
+		}
+		else gravityCenter = gc;
+	}
+
+
+
+	/**
+	 * @return Returns the isCustomizable.
+	 */
+	public synchronized boolean isCustomizable()
+	{
+		return isCustomizable;
+	}
+
+
+
+	/**
+	 * @return Returns the isThicknessable.
+	 */
+	public synchronized boolean isThicknessable()
+	{
+		return isThicknessable;
+	}
+
+
+
+	/**
+	 * @return Returns the doubleSep.
+	 */
+	public synchronized double getDoubleSep()
+	{
+		return doubleSep;
+	}
+
+
+
+	/**
+	 * @param doubleSep The doubleSep to set.
+	 */
+	public synchronized void setDoubleSep(double doubleSep)
+	{
+		if(!Double.isInfinite(doubleSep) && !Double.isNaN(doubleSep))
+			this.doubleSep = doubleSep;
+	}
+
+
+
+	/**
+	 * @return Returns the hasDoubleBoundary.
+	 */
+	public synchronized boolean hasDoubleBoundary()
+	{
+		return hasDoubleBoundary;
+	}
+
+
+
+	/**
+	 * @param hasDoubleBoundary The hasDoubleBoundary to set.
+	 */
+	public synchronized void setHasDoubleBoundary(boolean hasDoubleBoundary)
+	{
+		this.hasDoubleBoundary = hasDoubleBoundary;
+		updateShape();
+	}
+
+
+
+	/**
+	 * @return Returns the isDashableOrDotable.
+	 */
+	public synchronized boolean isDashableOrDotable()
+	{
+		return isDashableOrDotable;
+	}
+
+
+
+	/**
+	 * @return Returns the isDoubleBoundaryable.
+	 */
+	public synchronized boolean isDoubleBoundaryable()
+	{
+		return isDoubleBoundaryable;
+	}
+
+
+
+	/**
+	 * @param isCustomizable The isCustomizable to set.
+	 */
+	public synchronized void setCustomizable(boolean isCustomizable)
+	{
+		this.isCustomizable = isCustomizable;
+	}
+
+
+
+	/**
+	 * @return Returns the isResizable.
+	 */
+	public synchronized boolean isResizable()
+	{
+		return isResizable;
+	}
+
+
+
+	/**
+	 * @param isResizable The isResizable to set.
+	 */
+	public synchronized void setResizable(boolean isResizable)
+	{
+		this.isResizable = isResizable;
+	}
+
+
+
+	/**
+	 * @return Returns the doubleColor.
+	 */
+	public synchronized Color getDoubleColor()
+	{
+		return doubleColor;
+	}
+
+
+
+	/**
+	 * @param doublecolor The doubleColor to set.
+	 */
+	public synchronized void setDoubleColor(Color doublecolor)
+	{
+		if(doublecolor!=null)
+			this.doubleColor = doublecolor;
+	}
+
+
+
+	/**
+	 * @return Returns the doubleLinePosition.
+	 */
+	public synchronized String getBordersPosition()
+	{
+		return bordersPosition;
+	}
+
+
+
+	/**
+	 * @param doubleLinePosition The doubleLinePosition to set.
+	 */
+	public synchronized void setBordersPosition(String doubleLinePosition)
+	{
+		if(isValidBordersPosition(doubleLinePosition) && isBordersMovable)
+		{
+			this.bordersPosition = doubleLinePosition;
+			updateShape();
+		}
+	}
+
+
+
+	/**
+	 * Allows to get the north-westiest point of the bounds of the figure (the
+	 * bounds consider the thickness of the figure and the position of the  borders).
+	 * @return The north-westiest point of the bounds of the figure
+	 */
+	public LaTeXDrawPoint2D getTheNWBoundPoint()
+	{
+		Rectangle2D bounds = createShape2D().getBounds2D();
+
+		if(bounds == null)
+			return null;
+
+		if(hasShadow)
+		{
+			double dx=0, dy=0;
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+			Rectangle2D.Double bounds2 = new Rectangle2D.Double(bounds.getX()+dx,bounds.getY()+dy,
+											bounds.getWidth(), bounds.getHeight());
+			bounds2.add(bounds);
+			bounds = bounds2;
+		}
+		
+		return new LaTeXDrawPoint2D(bounds.getX()-thickness/2., bounds.getY()-thickness/2.);
+	}
+
+
+	
+	
+	/**
+	 * Allows to get the north-westiest point of the bounds of the figure (the
+	 * bounds consider the thickness of the figure and the position of the
+	 * borders), without any rotation of the figure. It doesn't take account  of the shadow.
+	 */
+	public LaTeXDrawPoint2D getTheNWNonRotatedBoundPoint()
+	{
+		Rectangle2D bounds = createNonRotatedShape2D().getBounds2D();
+
+		if(bounds == null)
+			return null;
+
+		return new LaTeXDrawPoint2D(bounds.getMinX() - thickness / 2., 
+									bounds.getMinY() - thickness / 2.);
+	}
+
+	
+	
+	
+
+	/**
+	 * Allows to get the south-eastiest point of the bounds of the figure (the
+	 * bounds consider the thickness of the figure and the position of the
+	 * borders), without any rotation of the figure. It doesn't take account of the shadow.
+	 * @return The south-eastiest point of the bounds of the figure.
+	 */
+	public LaTeXDrawPoint2D getTheSENonRotatedBoundPoint()
+	{
+		Rectangle2D bounds = createNonRotatedShape2D().getBounds2D();
+
+		if (bounds == null)
+			return null;
+
+		return new LaTeXDrawPoint2D(bounds.getMaxX() + thickness / 2., bounds.getMaxY() + thickness / 2.);
+	}
+	
+	
+	
+
+	/**
+	 * Allows to get the south-eastiest point of the bounds of the figure (the
+	 * bounds consider the thickness of the figure and the position of the borders).
+	 * @return The south-eastiest point of the bounds of the figure.
+	 */
+	public LaTeXDrawPoint2D getTheSEBoundPoint()
+	{
+		Rectangle2D bounds = createShape2D().getBounds2D();
+
+		if(bounds == null)
+			return null;
+		
+		if(hasShadow)
+		{
+			double dx=0, dy=0;
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+			Rectangle2D.Double bounds2 = new Rectangle2D.Double(bounds.getX()+dx,bounds.getY()+dy,
+											bounds.getWidth(), bounds.getHeight());
+			bounds2.add(bounds);
+			bounds = bounds2;
+		}
+
+		return new LaTeXDrawPoint2D(bounds.getX() + thickness / 2.
+				+ bounds.getWidth(), bounds.getY() + thickness / 2. + bounds.getHeight());
+	}
+
+
+
+	/**
+	 * @return True if the borders of the figure can move.
+	 */
+	public synchronized boolean isBordersMovable()
+	{
+		return isBordersMovable;
+	}
+	
+	
+	
+	/**
+	 * Allows to change the number of the figure.
+	 */
+	public synchronized void changeMeter()
+	{
+		number = meter++;
+	}
+	
+
+	
+	/**
+	 * Allows to compute the angle of the point pt.
+	 * @param pt The point of reference.
+	 * @param gravityC The centre of gravity of the trigonometric circle.
+	 * @return The angle.
+	 */
+	public static double computeAngle(Point pt, LaTeXDrawPoint2D gravityC)
+	{
+		double c = gravityC.y-pt.y;
+		double b = gravityC.x-pt.x;
+		
+		return atan(c/b);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to compute the angle of rotation between two points.
+	 * using the gravity centre of the figure.
+	 * @param formerPt The first point.
+	 * @param newPt The second point.
+	 * @return The rotation point.
+	 * @throws IllegalArgumentException If formerPt or newPt are null.
+	 */
+	public double computeRotationAngle(Point formerPt, Point newPt) throws IllegalArgumentException
+	{
+		double thetaOld = Figure.computeAngle(formerPt, gravityCenter);
+		double thetaNew = Figure.computeAngle(newPt, gravityCenter);
+
+		if((thetaNew-thetaOld)>(PI/2.) || (thetaNew-thetaOld)<-(PI/2.))
+			return thetaNew+thetaOld;
+
+		return thetaNew-thetaOld;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to rotate the figure around its gravity centre.
+	 * @param formerPt The former point.
+	 * @param newPt The new point.
+	 * @throws IllegalArgumentException If formerPt or newPt is null.
+	 */
+	public void rotate(Point formerPt, Point newPt) throws IllegalArgumentException
+	{
+		setRotationAngle(rotationAngle+computeRotationAngle(formerPt, newPt));
+	}
+	
+	
+	
+	
+	/**
+	 * Allows rotate the figure around the point gravityC.
+	 * @param gravityC The point of reference of the rotation.
+	 * @param angle The angle of the rotation.
+	 */
+	public void rotate(LaTeXDrawPoint2D gravityC, double angle)
+	{
+		if(!gravityC.equals(gravityCenter))
+		{// We must rotate the position of the figure
+			LaTeXDrawPoint2D rotGC = rotatePoint(gravityCenter, gravityC, angle);
+			shift(gravityCenter, rotGC);
+			updateGravityCenter();
+		}
+		
+		setRotationAngle(rotationAngle+angle);
+	}
+
+
+
+	/**
+	 * @return the blackDashLength.
+	 */
+	public synchronized float getBlackDashLength()
+	{
+		return blackDashLength;
+	}
+
+
+
+	/**
+	 * @param blackDashLength the blackDashLength to set.
+	 */
+	public synchronized void setBlackDashLength(float blackDashLength)
+	{
+		if(blackDashLength>0 && !Float.isInfinite(blackDashLength) && !Float.isNaN(blackDashLength))
+			this.blackDashLength = blackDashLength;
+	}
+
+
+
+	/**
+	 * @return the hatchingAngle.
+	 */
+	public synchronized double getHatchingAngle()
+	{
+		return hatchingAngle;
+	}
+
+
+
+	/**
+	 * @param hatchingAngle the hatchingAngle to set.
+	 */
+	public synchronized void setHatchingAngle(double hatchingAngle)
+	{
+		if(!Double.isInfinite(hatchingAngle) && !Double.isNaN(hatchingAngle))
+			this.hatchingAngle = hatchingAngle%(Math.PI*2.);
+	}
+
+
+
+	/**
+	 * @return the whiteDashLength.
+	 */
+	public synchronized float getWhiteDashLength()
+	{
+		return whiteDashLength;
+	}
+
+
+
+	/**
+	 * @param whiteDashLength the whiteDashLength to set.
+	 */
+	public synchronized void setWhiteDashLength(float whiteDashLength)
+	{
+		if(whiteDashLength>0 && !Float.isInfinite(whiteDashLength) && !Float.isNaN(whiteDashLength))
+			this.whiteDashLength = whiteDashLength;
+	}
+
+
+
+	/**
+	 * @return the dotSep.
+	 */
+	public synchronized float getDotSep()
+	{
+		return dotSep;
+	}
+
+
+
+	/**
+	 * @param dotSep the dotSep to set.
+	 */
+	public synchronized void setDotSep(float dotSep)
+	{
+		if(dotSep>0 && !Float.isInfinite(dotSep) && !Float.isNaN(dotSep))
+			this.dotSep = dotSep;
+	}
+	
+	
+	
+	/**
+	 * Allows to update the shape of the figure.
+	 */
+	public abstract void updateShape();
+	
+	
+	/**
+	 * Allows to know if the figure is too small to be rescaled.
+	 * @return True if the figure is too small to be rescaled.
+	 */
+	public abstract boolean isTooSmallToBeRescaled();
+
+
+
+	/**
+	 * @return the hasShadow.
+	 * @since 1.7
+	 */
+	public synchronized boolean hasShadow()
+	{
+		return hasShadow;
+	}
+
+
+
+	/**
+	 * @param hasShadow the hasShadow to set.
+	 * @since 1.7
+	 */
+	public synchronized void setHasShadow(boolean hasShadow)
+	{
+		this.hasShadow = hasShadow;
+	}
+
+
+
+	/**
+	 * @return The shadowAngle (in rad).
+	 * @since 1.7
+	 */
+	public synchronized double getShadowAngle()
+	{
+		return shadowAngle;
+	}
+
+
+
+	/**
+	 * @param shadowAngle the shadowAngle to set in radian.
+	 * @since 1.7
+	 */
+	public synchronized void setShadowAngle(double shadowAngle)
+	{
+		if(!Double.isInfinite(shadowAngle) && !Double.isNaN(shadowAngle))
+			this.shadowAngle = shadowAngle%(2*Math.PI);
+	}
+
+
+
+	/**
+	 * @return the shadowColor.
+	 * @since 1.7
+	 */
+	public synchronized Color getShadowColor()
+	{
+		return shadowColor;
+	}
+
+
+
+	/**
+	 * @param shadowColor the shadowColor to set.
+	 * @since 1.7
+	 */
+	public synchronized void setShadowColor(Color shadowColor)
+	{
+		if(shadowColor!=null)
+			this.shadowColor = shadowColor;
+	}
+
+
+
+	/**
+	 * @return the shadowSize.
+	 * @since 1.7
+	 */
+	public synchronized double getShadowSize()
+	{
+		return shadowSize;
+	}
+
+
+
+	/**
+	 * @param shadowSize the shadowSize to set.
+	 * @since 1.7
+	 */
+	public synchronized void setShadowSize(double shadowSize)
+	{
+		if(!Double.isInfinite(shadowSize) && !Double.isNaN(shadowSize))
+			this.shadowSize = shadowSize;
+	}
+
+
+
+	/**
+	 * @return the canHaveShadow.
+	 * @since 1.7
+	 */
+	public boolean canHaveShadow()
+	{
+		return canHaveShadow;
+	}
+	
+	
+	
+	/**
+	 * Allows to create a shape corresponding to the shadow of the figure.
+	 * @return The shadow.
+	 * @since 1.7
+	 */
+	public Shape createShadowShape()
+	{
+		if(!canHaveShadow || !hasShadow) return shape;
+		
+		Rectangle2D shadowS = createShape2D().getBounds2D();
+		double dx=0, dy=0;
+		LaTeXDrawPoint2D cg = getGravityCenter();
+		LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+		shadowCg.setLocation(cg.x+shadowSize, cg.y);
+		shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+		dx = shadowCg.x-cg.x;
+		dy = cg.y-shadowCg.y;
+		Rectangle2D.Double bounds2 = new Rectangle2D.Double(shadowS.getX()+dx-thickness/2.,
+										shadowS.getY()+dy-thickness/2.,
+										shadowS.getWidth()+thickness, shadowS.getHeight()+thickness);
+		return bounds2;
+	}
+
+
+
+	/**
+	 * @return the gradientAngle.
+	 * @since 1.7
+	 */
+	public synchronized double getGradientAngle()
+	{
+		return gradientAngle;
+	}
+
+
+
+	/**
+	 * @param gradientAngle the gradientAngle to set (in radian).
+	 * @since 1.7
+	 */
+	public synchronized void setGradientAngle(double gradientAngle)
+	{
+		if(!Double.isInfinite(gradientAngle) && !Double.isNaN(gradientAngle))
+			this.gradientAngle = gradientAngle;
+	}
+
+
+
+	/**
+	 * @return the gradientEndColor.
+	 * @since 1.7
+	 */
+	public synchronized Color getGradientEndColor()
+	{
+		return gradientEndColor;
+	}
+
+
+
+	/**
+	 * @param gradientEndColor the gradientEndColor to set.
+	 * @since 1.7
+	 */
+	public synchronized void setGradientEndColor(Color gradientEndColor)
+	{
+		if(gradientEndColor!=null)
+			this.gradientEndColor = gradientEndColor;
+	}
+
+
+
+	/**
+	 * @return the gradientMidPoint.
+	 * @since 1.7
+	 */
+	public synchronized double getGradientMidPoint()
+	{
+		return gradientMidPoint;
+	}
+
+
+
+	/**
+	 * @param gradientMidPoint the gradientMidPoint to set.
+	 * @since 1.7
+	 */
+	public synchronized void setGradientMidPoint(double gradientMidPoint)
+	{
+		if(gradientMidPoint>=0 && gradientMidPoint<=1)
+			this.gradientMidPoint = gradientMidPoint;
+	}
+
+
+
+	/**
+	 * @return the gradientStartColor.
+	 * @since 1.7
+	 */
+	public synchronized Color getGradientStartColor()
+	{
+		return gradientStartColor;
+	}
+
+
+
+	/**
+	 * @param gradientStartColor the gradientStartColor to set.
+	 * @since 1.7
+	 */
+	public synchronized void setGradientStartColor(Color gradientStartColor)
+	{
+		if(gradientStartColor!=null)
+			this.gradientStartColor = gradientStartColor;
+	}
+	
+	
+	
+	/**
+	 * @return The PSTricks code for the filling of the figure.
+	 * @since 1.7
+	 */
+	public String getPSTricksCodeFilling(float ppc)
+	{
+		String str="fillstyle=";//$NON-NLS-1$
+
+		if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_NONE))
+		{
+			if(isFilled)
+				str += "solid"; //$NON-NLS-1$
+			else str = "";//$NON-NLS-1$
+		}
+		else
+			if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_GRADIENT))
+			{
+				str+= "gradient,gradlines=2000";//$NON-NLS-1$
+				
+				if(!gradientStartColor.equals(PSTricksConstants.DEFAULT_GRADIENT_START_COLOR))
+				{
+					String name = DviPsColors.getColourName(gradientStartColor);
+					if(name==null)
+					{
+						name = "color"+number+'g';//$NON-NLS-1$
+						DviPsColors.addUserColour(gradientStartColor, name); 
+					}
+					str += ",gradbegin=" + name; //$NON-NLS-1$
+				}
+				
+				if(!gradientEndColor.equals(PSTricksConstants.DEFAULT_GRADIENT_END_COLOR))
+				{
+					String name = DviPsColors.getColourName(gradientEndColor);
+					if(name==null)
+					{
+						name = "color"+number+'f';//$NON-NLS-1$
+						DviPsColors.addUserColour(gradientEndColor, name); 
+					}
+					str += ",gradend=" + name; //$NON-NLS-1$
+				}
+				
+				if(gradientMidPoint!=PSTricksConstants.DEFAULT_GRADIENT_MID_POINT)
+					str+=",gradmidpoint="+(float)gradientMidPoint;//$NON-NLS-1$
+				
+				if(gradientAngle!=PSTricksConstants.DEFAULT_GRADIENT_ANGLE)
+					str+=",gradangle="+(float)toDegrees(gradientAngle);//$NON-NLS-1$
+			}
+			else
+			{
+				if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH))
+					str += "crosshatch"; //$NON-NLS-1$
+				else
+					if (hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_HLINES))
+						str += "hlines"; //$NON-NLS-1$
+					else
+						str += "vlines"; //$NON-NLS-1$
+	
+				if(isFilled)
+					str += "*"; //$NON-NLS-1$
+	
+				str += ",hatchwidth=" + (getHatchingWidth()/ppc) + ",hatchangle=" + //$NON-NLS-1$ //$NON-NLS-2$
+						(float)Math.toDegrees(hatchingAngle);
+				
+				if(((float)hatchingSep)!=((float)DEFAULT_HATCH_SEP))
+					str+=",hatchsep="+(float)(hatchingSep/PPC); //$NON-NLS-1$
+				
+				if(!hatchingColor.equals(PSTricksConstants.DEFAULT_HATCHING_COLOR))
+				{
+					String name = DviPsColors.getColourName(hatchingColor);
+					if(name==null)
+					{
+						name = "color"+number+'c';//$NON-NLS-1$
+						DviPsColors.addUserColour(hatchingColor, name); 
+					}
+					str += ",hatchcolor=" + name; //$NON-NLS-1$
+				}
+			}
+		
+		if(isFilled)
+		{
+			if(!interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR))
+			{
+				String name = DviPsColors.getColourName(interiorColor);
+				if(name==null)
+				{
+					name = "color"+number+'b';//$NON-NLS-1$
+					DviPsColors.addUserColour(interiorColor, name); 
+				}
+				str += ",fillcolor=" + name; //$NON-NLS-1$
+			}
+		}
+		
+		return str;
+	}
+	
+	
+	
+	
+	/**
+	 * @return The PSTricks code for the shape of the lines of the figure.
+	 * @since 1.7
+	 */
+	public String getPSTricksCodeLine(float ppc)
+	{
+		String str = "";//$NON-NLS-1$
+		boolean coma = false;
+		
+		if(!linesColor.equals(PSTricksConstants.DEFAULT_LINE_COLOR))
+		{
+			String name = DviPsColors.getColourName(linesColor);
+			if(name==null)
+			{
+				name = "color"+number;//$NON-NLS-1$
+				DviPsColors.addUserColour(linesColor, name); 
+			}
+			str += "linecolor=" + name; //$NON-NLS-1$
+			coma = true;
+		}
+		
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			str += (coma ? "," : "")+ "linestyle=" + lineStyle + ",dotsep=" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+					(getDotSep() / ppc) + "cm"; //$NON-NLS-1$
+		else
+			if (lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+				str += (coma ? "," : "") +"linestyle=" + lineStyle + ",dash=" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+						(getBlackDashLength() / ppc) + "cm " + //$NON-NLS-1$
+						(getWhiteDashLength() / ppc) + "cm"; //$NON-NLS-1$
+
+		return str;
+	}
+	
+	
+	
+	
+	/**
+	 * @return True if the current style of the interior of the figure is a gradient.
+	 * @since 1.7
+	 */
+	public synchronized boolean hasGradient()
+	{
+		return hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_GRADIENT);
+	}
+	
+	
+
+	
+	/**
+	 * @return The borders of the figure (taking account of the thickness, the double borders, ...).
+	 * @since 1.7
+	 */
+	public LaTeXDrawRectangle getBoundBorders()
+	{
+		LaTeXDrawPoint2D NW = getTheNWBoundPoint(), SE = getTheSEBoundPoint();
+		return new LaTeXDrawRectangle(NW, SE, false);
+	}
+
+
+
+
+
+	/**
+	 * @return the hatchingSep.
+	 * @since 1.8
+	 */
+	public synchronized double getHatchingSep()
+	{
+		return hatchingSep;
+	}
+
+
+
+	/**
+	 * @param hatchSep the hatchingSep to set.
+	 * @since 1.8
+	 */
+	public synchronized void setHatchingSep(double hatchSep)
+	{
+		if(hatchSep>0 && !Double.isInfinite(hatchSep) && !Double.isNaN(hatchSep))
+			this.hatchingSep = hatchSep;
+	}
+
+
+
+	/**
+	 * @return the canHaveArrow.
+	 */
+	public synchronized boolean canHaveArrow()
+	{
+		return canHaveArrow;
+	}
+
+
+
+	/**
+	 * Returns horizontally the figure.
+	 * @since 1.8
+	 * @param origin The location of the horizontal axe.
+	 */
+	public abstract void mirrorHorizontal(LaTeXDrawPoint2D origin);
+
+
+	
+	/**
+	 * Returns vertically the figure.
+	 * @since 1.8
+	 * @param origin The location of the vertical axe.
+	 */
+	public abstract void mirrorVertical(LaTeXDrawPoint2D origin);
+
+
+
+	/**
+	 * Updates the coordinates of the figure to the grid given in parameter.<br>
+	 * Nothing will be done if the magnetic grid is not activated.
+	 * @since 1.9
+	 * @param grid The magnetic grid.
+	 */
+	public abstract void updateToGrid(MagneticGrid grid);
+
+	
+	
+	
+	/**
+	 * Checks if the parameters of the figures are equals.
+	 * @param f The figure to compare.
+	 * @param considerShadow True if the parameters of the shadows must be considered.
+	 * @param considerArrow True if the parameters of the arrows must be considered.
+	 * @return True if the parameters are equals.
+	 * @since 1.9
+	 */
+	public boolean isParametersEquals(Figure f, boolean considerShadow, boolean considerArrow)
+	{
+		boolean lineOk = !f.isDashableOrDotable || !isDashableOrDotable || 
+						(lineStyle.equals(f.lineStyle) && thickness==f.thickness && 
+						(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE) ||
+						(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE) && dotSep==f.dotSep) ||
+						(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE) && 
+						blackDashLength==f.blackDashLength && whiteDashLength==f.whiteDashLength)));
+		
+		boolean filledOk = !f.canBeFilled || !canBeFilled || 
+							(isFilled==f.isFilled && interiorColor.equals(f.interiorColor));
+							
+		boolean dblbndOk = !f.isDoubleBoundaryable || f.isDoubleBoundaryable || 
+							(f.hasDoubleBoundary==hasDoubleBoundary &&
+							doubleColor.equals(f.doubleColor) && doubleSep==f.doubleSep);
+		
+		boolean arrowOk = !considerArrow || !f.canHaveArrow || !canHaveArrow || 
+						  (((Arrowable)f).getArrowHead1().equals(((Arrowable)this).getArrowHead1()) &&
+						  ((Arrowable)f).getArrowHead2().equals(((Arrowable)this).getArrowHead2()));
+		
+		boolean hatchOk = (!f.canBeFilled || !canBeFilled || 
+							((f.hatchingStyle.equals(hatchingStyle) && (!isHatched() ||
+							(f.hatchingAngle==hatchingAngle && f.hatchingColor.equals(hatchingColor) &&
+							((float)f.hatchingSep)==((float)hatchingSep) && f.hatchingWidth==hatchingWidth))) && 
+						  (hasGradient()==f.hasGradient() &&(!hasGradient() ||
+						  (gradientAngle==f.gradientAngle && gradientEndColor.equals(f.gradientEndColor) &&
+						  gradientMidPoint==f.gradientMidPoint && gradientStartColor.equals(f.gradientStartColor))))));
+		
+		boolean shadowOk = !considerShadow || !f.canHaveShadow || !canHaveArrow || 
+							(hasShadow==f.hasShadow && shadowAngle==f.shadowAngle &&
+							shadowColor.equals(f.shadowColor) && ((float)shadowSize)==((float)f.shadowSize));
+		
+		return linesColor.equals(f.linesColor) && lineOk && filledOk && dblbndOk && shadowOk &&
+				hatchOk && arrowOk ;
+	}
+	
+	
+	
+	/**
+	 * @return True is a delimiter is selected.
+	 * @since 1.9
+	 */
+	public boolean isDelimitorSelected()
+	{
+		return dSelected!=null || (borders==null ? false : borders.isDelimitorSelected());
+	}
+
+
+	
+	/**
+	 * @return The position of the selected delimiter.
+	 * @since 1.9
+	 */
+	public int getSelectedDelimitorOrientation()
+	{
+		if(isOnRotation())
+			return DELIMITOR_ROTATION;
+		
+		return DELIMITOR_ORIENTATION_NONE;
+	}
+	
+	
+	
+	/**
+	 * Sometimes a rectangle is too small to be drawn; this method check if the given shape is too small
+	 * and if it is the case, it return a visible shape based on the given shape.
+	 * @param s The shape to check.
+	 * @return A visible check if the given shape is too small or null if it is not the case.
+	 * @since 1.9
+	 */
+	protected Shape getTooSmallShape(Shape s)
+	{
+		Rectangle2D bds = s.getBounds2D();
+		
+		if(bds.getHeight()<=0)
+		{
+			if(bds.getWidth()<=0)
+				return new Line2D.Double(bds.getMinX(), bds.getMinY(), bds.getMinX()+1, bds.getMinY()+1);
+			return new Line2D.Double(bds.getMinX(), bds.getMaxY(), bds.getMaxX(), bds.getMaxY());
+		}
+		
+		if(bds.getWidth()<=0)
+			return new Line2D.Double(bds.getMaxX(), bds.getMinY(), bds.getMaxX(), bds.getMaxY());
+		return null;
+	}
+	
+	
+	
+	
+	/**
+	 * Gives a gradient to the shape.
+	 * @since 1.9
+	 */
+	protected void setHasGradient()
+	{
+		hatchingStyle = PSTricksConstants.TOKEN_FILL_GRADIENT;
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return (int)thickness+(int)doubleSep+(linesColor.hashCode()^interiorColor.hashCode()^
+				hatchingStyle.hashCode()^lineStyle.hashCode());
+	}
+	
+	
+	
+	
+	/**
+	 * Given a right-rectangle ABC right in A, it computes the gap created by the corner of the triangle in B
+	 * based on an initial gap.
+	 * @param a The point A.
+	 * @param b The point B.
+	 * @param c The point C.
+	 * @param gap The initial gap (for example, the thickness, the double border gap,...).
+	 * @return The gap created by the corner of the point B.
+	 * @since 2.0.0
+	 */
+	public static double getCornerGap(Point2D a, Point2D b, Point2D c, double gap)
+	{
+		if(a==null || b==null || c==null)
+			return 0.;
+		
+		return gap / Triangle.getAltitude(a, b, c) * a.distance(b);
+	}
+	
+	
+	
+	
+	/**
+	 * @return True if when the shape has a shadow, then it is filled.
+	 * @since 2.0.0
+	 */
+	public boolean shadowFillsShape()
+	{
+		return true;
+	}
+
+
+	/**
+	 * @return the shape.
+	 * @since 2.0.0
+	 */
+	public synchronized Shape getShape()
+	{
+		return shape;
+	}
+
+
+	/**
+	 * @param number the number to set.
+	 * @since 2.0.0
+	 */
+	public synchronized void setNumber(int number)
+	{
+		this.number = number;
+	}
+
+
+	public void setNewNumber()
+	{
+		setNumber(meter++);
+	}
+	
+	
+	
+	@Override
+	public String toString() 
+	{
+		return getClass().getName() + "#" + getNumber() + "[thick=" + getThickness() + ", bordCol=" + getLinesColor() +  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				", intCol=" + getInteriorColor() + ", dbleCol=" + getDoubleColor() + ", shadCol=" + getShadowColor() + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				", isFilled=" + isFilled() + ", hasShad=" + hasShadow() + ", hasDble=" + hasDoubleBoundary() + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				", shadSize=" + getShadowSize() + ", shadAngle=" + getShadowAngle() + ", gradAngle=" + getGradientAngle() + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				", gradMP=" + getGradientMidPoint() + ", gradCol1=" + getGradientStartColor() + ", gradCol2=" + getGradientEndColor() + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				", bordPos=" + getBordersPosition() + ", blackDash=" + getBlackDashLength() + ", dotSep=" + getDotSep() +  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				", dbleSep=" + getDoubleSep() + ", hatchAngle=" + getHatchingAngle() + ", hatchSep=" + getHatchingSep() +  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				", hatchStyle=" + getHatchingStyle() + ", hatchWidth=" + getHatchingWidth() + ", lineStyle=" + getLineStyle() + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				", rotAngle=" + getRotationAngle() + ", whiteDash=" + getWhiteDashLength() + ", gc=" + getGravityCenter() +  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				", isHatched=" + isHatched() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/current/latexDraw/figures/FramedBox.java b/current/latexDraw/figures/FramedBox.java
new file mode 100644
index 0000000..26fc0db
--- /dev/null
+++ b/current/latexDraw/figures/FramedBox.java
@@ -0,0 +1,1244 @@
+package latexDraw.figures;
+
+
+import java.awt.Graphics2D;
+import java.awt.font.TextLayout;
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
+import java.util.Vector;
+
+import latexDraw.figures.Text.TextPosition;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+
+/**
+ * This class defines a box which can frame a (part of a) text.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ * LaTeXDraw is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.<br>
+ * <br>
+ * LaTeXDraw is distributed without any warranty; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.<br>
+ * <br>
+ * 05/08/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @since 1.7
+ */
+public class FramedBox implements Cloneable, Serializable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The text of the box. */
+	protected Text text;
+
+	/** Define the separation between the text and the box (in pixels). */
+	protected double frameSep;
+
+	/** The box. */
+	protected Figure box;
+
+	/** Define if the box can be drawn of the text before and after the framed text. */
+	protected boolean boxSep;
+
+	/** The position of the beginning of the box in the string text of the class Text. */
+	protected int start;
+
+	/** The type of the box: rectangle, circle, ellipse, triangle or rhombus. */
+	protected int boxType;
+
+	/** The position of the end of the box in the string text of the class Text. */
+	protected int end;
+
+	protected transient Vector<TextPosition> textPosition;
+	
+	/** The box will be a rectangle. */
+	public static final short BOX_RECTANGLE = 0;
+
+	/** The box will be a circle. */
+	public static final short BOX_CIRCLE = 1;
+
+	/** The box will be an ellipse. */
+	public static final short BOX_ELLIPSE = 2;
+
+	/** The box will be a triangle. */
+	public static final short BOX_TRIANGLE = 3;
+
+	/** The box will be a diamond. */
+	public static final short BOX_DIAMOND = 4;
+
+
+
+
+	public FramedBox(Text text)
+	{
+		this(text, PSTricksConstants.DEFAULT_FRAME_SEP*Figure.PPC, BOX_RECTANGLE, PSTricksConstants.DEFAULT_BOX_SEP, -1, -1);
+	}
+
+
+
+
+	/**
+	 * The constructor.
+	 * @param frameSep The size of the separation between the text and the borders (in pixels).
+	 */
+	public FramedBox(Text text, double frameSep, short type, boolean boxSep, int start, int end)
+	{
+		super();
+		
+		this.text = text;
+		this.frameSep = frameSep;
+		this.boxSep = boxSep;
+		this.start = start;
+		this.end = end;
+		textPosition = new Vector<TextPosition>();
+		setBoxType(type);
+	}
+
+
+	
+	/**
+	 * Allows to know if the argument type is a valid kind of box.
+	 * @param type The type to check.
+	 * @return True if type is a valid kind of box.
+	 */
+	public static boolean isValidBoxType(short type)
+	{
+		return type==BOX_CIRCLE || type==BOX_ELLIPSE || type==BOX_RECTANGLE || type==BOX_TRIANGLE || type==BOX_DIAMOND;
+	}
+
+
+
+
+	/**
+	 * Allows to update the size of the box.
+	 */
+	public synchronized void updateBoxSize()
+	{
+		double x1;
+		double x2;
+		double y1;
+		double y2;
+
+		if(text.text.length()==0)
+			return;
+
+		text.updateFontsBorders();
+		LaTeXDrawPoint2D position = text.getPosition();
+		TextLayout tl = new TextLayout(text.text, text.currentFont, text.fontRenderContext);
+		Rectangle2D bounds = tl.getBounds();
+
+		x1 = position.x+bounds.getX()-frameSep;
+		x2 = position.x+bounds.getWidth()+bounds.getX()+frameSep;
+		y1 = bounds.getY()+position.y-frameSep;
+		y2 = position.y+bounds.getHeight()+bounds.getY()+frameSep;
+
+		if(start>=0 && end>0 && end<=text.text.length())
+		{
+			if(start>0)
+				x1 += text.fontMetrics.stringWidth(text.text.substring(0, start));
+			x2 -= text.fontMetrics.stringWidth(text.text.substring(end));
+		}
+
+		LaTeXDrawRectangle r = box.getBorders();
+
+		if(boxType==BOX_CIRCLE)
+		{
+			double cgX = (x1+x2)/2., cgY = (y1+y2)/2.;
+			double radius = Math.max(Math.abs(x1-x2), Math.abs(y1-y2))/2.;
+
+			r.getPoint(0).setLocation(cgX-radius, cgY-radius);
+			r.getPoint(-1).setLocation(cgX+radius, cgY+radius);
+			r.getPoint(1).setLocation(cgX+radius, cgY-radius);
+			r.getPoint(2).setLocation(cgX-radius, cgY+radius);
+			((Square)r).setWidth(radius*2);
+		}
+		else
+		{
+			r.setFirstPoint(x1, y1);
+			r.setLastPoint(x2, y2);
+			r.updateGravityCenter();
+
+			if(boxType==BOX_ELLIPSE)
+			{
+				double gap = (bounds.getMaxX() - bounds.getMinX())*0.5;
+				r.setFirstPoint(r.getTheNWPoint().x-gap/2., r.getTheNWPoint().y);
+				r.setLastPoint(r.getTheSEPoint().x+gap/2., r.getTheSEPoint().y);
+			}
+			else
+			{
+				LaTeXDrawPoint2D cg = r.getGravityCenter();
+				double height = y2-y1, width = x2-x1;
+				
+				if(boxType==BOX_DIAMOND)
+				{
+					double g = box.getThickness()*0.707;
+					double g2 = frameSep/2.;
+					box.setBordersPosition(PSTricksConstants.BORDERS_INSIDE);
+					r.setFirstPoint(cg.x-width-g*2+g2, cg.y-height-g*2.+g2);
+					r.setLastPoint(cg.x+width+g*2-g2, cg.y+height+g*2.-g2);
+				}
+				else
+					if(boxType==BOX_TRIANGLE)
+					{
+						double g = box.getThickness()*0.85;
+						box.setBordersPosition(PSTricksConstants.BORDERS_INSIDE);
+						r.setFirstPoint(cg.x-width-g*2, cg.y-(height*3.)/2.-box.getThickness()*2+frameSep);
+						r.setLastPoint(cg.x+width+g*2, cg.y+height/2.+box.getThickness());
+					}
+			}
+		}
+		
+		box.updateShape();
+	}
+
+
+
+
+	/**
+	 * @return the box
+	 */
+	public synchronized Figure getBox()
+	{
+		return box;
+	}
+
+
+
+
+	/**
+	 * @param box the box to set (must be a circle, an ellipse, a rectangle, a rhombus or a triangle).
+	 */
+	public synchronized void setBox(Figure box)
+	{
+		if(box==null)
+			return ;
+		
+		this.box = box;
+		
+		if(box instanceof LaTeXDrawRectangle)
+			setBoxType(BOX_RECTANGLE);
+		else if(box instanceof Rhombus)
+			setBoxType(BOX_DIAMOND);
+		else if(box instanceof Triangle)
+			setBoxType(BOX_TRIANGLE);
+		else if(box instanceof Ellipse)
+			setBoxType(BOX_ELLIPSE);
+		else if(box instanceof Circle)
+			setBoxType(BOX_CIRCLE);
+	}
+
+
+
+
+	/**
+	 * @return the boxSep
+	 */
+	public synchronized boolean isBoxSep()
+	{
+		return boxSep;
+	}
+
+
+
+
+	/**
+	 * @param boxSep the boxSep to set
+	 */
+	public synchronized void setBoxSep(boolean boxSep)
+	{
+		this.boxSep = boxSep;
+		text.hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * @return the frameSep
+	 */
+	public synchronized double getFrameSep()
+	{
+		return frameSep;
+	}
+
+
+
+
+	/**
+	 * @param frameSep the frameSep to set
+	 */
+	public synchronized void setFrameSep(double frameSep)
+	{
+		this.frameSep = frameSep;
+		text.hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * @return the text
+	 */
+	public synchronized Text getText()
+	{
+		return text;
+	}
+
+
+
+
+	/**
+	 * @param text the text to set
+	 */
+	public synchronized void setText(Text text)
+	{
+		this.text = text;
+		text.hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * @return the end
+	 */
+	public synchronized int getEnd()
+	{
+		return end;
+	}
+
+
+
+
+	/**
+	 * @param end the end to set
+	 */
+	public synchronized void setEnd(int end)
+	{
+		this.end = end;
+		text.hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * @return the start
+	 */
+	public synchronized int getStart()
+	{
+		return start;
+	}
+
+
+
+
+	/**
+	 * @param start the start to set
+	 */
+	public synchronized void setStart(int start)
+	{
+		this.start = start;
+		text.hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * @return the boxType
+	 */
+	public synchronized int getBoxType()
+	{
+		return boxType;
+	}
+
+
+
+
+	/**
+	 * @param type the boxType to set.
+	 */
+	public synchronized void setBoxType(short type)
+	{
+		if(!isValidBoxType(type))
+			return;
+
+		if(type!=boxType||box==null)
+		{
+			boxType = type;
+
+			if(box==null)
+				switch(boxType)
+				{
+					case BOX_CIRCLE:
+						box = new Circle(true);
+						break;
+
+					case BOX_ELLIPSE:
+						box = new Ellipse(true);
+						break;
+
+					case BOX_RECTANGLE:
+						box = new LaTeXDrawRectangle(true);
+						break;
+
+					case BOX_TRIANGLE:
+						box = new Triangle(true);
+						break;
+
+					case BOX_DIAMOND:
+						box = new Rhombus(true);
+						break;
+
+					default:
+						throw new IllegalArgumentException("Invalid kind of box.");//$NON-NLS-1$
+				}
+			else
+				switch(boxType)
+				{
+					case BOX_CIRCLE:
+						box = new Circle(box, true);
+						break;
+
+					case BOX_ELLIPSE:
+						box = new Ellipse(box, true);
+						break;
+
+					case BOX_RECTANGLE:
+						box = new LaTeXDrawRectangle(box, true);
+						break;
+
+					case BOX_TRIANGLE:
+						box = new Triangle(box, true);
+						break;
+
+					case BOX_DIAMOND:
+						box = new Rhombus(box, true);
+						break;
+
+					default:
+						throw new IllegalArgumentException("Invalid kind of box.");//$NON-NLS-1$
+				}
+
+			box.setBordersPosition(PSTricksConstants.BORDERS_OUTSIDE);
+			
+			if(text.hasSeveralBoxes())
+				text.updateFramedBoxes();
+			else updateBoxSize();
+		}
+
+		text.hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * Draw the framed box.
+	 */
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		if(getBox()!=null)
+			getBox().draw(g, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+
+
+
+	/**
+	 * @return The PSTricks code of the framed box.
+	 */
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		String cmdName = getCodeHeadPSTricks(drawBorders, ppc);
+		cmdName += '{'+getBoxedText()+'}';
+
+		return cmdName;
+	}
+
+
+
+
+	/**
+	 * @return The boxed text.
+	 */
+	public synchronized String getBoxedText()
+	{
+		int e, s;
+		if(end<0||start<0||end==start||end>text.text.length())
+		{
+			e = text.text.length();
+			s = 0;
+		}
+		else
+		{
+			s = start;
+			e = end;
+		}
+
+		return text.getText().substring(s, e);
+	}
+
+
+
+
+	/**
+	 * @return The beginning of the code (ex. \psframe[....] instead of psframe[...]{...} of the method getCode.
+	 */
+	public synchronized String getCodeHeadPSTricks(DrawBorders drawBorders, float ppc)
+	{
+		if(box==null)
+			return "";//$NON-NLS-1$
+
+		String boxCode = box.getCodePSTricks(drawBorders, ppc);
+		String boxParams = "";//$NON-NLS-1$
+
+		int i = boxCode.indexOf('[');
+		if(i!=-1)
+		{
+			int j = boxCode.indexOf(']', i);
+			if(j==-1)
+				throw new IndexOutOfBoundsException();
+			boxParams = boxCode.substring(i+1, j);
+			boxParams = boxParams.replace(",dimen=inner", "");//$NON-NLS-1$//$NON-NLS-2$
+			boxParams = boxParams.replace(",dimen=middle", "");//$NON-NLS-1$//$NON-NLS-2$
+			boxParams = boxParams.replace(",dimen=outer", "");//$NON-NLS-1$//$NON-NLS-2$
+		}
+
+		String cmdName;
+
+		switch(boxType)
+		{
+			case BOX_RECTANGLE:
+				cmdName = "\\psframebox";//$NON-NLS-1$
+				break;
+
+			case BOX_ELLIPSE:
+				cmdName = "\\psovalbox";//$NON-NLS-1$
+				break;
+
+			case BOX_CIRCLE:
+				cmdName = "\\pscirclebox";//$NON-NLS-1$
+				break;
+
+			case BOX_DIAMOND:
+				cmdName = "\\psdiabox";//$NON-NLS-1$
+				break;
+
+			case BOX_TRIANGLE:
+				cmdName = "\\pstribox";//$NON-NLS-1$
+				break;
+
+			default:
+				return null;
+		}
+
+		if(((float)(frameSep/ppc))!=(float)PSTricksConstants.DEFAULT_FRAME_SEP)
+			boxParams += (boxParams.length()>0 ? "," : "")//$NON-NLS-1$//$NON-NLS-2$
+					+"framesep="+LaTeXDrawNumber.getCutNumber((float)frameSep/ppc,0.0001);//$NON-NLS-1$
+
+		if(boxSep!=PSTricksConstants.DEFAULT_BOX_SEP)
+			boxParams += (boxParams.length()>0 ? "," : "")+"boxsep=" //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+					+boxSep;
+
+		if(boxParams.length()>0)
+			cmdName += '['+boxParams+']';
+
+		return cmdName;
+	}
+
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		FramedBox fb = (FramedBox)super.clone();
+
+		fb.boxSep = boxSep;
+		fb.boxType = boxType;
+		fb.box = (Figure)box.clone();
+		fb.end = end;
+		fb.frameSep = frameSep;
+		fb.start = start;
+		fb.text = text;// We cannot clone the text because the text clones the fb.
+		fb.textPosition = new Vector<TextPosition>();
+		for(TextPosition tp : textPosition)
+			fb.textPosition.add(tp);
+		
+		return fb;
+	}
+
+
+
+
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		text = null;
+		boxSep = ois.readBoolean();
+		boxType = ois.readInt();
+		frameSep = ois.readDouble();
+		start = ois.readInt();
+		end = ois.readInt();
+		box = (Figure)ois.readObject();
+		textPosition = new Vector<TextPosition>();
+	}
+
+
+
+	/**
+	 * @return The borders of the framed box.
+	 */
+	public synchronized LaTeXDrawRectangle getBorders()
+	{
+		return box.getBoundBorders();
+	}
+
+
+
+	/**
+	 * Allows to know if the framed box overlap another framed box.
+	 * @return True if the framed box overlap another framed box.
+	 */
+	public synchronized boolean overlap(Vector<FramedBox> fbs)
+	{
+		if(fbs==null)
+			return false;
+
+		boolean ok = true;
+		int i = 0, size = fbs.size();
+
+		while(ok&&i<size)
+			if(fbs.elementAt(i)!=this&&overlap(fbs.elementAt(i)))
+				ok = false;
+			else
+				i++;
+
+		return !ok;
+	}
+
+
+
+
+	/**
+	 * Allows to know if the framed box overlap another framed box.
+	 * @return True if the framed box overlap another framed box.
+	 */
+	public synchronized boolean overlap(FramedBox b)
+	{
+		return overlap(b.start, b.end);
+	}
+
+
+
+
+	/**
+	 * Allows to know if the framed box overlap another framed box.
+	 * @return True if the framed box overlap another framed box.
+	 */
+	public synchronized boolean overlap(int fbStart, int fbEnd)
+	{
+		if(start<0||end<0)
+			return false;
+
+		return (start<fbStart&&fbStart<end&&end<fbEnd)
+				||(start>fbStart&&start<fbEnd&&fbEnd<end);
+	}
+
+
+
+
+	/**
+	 * Allows to know if the current FrameBox contains (frames) the given FramedBox.
+	 * @param b The FramedBox we want to know if it is boxed by the current  FramedBox
+	 * @return 0 if 'this' does not contain b, 1 if 'this' contains b and -1 if they are equals.
+	 */
+	public synchronized int contains(FramedBox b)
+	{
+		if(box==null||b==null)
+			return 0;
+
+		if(start==b.start&&end==b.end)
+			return -1;
+
+		if(start<=b.start&&end>=b.end)
+			return 1;
+		return 0;
+	}
+
+
+
+
+	@Override
+	public String toString()
+	{
+		if(text==null||text.text==null||text.text.length()==0)
+			return super.toString();
+
+		if(start<0||end>text.text.length())
+			return super.toString();
+
+		return text.text.substring(start, end);
+	}
+
+
+
+
+
+	/**
+	 * @return The PSTricks code of the framed boxes.
+	 */
+	@SuppressWarnings("unchecked")
+	private static String getCode(Vector<FramedBox> boxes, FramedBox parent, DrawBorders drawBorders, float ppc) 
+	{
+		if(boxes==null||boxes.isEmpty())
+		{
+			if(parent==null)
+				return "";//$NON-NLS-1$
+			return parent.getBoxedText();
+		}
+
+		boolean valid = true;
+		String code = "";//$NON-NLS-1$
+		int i = 0, j, size = boxes.size(), k, size2;
+		boolean ok;
+		Vector<FramedBox> mainBoxes = new Vector<FramedBox>();
+
+		for(i = 1; i<size; i++)
+			if(!boxes.elementAt(i).getText().text.equals(boxes.elementAt(i-1).getText().text))
+				valid = false;
+
+		if(!valid)
+			return "";//$NON-NLS-1$
+
+		i = 0;
+		if(size>1)
+			while(i<size)
+			{
+				FramedBox fb = boxes.elementAt(i);
+				ok = true;
+				for(j = 0; ok && j<i; j++)
+					if(boxes.elementAt(j).contains(fb)==1)
+						ok = false;
+
+				for(j = i+1; ok && j<size; j++)
+					if(boxes.elementAt(j).contains(fb)!=0)
+						ok = false;
+
+				for(FramedBox b : mainBoxes)
+					if(b.contains(fb)==1)
+						ok = false;
+				
+				if(parent!=null && parent.contains(fb)==0)
+					ok = false;
+
+				if(ok)
+				{
+					FramedBox fBox = boxes.remove(i);
+					k = 0;
+					size2 = mainBoxes.size();
+					while(k<size2 && fBox.start>mainBoxes.elementAt(k).start)
+						k++;
+
+					if(k>=size2)
+						mainBoxes.add(fBox);
+					else
+						mainBoxes.add(k, fBox);
+
+					size = boxes.size();
+				}
+				else i++;
+			}//while
+		else
+		{
+			FramedBox fb = boxes.remove(0);
+			if((parent!=null && parent.contains(fb)!=0) || parent==null)
+				mainBoxes.add(fb);
+		}
+
+		if(!mainBoxes.isEmpty())
+		{
+			int s = parent==null ? 0 : parent.start;
+			
+			for(FramedBox b : mainBoxes)
+			{
+				if(b.start>s && (parent==null || parent.start!=b.start))
+					code += b.getText().text.substring(s, b.start);
+				
+				code += b.getCodeHeadPSTricks(drawBorders, ppc)+"{" +//$NON-NLS-1$
+				 getCode((Vector<FramedBox>)boxes.clone(), b, drawBorders, ppc)+'}';
+				s = b.end;
+			}
+
+			FramedBox b = mainBoxes.firstElement();
+
+			if(parent!=null && parent.end!=b.end && s-1<b.getText().text.length())
+				code += b.getText().text.substring(Math.max(0, s), parent.end);
+			else
+				if(!(parent!=null && parent.end==b.end) && s-1<b.getText().text.length())
+					code += b.getText().text.substring(Math.max(0, s), b.getText().text.length());
+		}
+		else
+			return parent==null ? "" : parent.getBoxedText(); //$NON-NLS-1$
+
+		return code;
+	}
+
+
+
+
+
+	/**
+	 * @return The PSTricks code of several boxes.
+	 */
+	public static String getCode(Vector<FramedBox> multipleBox, DrawBorders drawBorders, float ppc)
+	{
+		Vector<FramedBox> boxes = new Vector<FramedBox>();
+
+		for(FramedBox fb : multipleBox)
+			boxes.add(fb);
+
+		return getCode(boxes, null, drawBorders, ppc);
+	}
+
+
+
+
+	/**
+	 * Allows to update the dimensions of several boxes with taking account of
+	 * each box to others. The method updateTextPosition of the class text must be called before.
+	 * @param boxes The boxes to update.
+	 */
+	protected static void updateDimensions(Vector<FramedBox> boxes, Text text)
+	{
+		text.updateTextPosition();
+		
+		if(boxes==null || boxes.isEmpty())
+		{
+			text.updateBorders();
+			return ;
+		}
+		
+		Vector<FramedBox> bx 	= new Vector<FramedBox>();
+		Vector<FramedBox> done	= new Vector<FramedBox>();
+		FramedBox fb;
+		boolean found, ok;
+		int size, i, j;
+		double x1, x2, y1, y2, dec=0;
+		Vector<TextPosition> tps;
+		Rectangle2D bounds;
+		TextPosition first, last;
+		LaTeXDrawPoint2D[] NWs = new LaTeXDrawPoint2D[boxes.firstElement().text.text.length()];
+		LaTeXDrawPoint2D[] SEs = new LaTeXDrawPoint2D[boxes.firstElement().text.text.length()];
+		Vector<LaTeXDrawPoint2D> nwNotBoxSep = new Vector<LaTeXDrawPoint2D>();
+		Vector<LaTeXDrawPoint2D> seNotBoxSep = new Vector<LaTeXDrawPoint2D>();
+		
+		for(FramedBox fb2 : boxes)
+			bx.add(fb2);
+		
+		while(!bx.isEmpty())
+		{
+			found = false;
+			i = 0;
+			size = bx.size();
+			
+			// Looking for a box to update.
+			while(!found && i<size)
+			{
+				fb = bx.elementAt(i);
+				j = 0;
+				ok = true;
+				
+				while(j<i && ok)
+					if(fb.contains(bx.elementAt(j))==1)
+						ok = false;
+					else j++;
+				
+				j= i+1;
+				while(j<size && ok)
+					if(fb.contains(bx.elementAt(j))==1)
+						ok = false;
+					else j++;
+				
+				if(ok)
+					found = true;
+				else i++;
+			}
+			
+			fb = bx.remove(i);
+			
+			do
+			{
+				if(fb==null) return ;
+				
+				// Looking for the TextPositions of the current FrameBox
+				tps = new Vector<TextPosition>();
+				for(TextPosition tp2 : text.textPos)
+					if(tp2.start>=fb.start && (tp2.end+1)<=fb.end)
+						tps.add(tp2);
+
+				TextLayout tl = new TextLayout(text.text.substring(fb.start, fb.end), 
+						text.currentFont, text.fontRenderContext);
+				bounds = tl.getBounds();
+				first = tps.firstElement();
+				last  = first;
+				
+				for(j=1; j<tps.size(); j++)
+					if(tps.elementAt(j).start<first.start)
+						first = tps.elementAt(j);
+					else if(tps.elementAt(j).end>last.end)
+						last = tps.elementAt(j);
+				
+				LaTeXDrawPoint2D SE = null;
+				LaTeXDrawPoint2D NW = null;
+				
+				for(i=fb.start; i<fb.end; i++)
+				{
+					if(NWs[i]!=null)
+						if(NW==null)
+							NW = NWs[i];
+						else if(NW.y>NWs[i].y) NW.y = NWs[i].y;
+					
+					if(SEs[i]!=null)
+						if(SE==null)
+							SE = SEs[i];
+						else if(SE.y<SEs[i].y) SE.y = SEs[i].y;
+				}
+				
+				if(NW!=null && NWs[fb.start]!=null)
+					NW.x = NWs[fb.start].x;
+				else if(NW!=null) NW.x = Double.NaN;
+				
+				if(SE!=null && SEs[fb.end-1]!=null)
+					SE.x = SEs[fb.end-1].x;
+				else if(SE!=null) SE.x = Double.NaN;
+				
+				x1 = NW==null || Double.isNaN(NW.x) ? first.pos.x-fb.frameSep : NW.x-fb.frameSep;
+				x2 = SE==null || Double.isNaN(SE.x) ? last.pos.x+text.fontMetrics.stringWidth(
+						text.text.substring(last.start, last.end+1))+fb.frameSep : SE.x+fb.frameSep;
+				y1 = NW==null ? bounds.getY()+first.pos.y-fb.frameSep : NW.y-fb.frameSep;
+				y2 = SE==null ? first.pos.y+bounds.getHeight()+bounds.getY()+fb.frameSep : SE.y+fb.frameSep;
+				
+				LaTeXDrawRectangle r = fb.box.getBorders();
+				
+				if(fb.boxType==BOX_CIRCLE)
+				{
+					double cgX = (x1+x2)/2., cgY = bounds.getCenterY()+text.position.y;
+					double radius = Math.max(Math.abs(x1-x2), Math.abs(y1-y2))/2.;
+
+					r.getPoint(0).setLocation(cgX-radius, cgY-radius);
+					r.getPoint(-1).setLocation(cgX+radius, cgY+radius);
+					r.getPoint(1).setLocation(cgX+radius, cgY-radius);
+					r.getPoint(2).setLocation(cgX-radius, cgY+radius);
+					((Square)r).setWidth(radius*2);
+				}
+				else
+				{
+					r.setFirstPoint(x1, y1);
+					r.setLastPoint(x2, y2);
+					r.updateGravityCenter();
+
+					if(fb.boxType==BOX_ELLIPSE)
+					{
+						LaTeXDrawPoint2D nw = r.getTheNWPoint();
+						LaTeXDrawPoint2D cg = r.getGravityCenter();
+						double c = Math.abs(cg.x-nw.x)*3./2.25;
+						double a = (Math.sqrt((cg.x-nw.x+c)*(cg.x-nw.x+c)
+								+((cg.y-nw.y)*(cg.y-nw.y)))+Math.sqrt((cg.x-nw.x-c)
+								*(cg.x-nw.x-c)+((cg.y-nw.y)*(cg.y-nw.y))))/2.;
+						double b = Math.sqrt(a*a-c*c);
+
+						r.setFirstPoint(cg.x-a, cg.y-b);
+						r.setLastPoint(cg.x+a, cg.y+b);
+					}
+					else
+					{
+						LaTeXDrawPoint2D NW2 = r.getTheNWBoundPoint();
+						LaTeXDrawPoint2D SE2 = r.getTheSEBoundPoint();
+						LaTeXDrawPoint2D cg = r.getGravityCenter();
+						double height = SE2.y-NW2.y, width = SE2.x-NW2.x;
+
+						if(fb.boxType==BOX_DIAMOND)
+						{
+							double g = fb.box.getThickness()*0.707;
+							double g2 = fb.frameSep/2.;
+							
+							fb.box.setBordersPosition(PSTricksConstants.BORDERS_INSIDE);
+							r.setFirstPoint(cg.x-width-g*2+g2, cg.y-height-g*2.+g2);
+							r.setLastPoint(cg.x+width+g*2-g2, cg.y+height+g*2.-g2);
+						}
+						else
+							if(fb.boxType==BOX_TRIANGLE)
+							{
+								double g = fb.box.getThickness()*0.85;
+								fb.box.setBordersPosition(PSTricksConstants.BORDERS_INSIDE);
+								r.setFirstPoint(cg.x-width-g*2, cg.y-(height*3.)/2.-
+															fb.box.getThickness()*2+fb.frameSep);
+								r.setLastPoint(cg.x+width+g*2, cg.y+height/2.+fb.box.getThickness());
+							}
+					}
+				}
+				
+				fb.box.updateShape();
+				double oldNWx = NW==null ? Double.NaN : NW.x;
+				LaTeXDrawPoint2D n = fb.box.getTheNWBoundPoint(), s = fb.box.getTheSEBoundPoint();
+				
+				if(fb.isBoxSep())
+				{
+					if(NWs[fb.start]==null)
+						NWs[fb.start]= n;
+					else 
+					{
+						if(NWs[fb.start].x>n.x) NWs[fb.start].x = n.x;
+						if(NWs[fb.start].y>n.y) NWs[fb.start].y = n.y;
+					}
+					
+					if(SEs[fb.end-1]==null)
+						SEs[fb.end-1]= s;
+					else 
+					{
+						if(SEs[fb.end-1].x<s.x) SEs[fb.end-1].x = s.x;
+						if(SEs[fb.end-1].y<s.y) SEs[fb.end-1].y = s.y;
+					}
+				
+					if(NW==null || Double.isNaN(NW.x))
+						 dec = first.pos.x-fb.box.getTheNWBoundPoint().x;
+					else dec = oldNWx-fb.box.getTheNWBoundPoint().x;
+					
+					for(TextPosition tp2 : text.textPos)
+					{
+						ok = true;
+						j=0;
+						while(ok && j<tps.size())
+							if(tps.elementAt(j)==tp2)
+								ok = false;
+							else j++;
+						
+						if(ok)
+							if(tp2.start<first.start)
+								 tp2.pos.x-= dec;
+							else tp2.pos.x+= dec;
+					}
+					
+					for(i=0; i<fb.start; i++)
+					{
+						if(NWs[i]!=null && !Double.isNaN(NWs[i].x))
+							NWs[i].x-=dec;
+						if(SEs[i]!=null && !Double.isNaN(SEs[i].x))
+							SEs[i].x-=dec;
+					}
+					
+					for(i=fb.end; i<NWs.length; i++)
+					{
+						if(NWs[i]!=null && !Double.isNaN(NWs[i].x))
+							NWs[i].x+=dec;
+						if(SEs[i]!=null && !Double.isNaN(SEs[i].x))
+							SEs[i].x+=dec;
+					}
+					
+					// we push the others boxes
+					for(FramedBox fb2 : done)
+						if(fb.contains(fb2)!=1)
+						{
+							if(fb2.start<fb.start)
+							{
+								if(fb2.end<fb.end)
+									fb2.box.shift(-dec, 0);
+							}
+							else
+								if(fb2.end>fb.end)
+									fb2.box.shift(dec, 0);
+							fb2.box.updateShape();
+						}
+				}//if(fb.isBoxSep())
+				else
+				{
+					nwNotBoxSep.add(n);
+					seNotBoxSep.add(s);
+				}
+				
+				done.add(fb);
+				fb = null;
+
+				boolean found2 = false;
+				i = 0;
+				size = bx.size();
+				while(!found2 && i<size)
+				{
+					fb = bx.elementAt(i);
+					j = 0;
+					ok = true;
+					
+					while(j<i && ok)
+						if(fb.contains(bx.elementAt(j))==1)
+							ok = false;
+						else j++;
+					
+					j= i+1;
+					while(j<size && ok)
+						if(fb.contains(bx.elementAt(j))==1)
+							ok = false;
+						else j++;
+					
+					if(ok)
+						found2 = true;
+					else i++;
+				}
+				
+				if(fb==null)
+					found = false;
+				else
+					bx.remove(fb);
+			}while(found);
+		}//while
+		
+		// We update the borders of the text.
+		LaTeXDrawPoint2D NW = null, SE = null;
+		size = text.text.length();
+		
+		for(i=0; i<size; i++)
+		{
+			if(NWs[i]!=null)
+				if(NW==null)
+					NW = NWs[i];
+				else if(NW.y>NWs[i].y) NW.y = NWs[i].y;
+			
+			if(SEs[i]!=null)
+				if(SE==null)
+					SE = SEs[i];
+				else if(SE.y<SEs[i].y) SE.y = SEs[i].y;
+		}
+		
+		if(NW!=null && NWs[0]!=null)
+			NW.x = NWs[0].x;
+		else if(NW!=null) NW.x = Double.NaN;
+		
+		if(SE!=null && SEs[size-1]!=null)
+			SE.x = SEs[size-1].x;
+		else if(SE!=null) SE.x = Double.NaN;
+		
+		if(!nwNotBoxSep.isEmpty())
+		{
+			if(NW==null)
+				NW = new LaTeXDrawPoint2D(Double.MAX_VALUE, Double.MAX_VALUE);
+			for(LaTeXDrawPoint2D pt : nwNotBoxSep)
+			{
+				if(pt.x<NW.x)
+					NW.x = pt.x;
+				if(pt.y<NW.y)
+					NW.y = pt.y;
+			}
+		}
+		
+		if(!seNotBoxSep.isEmpty())
+		{
+			if(SE==null)
+				SE = new LaTeXDrawPoint2D(Double.MIN_VALUE, Double.MIN_VALUE);
+			for(LaTeXDrawPoint2D pt : seNotBoxSep)
+			{
+				if(pt.x>SE.x)
+					SE.x = pt.x;
+				if(pt.y>SE.y)
+					SE.y = pt.y;
+			}
+		}
+		
+		TextLayout tl = new TextLayout(text.text, text.currentFont, text.fontRenderContext);
+		bounds = tl.getBounds();
+		first = text.getFirstTextPosition();
+		last = text.getLastTextPosition();
+		
+		if(NW==null)
+			text.borders.setFirstPoint(first.pos.x, bounds.getY()+first.pos.y);
+		else
+			if(Double.isNaN(NW.x))
+				text.borders.setFirstPoint(first.pos.x, NW.y);
+			else
+				text.borders.setFirstPoint(NW);
+		
+		if(SE==null)
+			text.borders.setLastPoint(last.pos.x+text.fontMetrics.stringWidth(
+						text.text.substring(last.start, last.end+1)), first.pos.y+bounds.getHeight()+bounds.getY());
+		else
+			if(Double.isNaN(SE.x))
+				text.borders.setLastPoint(last.pos.x+text.fontMetrics.stringWidth(
+									text.text.substring(last.start, last.end+1)), SE.y);
+			else
+				text.borders.setLastPoint(SE);
+		
+		text.gravityCenter = text.borders.getGravityCenter();
+		text.updateShape();
+	}
+
+
+
+
+	/**
+	 * @return the textPosition.
+	 */
+	public synchronized Vector<TextPosition> getTextPosition()
+	{
+		return textPosition;
+	}
+
+
+
+
+	/**
+	 * @param tp the textPosition to add.
+	 */
+	public synchronized void addTextPosition(TextPosition tp)
+	{
+		
+		textPosition.add(tp);
+	}
+	
+	
+	
+	public synchronized void removeAllTextPosition()
+	{
+		textPosition.removeAllElements();
+	}
+
+
+
+	public boolean contains(TextPosition tp)
+	{
+		boolean again = true;
+		int i=0, size = textPosition.size();
+		
+		while(again && i<size)
+			if(textPosition.elementAt(i)==tp)
+				again = false;
+			else i++;
+		
+		return !again;
+	}
+	
+	
+	
+	public synchronized void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		box.mirrorHorizontal(origin);
+	}
+
+
+
+
+	public synchronized void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		box.mirrorVertical(origin);
+	}
+}
diff --git a/current/latexDraw/figures/Grid.java b/current/latexDraw/figures/Grid.java
new file mode 100644
index 0000000..d74073e
--- /dev/null
+++ b/current/latexDraw/figures/Grid.java
@@ -0,0 +1,775 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.Line2D;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines a grid.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 06/06/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Grid extends GridShape 
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The colour of the sub-grid. */
+	protected Color subGridColor;
+	
+	/** The size of the labels. */
+	protected int gridLabelsSize;
+	
+	/** The number of division in a sub-grid. */
+	protected int subGridDiv;
+	
+	/** The thickness of the main borders of the grid. */
+	protected float gridWidth;
+	
+	/** The colour of the labels */
+	protected Color gridLabelsColor;
+	
+	/** The number of dots in the lines of the grid 
+	 * ( if >0, replace a plain line) */
+	protected int gridDots;
+	
+	/** The thickness of the lines of the sub-grid */
+	protected float subGridWidth;
+	
+	/** The number of dots in the lines of the sub-grid
+	 * ( if >0, replace a plain line) */
+	protected int subGridDots;
+	
+	/** The unit of the grid */
+	protected double unit;
+	
+	/** The minimum possible size of the labels */
+	public static final int MIN_LABELS_SIZE = 5;
+
+	/** The size of the label by default */
+	public static final int DEFAULT_LABELSSIZE = (int)PSTricksConstants.DEFAULT_GRID_LABEL;
+
+	
+	
+	/**
+	 * The constructor using two arguments.
+	 * @param pos The current position of the south-west point of the grid.
+	 */
+	public Grid(LaTeXDrawPoint2D pos, boolean increaseMeter)
+	{
+		super(pos, increaseMeter);
+		
+		gridDots    		= PSTricksConstants.DEFAULT_GRIDDOTS;
+		gridLabelsColor 	= PSTricksConstants.DEFAULT_LABELGRIDCOLOR;
+		gridLabelsSize  	= DEFAULT_LABELSSIZE;
+		gridWidth       	= (float)PSTricksConstants.DEFAULT_GRID_WIDTH*PPC;
+		subGridColor = PSTricksConstants.DEFAULT_SUB_GRID_COLOR;
+		subGridDiv   = PSTricksConstants.DEFAULT_SUBGRIDDIV;
+		subGridDots  = PSTricksConstants.DEFAULT_SUBGRIDDOTS;
+		subGridWidth = (float)PSTricksConstants.DEFAULT_SUB_GRID_WIDTH*PPC;
+		unit 		 = PSTricksConstants.DEFAULT_UNIT;
+		
+		BufferedImage bufferImage = new BufferedImage(2, 2, BufferedImage.TYPE_INT_RGB);
+		Graphics2D g = bufferImage.createGraphics();
+		font = new Font(g.getFont().getName(), Font.PLAIN, gridLabelsSize);
+		g.dispose();
+		bufferImage.flush();
+		updateFonts();
+		updateShape();
+	}
+	
+	
+
+	/**
+	 * @return Returns the gridDots.
+	 */
+	public synchronized int getGridDots()
+	{
+		return gridDots;
+	}
+
+
+
+	/**
+	 * @param gridDots The gridDots to set.
+	 */
+	public synchronized void setGridDots(int gridDots)
+	{
+		if(gridDots>=0)
+			this.gridDots = gridDots;
+	}
+
+
+
+	/**
+	 * @return Returns the gridLabelsColor.
+	 */
+	public synchronized Color getGridLabelsColor()
+	{
+		return gridLabelsColor;
+	}
+
+
+
+	/**
+	 * @param gridLabelsColor The gridLabelsColor to set.
+	 */
+	public synchronized void setGridLabelsColor(Color gridLabelsColor)
+	{
+		if(gridLabelsColor!=null)
+			this.gridLabelsColor = gridLabelsColor;
+	}
+
+
+
+	/**
+	 * @return Returns the gridLabelsSize.
+	 */
+	public synchronized int getGridLabelsSize()
+	{
+		return gridLabelsSize;
+	}
+
+
+
+	/**
+	 * @param gridLabelsSize The gridLabelsSize to set.
+	 */
+	public synchronized void setGridLabelsSize(int gridLabelsSize)
+	{
+		this.gridLabelsSize = gridLabelsSize;
+		
+		if(gridLabelsSize>0)
+			updateFonts();
+	}
+
+
+
+	/**
+	 * @return Returns the gridWidth.
+	 */
+	public synchronized float getGridWidth()
+	{
+		return gridWidth;
+	}
+
+
+
+	/**
+	 * @param gridWidth The gridWidth to set.
+	 */
+	public synchronized void setGridWidth(float gridWidth)
+	{
+		if(gridWidth>0)
+			this.gridWidth = gridWidth;
+	}
+
+
+
+
+	/**
+	 * @return Returns the subGridColor.
+	 */
+	public synchronized Color getSubGridColor()
+	{
+		return subGridColor;
+	}
+
+
+
+	/**
+	 * @param subGridColor The subGridColor to set.
+	 */
+	public synchronized void setSubGridColor(Color subGridColor)
+	{
+		if(subGridColor!=null)
+			this.subGridColor = subGridColor;
+	}
+
+
+
+	/**
+	 * @return Returns the subGridDiv.
+	 */
+	public synchronized int getSubGridDiv()
+	{
+		return subGridDiv;
+	}
+
+
+
+	/**
+	 * @param subGridDiv The subGridDiv to set.
+	 */
+	public synchronized void setSubGridDiv(int subGridDiv)
+	{
+		if(subGridDiv>=0)
+			this.subGridDiv = subGridDiv;
+	}
+
+
+
+	/**
+	 * @return Returns the subGridDots.
+	 */
+	public synchronized int getSubGridDots()
+	{
+		return subGridDots;
+	}
+
+
+
+	/**
+	 * @param subGridDots The subGridDots to set.
+	 */
+	public synchronized void setSubGridDots(int subGridDots)
+	{
+		if(subGridDots>=0)
+			this.subGridDots = subGridDots;
+	}
+
+
+
+	/**
+	 * @return Returns the subGridWidth.
+	 */
+	public synchronized float getSubGridWidth()
+	{
+		return subGridWidth;
+	}
+
+
+
+	/**
+	 * @param subGridWidth The subGridWidth to set.
+	 */
+	public synchronized void setSubGridWidth(float subGridWidth)
+	{
+		if(subGridWidth>0)
+			this.subGridWidth = subGridWidth;
+	}
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Grid g = (Grid)super.clone();
+		g.gridDots = gridDots;
+		g.gridLabelsColor = gridLabelsColor;
+		g.gridLabelsSize = gridLabelsSize;
+		g.gridWidth = gridWidth;
+		g.subGridColor = subGridColor;
+		g.subGridDiv = subGridDiv;
+		g.subGridDots = subGridDots;
+		g.subGridWidth = subGridWidth;
+		g.unit 	= unit;
+
+		return g;
+	}
+	
+
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		if(g==null || antiAlias==null || rendering==null || alphaInter==null || colorRendering==null)
+			throw new IllegalArgumentException();
+		
+		Font formerFont = g.getFont();
+		Color formerCol = g.getColor();
+		g.setFont(getFont());
+		
+		updateBorders();
+
+		double XStep = PPC*unit, i, j, XSubStep, k, l, m, n;
+		double YStep = XStep, YSubStep;
+		XStep *= gridEnd.x<gridStart.x ? -1 : 1 ;
+		YStep *= gridEnd.y<gridStart.y ? -1 : 1 ;
+		XSubStep = XStep/subGridDiv;
+		YSubStep = YStep/subGridDiv;
+		
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint();
+		LaTeXDrawPoint2D SE = borders.getTheSEPoint();	
+		double minX, maxX, minY, maxY;
+		double absStep = Math.abs(XStep);
+
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+		double posX = position.x+Math.min(gridStart.x, gridEnd.x)*PPC*unit;
+		double posY = position.y-Math.min(gridStart.y, gridEnd.y)*PPC*unit;
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}
+		
+		if(gridEnd.x<gridStart.x)
+		{
+			minX = gridEnd.x;
+			maxX = gridStart.x;
+		}else
+		{
+			minX = gridStart.x;
+			maxX = gridEnd.x;
+		}
+		
+		if(gridEnd.y<gridStart.y)
+		{
+			minY = gridEnd.y;
+			maxY = gridStart.y;
+		}else
+		{
+			minY = gridStart.y;
+			maxY = gridEnd.y;
+		}
+		
+		g.setColor(subGridColor);
+		
+		// We draw the sub-grid
+		if(subGridDots>0)
+		{
+			double dotStep = (unit*PPC)/(subGridDots*subGridDiv);
+			double nbX = (maxX-minX)*subGridDiv;
+			double nbY = (maxY-minY)*subGridDiv;
+			
+			g.setStroke(new BasicStroke(subGridWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER));
+			
+			for(i=0, n=NW.x; i<nbX; i++, n+=XSubStep)
+				for(j=0, m=NW.y; j<=nbY; j++, m+=YSubStep)
+					for(k=0; k<subGridDots; k++)
+						g.draw(new Line2D.Double(n+k*dotStep, m, n+k*dotStep, m));
+			
+			for(j=0, n=NW.y; j<nbY; j++, n+=YSubStep)
+				for(i=0, m=NW.x; i<=nbX; i++, m+=XSubStep)
+					for(k=0; k<subGridDots; k++)
+						g.draw(new Line2D.Double(m, n+k*dotStep, m, n+k*dotStep));
+			
+			g.draw(new Line2D.Double(SE.x, SE.y, SE.x, SE.y));
+		}
+		else
+			if(subGridDiv>1)
+			{
+				g.setStroke(new BasicStroke(subGridWidth, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+				
+				for(k=minX, i=posX; k<maxX; i+=XStep, k++)
+					for(j=0; j<=subGridDiv; j++)
+						g.draw(new Line2D.Double(i+XSubStep*j, SE.y, i+XSubStep*j, NW.y));
+				
+				for(k=minY, i=posY; k<maxY; i-=YStep, k++)
+					for(j=0; j<=subGridDiv; j++)
+						g.draw(new Line2D.Double(NW.x, i-YSubStep*j, SE.x, i-YSubStep*j));
+			}
+		
+		g.setColor(linesColor);
+		
+		if(gridDots>0)
+		{
+			double dotStep = (unit*PPC)/gridDots;
+			
+			g.setStroke(new BasicStroke(gridWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER));
+			
+			for(k=minX, i=posX; k<=maxX; i+=XStep, k++)
+				for(m=NW.y, n=minY; n<maxY; n++, m+=absStep)
+					for(l=0, j=m; l<gridDots; l++, j+=dotStep)
+						g.draw(new Line2D.Double(i, j, i, j));
+			
+			for(k=minY, i=posY; k<=maxY; i-=YStep, k++)
+				for(m=NW.x, n=minX; n<maxX; n++, m+=absStep)
+					for(l=0, j=m; l<gridDots; l++, j+=dotStep)
+						g.draw(new Line2D.Double(j, i, j, i));
+			
+			g.draw(new Line2D.Double(SE.x, SE.y, SE.x, SE.y));
+		}
+		else
+		{
+			g.setStroke(new BasicStroke(gridWidth, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+			
+			for(k=minX, i=posX; k<=maxX; i+=XStep, k++)
+				g.draw(new Line2D.Double(i, SE.y, i, NW.y));
+			
+			for(k=minY, i=posY; k<=maxY; i-=YStep, k++)
+				g.draw(new Line2D.Double(NW.x, i, SE.x, i));
+		}
+
+		if(gridLabelsSize>0)
+		{
+			// We draw the labels
+			float labelHeight = fontMetrics.getAscent();
+			float labelWidth = fontMetrics.stringWidth(String.valueOf((int)maxX));
+			String label;
+			double xorigin = position.x+XStep*origin.x;
+			double yorigin = isXLabelSouth  ? position.y-YStep*origin.y+labelHeight : position.y-YStep*origin.y-2;
+			double width=gridWidth/2., tmp = isXLabelSouth ? width : -width;
+		
+			g.setColor(gridLabelsColor);
+			
+			for(i=NW.x + (isYLabelWest ? width+gridLabelsSize/4. : -width-labelWidth-gridLabelsSize/4.), j=minX; j<=maxX; i+=absStep, j++)
+				g.drawString(String.valueOf((int)j), (int)i, (int)(yorigin+tmp));
+	
+			if(isYLabelWest)
+				for(i=NW.y + (isXLabelSouth ? -width-gridLabelsSize/4. : width+labelHeight), j=maxY ; j>=minY; i+=absStep, j--)
+				{
+					label = String.valueOf((int)j);
+					g.drawString(label, (int)(xorigin-fontMetrics.stringWidth(label)-gridLabelsSize/4.-width), (int)i);
+				}
+			else
+				for(i=NW.y + (isXLabelSouth ? -width-gridLabelsSize/4. : width+labelHeight), j=maxY; j>=minY; i+=absStep, j--)
+				{
+					label = String.valueOf((int)j);
+					g.drawString(label, (int)(xorigin+gridLabelsSize/4.+width), (int)i);
+				}
+		}
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+		
+		g.setFont(formerFont);
+		g.setColor(formerCol);
+		updateBorders(fontMetrics);
+		
+		if(isSelected)
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+	
+	
+	
+	/**
+	 * Allows to update the borders of the grid (without labels)
+	 */
+	@Override
+	public synchronized void updateBorders()
+	{
+		if(borders==null)
+			borders = new LaTeXDrawRectangle(false);
+		
+		double step = PPC*unit;
+		double posX = position.x;
+		double posY = position.y;
+		double minX = gridEnd.x<gridStart.x ? gridEnd.x : gridStart.x;
+		double minY = gridEnd.y<gridStart.y ? gridEnd.y : gridStart.y;
+		
+		posX+=minX*step;
+		posY-=minY*step;
+	
+		if(gridStart.x<gridEnd.x)
+			if(gridStart.y<gridEnd.y)
+			{
+				borders.setFirstPoint(posX, posY-step*Math.abs(gridEnd.y-gridStart.y));
+				borders.setLastPoint(posX+step*Math.abs(gridEnd.x-gridStart.x), posY);
+			}
+			else
+			{
+				borders.setFirstPoint(posX, posY);
+				borders.setLastPoint(posX+step*Math.abs(gridEnd.x-gridStart.x), 
+									 posY+step*Math.abs(gridEnd.y-gridStart.y));
+			}
+		else
+			if(gridStart.y<gridEnd.y)
+			{
+				borders.setFirstPoint(posX-step*Math.abs(gridEnd.x-gridStart.x), 
+									  posY-step*Math.abs(gridEnd.y-gridStart.y));
+				borders.setLastPoint(posX, posY);
+			}
+			else
+			{
+				borders.setFirstPoint(posX-step*Math.abs(gridEnd.x-gridStart.x), posY);
+				borders.setLastPoint(posX, posY+step*Math.abs(gridEnd.y-gridStart.y));
+			}	
+		gravityCenter = borders.getGravityCenter();
+		shape = createShape2D();
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to update the borders of the grid
+	 * @param fontMet The fontMetrics of the labels (If null, the fontMetrics of the grid will be used).
+	 */
+	@Override
+	public synchronized void updateBorders(FontMetrics fontMet)
+	{
+		if(fontMet==null)
+			fontMet = fontMetrics;
+		
+		updateBorders();
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint(), SE = borders.getTheSEPoint();
+		String labelMax = String.valueOf(gridEnd.y), labelMin = String.valueOf(gridStart.y);
+		String maxLgth = labelMax.length()>labelMin.length() ? labelMax : labelMin;
+		double NWxGap=0;
+		double NWyGap=0;
+		double SExGap=0;
+		double SEyGap=0;
+		double step = PPC*unit;
+		
+		if(gridStart.x>origin.x)
+			NWxGap=origin.x-gridStart.x;
+		else 
+			if(gridEnd.x<origin.x)
+				SExGap=origin.x-gridEnd.x;
+		
+		if(gridStart.y>origin.y)
+			SEyGap=gridStart.y-origin.y;
+		else 
+			if(gridEnd.y<origin.y)
+				NWyGap=gridEnd.y-origin.y;
+		
+		borders.setFirstPoint(NW.x+NWxGap*step-fontMet.stringWidth(maxLgth), NW.y+NWyGap*step-fontMet.getHeight());
+		borders.setLastPoint(SE.x+SExGap*step+fontMet.stringWidth(String.valueOf(gridEnd.x)), SE.y+SEyGap*step+fontMet.getHeight());
+		gravityCenter = borders.getGravityCenter();
+		shape = createShape2D();
+	}
+	
+	
+	
+	
+	
+	
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		String start = "", end = "", code = "";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+		int startX, startY, endX, endY;
+		
+		if(isXLabelSouth)
+		{
+			startY = (int)gridStart.y;
+			endY   = (int)gridEnd.y;
+		}else
+		{
+			startY = (int)gridEnd.y;
+			endY   = (int)gridStart.y;
+
+		}
+		
+		if(isYLabelWest)
+		{
+			startX = (int)gridStart.x;
+			endX   = (int)gridEnd.x;
+		}else
+		{
+			startX = (int)gridEnd.x;
+			endX   = (int)gridStart.x;
+		}
+		
+		String coord = "("+startX+","+startY+")("+ //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$
+						endX+","+endY+")"; //$NON-NLS-1$ //$NON-NLS-2$
+		
+		coord = "(" + (int)origin.x + "," + (int)origin.y + ")" + coord; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		
+		//add options
+		code+="[gridwidth="+LaTeXDrawNumber.getCutNumber(gridWidth/ppc,0.0001); //$NON-NLS-1$
+		code+=",subgridwidth="+LaTeXDrawNumber.getCutNumber(subGridWidth/ppc,0.0001); //$NON-NLS-1$
+		
+		code+=",gridlabels="+(float)(gridLabelsSize*0.6)+"pt"; //$NON-NLS-1$ //$NON-NLS-2$
+		
+		if(subGridDiv!=PSTricksConstants.DEFAULT_SUBGRIDDIV)
+			code+=",subgriddiv="+subGridDiv; //$NON-NLS-1$
+		
+		if(gridDots!=PSTricksConstants.DEFAULT_GRIDDOTS)
+			code+=",griddots="+gridDots; //$NON-NLS-1$
+		
+		if(subGridDots!=PSTricksConstants.DEFAULT_SUBGRIDDOTS)
+			code+=",subgriddots="+subGridDots; //$NON-NLS-1$
+		
+		if(!gridLabelsColor.equals(PSTricksConstants.DEFAULT_LABELGRIDCOLOR))
+		{
+			String name = DviPsColors.getColourName(gridLabelsColor);
+			if(name==null)
+			{
+				name = "color"+number+'b';//$NON-NLS-1$
+				DviPsColors.addUserColour(gridLabelsColor, name); 
+			}
+			code +=",gridlabelcolor="+name; //$NON-NLS-1$
+		}
+		
+		if(unit!=PSTricksConstants.DEFAULT_UNIT)
+			code+=",unit="+(float)unit+"cm"; //$NON-NLS-1$ //$NON-NLS-2$
+		
+		if(!linesColor.equals(PSTricksConstants.DEFAULT_GRIDCOLOR))
+		{
+			String name = DviPsColors.getColourName(linesColor);
+			if(name==null)
+			{
+				name = "color"+number;//$NON-NLS-1$
+				DviPsColors.addUserColour(linesColor, name); 
+			}
+			code+=",gridcolor="+name; //$NON-NLS-1$
+		}
+		
+		// subgridcolor
+		String name = DviPsColors.getColourName(subGridColor);
+		if(name==null)
+		{
+			name = "color"+number+'c';//$NON-NLS-1$
+			DviPsColors.addUserColour(subGridColor, name); 
+		}
+		
+		code+=",subgridcolor="+name; //$NON-NLS-1$
+		code+="]"; //$NON-NLS-1$
+		if(unit!=PSTricksConstants.DEFAULT_UNIT)
+			end+="\n\\psset{unit="+PSTricksConstants.DEFAULT_UNIT+"cm}";//$NON-NLS-1$ //$NON-NLS-2$
+		
+		double x=0, y=0;
+	
+		// add position
+		if(position.x!=0 || position.y!=0)
+		{
+			double posX = (position.x-d.x)/ppc, posY = (d.y-position.y)/ppc;
+			if(Math.abs(posX) < 0.001) posX = 0;
+			if(Math.abs(posY) < 0.001) posY = 0;
+			
+			end +="}"; //$NON-NLS-1$
+			start = "\\rput(" + (float)posX + "," + (float)posY + "){" + start; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+		
+		if(rotationAngle%(Math.PI*2)!=0.)
+		{
+			updateBorders();
+			updateGravityCenter();
+			double angle = -Math.toDegrees(rotationAngle);
+			double cx = (gravityCenter.x - position.x) / ppc;
+			double cy = (position.y - gravityCenter.y) / ppc;
+			x = -Math.cos(-rotationAngle) * cx + Math.sin(-rotationAngle) * cy + cx;
+			y = -Math.sin(-rotationAngle) * cx - Math.cos(-rotationAngle) * cy + cy;
+
+			if(Math.abs(x) < 0.001) x = 0;
+			if(Math.abs(y) < 0.001) y = 0;
+			
+			start = start+"\\rput{" + (float)angle + "}(" + (float)x + ',' + (float)y + "){"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			end = end+"}"; //$NON-NLS-1$
+		}
+		return start +"\\psgrid"+ code + coord + end;//$NON-NLS-1$
+	}
+
+
+
+	
+	
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		gridDots 		= ois.readInt();
+		gridLabelsSize 	= ois.readInt();
+		subGridDiv 		= ois.readInt();
+		subGridDots 	= ois.readInt();
+		subGridWidth 	= ois.readFloat();
+		gridWidth		= ois.readFloat();
+		gridEnd 		= (LaTeXDrawPoint2D)ois.readObject();
+		gridStart 		= (LaTeXDrawPoint2D)ois.readObject();
+		gridLabelsColor = (Color)ois.readObject();
+		linesColor 		= (Color)ois.readObject();
+		subGridColor 	= (Color)ois.readObject();
+		position 		= (LaTeXDrawPoint2D)ois.readObject();
+		origin 			= (LaTeXDrawPoint2D)ois.readObject();
+		unit 			= ois.readDouble();
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")<=0) //$NON-NLS-1$
+		{
+			isYLabelWest 	= ois.readBoolean();
+			isXLabelSouth 	= ois.readBoolean();
+		}
+		else
+		{
+			isXLabelSouth 	= ois.readBoolean();
+			isYLabelWest 	= ois.readBoolean();
+		}
+		borders 		= (LaTeXDrawRectangle)ois.readObject();
+		font 			= (Font)ois.readObject();
+		
+		updateFonts();
+		shape = createShape2D();
+	}
+
+	
+
+
+	public synchronized void updateFont()
+	{
+		font = new Font(font.getName(), Font.PLAIN, gridLabelsSize);
+	}
+
+
+
+	
+	
+	@Override
+	public synchronized void updateFonts()
+	{
+		updateFont();
+		super.updateFonts();
+	}
+
+	
+	
+	/**
+	 * @param unit The unit to set.
+	 */
+	public synchronized void setUnit(double unit)
+	{
+		this.unit = unit;
+	}
+	
+	
+	
+	/**
+	 * @return Returns the unit.
+	 */
+	public synchronized double getUnit()
+	{
+		return unit;
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		position.setLocation(grid.getTransformedPointToGrid(position, false));
+		updateShape();
+	}	
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return (int)(super.hashCode()*2.5);
+	}
+}
+
+
+
diff --git a/current/latexDraw/figures/GridShape.java b/current/latexDraw/figures/GridShape.java
new file mode 100644
index 0000000..cd21ec7
--- /dev/null
+++ b/current/latexDraw/figures/GridShape.java
@@ -0,0 +1,511 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.image.BufferedImage;
+
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/** 
+ * This abstract class defines a general model of a grid; it can be used to define
+ * a grid or axes for instance.<br>
+ * <br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 14/08/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @since 1.8<br>
+ * @version 2.0.0<br>
+ */
+public abstract class GridShape extends Figure
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** If true, the x label will be displayed at the south of the grid. Else at the north */
+	protected boolean isXLabelSouth;
+	
+	/** If true, the y label will be displayed at the west of the grid. Else at the east */
+	protected boolean isYLabelWest;
+	
+	/** The minimum values of the axes */
+	protected LaTeXDrawPoint2D gridStart;
+	
+	/** The maximum values of the axes */
+	protected LaTeXDrawPoint2D gridEnd;
+	
+	/** The position of the SW point of the grid in the drawpanel */
+	protected LaTeXDrawPoint2D position;
+	
+	/** The origin of the grid */
+	protected LaTeXDrawPoint2D origin;
+	
+	/** The current font*/
+	protected Font font;
+	
+	/** The current font metrics of the text */
+	protected FontMetrics fontMetrics;
+	
+	
+	/** The value by default of isXLabelSouth */
+	public static final boolean DEFAULT_ISXLABELSOUTH = true;
+	
+	/** The value by default of isYLabelWest */
+	public static final boolean DEFAULT_ISYLABELWEST = true;
+	
+	/** The origin of the grid by default */
+	public static final LaTeXDrawPoint2D DEFAULT_ORIGIN = new LaTeXDrawPoint2D(0,0);
+	
+	/** The minimum points of the grid by default */
+	public static final LaTeXDrawPoint2D DEFAULT_GRIDMIN = (LaTeXDrawPoint2D)DEFAULT_ORIGIN.clone();
+	
+	/** The maximum points of the grid by default */
+	public static final LaTeXDrawPoint2D DEFAULT_GRIDMAX = new LaTeXDrawPoint2D(2,2);
+	
+	
+	
+	protected GridShape(LaTeXDrawPoint2D pos, boolean increaseMeter)
+	{
+		super(increaseMeter);
+		
+		canHaveShadow 		= false;
+		canBeFilled 		= false;
+		isBordersMovable 	= false;
+		isDashableOrDotable = false;
+		isDoubleBoundaryable = false;
+		isThicknessable 	= false;
+		isResizable 		= false;
+		position 			= pos;
+		isXLabelSouth 		= DEFAULT_ISXLABELSOUTH;
+		isYLabelWest  		= DEFAULT_ISYLABELWEST;
+		origin         		= (LaTeXDrawPoint2D)DEFAULT_ORIGIN.clone();
+		gridStart			= (LaTeXDrawPoint2D)DEFAULT_GRIDMIN.clone();
+		gridEnd				= (LaTeXDrawPoint2D)DEFAULT_GRIDMAX.clone();
+	}
+
+
+	
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		GridShape g = (GridShape)super.clone();
+		
+		g.borders 	= (LaTeXDrawRectangle)borders.clone();
+		g.gridEnd 	= (LaTeXDrawPoint2D)gridEnd.clone();
+		g.gridStart = (LaTeXDrawPoint2D)gridStart.clone();
+		g.origin 	= (LaTeXDrawPoint2D)origin.clone();
+		g.position 	= (LaTeXDrawPoint2D)position.clone();
+		g.gravityCenter = g.borders.getGravityCenter();
+		g.isXLabelSouth = isXLabelSouth;
+		g.isYLabelWest  = isYLabelWest;
+		g.shape = g.createShape2D();
+		
+		return g;
+	}
+
+
+
+	@Override
+	public Shape createNonRotatedShape2D()
+	{
+		return borders.createNonRotatedShape2D();
+	}
+
+
+
+
+	@Override
+	public Shape createShape2D()
+	{
+		if(borders==null)
+			updateBorders();
+		
+		return borders.createShape2D();
+	}
+
+
+
+	public abstract void updateBorders();
+
+
+
+	@Override
+	public abstract void draw(Graphics2D g, Object antiAlias, Object rendering, 
+								Object alphaInter, Object colorRendering);
+	
+
+	@Override
+	public abstract String getCodePSTricks(DrawBorders drawBorders, float ppc);
+
+
+
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt)
+	{
+		if(borders==null) return false;
+		return borders.isIn(pt);
+	}
+
+
+
+	@Override
+	public boolean isTooSmallToBeRescaled()
+	{
+		return true;
+	}
+
+
+
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D orig)
+	{
+		updateBorders();
+		borders.mirrorHorizontal(orig);
+		position.setLocation(borders.getTheNWPoint().x, position.y);
+		updateBorders(fontMetrics);
+	}
+
+
+
+	public abstract void updateBorders(FontMetrics fm);
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D orig)
+	{
+		updateBorders();
+		borders.mirrorVertical(orig);
+		position.setLocation(position.x, borders.getTheSEPoint().y);
+		updateBorders(fontMetrics);
+	}
+
+
+
+	@Override
+	public void onDragged(Point formerPt, Point newPt)
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		if(isOnRotation && borders.dSelected!=null)
+		{
+			borders.onDragged(formerPt, newPt);
+			shape = createShape2D();
+			rotationAngle = borders.getRotationAngle();
+		}
+		else
+			shift(formerPt, newPt);
+		gravityCenter = borders.getGravityCenter();
+	}
+
+
+
+	@Override
+	@Deprecated
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound) 
+	{
+		/*
+		 * This function is disable
+		 */
+	}
+
+	
+	
+	@Override
+	@Deprecated
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound) 
+	{
+		/*
+		 * This function is disable
+		 */
+	}
+
+
+
+	@Override
+	@Deprecated
+	public void setLastPoint(double x, double y) 
+	{
+		/*
+		 * This function is disable
+		 */
+	}
+
+	
+	@Override
+	@Deprecated
+	public void setFirstPoint(double x, double y) 
+	{
+		/*
+		 * This function is disable
+		 */
+	}
+
+
+
+	@Override
+	public void shift(double shiftX, double shiftY)
+	{
+		if(position!=null)
+		{
+			position.x+=shiftX;
+			position.y+=shiftY;
+			updateBorders(getFontMetrics());
+		}	
+	}
+
+
+
+	@Override
+	public void updateShape()
+	{
+		shape = createShape2D();
+	}
+
+	
+	
+	/**
+	 * @param x The x-coordinate to set.
+	 */
+	public synchronized void setGridEndX(int x)
+	{
+		if(x>=gridStart.x)
+			gridEnd.x = x;
+	}
+
+	
+	
+	/**
+	 * @param y The y-coordinate to set.
+	 */
+	public synchronized void setGridEndY(int y)
+	{
+		if(y>=gridStart.y)
+			gridEnd.y = y;
+	}
+
+
+
+	/**
+	 * @return the isXLabelSouth.
+	 */
+	public synchronized boolean isXLabelSouth()
+	{
+		return isXLabelSouth;
+	}
+
+
+
+	/**
+	 * @param isXLabelSouth the isXLabelSouth to set.
+	 */
+	public synchronized void setXLabelSouth(boolean isXLabelSouth)
+	{
+		this.isXLabelSouth = isXLabelSouth;
+	}
+
+
+
+
+	/**
+	 * @return the isYLabelWest.
+	 */
+	public synchronized boolean isYLabelWest()
+	{
+		return isYLabelWest;
+	}
+
+
+
+
+	/**
+	 * @param isYLabelWest the isYLabelWest to set.
+	 */
+	public synchronized void setYLabelWest(boolean isYLabelWest)
+	{
+		this.isYLabelWest = isYLabelWest;
+	}
+
+
+
+
+	/**
+	 * @return the gridStart.
+	 */
+	public synchronized LaTeXDrawPoint2D getGridStart()
+	{
+		return gridStart;
+	}
+
+
+
+
+	/**
+	 * @param gridStart the gridStart to set.
+	 */
+	public synchronized void setGridStart(LaTeXDrawPoint2D gridStart)
+	{
+		this.gridStart = gridStart;
+	}
+
+
+
+
+	/**
+	 * @return the gridEnd.
+	 */
+	public synchronized LaTeXDrawPoint2D getGridEnd()
+	{
+		return gridEnd;
+	}
+
+
+
+	/**
+	 * @param gridEnd the gridEnd to set.
+	 */
+	public synchronized void setGridEnd(LaTeXDrawPoint2D gridEnd)
+	{
+		this.gridEnd = gridEnd;
+	}
+
+
+
+	/**
+	 * @return the position.
+	 */
+	public synchronized LaTeXDrawPoint2D getPosition()
+	{
+		return position;
+	}
+
+
+
+
+	/**
+	 * @param position the position to set.
+	 */
+	public synchronized void setPosition(LaTeXDrawPoint2D position)
+	{
+		this.position = position;
+	}
+
+
+
+
+	/**
+	 * @return the origin.
+	 */
+	public synchronized LaTeXDrawPoint2D getOrigin()
+	{
+		return origin;
+	}
+
+
+
+	/**
+	 * @param origin the origin to set.
+	 */
+	public synchronized void setOrigin(LaTeXDrawPoint2D origin)
+	{
+		this.origin = origin;
+	}
+	
+	
+	/**
+	 * @param y The y-coordinate to set.
+	 */
+	public synchronized void setGridStartY(int y)
+	{
+		if(y<=gridEnd.y)
+			gridStart.y = y;
+	}
+	
+
+	
+	/**
+	 * @param x The x-coordinate to set.
+	 */
+	public synchronized void setGridStartX(int x)
+	{
+		if(x<=gridEnd.x)
+			gridStart.x = x;
+	}
+	
+	
+	
+	/**
+	 * @param x The X-coordinate to set.
+	 */
+	public synchronized void setOriginX(int x)
+	{
+		origin.x = x;
+	}
+
+	
+	
+	/**
+	 * @param y The Y-coordinate to set.
+	 */
+	public synchronized void setOriginY(int y)
+	{
+		origin.y = y;
+	}
+	
+	
+	
+	
+	/**
+	 * @return the fontMetrics
+	 */
+	public synchronized FontMetrics getFontMetrics()
+	{
+		return fontMetrics;
+	}
+
+
+
+
+	/**
+	 * Allows to update the Font and the FontMetrics.
+	 */
+	public synchronized void updateFonts()
+	{
+		BufferedImage bufferImage = new BufferedImage(2, 2, BufferedImage.TYPE_INT_RGB);
+		Graphics2D g = bufferImage.createGraphics();
+		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+		g.setFont(getFont());
+		fontMetrics = g.getFontMetrics();
+		
+		g.dispose();
+		bufferImage.flush();
+		g = null;
+		bufferImage = null;
+	}
+
+
+	
+	/**
+	 * @return the font
+	 */
+	public synchronized Font getFont()
+	{
+		return font;
+	}
+		
+	
+	@Override
+	@Deprecated
+	public LaTeXDrawPoint2D getLastPoint()
+	{
+		return null;
+	}
+}
diff --git a/current/latexDraw/figures/JoinedLines.java b/current/latexDraw/figures/JoinedLines.java
new file mode 100644
index 0000000..108bc72
--- /dev/null
+++ b/current/latexDraw/figures/JoinedLines.java
@@ -0,0 +1,809 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Line2D;
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/**
+ * This class defines a kind of figure: joined lines.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ * LaTeXDraw is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or any later version.<br>
+ * <br>
+ * LaTeXDraw is distributed without any warranty; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.<br>
+ * <br>
+ * 01/28/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class JoinedLines extends LaTeXDrawPolygon implements Arrowable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** the arrowhead of the first line. */
+	private ArrowHead arrowHead1;
+
+	/** The arrowhead of the last line. */
+	private ArrowHead arrowHead2;
+
+
+
+	 /**
+	 * The constructor using two points
+	 * @param pt1 The first point of the polygon
+	 * @param pt2 The second point of the polygon
+	 */
+	public JoinedLines(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, boolean increaseMeter)
+	{
+		super(pt1, pt2, increaseMeter);
+		
+		canBeFilled = true;
+		isBordersMovable = false;
+		isDoubleBoundaryable = true;
+		canHaveArrow = true;
+		shape = getInsideOutsideOrMiddleBorders();
+		arrowHead1 = new ArrowHead(pt1, new Line(pt1, pt2, false), this);
+		arrowHead2 = new ArrowHead(pt2, new Line(pt2, pt1, false), this);
+	} 
+
+
+
+	/**
+	 * Allows to get the outer or the inner borders following a distance
+	 * @param gap The distance of the borders
+	 * @param into True, you will get the borders inside the real borders
+	 */
+	@Override
+	protected GeneralPath getBorders(double gap, boolean into)
+	{
+		GeneralPath gp = new GeneralPath();
+		
+		gp.moveTo((float)pts.firstElement().x, (float)pts.firstElement().y);
+		
+		if(pts.size()==1)
+			gp.lineTo((float)pts.firstElement().x-1, (float)pts.firstElement().y);
+		else
+		if(pts.size()==2)
+			gp.lineTo(((float)pts.firstElement().x)==((float)pts.lastElement().x) && 
+						((float)pts.firstElement().y)==((float)pts.lastElement().y) ? (float)pts.lastElement().x-1 : 
+						(float)pts.lastElement().x, (float)pts.lastElement().y);
+		else
+			for(int i=1, size=pts.size(); i<size; i++)
+				gp.lineTo((float)pts.elementAt(i).x, (float)pts.elementAt(i).y);
+		
+		return gp;
+	}
+
+
+
+
+
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{ 
+		double dx=0, dy=0;
+		LaTeXDrawPoint2D first = (LaTeXDrawPoint2D)pts.firstElement().clone();
+		LaTeXDrawPoint2D last =  (LaTeXDrawPoint2D)pts.lastElement().clone();
+		Color formerCol = g.getColor();
+		String arrowHead1Style = arrowHead1.getArrowStyle();
+		String arrowHead2Style = arrowHead2.getArrowStyle();
+		boolean arrow1Drawable = arrowHead1.isDrawable() && !arrowHead1Style.equals(PSTricksConstants.NONEARROW_STYLE) && pts.size()>1;
+		boolean arrow2Drawable = arrowHead2.isDrawable() && !arrowHead2Style.equals(PSTricksConstants.NONEARROW_STYLE) && pts.size()>1;
+		boolean update = false;
+		LaTeXDrawPoint2D pFormer0 = pts.firstElement();
+		LaTeXDrawPoint2D pFormer1 = pts.lastElement();
+		BasicStroke wideline = new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
+		float thick = thickness;
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		if(shape==null)
+			shape = getInsideOutsideOrMiddleBorders();
+			
+		if(arrow1Drawable)
+		{
+			LaTeXDrawPoint2D pt0 = pts.firstElement();
+			LaTeXDrawPoint2D pt1 = pts.elementAt(1);
+			Line l = arrowHead1.getLine();
+			l.updateAandB();
+			double lineAngle = Math.atan(l.getA());
+			double xRot,yRot, b = l.getB();
+			double lgth = arrowHead1.getArrowHeadLength();
+	
+			if(Math.abs(lineAngle)==(Math.PI/2.))
+			{
+				first.y = pt0.y<pt1.y ? pt0.y+lgth : pt0.y-lgth;
+				first.x = pt0.x;
+			}
+			else
+			{
+				xRot = Math.cos(-lineAngle)*pt0.x-Math.sin(-lineAngle)*(pt0.y-b); 
+				yRot = Math.sin(-lineAngle)*pt0.x+Math.cos(-lineAngle)*(pt0.y-b)+b;
+				if(pt0.x<pt1.x) xRot+=lgth;
+				else xRot-=lgth;
+				first.x = Math.cos(lineAngle)*xRot-Math.sin(lineAngle)*(yRot-b);
+				first.y = Math.sin(lineAngle)*xRot+Math.cos(lineAngle)*(yRot-b)+b;	
+			}	
+			
+			pFormer0 = pts.remove(0);
+			pts.add(0, first);
+			update = true;
+		}
+			
+		if(arrow2Drawable)
+		{
+			LaTeXDrawPoint2D pt0 = pts.lastElement();
+			LaTeXDrawPoint2D pt1 = pts.elementAt(pts.size()-2);
+			Line l = arrowHead2.getLine();
+			l.updateAandB();
+			double lineAngle = Math.atan(l.getA());
+			double xRot,yRot, b = l.getB();
+			double lgth = arrowHead2.getArrowHeadLength();
+	
+			if(Math.abs(lineAngle)==(Math.PI/2.))
+			{
+				last.y = pt0.y<pt1.y ? pt0.y+lgth : pt0.y-lgth;
+				last.x = pt0.x;
+			}
+			else
+			{
+				xRot = Math.cos(-lineAngle)*pt0.x-Math.sin(-lineAngle)*(pt0.y-b); 
+				yRot = Math.sin(-lineAngle)*pt0.x+Math.cos(-lineAngle)*(pt0.y-b)+b;
+				if(pt0.x<pt1.x) xRot+=lgth;
+				else xRot-=lgth;
+				last.x = Math.cos(lineAngle)*xRot-Math.sin(lineAngle)*(yRot-b);
+				last.y = Math.sin(lineAngle)*xRot+Math.cos(lineAngle)*(yRot-b)+b;	
+			}	
+			
+			pFormer1 = pts.remove(pts.size()-1);
+			pts.add(pts.size(), last);
+			update = true;
+		}
+			
+		if(update)
+			shape = getBorders(0, true);
+		
+		if(hasDoubleBoundary)
+		{
+			thick = (float)(2*thickness+doubleSep);
+			
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				wideline = new BasicStroke(thick, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
+			else 
+			if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+				wideline = new BasicStroke(thick, BasicStroke.CAP_ROUND,
+						BasicStroke.JOIN_MITER, 1.f, new float[] { 0, thick + dotSep }, 0);
+			else
+				wideline = new BasicStroke(thick, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+						1.f, new float[]{blackDashLength, whiteDashLength}, 0);
+		}
+		
+		if(hasShadow)
+		{
+			g.setStroke(new BasicStroke(thick, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			g.translate(dx, dy);
+			g.setColor(shadowColor);
+			
+			if(isFilled() || isHatched() || hasGradient()) g.fill(shape);
+				g.draw(shape);
+				
+			g.translate(-dx, -dy);
+			
+			if(isFilled() || isHatched() || hasGradient()) 
+			{
+				g.setColor(interiorColor);
+				g.draw(shape);
+			}
+		}
+
+		if(arrow1Drawable && hasShadow)
+		{
+			g.translate(dx, dy);
+			arrowHead1.draw(g, interiorColor, true);
+			g.translate(-dx, -dy);
+		}
+			
+		if(arrow2Drawable && hasShadow)
+		{
+			g.translate(dx, dy);
+			arrowHead2.draw(g, interiorColor, true);
+			g.translate(-dx, -dy);
+		}
+			
+		if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			g.setStroke(new BasicStroke(thick, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+		else 
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			g.setStroke(new BasicStroke(thick, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER,
+					1.f, new float[]{0,thick+dotSep}, 0));
+		else
+		if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+			g.setStroke(new BasicStroke(thick, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+					1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+			
+		fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, shape);
+		g.setColor(linesColor);
+		
+		if(hasDoubleBoundary())
+		{
+			Shape outline = wideline.createStrokedShape(shape);
+			g.fill(outline);
+			g.setColor(doubleColor);
+			wideline = new BasicStroke((float)doubleSep, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
+	        outline = wideline.createStrokedShape(shape);
+			g.fill(outline);
+		}
+		else
+			g.draw(shape);
+		
+		if(update)
+		{
+			pts.remove(0);
+			pts.remove(pts.size()-1);
+			pts.add(0, pFormer0);
+			pts.add(pts.size(), pFormer1);
+			updateShape();
+		}
+	
+		g.setStroke(new BasicStroke(thick, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+		
+		if(arrow1Drawable)
+			arrowHead1.draw(g, interiorColor, false);
+		
+		if(arrow2Drawable)
+			arrowHead2.draw(g, interiorColor, false);
+
+		g.setColor(formerCol);
+
+		if(isSelected)
+		{
+			int sizeD = delimiters.size();
+			for(int i=0; i<sizeD; i++)
+				delimiters.elementAt(i).draw(g);
+			
+			if(borders!=null)
+				borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+		}
+	}
+
+
+
+
+
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint(), p;
+		String coord = "", add = "", fillType = "", arrowsCode = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
+		int i, size = getNbPoints();
+		double threshold = 0.001;
+		
+		if(size<2)
+			return null;
+
+		for(i = 0; i<size; i++)
+		{
+			p = pts.elementAt(i);
+			coord += "("+LaTeXDrawNumber.getCutNumber((float)((p.x-d.x)/ppc),threshold)+","+ //$NON-NLS-1$ //$NON-NLS-2$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-p.y)/ppc),threshold)+")"; //$NON-NLS-1$
+		}
+
+		if(hasShadow)
+		{
+			fillType += ",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				fillType += ",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				fillType += ",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC),threshold);//$NON-NLS-1$
+
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name);
+				}
+				add += ",shadowcolor="+name; //$NON-NLS-1$
+			}
+		}
+
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0)
+			fillType = fillType+','+str;
+
+		str = getPSTricksCodeLine(ppc);
+		if(str.length()>0)
+			add = add+','+str;
+
+		String arrowHead1Style = arrowHead1.getArrowStyle();
+		String arrowHead2Style = arrowHead2.getArrowStyle();
+
+		if(!arrowHead1Style.equals(PSTricksConstants.NONEARROW_STYLE) ||
+			!arrowHead2Style.equals(PSTricksConstants.NONEARROW_STYLE))
+		{
+			if(arrowHead2Style.equals(PSTricksConstants.DLARROW_STYLE))
+				arrowHead2Style = PSTricksConstants.DRARROW_STYLE;
+			else
+				if(arrowHead2Style.equals(PSTricksConstants.DRARROW_STYLE))
+					arrowHead2Style = PSTricksConstants.DLARROW_STYLE;
+				else
+					if(arrowHead2Style.equals(PSTricksConstants.RARROW_STYLE))
+						arrowHead2Style = PSTricksConstants.LARROW_STYLE;
+					else
+						if(arrowHead2Style.equals(PSTricksConstants.LARROW_STYLE))
+							arrowHead2Style = PSTricksConstants.RARROW_STYLE;
+						else
+							if(arrowHead2Style.equals(PSTricksConstants.DLARROW_STYLE))
+								arrowHead2Style = PSTricksConstants.DRARROW_STYLE;
+							else
+								if(arrowHead2Style.equals(PSTricksConstants.LRBRACKET_STYLE))
+									arrowHead2Style = PSTricksConstants.RRBRACKET_STYLE;
+								else
+									if(arrowHead2Style.equals(PSTricksConstants.RRBRACKET_STYLE))
+										arrowHead2Style = PSTricksConstants.LRBRACKET_STYLE;
+									else
+										if(arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE))
+											arrowHead2Style = PSTricksConstants.LSBRACKET_STYLE;
+										else
+											if(arrowHead2Style.equals(PSTricksConstants.LSBRACKET_STYLE))
+												arrowHead2Style = PSTricksConstants.RSBRACKET_STYLE;
+
+			String paramsR = ","+arrowHead1.getParametersCode(); //$NON-NLS-1$
+			String paramsL = ","+arrowHead2.getParametersCode(); //$NON-NLS-1$
+			if(paramsR.equals(","))paramsR = ""; //$NON-NLS-1$ //$NON-NLS-2$
+			if(paramsL.equals(","))paramsL = ""; //$NON-NLS-1$ //$NON-NLS-2$
+
+			if(!arrowHead1Style.equals(PSTricksConstants.NONEARROW_STYLE))
+			{
+				arrowsCode = "{"+arrowHead1Style+'-'; //$NON-NLS-1$
+
+				if(!arrowHead2Style.equals(PSTricksConstants.NONEARROW_STYLE))
+					arrowsCode += arrowHead2Style;
+				arrowsCode += '}';
+
+				if(!arrowHead1.isOfTheSameTypeAs(arrowHead2))
+				{
+					if((arrowHead2Style.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+						arrowHead2Style.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+						arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE)||
+						arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE)) &&
+						(arrowHead1Style.equals(PSTricksConstants.BAREND_STYLE)
+						||arrowHead1Style.equals(PSTricksConstants.BARIN_STYLE)
+						||arrowHead1Style.equals(PSTricksConstants.LRBRACKET_STYLE)
+						||arrowHead1Style.equals(PSTricksConstants.RRBRACKET_STYLE)
+						||arrowHead1Style.equals(PSTricksConstants.RSBRACKET_STYLE)||
+						arrowHead1Style.equals(PSTricksConstants.RSBRACKET_STYLE)))
+						add = paramsR;
+					else
+						add += paramsL+paramsR;
+				}
+				else
+					add += paramsR;
+			}
+			else
+				if(!arrowHead2Style.equals(PSTricksConstants.NONEARROW_STYLE))
+				{
+					add += paramsL;
+					arrowsCode = "{-"+arrowHead2Style+'}'; //$NON-NLS-1$
+				}
+		}
+
+		if(hasDoubleBoundary)
+		{
+			add += ",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc),threshold); //$NON-NLS-1$
+
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name);
+				}
+				add += ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}
+
+		if(!isFilled
+				&&!interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR))
+		{
+			String name = DviPsColors.getColourName(interiorColor);
+			if(name==null)
+			{
+				name = "color"+number+'b';//$NON-NLS-1$
+				DviPsColors.addUserColour(interiorColor, name);
+			}
+			add += ",fillcolor="+name; //$NON-NLS-1$
+		}
+
+		return "\\psline[linewidth="+LaTeXDrawNumber.getCutNumber((thickness/ppc),threshold) //$NON-NLS-1$
+				+add+fillType+"]"+arrowsCode+coord; //$NON-NLS-1$
+	}
+
+
+
+
+
+	/**
+	 * @return the arrowHead1Style
+	 */
+	public synchronized String getArrow1Style()
+	{
+		return arrowHead1.getArrowStyle();
+	}
+
+
+
+
+
+	/**
+	 * @param arrowHeadStyle the arrowHead1Style to set
+	 */
+	public synchronized void setArrow1Style(String arrowHeadStyle)
+	{
+		if(PSTricksConstants.isValidArrowStyle(arrowHeadStyle))
+			arrowHead1.setArrowStyle(arrowHeadStyle);
+	}
+
+
+
+
+
+	/**
+	 * @param arrowHeadStyle the arrowHead2Style to set
+	 */
+	public synchronized void setArrow2Style(String arrowHeadStyle)
+	{
+		if(PSTricksConstants.isValidArrowStyle(arrowHeadStyle))
+			arrowHead2.setArrowStyle(arrowHeadStyle);
+	}
+
+
+
+
+
+	/**
+	 * @return the arrowHead2Style
+	 */
+	public synchronized String getArrow2Style()
+	{
+		return arrowHead2.getArrowStyle();
+	}
+
+
+
+
+
+	@Override
+	public synchronized void setThickness(float val)
+	{
+		super.setThickness(val);
+
+		if(arrowHead1!=null)
+		{
+			arrowHead1.getLine().setThickness(val);
+			arrowHead2.getLine().setThickness(val);
+		}
+	}
+
+
+
+
+
+	@Override
+	public boolean addPoint(LaTeXDrawPoint2D pt)
+	{
+		boolean ok = super.addPoint(pt);
+
+		if(ok&&pts.size()>1)
+		{
+			Line l = new Line(pt, pts.elementAt(pts.size()-2), false);
+			l.setThickness(thickness);
+			l.setLinesColor(linesColor);
+
+			if(arrowHead2!=null)
+			{
+				arrowHead2.setLine(l);
+				arrowHead2.setPosition(pt);
+			}
+		}
+
+		return ok;
+	}
+
+
+
+
+
+	@Override
+	public void removePointAt(int id)
+	{
+		super.removePointAt(id);
+
+		if(id==0&&pts.size()>1)
+		{
+			Line l = new Line(pts.firstElement(), pts.elementAt(1), false);
+			l.setThickness(thickness);
+			l.setLinesColor(linesColor);
+			arrowHead1.setLine(l);
+			arrowHead1.setPosition(pts.firstElement());
+		}
+		else
+			if((id==-1||id>pts.size())&&pts.size()>1)
+			{
+				Line l = new Line(pts.lastElement(), pts
+						.elementAt(pts.size()-2), false);
+				l.setThickness(thickness);
+				l.setLinesColor(linesColor);
+				arrowHead2.setLine(l);
+				arrowHead2.setPosition(pts.lastElement());
+			}
+
+	}
+
+
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		JoinedLines f = (JoinedLines)super.clone();
+
+		f.arrowHead1 = (ArrowHead)arrowHead1.clone();
+		f.arrowHead2 = (ArrowHead)arrowHead2.clone();
+		Line l1 = new Line(f.pts.lastElement(), f.pts.elementAt(f.pts.size()-2), false);
+		l1.setThickness(thickness);
+		l1.setLinesColor(linesColor);
+		f.arrowHead2.setLine(l1);
+		f.arrowHead2.setPosition(f.pts.lastElement());
+		f.arrowHead2.setFigure(f);
+		Line l2 = new Line(f.pts.firstElement(), f.pts.elementAt(1), false);
+		l2.setThickness(thickness);
+		l2.setLinesColor(linesColor);
+		f.arrowHead1.setLine(l2);
+		f.arrowHead1.setPosition(f.pts.firstElement());
+		f.arrowHead1.setFigure(f);
+
+		return f;
+	}
+
+
+
+
+
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow = true;
+		canHaveArrow = true;
+		isDoubleBoundaryable = true;
+
+		interiorColor = (Color)ois.readObject();
+		lineStyle = (String)ois.readObject();
+		rotationAngle = ois.readDouble();
+		thickness = ois.readFloat();
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color)ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		pts = (Vector<LaTeXDrawPoint2D>)ois.readObject();
+
+		delimiters = new Vector<Delimitor>();
+		for(int i = 0, size = pts.size(); i<size; i++)
+			delimiters.add(new Delimitor(pts.elementAt(i)));
+
+		hasDoubleBoundary = ois.readBoolean();
+		doubleColor = (Color)ois.readObject();
+		doubleSep = ois.readDouble();
+		hatchingAngle = ois.readDouble();
+		hatchingColor = (Color)ois.readObject();
+		hatchingStyle = (String)ois.readObject();
+		hatchingWidth = ois.readFloat();
+
+		arrowHead1 = (ArrowHead)ois.readObject();
+		arrowHead2 = (ArrowHead)ois.readObject();
+
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow = ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize = ois.readDouble();
+			shadowColor = (Color)ois.readObject();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+		}
+		else
+		{
+			hasShadow = DEFAULT_SHADOW_HAS;
+			shadowAngle = DEFAULT_SHADOW_ANGLE;
+			shadowSize = DEFAULT_SHADOW_SIZE;
+			shadowColor = DEFAULT_SHADOW_COLOR;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+		}
+
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+			hatchingSep = ois.readDouble();
+		else
+			hatchingSep = DEFAULT_HATCH_SEP;
+
+		shape = getInsideOutsideOrMiddleBorders();
+		setThickness(thickness);
+	}
+
+
+
+	/**
+	 * @return the arrowHead1
+	 */
+	public ArrowHead getArrowHead1()
+	{
+		return arrowHead1;
+	}
+
+
+
+
+
+	/**
+	 * @return the arrowHead2
+	 */
+	public ArrowHead getArrowHead2()
+	{
+		return arrowHead2;
+	}
+
+
+
+
+
+//	@Override
+//	public boolean intersects(Rectangle2D.Double r)
+//	{
+//		if(r==null)
+//			return false;
+//
+//		boolean again = true;
+//		int i = 0, size = pts.size()-1;
+//		Line2D.Double l = new Line2D.Double();
+//		BasicStroke wideline = new BasicStroke((thickness));
+//
+//		while(again&&i<size)
+//		{
+//			l.setLine(pts.elementAt(i), pts.elementAt(i+1));
+//			Shape outline = wideline.createStrokedShape(l);
+//
+//			if(outline.intersects(r))
+//				again = false;
+//			else
+//				i++;
+//		}
+//
+//		if(again && (isFilled() || isHatched() || hasGradient()))
+//		{
+//			l = new Line2D.Double(pts.lastElement(), pts.firstElement());
+//
+//			if(l.intersects(r))
+//				again = false;
+//		}
+//
+//		return !again;
+//	}
+
+
+
+
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()^getNbPoints();
+	}
+
+
+
+
+	public boolean hasTwoLeftArrows()
+	{
+		return true;
+	}
+	
+	
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt)
+	{
+		if(isSelected && (borders.dNE.isIn(pt) || borders.dNW.isIn(pt) || borders.dSE.isIn(pt) || 
+			borders.dSW.isIn(pt) || borders.dS.isIn(pt)  || borders.dN.isIn(pt) || borders.dE.isIn(pt)  || borders.dW.isIn(pt)))
+			return true;
+		
+		boolean in = false;
+		int i, sizeD = delimiters.size();
+		
+		// If the point is in a delimiter
+		for(i=0; i<sizeD && !in; i++)
+			if(delimiters.elementAt(i).isIn(pt))
+				in = true;
+		
+		if(in) return true;
+		
+		Stroke wideline = new BasicStroke(hasDoubleBoundary ?(float)(thickness*2+doubleSep) : thickness, 
+											BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
+		Shape s = wideline.createStrokedShape(shape);
+		
+		if(s.contains(pt))
+			return true;
+		
+		if(isFilled || hasGradient() || isHatched())
+			return shape.contains(pt);
+
+		return false;
+	}
+
+	
+	
+	@Override
+	public boolean intersected(Rectangle2D.Double r)
+	{
+		if(r==null)
+			return false;
+		
+		BasicStroke wideline = new BasicStroke(hasDoubleBoundary() ? (float)(thickness*2+doubleSep) : thickness);
+        Shape outline = wideline.createStrokedShape(shape);
+        
+        boolean ok = outline.intersects(r);
+        
+        if(!ok && (isFilled() || isHatched() || hasGradient()))
+        {
+        	Line2D.Double l = new Line2D.Double(pts.firstElement(), pts.lastElement());
+        	
+        	if(l.intersects(r))
+        		ok = true;
+        }
+        
+        return ok;
+	}
+	
+	
+	@Override
+	public boolean shadowFillsShape()
+	{
+		return false;
+	}
+}
diff --git a/current/latexDraw/figures/LaTeXDrawPolygon.java b/current/latexDraw/figures/LaTeXDrawPolygon.java
new file mode 100644
index 0000000..67ab4de
--- /dev/null
+++ b/current/latexDraw/figures/LaTeXDrawPolygon.java
@@ -0,0 +1,1498 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import latexDraw.figures.properties.DoubleBoundaryable;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawException;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/** 
+ * This class defines a polygon.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @java6 Replace GeneralPath by Path2D.Double
+ */
+public class LaTeXDrawPolygon extends Figure implements DoubleBoundaryable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** All the corners of the polygon */
+	protected Vector<LaTeXDrawPoint2D> pts;
+	
+	/** All delimiters of the polygon */
+	protected Vector<Delimitor> delimiters;
+
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public LaTeXDrawPolygon(boolean increaseMeter)
+	{
+		super(increaseMeter);
+		isBordersMovable = false;
+		borders=null;
+		pts = new Vector<LaTeXDrawPoint2D>();
+		delimiters = new Vector<Delimitor>();
+	}
+	
+	
+
+	/**
+	 * Create a figure from one another.
+	 * @param f The figure to copy.
+	 * @param sameNumber True is the new figure must have the same number as the other.
+	 * @throws IllegalArgumentException If f is null or if f has no border.
+	 */
+	public LaTeXDrawPolygon(Figure f, boolean sameNumber)
+	{
+		super(f, sameNumber);
+		
+		pts = new Vector<LaTeXDrawPoint2D>();
+		delimiters = new Vector<Delimitor>();
+		if(f==null) return;
+		
+		LaTeXDrawRectangle b = f.getBorders();
+		
+		if(b==null)
+			throw new IllegalArgumentException();
+		
+		borders = new LaTeXDrawRectangle((LaTeXDrawPoint2D)b.getPoint(0).clone(), (LaTeXDrawPoint2D)b.getPoint(-1).clone(), false);
+		
+		for(LaTeXDrawPoint2D pt : b.pts)
+		{
+			pts.add((LaTeXDrawPoint2D)pt.clone());
+			Delimitor d = new Delimitor(pts.lastElement());
+			d.setColorSet3();
+			delimiters.add(d);
+		}
+		
+		isBordersMovable = false;
+		updateBorders();
+		updateShape();
+		setThickness(thickness);
+	}
+	
+	
+	
+	/**
+	 * The constructor using two points
+	 * @param pt1 The first point of the polygon
+	 * @param pt2 The second point of the polygon
+	 */
+	public LaTeXDrawPolygon(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, boolean increaseMeter)
+	{
+		super(increaseMeter);
+		
+		isBordersMovable = false;
+		borders = new LaTeXDrawRectangle((LaTeXDrawPoint2D)pt1.clone(), (LaTeXDrawPoint2D)pt2.clone(), false);
+		pts = new Vector<LaTeXDrawPoint2D>();
+		delimiters = new Vector<Delimitor>();
+		addPoint(pt1);
+		addPoint(pt2);
+		updateGravityCenter();
+	}
+	
+	
+	
+	/**
+	 * The constructor using four points
+	 * @param pt1 The first point of the polygon
+	 * @param pt2 The second point of the polygon
+	 * @param pt3 The third point of the polygon
+	 * @param pt4 The fourth point of the polygon
+	 */
+	public LaTeXDrawPolygon(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, 
+			LaTeXDrawPoint2D pt3, LaTeXDrawPoint2D pt4, boolean increaseMeter)
+	{
+		super(increaseMeter);
+		borders = new LaTeXDrawRectangle((LaTeXDrawPoint2D)pt1.clone(),(LaTeXDrawPoint2D)pt2.clone(),
+										 (LaTeXDrawPoint2D)pt3.clone(),(LaTeXDrawPoint2D)pt4.clone(),false);
+		pts = new Vector<LaTeXDrawPoint2D>();
+		delimiters = new Vector<Delimitor>();
+		addPoint(pt1);
+		addPoint(pt2);
+		addPoint(pt3);
+		addPoint(pt4);
+		updateGravityCenter();
+		isBordersMovable = false;
+	}
+	
+	
+	
+	/**
+	 * Allows to add a point to the polygon
+	 * @param pt The point to be added
+	 * @return True if the point has been added
+	 */
+	public boolean addPoint(LaTeXDrawPoint2D pt)
+	{
+		int id = pts.isEmpty() ? 0 : pts.size()-1;
+		return addPointAt(pt, id);
+	}
+
+	
+	
+	
+	/**
+	 * Allows to add a point to the polygon at a specific position.
+	 * @param pt The point to be added (-1=the last position).
+	 * @return True if the point has been added.
+	 */
+	public boolean addPointAt(LaTeXDrawPoint2D pt, int id)
+	{
+		if(id == -1)
+			id = pts.size()-1;
+		
+		if(id<0 || id>pts.size())
+			throw new IllegalArgumentException(String.valueOf(id));
+		
+		if(pt!=null)
+		{
+			Delimitor d = new Delimitor(pt);
+			d.setDim(Math.max(6, 1.33*thickness+3.33 +1.));
+			d.setColorSet3();
+
+			if(pts.size()-1==id || pts.isEmpty())
+			{
+				pts.add(pt);
+				delimiters.add(d);
+			}
+			else
+			{
+				pts.add(id, pt);
+				delimiters.add(id, d);
+			}
+			
+			if(borders!=null)
+				updateBorders(pt);
+			
+			return true;
+		}
+		return false;
+	}
+	
+	
+	
+	/**
+	 * Allows to remove a point at the position id. If id = -1
+	 * the last point will be deleted
+	 * @param id The position of the point (-1 for the last point)
+	 */
+	public void removePointAt(int id)
+	{
+		if(pts.isEmpty()) return ;
+		
+		if(id>=pts.size() || id<-1)
+			throw new IllegalArgumentException();
+
+		if(id==-1)
+			id = pts.size()-1;
+		
+		pts.remove(id);
+		delimiters.remove(id);
+		if(borders!=null)
+			updateBorders();
+		
+		updateShape();
+	}
+	
+	
+	
+	
+	public Shape getInsideOutsideOrMiddleBorders()
+	{
+		return getBorders(0, true);
+	}
+	
+	
+	
+	
+	/**
+	 * Allow to get the point at the position id in the vector pts
+	 * @param id The position of the point asked (-1 = the last point)
+	 * @return The point asked
+	 */
+	public synchronized LaTeXDrawPoint2D getPoint(int id)
+	{
+		if(pts==null) return null;
+		
+		if(id==-1) return pts.lastElement();
+		if(id<0 || id>=pts.size())
+			throw new ArrayIndexOutOfBoundsException(id);
+		
+		return pts.elementAt(id);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to replace a given point of the polygon
+	 * @param pt The point to be replaced
+	 * @param id The position of the point in the vector pts
+	 */
+	public synchronized void setPointAt(LaTeXDrawPoint2D pt, int id)
+	{
+		if(id<0 || id>=pts.size())
+			throw new IllegalArgumentException();
+		
+		if(!pt.equals(pts.elementAt(id)))
+		{
+			pts.setElementAt(pt, id);
+	
+			if(borders!=null)
+				updateBorders(pt);
+			
+			updateShape();
+		}
+	}
+	
+	
+	
+	@Override
+	public void onDragged(Point formerPt, Point newPt) throws Exception 
+	{	
+		if(formerPt.equals(newPt)) return;
+		
+		if(isOnRotation && (borders.dSelected!=null || dSelected!=null))
+			addRotationAngle(computeRotationAngle(formerPt, newPt));
+		else
+		if(dSelected==null)// We dragged the figure or a delimiter of the 
+		{//borders is selected
+			if(borders.dSelected==null)
+				shift(formerPt, newPt);
+			else
+				if(borders!=null && borders.dSelected!=null)
+				{
+					if(borders.dSelected==borders.dE || borders.dSelected==borders.dNE ||
+						borders.dSelected==borders.dSE)
+					{
+						double dEx = borders.dE.getX(), dWx = borders.dW.getX();
+						// The user must not be able to reduce too much to figure
+						if(dEx!=dWx && newPt.x-dWx>10)
+							rescaleX(dEx, newPt.x, Math.abs((newPt.x-dWx)/(dEx-dWx)), borders);
+					}
+					if(borders.dSelected==borders.dW || borders.dSelected==borders.dNW ||
+						borders.dSelected==borders.dSW)
+					{
+						double dEx = borders.dE.getX(), dWx = borders.dW.getX();
+						if(dEx!=dWx && dEx-newPt.x>10)
+						//	 The user must not be able to reduce too much to figure
+							rescaleX(dWx, newPt.x, Math.abs((newPt.x-dEx)/(dWx-dEx)), borders);
+					}
+					if(borders.dSelected==borders.dN || borders.dSelected==borders.dNW ||
+						borders.dSelected==borders.dNE)
+					{
+						double dNy = borders.dN.getY(), dSy = borders.dS.getY();
+						if(dNy!=dSy && dSy-newPt.y>10)
+						//	 The user must not be able to reduce too much to figure
+							rescaleY(dNy, newPt.y, Math.abs((newPt.y-dSy)/(dNy-dSy)), borders);
+					}
+					if(borders.dSelected==borders.dS || borders.dSelected==borders.dSW ||
+						borders.dSelected==borders.dSE)
+					{
+						double dNy = borders.dN.getY(), dSy = borders.dS.getY();
+						if(dNy!=dSy && newPt.y-dNy>10)
+						//	 The user must not be able to reduce too much to figure
+							rescaleY(dSy, newPt.y, Math.abs((newPt.y-dNy)/(dSy-dNy)), borders);
+					}	
+				}
+			}//if(dSelected==null)
+			else
+			{
+				dSelected.setCoordinates(newPt.x, newPt.y);	
+				updateShape();
+			}
+		
+		updateBorders();
+	}
+
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{ 
+		Color formerCol = g.getColor();
+		double dx=0, dy=0;
+		boolean changeFillStyle = false;
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		if(shape==null)
+			shape = getInsideOutsideOrMiddleBorders();
+		
+		if(hasDoubleBoundary)
+		{
+			g.setColor(linesColor);
+			BasicStroke wideline=null;
+			
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				wideline = new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
+			else 
+			if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+				wideline = new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER,
+						1.f, new float[]{0,(float)(doubleSep+thickness*2.)+dotSep}, 0);
+			else
+				wideline = new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+						1.f, new float[]{blackDashLength, whiteDashLength}, 0);
+			
+	        Shape outline = wideline.createStrokedShape(shape);
+	        
+	        if(hasShadow)
+			{
+				Stroke stroke = g.getStroke();
+				g.setStroke(new BasicStroke((float)(doubleSep+thickness*2.), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.translate(dx, dy);
+				g.setColor(shadowColor);
+				g.fill(shape);
+				g.draw(shape);
+				g.translate(-dx, -dy);
+				g.setStroke(stroke);
+				
+				if(!isFilled)
+				{
+					changeFillStyle = true;
+					isFilled = true;
+				}
+			}
+			
+			fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, shape);
+			g.setColor(linesColor);
+			g.fill(outline);
+			g.setColor(doubleColor);
+			wideline = new BasicStroke((float)doubleSep);
+	        outline = wideline.createStrokedShape(shape);
+			g.fill(outline);
+		}
+		else
+		{
+			if(hasShadow)
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.translate(dx, dy);
+				g.setColor(shadowColor);
+				g.fill(shape);
+				g.draw(shape);
+				g.translate(-dx, -dy);
+				if(!isFilled)
+				{
+					changeFillStyle = true;
+					isFilled = true;
+				}
+				g.setColor(interiorColor);
+				g.draw(shape);
+			}
+			
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			else 
+			if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER,
+						1.f, new float[]{0,thickness+dotSep}, 0));
+			}
+			else
+			if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+						1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+			}	
+			
+			fillFigure(g, antiAlias,rendering,alphaInter, colorRendering,shape);
+			g.setColor(linesColor);
+			g.draw(shape);
+		}
+		
+		if(changeFillStyle) isFilled = false;
+		g.setColor(formerCol);
+
+		if(isSelected)
+		{
+			int sizeD = delimiters.size();
+			for(int i=0; i<sizeD; i++)
+				delimiters.elementAt(i).draw(g);
+			
+			if(borders!=null)
+				borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+		}
+	}
+
+	
+	
+	
+	
+	@Override
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound)
+	{
+		if(percent==1.) return ;
+		
+		if(bound==null) throw new IllegalArgumentException();
+		
+		int i, size = getNbPoints();
+
+		if(size>0)
+		{
+			LaTeXDrawPoint2D NW = bound.getTheNWPoint(), SE = bound.getTheSEPoint(),farest,p;
+	
+			if(formerX == SE.x)
+				farest = NW;
+			else
+				if(formerX == NW.x)
+					farest = SE;
+				else
+					throw new IllegalArgumentException();
+		
+			for(i=0; i<size; i++)
+			{// We rescale each point
+				p = getPoint(i);
+				if(p.x!=farest.x)
+					p.x = farest.x+(p.x-farest.x)*percent;
+			}
+			
+			updateBorders();
+		}
+		
+		updateShape();
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound)
+	{
+		if(percent==1.) return ;
+		
+		if(bound==null) throw new IllegalArgumentException();
+		
+		int i, size = getNbPoints();
+		
+		if(size>0)
+		{
+			LaTeXDrawPoint2D NW = bound.getTheNWPoint(), SE = bound.getTheSEPoint(),farest,p;
+	
+			if(formerY == SE.y)
+				farest = NW;
+			else
+				if(formerY == NW.y)
+					farest = SE;
+				else
+					throw new IllegalArgumentException();
+			
+			for(i=0; i<size; i++)
+			{// We rescale each point
+				p = getPoint(i);
+				if(p.y!=farest.y)
+					p.y = farest.y+(p.y-farest.y)*percent;
+			}
+			updateBorders();
+		}
+		updateShape();
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setLastPoint(LaTeXDrawPoint2D pt)
+	{
+		// We move the last point of the polygon
+		if(!pts.isEmpty())
+		{
+			pts.lastElement().setLocation(pt);
+			updateShape();
+			
+			if(borders!=null)
+				updateBorders();
+		}	
+	}
+	
+	
+	
+	@Override
+	public synchronized void setFirstPoint(double x, double y)
+	{
+		// We move the last point of the polygon
+		if(!pts.isEmpty())
+		{
+			pts.firstElement().setLocation(x, y);
+			if(borders!=null)
+				updateBorders(new LaTeXDrawPoint2D(x,y));
+			
+			updateShape();
+		}	
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setLastPoint(double x, double y)
+	{
+		setLastPoint(new LaTeXDrawPoint2D(x,y));
+	}
+
+	
+	
+	/**
+	 * Allows to set the coordinates of the last point of the figure with a Point
+	 * @param pt The point which will replace the last point (The last
+	 * point takes the coordinates of this point, the pointer doesn't change).
+	 */
+	public synchronized void setLastPoint(Point pt)
+	{
+		setLastPoint(new LaTeXDrawPoint2D(pt.x,pt.y));	
+	}
+	
+	
+	
+	
+	@Override
+	public LaTeXDrawPoint2D getTheSERotatedPoint()
+	{
+		return getTheSEPoint();
+	}
+	
+	
+	
+	
+	@Override
+	public LaTeXDrawPoint2D getTheNWRotatedPoint()
+	{
+		return getTheNWPoint();
+	}
+		
+	
+	
+	
+	/**
+	 * Allows to get the number of points that the polygon contains
+	 * @return The number of points
+	 */
+	public int getNbPoints()
+	{
+		if(pts!=null)
+			return pts.size();
+		return 0;
+	}
+	
+	
+	
+	
+	@Override
+	public LaTeXDrawPoint2D getTheNWPoint()
+	{	
+		if(borders!=null)
+			return borders.getTheNWPoint();
+		return null;
+	}
+
+	
+	
+	
+	@Override
+	public LaTeXDrawPoint2D getTheSEPoint()
+	{	
+		if(borders!=null)
+			return borders.getTheSEPoint();
+		return null;
+	}
+
+	
+	
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt)
+	{
+		if(isSelected && (borders.dNE.isIn(pt) || borders.dNW.isIn(pt) || 
+			borders.dSE.isIn(pt) || borders.dSW.isIn(pt) || borders.dS.isIn(pt)  || 
+			borders.dN.isIn(pt) || borders.dE.isIn(pt)  || borders.dW.isIn(pt)))
+			return true;
+		
+		boolean in = false;
+		int i, sizeD = delimiters.size();
+		
+		// If the point is in a delimiter
+		for(i=0; i<sizeD && !in; i++)
+			if(delimiters.elementAt(i).isIn(pt))
+				in = true;
+		
+		if(in) return true;
+		
+		Stroke wideline = new BasicStroke(hasDoubleBoundary ?(float)(thickness*2+doubleSep) : thickness, 
+				BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER);
+		Shape s = wideline.createStrokedShape(shape);
+		
+		if(s.contains(pt))
+			return true;
+		
+		if(isFilled || hasShadow || hasGradient())
+			return shape.contains(pt);
+
+		return false;
+	}
+
+
+	
+	
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint(), p;
+		String coord="", add="", fillType=""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		int i, size = getNbPoints();
+		boolean isFilledWasChanged = false;
+		double threshold = 0.001;
+		
+		if(size<2) return null;
+		
+		p = getPoint(0);
+		
+		// Creation of the coordinates of the polygon
+		for(i=0; i<size; i++)
+		{
+			p = getPoint(i);
+			coord+="("+LaTeXDrawNumber.getCutNumber((float)((p.x-d.x)/ppc),threshold)+","+ //$NON-NLS-1$//$NON-NLS-2$
+					LaTeXDrawNumber.getCutNumber((float)((d.y-p.y)/ppc),threshold)+")"; //$NON-NLS-1$
+		}
+
+		if(hasShadow)
+		{
+			fillType+=",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				fillType+=",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+			
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				fillType+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC),threshold);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				add += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+			if(!isFilled)
+			{
+				isFilled = true;
+				isFilledWasChanged = true;
+			}
+		}
+		
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) fillType=fillType+','+str;
+		
+		str = getPSTricksCodeLine(ppc);
+		if(str.length()>0) add=add+','+str;
+		
+		if(hasDoubleBoundary)
+		{
+			add+=",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc),threshold); //$NON-NLS-1$
+			
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name); 
+				}
+				add+= ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}
+		
+		if(isFilledWasChanged) isFilled = false;
+		
+		return "\\pspolygon[linewidth=" + LaTeXDrawNumber.getCutNumber(thickness/ppc,threshold)  //$NON-NLS-1$
+		+ add + fillType + "]"+coord; //$NON-NLS-1$
+	}
+
+	
+	
+
+	@Override
+	public void onClick(Point pt)
+	{
+		isSelected = true;
+		int i, sizeD = delimiters.size();
+		boolean in = false;
+		
+		for(i=0; i<sizeD && !in; i++)
+			if(delimiters.elementAt(i).isIn(pt))
+				in = true;
+		
+		if(in)
+			dSelected = delimiters.elementAt(i-1);
+		
+		if(borders!=null)
+			borders.onClick(pt);
+	}
+
+
+	
+	
+	@Override
+	public void shift(double shiftX, double shiftY) 
+	{
+		if(shiftX==0 && shiftY==0) return ;
+		
+		int i, size = pts.size();
+		
+		for(i=0; i<size; i++)
+		{
+			LaTeXDrawPoint2D p = pts.elementAt(i);
+			p.x+=shiftX;
+			p.y+=shiftY;
+		}
+		
+		if(borders!=null)
+			borders.shift(shiftX, shiftY);
+		
+		updateShape();
+	}
+
+	
+	
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		LaTeXDrawPolygon p = (LaTeXDrawPolygon) super.clone();
+		
+		p.pts = new Vector<LaTeXDrawPoint2D>();
+		p.delimiters = new Vector<Delimitor>();
+		int i, size;
+		LaTeXDrawPoint2D pt;
+		
+		for(i=0, size=pts.size(); i<size; i++)
+		{
+			pt = (LaTeXDrawPoint2D)pts.elementAt(i).clone();
+			p.pts.add(pt);
+			p.delimiters.add(new Delimitor(pt));
+		}
+		
+		if(!p.pts.isEmpty() && borders!=null)
+		{// We can't invoke borders.clone() because borders is a rectangle and a rectangle is a polygon, so ...
+			pt = p.pts.firstElement();
+			p.borders = new LaTeXDrawRectangle((LaTeXDrawPoint2D)pt.clone(), (LaTeXDrawPoint2D)pt.clone(),false);
+			p.borders.setSelected(isSelected);
+			p.updateBorders();
+			p.updateGravityCenter();
+		}
+			
+		p.setThickness(thickness);
+		p.updateStyleOfDelimitors();
+		p.updateShape();
+		
+		return p;
+	}
+
+
+	
+	
+	@Override
+	public synchronized void updateGravityCenter() 
+	{
+		if(gravityCenter==null)
+			gravityCenter = new LaTeXDrawPoint2D();
+		
+		gravityCenter.setLocation(0, 0);
+		
+		if(pts.size()>0)
+		{
+			for(LaTeXDrawPoint2D pt : pts)
+			{
+				gravityCenter.x+=pt.x;
+				gravityCenter.y+=pt.y;
+			}
+			
+			gravityCenter.x/=pts.size();
+			gravityCenter.y/=pts.size();
+		}
+	}
+
+	
+	
+	
+	@Override
+	public synchronized void setThickness(float val)
+	{
+		super.setThickness(val);
+		
+		if(!Double.isInfinite(val) && !Double.isNaN(val) && val>0)
+		{
+			double dim = Math.max(6,1.33*val+3.33 +1.);
+			int i, size = delimiters.size();
+			
+			// We change the size of the delimiters when the size of the figure change
+			for(i=0; i<size; i++)
+				delimiters.elementAt(i).setDim(dim);
+			
+			if(thickness!=val)
+			{
+				updateShape();
+				updateBorders();
+			}
+		}
+	}
+	
+	
+	
+	
+	
+	@Override
+	public synchronized void setRotationAngle(double theta)
+	{
+		if(!Double.isInfinite(theta) && !Double.isNaN(theta))
+			addRotationAngle(theta-rotationAngle);
+	}
+	
+	
+	
+	
+	public synchronized void addRotationAngle(double theta)
+	{
+		if(!Double.isInfinite(theta) && !Double.isNaN(theta))
+		{
+			theta%=(Math.PI*2);
+			int i, size = pts.size();
+			LaTeXDrawPoint2D p, pRot, formerGC = (LaTeXDrawPoint2D)getGravityCenter().clone();
+			
+			for(i=0; i<size; i++)
+			{
+				p = getPoint(i);
+				pRot = rotatePoint(p, formerGC, theta);
+				p.setLocation(pRot.x, pRot.y);
+			}
+			rotationAngle+=theta;
+			rotationAngle%=(Math.PI*2);
+			
+			updateBorders();
+			updateShape();
+			shift(getGravityCenter(), formerGC);
+		}
+	}
+	
+	
+
+
+	@Override
+	public void updateStyleOfDelimitors() 
+	{
+		int i, size = delimiters.size();
+		if(isOnRotation)
+			for(i=0; i<size; i++)
+				delimiters.elementAt(i).setColorSet4();
+		else
+			for(i=0; i<size; i++)
+				delimiters.elementAt(i).setColorSet3();
+		
+		if(borders!=null)
+			borders.updateStyleOfDelimitors();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update the dimension of the borders of the polygon
+	 */
+	public void updateBorders()
+	{
+		if(!pts.isEmpty())
+		{
+			LaTeXDrawPoint2D pt = getPoint(0);
+			int i, size = pts.size();
+			double NWx, NWy, SEy, SEx;
+			NWx = SEx = pt.x;		
+			SEy = NWy = pt.y;
+			
+			for(i=1; i<size; i++)
+			{
+				pt = getPoint(i);
+				if(pt.x<NWx) NWx = pt.x;
+				else if(pt.x>SEx) SEx = pt.x;
+				if(pt.y<NWy) NWy = pt.y;
+				else if(pt.y>SEy) SEy = pt.y;
+			}
+			
+			if(borders==null)
+				borders = new LaTeXDrawRectangle(new LaTeXDrawPoint2D(NWx,NWy), new LaTeXDrawPoint2D(SEx,SEy), false);
+			else
+			{
+				borders.setLastPoint(SEx, SEy);
+				borders.setFirstPoint(NWx, NWy);
+			}
+			
+			updateGravityCenter();
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update the dimension of the borders of the polygon when a point pt is added to the polygon
+	 * @param pt The added point
+	 */
+	public void updateBorders(LaTeXDrawPoint2D pt)
+	{
+		if(pt==null || borders==null) return ;
+
+		if(pts.size()>1)
+		{
+			LaTeXDrawPoint2D NW = getBordersPoint(0);
+			LaTeXDrawPoint2D SE = getBordersPoint(-1);
+			
+			if(pt.x<NW.x)
+				if(pt.y<NW.y)
+					 borders.setFirstPoint(pt);
+				else 
+				{
+					if(pt.y>SE.y)
+					{
+						 borders.setFirstPoint(pt.x,NW.y);
+						 borders.setLastPoint(SE.x,pt.y);
+					}
+					else borders.setFirstPoint(pt.x,NW.y);
+				}
+			else
+			{
+				if(pt.y<NW.y)
+					 borders.setFirstPoint(NW.x,pt.y);
+				if(pt.x>SE.x)
+				{
+					if(pt.y>SE.y)
+						  borders.setLastPoint(pt);
+					else  borders.setLastPoint(pt.x, SE.y);		
+				}
+				else 
+					if(pt.y>SE.y) 
+						borders.setLastPoint(SE.x,pt.y);
+			}
+		}//if(pts.size()>1)
+	}
+
+
+
+
+	@Override
+	public Shape createShape2D() 
+	{
+		if(hasDoubleBoundary)
+		{
+			BasicStroke wideline = new BasicStroke((float)(doubleSep+thickness));
+	        Shape outline = wideline.createStrokedShape(shape);
+	        
+	        return outline;
+		}
+		
+		return getInsideOutsideOrMiddleBorders();
+	}
+
+	
+	
+	
+	
+	@Override
+	public Shape createNonRotatedShape2D() 
+	{
+		 return createShape2D();
+	}
+	
+	
+	
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow = true;
+		isDoubleBoundaryable = true;
+		interiorColor = (Color) ois.readObject();
+		lineStyle = (String) ois.readObject();
+		rotationAngle = ois.readDouble();
+		thickness = ois.readFloat();
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		pts = (Vector<LaTeXDrawPoint2D>) ois.readObject();
+		
+		delimiters = new Vector<Delimitor>();
+		for(int i=0, size = pts.size();i<size; i++)
+			delimiters.add(new Delimitor(pts.elementAt(i)));	
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0)//$NON-NLS-1$
+		{
+			hasDoubleBoundary = ois.readBoolean();
+			doubleColor = (Color)ois.readObject();
+			doubleSep = ois.readDouble();
+			if(!(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0)) //$NON-NLS-1$
+				ois.readBoolean();
+			hatchingAngle = ois.readDouble();
+			hatchingColor = (Color)ois.readObject();
+			hatchingStyle = (String)ois.readObject();
+			hatchingWidth = ois.readFloat();
+			
+			if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6") < 0)//$NON-NLS-1$
+			{
+				if(hatchingStyle.equals(DECREPETED_FILL_CROSS))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_CROSSHATCH;
+				else if(hatchingStyle.equals(DECREPETED_FILL_HORIZ))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_HLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_VERT))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_VLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_NO))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_NONE;
+			}
+		}
+		else
+		{
+			hasDoubleBoundary  = DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor = DEFAULT_DOUBLE_COLOR;
+			doubleSep   = DEFAULT_DOUBLESEP;
+			hatchingAngle = DEFAULT_HATCH_ANGLE;
+			hatchingColor = DEFAULT_HATCH_COL;
+			hatchingStyle = DEFAULT_HATCH_STYLE;
+			hatchingWidth = DEFAULT_HATCH_WIDTH;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+			hatchingSep = ois.readDouble();
+		else
+			hatchingSep = DEFAULT_HATCH_SEP;
+		
+		setThickness(thickness);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+	
+	public Shape[] getDbleBoundariesOutside(Shape classicBord)
+	{// A Line cannot be double boundaries which move
+		return getDbleBoundariesMiddle(classicBord);
+	}
+
+	
+	
+	
+	
+	public Shape[] getDbleBoundariesInside(Shape classicBord)
+	{// A Line cannot be double boundaries which move
+		return getDbleBoundariesMiddle(classicBord);
+	}
+
+	
+	
+	
+
+	public Shape[] getDbleBoundariesMiddle(Shape classicBord)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		Shape[] sx = new Shape[2];
+		
+		if(pt1.x<pt2.x+thickness && pt1.x>pt2.x-thickness)
+		{
+			sx[0] = new GeneralPath(classicBord);
+			sx[1] = new GeneralPath(classicBord);
+		}
+		else
+		{
+			sx[0] = getBorders(thickness+doubleSep, false);
+			sx[1] = getBorders(thickness+doubleSep, true);
+		}
+		
+		return sx;
+	}
+
+	
+	
+
+
+	public Shape[] getDbleBoundariesOutInOrMiddle(Shape classicBord)
+	{// A Line cannot be double boundaries which move
+		return getDbleBoundariesMiddle(classicBord);
+	}
+
+	
+	
+	
+	
+	/**
+	 * Allows to get the outer or the inner borders following a distance
+	 * @param gap The distance of the borders
+	 * @param into True, you will get the borders inside the real borders
+	 */
+	protected GeneralPath getBorders(double gap, boolean into)
+	{
+		int i, nbP = getNbPoints();
+		LaTeXDrawPoint2D pt;
+		double xs[] = new double[nbP], ys[] = new double[nbP];
+		GeneralPath path = new GeneralPath();
+		
+		if(nbP<2)
+			return path;
+		
+		pt = pts.elementAt(0);
+		path.moveTo((float)pt.x, (float)pt.y);
+		
+		for(i=1; i<nbP; i++)
+		{
+			pt = pts.elementAt(i);
+			path.lineTo((float)pt.x, (float)pt.y);
+		}
+		
+		path.closePath();
+		
+		if(gap!=0.)
+			try
+			{
+				if(!into) 
+					gap*=-1;
+				
+				Double b;
+				LaTeXDrawPoint2D inter;
+				LaTeXDrawPoint2D ptStart = pts.elementAt(0), ptEnd = pts.elementAt(1);
+				int endId = 2;
+				
+				if(ptStart.x==ptEnd.x)
+					while(endId<nbP && ptStart.x==pts.elementAt(endId).x)
+					{
+						ptEnd = pts.elementAt(endId);
+						endId++;
+					}
+				
+				Line l1 = new Line(ptStart, ptEnd, false), l2, l2Old, l0;
+				pt = l1.getMiddlePt();
+				LaTeXDrawPoint2D[] p = l1.getPerpendicularLine(pt, false).findPoints(pt, Math.abs(gap)); 
+				
+				if(p.length<2)
+					throw new IndexOutOfBoundsException();
+				
+				boolean dist = path.contains(p[0]);
+				
+				if( (into && dist) || (!into && !dist) )
+				{
+					b = p[0].y-l1.getA()*p[0].x;
+					l2Old = new Line(b, p[0],false);
+				}
+				else
+				{
+					b = p[1].y-l1.getA()*p[1].x;
+					l2Old = new Line(b, p[1],false);
+				}
+				
+				l0 = l2Old;
+				i = endId-1;
+				
+				while(i<nbP-1)
+				{
+					ptStart = pts.elementAt(i);
+					ptEnd   = pts.elementAt(i+1);
+					endId   = i+2;
+					
+					if(ptStart.x==ptEnd.x)
+						while(endId<nbP && ptStart.x==pts.elementAt(endId).x)
+						{
+							ptEnd = pts.elementAt(endId);
+							endId++;
+						}
+					
+					l1 = new Line(ptStart, ptEnd, false);
+					pt = l1.getMiddlePt();
+					p = l1.getPerpendicularLine(pt, false).findPoints(pt, Math.abs(gap)); 
+					
+					if(p.length<2)
+						throw new IndexOutOfBoundsException();
+					
+					dist = path.contains(p[0]);
+					
+					if( (into && dist) || (!into && !dist) )
+					{
+						b = p[0].y-l1.getA()*p[0].x;
+						l2 = new Line(b, p[0],false);
+					}
+					else
+					{
+						b = p[1].y-l1.getA()*p[1].x;
+						l2 = new Line(b, p[1],false);
+					}
+					
+					inter = l2Old.getIntersection(l2);
+					l2Old.setPointAt(inter, 1);
+					l2.setPointAt(inter, 0);
+					l2Old = l2;
+					xs[i] = (inter.x+ptStart.x)/2.;
+					ys[i] = (inter.y+ptStart.y)/2.;
+					
+					i = endId-1;
+				}// while
+		
+				
+				if(endId<nbP)
+				{
+					// The last round
+					l1 = new Line(pts.elementAt(nbP-1), pts.elementAt(0), false);	
+					pt = l1.getMiddlePt();
+					p = l1.getPerpendicularLine(pt, false).findPoints(pt, Math.abs(gap)); 
+					
+					if(p.length<2)
+						throw new IndexOutOfBoundsException();
+					
+					dist = path.contains(p[0]);
+					
+					if( (into && dist) || (!into && !dist) )
+					{
+						b = p[0].y-l1.getA()*p[0].x;
+						l2 = new Line(b, p[0], false);
+					}
+					else
+					{
+						b = p[1].y-l1.getA()*p[1].x;
+						l2 = new Line(b, p[1], false);
+					}
+		
+					inter = l2Old.getIntersection(l2);
+		
+					l2Old.setPointAt(inter, 1);
+					l2.setPointAt(inter, 0);
+					
+					xs[nbP-1] = (inter.x+pts.elementAt(nbP-1).x)/2.;
+					ys[nbP-1] = (inter.y+pts.elementAt(nbP-1).y)/2.;		
+					
+					inter = l2.getIntersection(l0);
+		
+					xs[0] = (inter.x+pts.elementAt(0).x)/2.;
+					ys[0] = (inter.y+pts.elementAt(0).y)/2.;	
+				}
+				
+				path = new GeneralPath();
+				pt = pts.elementAt(0);
+				path.moveTo((float)xs[0], (float)ys[0]);
+				
+				for(i=1; i<nbP; i++)
+					path.lineTo((float)xs[i], (float)ys[i]);
+				
+				path.closePath();
+				
+			}catch(LaTeXDrawException e)
+			{
+				e.printStackTrace(); 
+				return path; 
+			}
+		
+		return path;
+	}
+
+	
+	
+	
+	@Override
+	public void updateShape()
+	{
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+
+	@Override
+	public boolean isTooSmallToBeRescaled()
+	{
+		return borders.isTooSmallToBeRescaled();
+	}
+	
+	
+	
+	
+	@Override
+	public Shape createShadowShape()
+	{
+		if(!canHaveShadow || !hasShadow) return shape;
+
+		Shape shadowS;
+		if(hasDoubleBoundary)
+			 shadowS = getBorders(thickness*3+doubleSep, false); 
+		else shadowS = getBorders(thickness, false); 
+		
+		double dx=0, dy=0;
+		LaTeXDrawPoint2D cg = getGravityCenter();
+		LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+		shadowCg.setLocation(cg.x+shadowSize, cg.y);
+		shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+		dx = shadowCg.x-cg.x;
+		dy = cg.y-shadowCg.y;
+
+		AffineTransform at = new AffineTransform();
+		at.translate(dx, dy);
+		return at.createTransformedShape(shadowS);
+	}
+
+
+
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		for(LaTeXDrawPoint2D pt : pts)
+			pt.setLocation(pt.horizontalSymmetry(origin));
+		
+		updateBorders();
+		updateShape();
+	}
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		for(LaTeXDrawPoint2D pt : pts)
+			pt.setLocation(pt.verticalSymmetry(origin));
+		
+		updateBorders();
+		updateShape();
+	}
+
+
+
+	@Override
+	public synchronized LaTeXDrawPoint2D getLastPoint()
+	{
+		return pts.lastElement();
+	}
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		for(LaTeXDrawPoint2D pt : pts)
+			pt.setLocation(grid.getTransformedPointToGrid(pt, false));
+		
+		updateBorders();
+		updateShape();
+	}
+
+
+
+	@Override
+	public int getSelectedDelimitorOrientation()
+	{
+		int del = super.getSelectedDelimitorOrientation();
+		
+		if(del!=DELIMITOR_ORIENTATION_NONE)
+			return del;
+		
+		if(borders!=null && borders.dSelected!=null)
+			return borders.getSelectedDelimitorOrientation();
+		
+		return DELIMITOR_ORIENTATION_NONE;
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()*2;
+	}
+	
+	
+	
+	/**
+	 * Set the coordinates of the point at id by the given coordinates.
+	 * @param x The X-coordinate
+	 * @param y The Y-coordinate
+	 * @param id The position of the point to replace
+	 * @since 1.9
+	 */
+	public void setPoint(double x, double y, int id)
+	{
+		if(id<0 || id>=pts.size())
+			throw new IllegalArgumentException();
+		
+		pts.elementAt(id).setLocation(x, y);
+
+		if(borders!=null)
+			updateBorders();
+		
+		updateShape();
+	}
+
+
+
+	/**
+	 * @return The points of the shape.
+	 * @since 2.0.0
+	 */
+	public Vector<LaTeXDrawPoint2D> getPoints()
+	{
+		return pts;
+	}
+}
diff --git a/current/latexDraw/figures/LaTeXDrawRectangle.java b/current/latexDraw/figures/LaTeXDrawRectangle.java
new file mode 100644
index 0000000..52cf42f
--- /dev/null
+++ b/current/latexDraw/figures/LaTeXDrawRectangle.java
@@ -0,0 +1,1770 @@
+
+package latexDraw.figures;
+
+
+import static java.lang.Math.*;
+
+import java.awt.*;
+import java.awt.geom.*;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import latexDraw.figures.properties.BordersMovable;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/**
+ * This class defines a Rectangle.<br>
+ * <br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ * LaTeXDraw is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or any later version.<br>
+ * <br>
+ * LaTeXDraw is distributed without any warranty; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.<br>
+ * <br>
+ * 
+ * 01/16/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class LaTeXDrawRectangle extends LaTeXDrawPolygon implements BordersMovable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The North-West delimiter (therefore it's possible that the delimiter not be a this position it's just a indication). */
+	protected Delimitor dNW;
+
+	/** The South-East delimiter (therefore it's possible that the delimiter not be a this position it's just a indication). */
+	protected Delimitor dSE;
+
+	/** The South-West delimiter (therefore it's possible that the delimiter not be a this position it's just a indication). */
+	protected Delimitor dSW;
+
+	/** The North East delimiter (therefore it's possible that the delimiter not be a this position it's just a indication). */
+	protected Delimitor dNE;
+
+	/** The West delimiter (therefore it's possible that the delimiter not be a this position it's just a indication) */
+	protected Delimitor dW;
+
+	/** The South delimiter (therefore it's possible that the delimiter not be a this position it's just a indication) */
+	protected Delimitor dS;
+
+	/** The East delimiter (therefore it's possible that the delimiter not be a this position it's just a indication) */
+	protected Delimitor dE;
+
+	/** The North delimiter (therefore it's possible that the delimiter not be a this position it's just a indication) */
+	protected Delimitor dN;
+
+	/** Allows to know if the rectangle has round corner or not */
+	protected boolean isRound;
+
+	/** The level of roundness of the rectangle */
+	protected double frameArc;
+
+	/** The value by default of the roundness of the rectangle */
+	public static final double DEFAULT_FRAME_ARC = 0.5;
+
+	/** The number of points which contains a rectangle */
+	public static final short NB_POINTS_FRAME = 4;
+
+	public static final boolean DEFAULT_ISROUND = false;
+
+
+
+
+	/**
+	 * The basic constructor.
+	 * @param increaseMeter True if the meter of figures must be increased.
+	 */
+	public LaTeXDrawRectangle(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(),
+				new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), increaseMeter);
+	}
+
+
+	
+	
+	/**
+	 * Creates a figure from one another.
+	 * @param f The figure to copy.
+	 * @param sameNumber True is the new figure must have the same number as the other.
+	 * @throws IllegalArgumentException If f is null or if f has no border.
+	 */
+	public LaTeXDrawRectangle(Figure f, boolean sameNumber)
+	{
+		super(f, sameNumber);
+		
+		borders = null;
+		isBordersMovable = true;
+		LaTeXDrawRectangle bord = f.getBorders();
+		
+		if(bord==null)
+			throw new IllegalArgumentException();
+		
+		pts = new Vector<LaTeXDrawPoint2D>();
+		
+		pts.add((LaTeXDrawPoint2D)bord.getPoint(0).clone());
+		pts.add((LaTeXDrawPoint2D)bord.getPoint(1).clone());
+		pts.add((LaTeXDrawPoint2D)bord.getPoint(2).clone());
+		pts.add((LaTeXDrawPoint2D)bord.getPoint(3).clone());
+		
+		initializeDelimitors();
+		updateShape();
+		setThickness(thickness);
+		
+		if(f instanceof LaTeXDrawRectangle)
+		{
+			frameArc = ((LaTeXDrawRectangle)f).frameArc;
+			isRound  = ((LaTeXDrawRectangle)f).isRound;
+		}
+	}
+	
+
+
+	/**
+	 * Allows to create a rectangle with the north-west point and the south-east point
+	 * @param NW The north-west point
+	 * @param SE The south-east point
+	 */
+	public LaTeXDrawRectangle(LaTeXDrawPoint2D NW, LaTeXDrawPoint2D SE, boolean increaseMeter)
+	{
+		this(NW, new LaTeXDrawPoint2D(SE.x, NW.y), new LaTeXDrawPoint2D(NW.x, SE.y), SE, increaseMeter);
+	}
+
+
+
+
+
+	/**
+	 * The constructor taking four points.
+	 * @param first The first point of the rectangle (the highest and the westiest point)
+	 * @param second The second point of the rectangle (the lowest and the eastiest point)
+	 * @param third The third point of the rectangle (the lowest and the eastiest point)
+	 * @param fourth The fourth point of the rectangle (the lowest and the eastiest point)
+	 */
+	public LaTeXDrawRectangle(LaTeXDrawPoint2D first, LaTeXDrawPoint2D second,
+			LaTeXDrawPoint2D third, LaTeXDrawPoint2D fourth , boolean increaseMeter)
+	{
+		super(increaseMeter);
+		isBordersMovable = true;
+		borders = null;
+		pts.add(first);
+		pts.add(second);
+		pts.add(third);
+		pts.add(fourth);
+
+		frameArc = DEFAULT_FRAME_ARC;
+		isRound = DEFAULT_ISROUND;
+
+		initializeDelimitors();
+		updateShape();
+	}
+
+	
+	
+	
+	/**
+	 * Initialises the delimiters of the rectangle.
+	 */
+	protected void initializeDelimitors()
+	{
+		if(getNbPoints()<4)
+			throw new IllegalArgumentException("Invalid number of points");//$NON-NLS-1$
+		
+		dNW = new Delimitor(getPoint(0));
+		dNE = new Delimitor(getPoint(1));
+		dSW = new Delimitor(getPoint(2));
+		dSE = new Delimitor(getPoint(3));
+
+		dN = new Delimitor(new LaTeXDrawPoint2D((dNW.getCenter().x + dNE.getCenter().x) / 2, dNW.getCenter().y));
+		dS = new Delimitor(new LaTeXDrawPoint2D((dSW.getCenter().x + dSE.getCenter().x) / 2, dSW.getCenter().y));
+		dE = new Delimitor(new LaTeXDrawPoint2D(dSE.getCenter().x, (dSE.getCenter().y + dNE.getCenter().y) / 2));
+		dW = new Delimitor(new LaTeXDrawPoint2D(dNW.getCenter().x, (dSW.getCenter().y + dNW.getCenter().y) / 2));
+
+		dN.setColorSet2();
+		dS.setColorSet2();
+		dE.setColorSet2();
+		dW.setColorSet2();
+	}
+
+
+
+
+	/**
+	 * Sets id the rectangle must be round or not.
+	 * @param round Its new value : if true, the rectangle will be round.
+	 */
+	public synchronized void setIsRound(boolean round)
+	{
+		if(round!=isRound)
+		{
+			isRound = round;
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+	}
+
+
+
+
+
+	@Override
+	public synchronized void setOnRotation(boolean on)
+	{
+		isOnRotation = on;
+		updateStyleOfDelimitors();
+	}
+
+
+
+
+	/**
+	 * @return True if the rectangle is round.
+	 */
+	public synchronized boolean isRound()
+	{
+		return isRound;
+	}
+
+
+
+
+	/**
+	 * @return The value of the attribute.
+	 */
+	public synchronized double getFrameArc()
+	{
+		return frameArc;
+	}
+
+
+
+
+	/**
+	 * @return The width of the non-rotated rectangle.
+	 */
+	public synchronized double getWidth()
+	{
+		return Math.abs(getTheNWPoint().x - getTheSEPoint().x);
+	}
+
+
+
+
+	/**
+	 * @return The height of the non-rotated rectangle.
+	 */
+	public synchronized double getHeight()
+	{
+		return Math.abs(getTheNWPoint().y - getTheSEPoint().y);
+	}
+
+
+
+
+	@Override
+	public synchronized LaTeXDrawRectangle getBorders()
+	{
+		return this;
+	}
+
+
+
+
+	@Override
+	public LaTeXDrawPoint2D getBordersPoint(int id)
+	{
+		if(id == -1)
+			return getPoint(getNbPoints()-1);
+		
+		if(id < 0 || id > LaTeXDrawRectangle.NB_POINTS_FRAME - 1)
+			throw new IllegalArgumentException();
+
+		return getPoint(id);
+	}
+
+
+
+
+
+	@Override
+	public void shift(double shiftX, double shiftY)
+	{
+		if(shiftX==0 && shiftY==0) return ;
+		
+		if(pts == null)
+			pts = new Vector<LaTeXDrawPoint2D>();
+
+		int i, size = pts.size();
+		for(i = 0; i < size; i++)
+		{
+			LaTeXDrawPoint2D p = pts.elementAt(i);
+			p.x += shiftX;
+			p.y += shiftY;
+		}
+
+		updateNSEWDelimitors();
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+
+
+	/**
+	 * Sets the attribute frameArc.
+	 * @param value Its new value.
+	 */
+	public synchronized void setFrameArc(double value)
+	{
+		if(value != frameArc && value>0)
+		{
+			frameArc = min(value,1); // The frame arc must at max at 1
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+	}
+
+
+
+
+
+	@Override
+	public void rescaleX(double formerX, double newX, double percent,
+			LaTeXDrawRectangle bound)
+	{
+		if(percent==1.) return ;
+		
+		int i, size = getNbPoints();
+
+		if(size > 0)
+		{
+			LaTeXDrawPoint2D NW = bound.getTheNWPoint(), SE = bound.getTheSEPoint(), farest, p;
+
+			if(formerX == SE.x)
+				farest = NW;
+			else
+				if(formerX == NW.x)
+					farest = SE;
+				else
+					throw new IllegalArgumentException();
+
+			for(i = 0; i < size; i++)
+			{// We rescale each point
+				p = getPoint(i);
+				p.x = farest.x + (p.x - farest.x) * percent;
+			}
+			updateNSEWDelimitors();
+		}
+		
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+
+
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound)
+	{
+		if(percent==1.) return ;
+		
+		int i, size = getNbPoints();
+
+		if(size > 0)
+		{
+			LaTeXDrawPoint2D NW = bound.getTheNWPoint(), SE = bound.getTheSEPoint(), farest, p;
+
+			if(formerY == SE.y)
+				farest = NW;
+			else
+				if(formerY == NW.y)
+					farest = SE;
+				else
+					throw new IllegalArgumentException();
+
+			for(i = 0; i < size; i++)
+			{// We rescale each point
+				p = getPoint(i);
+				p.y = farest.y + (p.y - farest.y) * percent;
+			}
+			updateNSEWDelimitors();
+		}
+
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+
+
+	
+	@Override
+	public synchronized void setFirstPoint(double x, double y)
+	{
+		LaTeXDrawPoint2D first = getPoint(0), second = getPoint(1);
+		LaTeXDrawPoint2D third = getPoint(2);
+
+		first.setLocation(x, y);
+		second.y = y;
+		third.x = x;
+
+		updateNSEWDelimitors();
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+	
+	
+	@Override
+	public synchronized void setBordersPosition(String doubleLinePosition)
+	{
+		super.setBordersPosition(doubleLinePosition);
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+	
+	
+
+
+	@Override
+	public synchronized void setThickness(float val)
+	{
+		if(!Double.isInfinite(val) && !Double.isNaN(val) && val>0)
+		{
+			thickness = val;
+			double dim = 1.33 * val + 3.33 + 1.;
+			
+			if(dim < 6.)
+				dim = 6;
+	
+			if(dNW!=null)
+			{
+				dNW.setDim(dim);
+				dSE.setDim(dim);
+				dSW.setDim(dim);
+				dNE.setDim(dim);
+				dN.setDim(dim);
+				dS.setDim(dim);
+				dE.setDim(dim);
+				dW.setDim(dim);
+			}
+			
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+	}
+
+
+
+
+
+	@Override
+	public synchronized void setRotationAngle(double theta)
+	{
+		theta%=(Math.PI*2);
+		rotationAngle = theta;
+	}
+
+
+
+
+
+	@Override
+	public synchronized void setSelected(boolean state)
+	{
+		isSelected = state;
+	}
+
+
+
+
+
+	/**
+	 * Updates the position of some delimiters.
+	 */
+	public synchronized void updateNSEWDelimitors()
+	{
+		dN.setCoordinates((dNW.getCenter().x + dNE.getCenter().x)/2, dNW.getCenter().y);
+		dS.setCoordinates((dSW.getCenter().x + dSE.getCenter().x)/2, dSW.getCenter().y);
+		dE.setCoordinates(dSE.getCenter().x, (dSE.getCenter().y + dNE.getCenter().y) / 2);
+		dW.setCoordinates(dNW.getCenter().x, (dSW.getCenter().y + dNW.getCenter().y) / 2);
+	}
+
+
+
+
+
+	@Override
+	public synchronized void updateGravityCenter()
+	{
+		if(pts.size() == NB_POINTS_FRAME)
+		{
+			LaTeXDrawPoint2D NW = getTheNWPoint();
+			LaTeXDrawPoint2D SE = getTheSEPoint();
+			
+			if(gravityCenter==null)
+				gravityCenter = new LaTeXDrawPoint2D((NW.x + SE.x) / 2., (NW.y + SE.y) / 2.);
+			else
+				gravityCenter.setLocation((NW.x + SE.x) / 2., (NW.y + SE.y) / 2.);
+		}
+	}
+
+
+
+
+
+	/**
+	 * Changes the last point of the rectangle.
+	 * @param pt The new last point (in fact the south-east point).
+	 */
+	@Override
+	public synchronized void setLastPoint(LaTeXDrawPoint2D pt)
+	{
+		if(!pt.equals(getPoint(-1)))
+		{
+			LaTeXDrawPoint2D third = getPoint(2), fourth = getPoint(3);
+			LaTeXDrawPoint2D second = getPoint(1);
+	
+			fourth.setLocation(pt.x, pt.y);
+			third.y = pt.y;
+			second.x = pt.x;
+	
+			updateNSEWDelimitors();
+			updateGravityCenter();
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+	}
+
+
+
+
+
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		draw(g, true, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+
+
+
+
+	/**
+	 * This method draws the rectangle.
+	 * @param drawRectangle  if true, the rectangle is drawn ; else, only the delimiters may be drawn (Useful for Rhombus, ...).
+	 */
+	public void draw(Graphics2D g, boolean drawRectangle, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		double cx = (NW.x + SE.x) / 2., cy = (NW.y + SE.y) / 2.;
+		double c2x = Math.cos(rotationAngle) * cx - Math.sin(rotationAngle)* cy;
+		double c2y = Math.sin(rotationAngle) * cx + Math.cos(rotationAngle)* cy;
+		double c3x = Math.cos(-rotationAngle) * (cx - c2x)- Math.sin(-rotationAngle) * (cy - c2y);
+		double c3y = Math.sin(-rotationAngle) * (cx - c2x)+ Math.cos(-rotationAngle) * (cy - c2y);
+		double dx=0, dy=0;
+		boolean changeFillStyle = false;
+		
+		if(rotationAngle % (Math.PI*2) != 0)
+		{
+			g.rotate(rotationAngle);
+			g.translate(c3x, c3y);
+		}
+
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		if(drawRectangle)
+		{
+			Color formerCol = g.getColor();
+
+			if(hasDoubleBoundary)
+			{
+				Shape s0 = shape;
+				Shape s[] = getDbleBoundariesOutInOrMiddle(s0);
+				Shape s1, s2, s3;
+
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				{
+					s1 = s0;
+					s2 = s[0];
+					s3 = s[1];
+				}
+				else
+					if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+					{
+						s1 = s[0];
+						s2 = s0;
+						s3 = s[1];
+					}
+					else
+					{
+						s1 = s[0];
+						s2 = s[1];
+						s3 = s0;
+					}
+
+				Shape sTooSmall = getTooSmallShape(s1);
+				
+				if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				{
+					Area area = new Area(s1);
+					area.subtract(new Area(s3));
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					
+					if(hasShadow)
+					{
+						g.translate(dx, dy);
+						g.setColor(shadowColor);
+						g.fill(s1);
+						
+						if(sTooSmall==null)
+							g.draw(s1);
+						else
+							g.draw(sTooSmall);
+					
+						g.translate(-dx, -dy);
+						
+						if(!isFilled)
+						{
+							changeFillStyle = true;
+							isFilled = true;
+						}
+					}
+					
+					g.setColor(doubleColor);
+					g.fill(area);
+					fillFigure(g,antiAlias,rendering,alphaInter,colorRendering,s3);
+					g.setColor(linesColor);
+					
+					if(sTooSmall==null)
+						g.draw(s1);
+					else
+						g.draw(sTooSmall);
+					g.draw(s3);
+				}
+				else
+				{
+					if(hasShadow)
+					{
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+						g.translate(dx, dy);
+						g.setColor(shadowColor);
+						g.fill(s1);
+						
+						if(sTooSmall==null)
+							g.draw(s1);
+						else
+							g.draw(sTooSmall);
+						
+						g.translate(-dx, -dy);
+						g.setColor(interiorColor);
+						g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+						g.draw(s2);
+						
+						if(!isFilled)
+						{
+							changeFillStyle = true;
+							isFilled = true;
+						}
+					}
+					
+					if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+						g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_ROUND,
+								BasicStroke.JOIN_MITER, 1.f, new float[]
+								{ 0, (float)(thickness*2+doubleSep + dotSep) }, 0));
+					else
+						g.setStroke(new BasicStroke((float)(thickness*2+doubleSep),
+								BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+								new float[] { blackDashLength, whiteDashLength }, 0));
+					
+					fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, s2);
+					g.setColor(linesColor);
+					
+					Shape sTooSmall2 = getTooSmallShape(s2);
+					if(sTooSmall2==null)
+						g.draw(s2);
+					else
+						g.draw(sTooSmall2);
+					
+					g.setStroke(new BasicStroke((float)doubleSep, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.setColor(doubleColor);
+					
+					if(sTooSmall2==null)
+						g.draw(s2);
+					else
+						g.draw(sTooSmall2);
+				}				
+			}
+			else
+			{
+				Shape sTooSmall = getTooSmallShape(shape);
+				
+				if(hasShadow)
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(shape);
+					
+					if(sTooSmall==null)
+						g.draw(shape);
+					else
+						g.draw(sTooSmall);
+					
+					g.translate(-dx, -dy);
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+					g.setColor(interiorColor);
+					g.draw(shape);
+				}
+				
+				if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				else
+					if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND,
+								BasicStroke.JOIN_MITER, 1.f, new float[] { 0, thickness + dotSep }, 0));
+					else
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+									new float[] { blackDashLength, whiteDashLength }, 0));
+
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, shape);
+				g.setColor(linesColor);
+				
+				if(sTooSmall==null)
+					g.draw(shape);
+				else
+					g.draw(sTooSmall);
+			}
+
+			if(changeFillStyle) isFilled = false;
+			g.setColor(formerCol);
+		}
+
+		if(isSelected())
+		{
+			dN.draw(g);
+			dE.draw(g);
+			dW.draw(g);
+			dS.draw(g);
+			dNW.draw(g);
+			dSE.draw(g);
+			dNE.draw(g);
+			dSW.draw(g);
+		}
+
+		if((rotationAngle%(Math.PI*2))!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+	}
+
+
+	
+
+	@Override
+	public LaTeXDrawPoint2D getTheNWPoint()
+	{
+		LaTeXDrawPoint2D first = getPoint(0), second = getPoint(1), third = getPoint(2);
+		LaTeXDrawPoint2D fourth = getPoint(3);
+
+		if (first.x < second.x)
+		{
+			if (first.y < third.y)
+				return first;
+			return third;
+		}
+		else
+			if (second.y < fourth.y)
+				return second;
+			else
+				return fourth;
+	}
+
+
+
+
+	@Override
+	public LaTeXDrawPoint2D getTheSERotatedPoint()
+	{
+		if (!pts.isEmpty())
+		{
+			LaTeXDrawPoint2D pt = rotatePoint(getPoint(0));
+			double SEx = pt.x, SEy = pt.y;
+			int i, size = pts.size();
+
+			for (i = 1; i < size; i++)
+			{
+				pt = rotatePoint(getPoint(i));
+				if (pt.x > SEx)
+					SEx = pt.x;
+				if (pt.y > SEy)
+					SEy = pt.y;
+			}
+
+			return new LaTeXDrawPoint2D(SEx, SEy);
+		}
+		return null;
+	}
+
+
+
+
+	@Override
+	public LaTeXDrawPoint2D getTheNWRotatedPoint()
+	{
+		if(!pts.isEmpty())
+		{
+			LaTeXDrawPoint2D pt = rotatePoint(getPoint(0));
+			double NWx = pt.x, NWy = pt.y;
+			int i, size = pts.size();
+
+			for(i=1; i<size; i++)
+			{
+				pt = rotatePoint(getPoint(i));
+				if(pt.x < NWx)
+					NWx = pt.x;
+				if(pt.y < NWy)
+					NWy = pt.y;
+			}
+
+			return new LaTeXDrawPoint2D(NWx, NWy);
+		}
+		return null;
+	}
+
+
+
+
+	@Override
+	public LaTeXDrawPoint2D getTheSEPoint()
+	{
+		LaTeXDrawPoint2D first = getPoint(0);
+		LaTeXDrawPoint2D second = getPoint(1);
+		LaTeXDrawPoint2D third = getPoint(2);
+		LaTeXDrawPoint2D fourth = getPoint(3);
+
+		if(first.x > second.x)
+		{
+			if (first.y > third.y)
+				return first;
+			return third;
+		}
+
+		if(second.y > fourth.y)
+			return second;
+		return fourth;
+	}
+
+
+
+
+	@Override
+	public boolean intersected(Rectangle2D.Double r)
+	{
+		if(r==null)
+			return false;
+		
+		Shape s 			= createShape2D();
+		Rectangle2D bounds 	= s.getBounds2D();
+
+		if(bounds.getHeight()<=0)////fix #1591312
+			s = new Line2D.Double(bounds.getMinX(), bounds.getMaxY(), bounds.getMaxX(), bounds.getMaxY());
+		else
+			if(bounds.getWidth()<=0)
+				s = new Line2D.Double(bounds.getMaxX(), bounds.getMinY(), bounds.getMaxX(), bounds.getMaxY());
+		
+		BasicStroke wideline = new BasicStroke(thickness);
+        Shape outline = wideline.createStrokedShape(s);		
+		
+		return outline.intersects(r) && !outline.contains(r);
+	}
+
+
+
+
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D p)
+	{
+		if(p == null)
+			throw new IllegalArgumentException();
+		
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);
+
+		if(isSelected() && (dNW.isIn(pt) || dSE.isIn(pt) || dSW.isIn(pt) || dNE.isIn(pt) || dS.isIn(pt) || 
+			dW.isIn(pt) || dN.isIn(pt) || dE.isIn(pt)))
+			return true;
+
+		LaTeXDrawPoint2D NW = getTheNWNonRotatedBoundPoint();
+		LaTeXDrawPoint2D SE = getTheSENonRotatedBoundPoint();
+		Rectangle2D.Double s = new Rectangle2D.Double(NW.x, NW.y, 
+						Math.abs(NW.x - SE.x), Math.abs(NW.y - SE.y));
+
+		if(!s.contains(pt))
+			return false;
+
+		if(isFilled || hasShadow || hasGradient())
+			return true;
+
+		Shape s2;
+
+		if(hasDoubleBoundary)
+			s2 = new Rectangle2D.Double(NW.x + thickness * 2 + doubleSep,
+						NW.y + thickness * 2 + doubleSep, 
+						Math.abs(NW.x - SE.x)- 4 * thickness - 2 * doubleSep, 
+						Math.abs(NW.y- SE.y) - 4 * thickness - 2 * doubleSep);
+		else
+			s2 = new Rectangle2D.Double(NW.x + thickness, NW.y + thickness,
+						Math.abs(NW.x - SE.x) - 2 * thickness, 
+						Math.abs(NW.y- SE.y)- 2 * thickness);
+
+		return !s2.contains(pt);
+	}
+
+
+
+
+
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		double x1 = NW.x - d.x, x2 = SE.x - d.x;
+		double y1 = d.y - NW.y, y2 = d.y - SE.y;
+		String add = "", addBegin = "", addEnd = "", fillType = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		boolean isFilledWasChanged = false;
+		double threshold = 0.001;
+		
+		if(hasShadow)
+		{
+			fillType+=",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				fillType+=",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+			
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				fillType+=",shadowsize="+(float)(shadowSize/PPC);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				fillType += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+			if(!isFilled)
+			{
+				isFilled = true;
+				isFilledWasChanged = true;
+			}
+		}
+		
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) fillType=fillType+','+str;
+		
+		str = getPSTricksCodeLine(ppc);
+		if(str.length()>0) add=add+','+str;
+		
+		if(isRound)
+			add += ",framearc=" + (float)frameArc; //$NON-NLS-1$
+
+		if(rotationAngle%(Math.PI*2)!=0.)
+		{
+			double angle = -Math.toDegrees(rotationAngle);
+			double cx = (gravityCenter.x - d.x) / ppc;
+			double cy = (d.y - gravityCenter.y) / ppc;
+			double x = -Math.cos(-rotationAngle) * cx + Math.sin(-rotationAngle) * cy + cx;
+			double y = -Math.sin(-rotationAngle) * cx - Math.cos(-rotationAngle) * cy + cy;
+
+			x = LaTeXDrawNumber.getCutNumber(x, threshold);
+			y = LaTeXDrawNumber.getCutNumber(y, threshold);
+			
+			addBegin += "\\rput{" + (float)angle + "}(" + (float)x + ',' + (float)y + "){"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			addEnd = "}"; //$NON-NLS-1$
+		}
+
+		add += ",dimen=" + bordersPosition; //$NON-NLS-1$
+		
+		if(hasDoubleBoundary)
+		{
+			add += ",doubleline=true,doublesep=" + (float)(doubleSep / ppc); //$NON-NLS-1$
+
+			if(doubleColor != PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name); 
+				}
+				add += ",doublecolor=" + name; //$NON-NLS-1$
+			}
+		}
+
+		x2 = LaTeXDrawNumber.getCutNumber(x2/ppc, threshold);
+		y2 = LaTeXDrawNumber.getCutNumber(y2/ppc, threshold);
+		x1 = LaTeXDrawNumber.getCutNumber(x1/ppc, threshold);
+		y1 = LaTeXDrawNumber.getCutNumber(y1/ppc, threshold);
+		float th = LaTeXDrawNumber.getCutNumber(thickness/ppc, threshold); 
+		
+		if(isFilledWasChanged) isFilled = false;
+		
+		return addBegin
+				+ "\\psframe[linewidth=" + th + //$NON-NLS-1$
+				add + fillType+"](" + (float)x2 + ',' + //$NON-NLS-1$
+				(float)y1 + ")(" //$NON-NLS-1$
+				+ (float)x1 + ',' + (float)y2 + ')' + addEnd;
+	}
+
+
+
+
+
+	
+	/**
+	 * Recentres the figure after a drag with a rotated figure.
+	 * @param oldGravityCenter The former gravity centre
+	 */
+	protected void recenterDraggedOnRotation(LaTeXDrawPoint2D oldGravityCenter)
+	{
+		if(oldGravityCenter==null)
+			throw new IllegalArgumentException();
+		
+		updateGravityCenter();
+		LaTeXDrawPoint2D rotGc = rotatePoint(getGravityCenter(), oldGravityCenter, rotationAngle);
+		shift(getGravityCenter(), rotGc);
+	}
+	
+	
+	
+	
+	@Override
+	public void onDragged(Point formerPt, Point newPt)
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		if(dSelected != null)
+		{
+			if(isOnRotation())
+				rotate(formerPt, newPt);
+			else
+			{
+				LaTeXDrawPoint2D newPt2 = rotateInvertPoint(newPt);
+				LaTeXDrawPoint2D oldGc = (LaTeXDrawPoint2D)getGravityCenter().clone();
+			
+				if(dSelected == dE)
+					dNE.getCenter().x = dSE.getCenter().x = newPt2.x;
+				else
+				if(dSelected == dW)
+					dNW.getCenter().x = dSW.getCenter().x = newPt2.x;
+				else
+				if(dSelected == dN)
+					dNE.getCenter().y = dNW.getCenter().y = newPt2.y;
+				else
+				if(dSelected == dS)
+					dSE.getCenter().y = dSW.getCenter().y = newPt2.y;
+				else
+				if(dSelected == dNE)
+				{
+					dNW.getCenter().y = newPt2.y;
+					dSE.getCenter().x = newPt2.x;
+				}else
+				if(dSelected == dNW)
+				{
+					dNE.getCenter().y = newPt2.y;
+					dSW.getCenter().x = newPt2.x;
+				}else
+				if(dSelected == dSW)
+				{
+					dSE.getCenter().y = newPt2.y;
+					dNW.getCenter().x = newPt2.x;
+				}else
+				if(dSelected == dSE)
+				{
+					dSW.getCenter().y = newPt2.y;
+					dNE.getCenter().x = newPt2.x;
+				}
+				
+				dSelected.setCoordinates(newPt2);
+				
+				if(rotationAngle!=0)
+					recenterDraggedOnRotation(oldGc);
+			}
+			updateGravityCenter();
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+		else
+			// If the user has clicked on the line
+			shift(formerPt, newPt);
+
+		updateNSEWDelimitors();
+	}
+
+
+
+
+
+	@Override
+	public synchronized void onClick(Point p)
+	{
+		updateNSEWDelimitors();
+
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);
+
+		if(dSE.isIn(pt))
+			dSelected = dSE;
+		else
+			if(dNW.isIn(pt))
+				dSelected = dNW;
+			else
+				if(dNE.isIn(pt))
+					dSelected = dNE;
+				else
+					if(dSW.isIn(pt))
+						dSelected = dSW;
+					else
+						if(dN.isIn(pt))
+							dSelected = dN;
+						else
+							if(dS.isIn(pt))
+								dSelected = dS;
+							else
+								if(dE.isIn(pt))
+									dSelected = dE;
+								else
+									if(dW.isIn(pt))
+										dSelected = dW;
+		isSelected = true;
+	}
+
+
+
+
+	@Override
+	public synchronized void onDelimitorRelease()
+	{
+		updateStyleOfDelimitors();
+		dSelected = null;
+	}
+
+
+
+
+	@Override
+	public synchronized void onRelease()
+	{
+		setOnRotation(false);
+		isSelected = false;
+		dSelected = null;
+	}
+
+
+
+
+
+	@Override
+	public synchronized Shape createShape2D()
+	{
+		Shape area = createNonRotatedShape2D();
+
+		if((rotationAngle % (2*PI)) != 0)
+		{
+			LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+			double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+			double c2x = cos(rotationAngle)*cx - sin(rotationAngle)*cy;
+			double c2y = sin(rotationAngle)*cx + cos(rotationAngle)*cy;
+			Rectangle2D bounds = area.getBounds2D();
+			
+			if(bounds.getHeight()<=0)//AffineTransform has problem when the shape is very small.
+				if(bounds.getWidth()<=0)
+					area = new Rectangle2D.Double(bounds.getMinX(), bounds.getMinY(), 1, 1);
+				else
+					area = new Rectangle2D.Double(bounds.getMinX(), bounds.getMinY(), bounds.getWidth(), 1);
+			else
+				if(bounds.getWidth()<=0)
+					area = new Rectangle2D.Double(bounds.getMinX(), bounds.getMinY(), 1, bounds.getHeight());
+			
+			AffineTransform at = AffineTransform.getTranslateInstance(cx - c2x, cy - c2y);
+			at.rotate(rotationAngle);
+			area = at.createTransformedShape(area);
+		}
+
+		return area;
+	}
+
+
+	
+	
+	
+	@Override
+	public synchronized Shape createNonRotatedShape2D()
+	{
+		Shape area;
+		Shape s = getInsideOutsideOrMiddleBorders();
+
+		if(hasDoubleBoundary)
+		{
+			Shape[] s2 = getDbleBoundariesOutInOrMiddle(s);
+			Shape min;
+			Shape max;
+
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			{
+				max = s;
+				min = s2[1];
+			}
+			else
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				{
+					max = s2[0];
+					min = s2[1];
+				}
+				else
+				{
+					max = s2[0];
+					min = s;
+				}
+		
+			area = new Area(max);
+			((Area)area).exclusiveOr(new Area(min));
+			
+			Shape tooSmallShape = getTooSmallShape(area);
+		
+			if(tooSmallShape!=null)
+			{
+				Rectangle2D bounds = max.getBounds2D();
+				area = new Line2D.Double(Math.max(1, bounds.getMinX()), Math.max(1, bounds.getMinY()),
+						Math.max(1, bounds.getMaxX()), Math.max(1, bounds.getMaxY()));
+			}
+		}
+		else
+			area = s;
+
+		return area;
+	}
+	
+
+
+
+	
+	
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		LaTeXDrawRectangle r = (LaTeXDrawRectangle)super.clone();
+
+		r.dNW = new Delimitor(r.getPoint(0));
+		r.dNE = new Delimitor(r.getPoint(1));
+		r.dSW = new Delimitor(r.getPoint(2));
+		r.dSE = new Delimitor(r.getPoint(3));
+
+		r.dE = (Delimitor)dE.clone();
+		r.dS = (Delimitor)dS.clone();
+		r.dW = (Delimitor)dW.clone();
+		r.dN = (Delimitor)dN.clone();
+
+		r.setThickness(thickness);
+		r.updateNSEWDelimitors();
+		r.updateStyleOfDelimitors();
+		r.isRound 	= isRound;
+		r.frameArc 	= frameArc;
+		r.shape 	= getInsideOutsideOrMiddleBorders();
+		
+		return r;
+	}
+
+
+
+
+
+	@Override
+	public synchronized void updateStyleOfDelimitors()
+	{
+		if(isOnRotation)
+		{
+			dN.setColorSet4();
+			dS.setColorSet4();
+			dE.setColorSet4();
+			dW.setColorSet4();
+			dSW.setColorSet4();
+			dSE.setColorSet4();
+			dNW.setColorSet4();
+			dNE.setColorSet4();
+		}
+		else
+		{
+			dN.setColorSet2();
+			dS.setColorSet2();
+			dE.setColorSet2();
+			dW.setColorSet2();
+			dSW.setColorSet1();
+			dSE.setColorSet1();
+			dNW.setColorSet1();
+			dNE.setColorSet1();
+		}
+	}
+
+
+
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow = true;
+		interiorColor = (Color)ois.readObject();
+		lineStyle = (String)ois.readObject();
+		rotationAngle = ois.readDouble();
+		float thick = ois.readFloat();
+		thickness = DEFAULT_THICKNESS;
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color)ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		pts = (Vector)ois.readObject();
+		isRound = ois.readBoolean();
+		frameArc = ois.readDouble();
+
+		if(pts.size() != NB_POINTS_FRAME)
+			throw new ArrayIndexOutOfBoundsException();
+
+		dNW = new Delimitor(pts.firstElement());
+		dNE = new Delimitor(pts.elementAt(1));
+		dSW = new Delimitor(pts.elementAt(2));
+		dSE = new Delimitor(pts.elementAt(3));
+	
+		dN = new Delimitor(new LaTeXDrawPoint2D((dNW.getCenter().x+dNE.getCenter().x)/2, dNW.getCenter().y));
+		dS = new Delimitor(new LaTeXDrawPoint2D((dSW.getCenter().x+dSE.getCenter().x)/2, dSW.getCenter().y));
+		dE = new Delimitor(new LaTeXDrawPoint2D(dSE.getCenter().x,(dSE.getCenter().y+dNE.getCenter().y)/2));
+		dW = new Delimitor(new LaTeXDrawPoint2D(dNW.getCenter().x,(dSW.getCenter().y+dNW.getCenter().y)/2));
+
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5") >= 0)//$NON-NLS-1$
+		{
+			hasDoubleBoundary = ois.readBoolean();
+			doubleColor = (Color)ois.readObject();
+			doubleSep = ois.readDouble();
+			bordersPosition = (String)ois.readObject();
+			if(!(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0)) //$NON-NLS-1$
+				ois.readBoolean();
+			hatchingAngle = ois.readDouble();
+			hatchingColor = (Color)ois.readObject();
+			hatchingStyle = (String)ois.readObject();
+			hatchingWidth = ois.readFloat();
+			
+			if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6") < 0)//$NON-NLS-1$
+			{
+				if(hatchingStyle.equals(DECREPETED_FILL_CROSS))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_CROSSHATCH;
+				else if(hatchingStyle.equals(DECREPETED_FILL_HORIZ))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_HLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_VERT))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_VLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_NO))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_NONE;
+			}
+		}
+		else
+		{
+			hasDoubleBoundary = DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor = DEFAULT_DOUBLE_COLOR;
+			doubleSep = DEFAULT_DOUBLESEP;
+			bordersPosition = DEFAULT_BORDERS_POSITION;
+			hatchingAngle = DEFAULT_HATCH_ANGLE;
+			hatchingColor = DEFAULT_HATCH_COL;
+			hatchingStyle = DEFAULT_HATCH_STYLE;
+			hatchingWidth = DEFAULT_HATCH_WIDTH;
+		}
+	
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+			hatchingSep = ois.readDouble();
+		else
+			hatchingSep = DEFAULT_HATCH_SEP;
+		
+		setThickness(thick);
+		updateStyleOfDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+
+
+	/**
+	 * Creates the borders of the rectangle in the position "inside".
+	 * @return The borders.
+	 */
+	public Shape getInsideBorders()
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		double width = abs(NW.x - SE.x), height = abs(NW.y - SE.y);
+		double min = min(width, height);
+		Shape s;
+		
+		if(isRound)//Fixes #1554750
+			s = new RoundRectangle2D.Double(NW.x+thickness/2., NW.y+thickness/2., 
+					max(width-thickness,1), max(height-thickness,1), 
+					(min-thickness)*frameArc, (min-thickness)*frameArc);
+		else
+			s = new Rectangle2D.Double(NW.x+thickness/2., NW.y+thickness/2., 
+					max(width-thickness,1), max(height-thickness,1));
+
+		return s;
+	}
+
+
+
+
+
+	/**
+	 * Creates the borders of the rectangle in the position "outside".
+	 * @return The borders.
+	 */
+	public Shape getOutsideBorders()
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		double width = abs(NW.x - SE.x), height = abs(NW.y - SE.y);
+		double min = min(width, height);
+		Shape s;
+
+		if(isRound)//Fixes #1554750
+			s = new RoundRectangle2D.Double(NW.x-thickness/2., NW.y-thickness/2., 
+					max(width+thickness, 1), max(height+thickness, 1), 
+					(min+thickness)*frameArc, (min+thickness)*frameArc);
+		else
+			s = new Rectangle2D.Double(NW.x-thickness/2., NW.y-thickness/2., 
+					max(width+thickness, 1), max(height+thickness, 1));
+
+		return s;
+	}
+
+
+
+
+
+	/**
+	 * Creates the borders of the rectangle in the position "middle".
+	 * @return The borders.
+	 */
+	public Shape getMiddleBorders()
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		double width = abs(NW.x - SE.x), height = abs(NW.y - SE.y);
+		double min = min(width, height);
+		Shape s;
+
+		if(isRound)
+			s = new RoundRectangle2D.Double(NW.x, NW.y, max(width,1), max(height,1), min*frameArc, min*frameArc);
+		else
+			s = new Rectangle2D.Double(NW.x, NW.y, max(width, 1), max(height, 1));
+		
+		return s;
+	}
+
+
+
+
+
+	@Override
+	public Shape getInsideOutsideOrMiddleBorders()
+	{
+		Shape s;
+
+		if (bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			s = getInsideBorders();
+		else
+			if (bordersPosition.equals(PSTricksConstants.BORDERS_OUTSIDE))
+				s = getOutsideBorders();
+			else
+				s = getMiddleBorders();
+
+		return s;
+	}
+
+
+
+
+
+	@Override
+	public Shape[] getDbleBoundariesOutside(Shape classicBord)
+	{
+		if(classicBord == null)
+			return null;
+
+		RectangularShape r = (RectangularShape)classicBord;
+		Shape[] s = new Shape[2];
+		double min = min(r.getWidth(), r.getHeight());
+		double add = doubleSep+thickness;
+		
+		if(isRound)
+		{//Fixes #1554750
+			s[0] = new RoundRectangle2D.Double(r.getX()-add, r.getY()-add, r.getWidth()+2*add, 
+											r.getHeight()+2*add, (min+2*add)*frameArc, (min+2*add)*frameArc);
+			s[1] = new RoundRectangle2D.Double(r.getX()-add/2., 
+								r.getY()-add/2., r.getWidth()+add, r.getHeight()+add, (min+add)*frameArc, (min+add)*frameArc);
+		}
+		else
+		{
+			s[0] = new Rectangle2D.Double(r.getX()-add, r.getY()-add, r.getWidth()+2*add, r.getHeight()+2*add);
+			s[1] = new Rectangle2D.Double(r.getX()-add/2., r.getY()-add/2., r.getWidth()+add, r.getHeight()+add);
+		}
+
+		return s;
+	}
+
+
+
+
+
+	@Override
+	public Shape[] getDbleBoundariesMiddle(Shape classicBord)
+	{
+		if(classicBord == null)
+			return null;
+
+		RectangularShape r = (RectangularShape)classicBord;
+		Shape[] s = new Shape[2];
+		double min = min(r.getWidth(), r.getHeight());
+		double add = doubleSep+thickness;
+
+		if(isRound)
+		{//Fixes #1554750
+			s[0] = new RoundRectangle2D.Double(r.getX()-add/2., r.getY()-add/2., 
+					r.getWidth()+add, r.getHeight()+add,
+					(min+add)*frameArc, (min+add)*frameArc);
+			s[1] = new RoundRectangle2D.Double(r.getX()+add/2., r.getY()+add/2., 
+					r.getWidth()-add, r.getHeight()-add,
+					(min-add)*frameArc, (min-add)*frameArc);
+		}
+		else
+		{
+			s[0] = new Rectangle2D.Double(r.getX()-add/2., r.getY()-add/2., 
+					r.getWidth()+add, r.getHeight()+add);
+			s[1] = new Rectangle2D.Double(r.getX()+add/2., r.getY()+add/2., 
+					r.getWidth()-add, r.getHeight()-add);
+		}
+		
+		return s;
+	}
+
+
+
+
+
+	@Override
+	public Shape[] getDbleBoundariesInside(Shape classicBord)
+	{
+		if(classicBord == null)
+			return null;
+
+		RectangularShape r = (RectangularShape)classicBord;
+		Shape[] s = new Shape[2];
+		double min = min(r.getWidth(), r.getHeight());
+		double add = doubleSep+thickness;
+
+		if(isRound)
+		{//Fixes #1554750
+			s[0] = new RoundRectangle2D.Double( r.getX()+add/2., r.getY() + add/2., 
+								r.getWidth()-add, r.getHeight()-add, (min-add)*frameArc, (min-add)*frameArc);
+			s[1] = new RoundRectangle2D.Double(r.getX()+add, 
+							r.getY()+add, r.getWidth()-2*add, r.getHeight()-2*add, (min-add*2)*frameArc, (min-add*2)*frameArc);
+		}
+		else
+		{
+			s[0] = new Rectangle2D.Double(r.getX() + add/2., r.getY()+add/2., r.getWidth()-add, r.getHeight()-add);
+			s[1] = new Rectangle2D.Double(r.getX()+add, r.getY()+add, r.getWidth()-2*add, r.getHeight()-2*add);
+		}
+
+		return s;
+	}
+	
+	
+	
+	
+	@Override
+	public Shape[] getDbleBoundariesOutInOrMiddle(Shape classicBord)
+	{
+		Shape[] s;
+
+		if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			s = getDbleBoundariesInside(classicBord);
+		else
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_OUTSIDE))
+				s = getDbleBoundariesOutside(classicBord);
+			else
+				s = getDbleBoundariesMiddle(classicBord);
+
+		return s;
+	}
+
+	
+	
+	
+	@Override
+	public boolean isTooSmallToBeRescaled()
+	{
+		if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			return (getTheSEPoint().x-getTheNWPoint().x-2*thickness)<1 ||
+					(getTheSEPoint().y-getTheNWPoint().y-2*thickness)<1;
+		else if(bordersPosition.equals(PSTricksConstants.BORDERS_OUTSIDE))
+			 return (getTheSEPoint().x-getTheNWPoint().x)<1 ||
+					(getTheSEPoint().y-getTheNWPoint().y)<1;
+		else return (getTheSEPoint().x-getTheNWPoint().x-thickness)<1 ||
+					(getTheSEPoint().y-getTheNWPoint().y-thickness)<1;
+	}
+
+
+
+	@Override
+	public Shape createShadowShape()
+	{
+		if(!canHaveShadow || !hasShadow) return shape;
+		
+		Rectangle2D b = createShape2D().getBounds2D();
+		double dx=0, dy=0;
+		LaTeXDrawPoint2D cg = getGravityCenter();
+		LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+		shadowCg.setLocation(cg.x+shadowSize, cg.y);
+		shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+		dx = shadowCg.x-cg.x;
+		dy = cg.y-shadowCg.y;
+		Rectangle2D.Double shadowS = new Rectangle2D.Double(b.getX()+dx-thickness/2.,b.getY()+dy-thickness/2.,
+													b.getWidth()+thickness, b.getHeight()+thickness);
+		return shadowS;
+	}
+	
+	
+	
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		super.mirrorHorizontal(origin);
+		updateNSEWDelimitors();
+	}
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		super.mirrorVertical(origin);
+		updateNSEWDelimitors();
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		super.updateToGrid(grid);
+		updateNSEWDelimitors();
+	}
+
+
+
+
+	@Override
+	public int getSelectedDelimitorOrientation()
+	{
+		int del = super.getSelectedDelimitorOrientation();
+		
+		if(del!=DELIMITOR_ORIENTATION_NONE)
+			return del;
+		
+		if(dSelected==dN) return DELIMITOR_ORIENTATION_NORTH;
+		if(dSelected==dS) return DELIMITOR_ORIENTATION_SOUTH;
+		if(dSelected==dE) return DELIMITOR_ORIENTATION_EAST;
+		if(dSelected==dW) return DELIMITOR_ORIENTATION_WEST;
+		if(dSelected==dNE) return DELIMITOR_ORIENTATION_NE;
+		if(dSelected==dNW) return DELIMITOR_ORIENTATION_NW;
+		if(dSelected==dSE) return DELIMITOR_ORIENTATION_SE;
+		if(dSelected==dSW) return DELIMITOR_ORIENTATION_SW;
+		return DELIMITOR_ORIENTATION_NONE;
+	}
+
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()*8;
+	}
+	
+	
+	
+	/**
+	 * Creates a Rectangle2D from the LaTeXDrawRectangle.
+	 * @return A Rectangle2D
+	 * @since 1.9.2
+	 */
+	public Rectangle2D toRectangle2D() 
+	{
+		LaTeXDrawPoint2D nw = getTheNWPoint(), se = getTheSEPoint();
+		
+		return  new Rectangle2D.Double(nw.x, nw.y, se.x-nw.x, se.y-nw.y);
+	}
+	
+	
+	/**
+	 * Creates a Rectangle from the LaTeXDrawRectangle.
+	 * @return A Rectangle
+	 * @since 1.9.2
+	 */
+	public Rectangle toRectangle() 
+	{
+		LaTeXDrawPoint2D nw = getTheNWPoint(), se = getTheSEPoint();
+		
+		return  new Rectangle((int)nw.x, (int)nw.y, (int)(se.x-nw.x), (int)(se.y-nw.y));
+	}
+}
diff --git a/current/latexDraw/figures/Line.java b/current/latexDraw/figures/Line.java
new file mode 100644
index 0000000..fbeff23
--- /dev/null
+++ b/current/latexDraw/figures/Line.java
@@ -0,0 +1,1499 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.Line2D;
+import java.awt.geom.Point2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.util.LaTeXDrawException;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines a line.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Line extends LaTeXDrawPolygon implements Arrowable
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** the arrowhead of the first point */
+	private ArrowHead arrowHeadL;
+	
+	/** The arrow head of the second point */
+	private ArrowHead arrowHeadR;
+	
+	/** The director coefficient" of the line (y=ax+b) */
+	private double a;
+	
+	/** y=ax+b */
+	private double b;
+
+	/** The number of points in a line */
+	public static final short LINE_NB_POINTS = 2;
+
+
+	
+	
+	/** The constructor by default */
+	public Line(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), increaseMeter);
+	}
+
+	
+	
+	public Line(double a, double b, boolean increaseMeter)
+	{
+		super(increaseMeter);
+		
+		canHaveArrow = true;
+		borders=null;
+		this.a = a;
+		this.b = b;
+		bordersPosition = PSTricksConstants.BORDERS_MIDDLE;
+		isBordersMovable = false;
+		LaTeXDrawPoint2D pt1 = new LaTeXDrawPoint2D(0,(int) b);
+		addPoint(pt1);
+		LaTeXDrawPoint2D pt2s[];
+		
+		try
+		{
+			pt2s = findPoints(pt1, 10.);
+			
+			if(pt2s==null)
+				throw new IllegalArgumentException();
+			if(pt2s.length==0)
+				throw new IllegalArgumentException();
+			
+			addPoint(pt2s[0]);		
+			arrowHeadL = new ArrowHead(pt1, this, this);
+			arrowHeadR = new ArrowHead(pt2s[0], this, this);
+			
+		}
+		catch(LaTeXDrawException e) { throw new IllegalArgumentException(); } 
+
+		updateGravityCenter();
+		shape = createShape2D();
+	}
+	
+
+	
+	/**
+	 * Create a line by creating a second point with :
+	 * @param b y = ax+ b
+	 * @param p1 The first point
+	 */
+	public Line(double b, LaTeXDrawPoint2D p1, boolean increaseMeter)
+	{
+		this(p1,Double.isInfinite(b) || Double.isNaN(b) ? new LaTeXDrawPoint2D(p1.x,p1.y-10) : 
+			new LaTeXDrawPoint2D(0,b),increaseMeter);
+	}
+	
+	
+	
+	
+	/**
+	 * Constructs a line with a line2D
+	 */
+	public Line(Line2D.Double l, boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(l.x1, l.y1), new LaTeXDrawPoint2D(l.x2, l.y2), increaseMeter);
+	}
+	
+	
+	
+	
+	/** 
+	 * The constructor using two points to create the line.
+	 * 
+	 */
+	public Line(double x1, double y1, double x2, double y2, boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(x1, y1), new LaTeXDrawPoint2D(x2, y2), increaseMeter);
+	}
+	
+	
+	
+	
+	/** 
+	 * The constructor using two points in order to create the line 
+	 * @param p1 The first point of the line
+	 * @param p2 The second point of the line
+	 */
+	public Line(LaTeXDrawPoint2D p1, LaTeXDrawPoint2D p2, boolean increaseMeter)
+	{
+		super(increaseMeter);
+
+		canHaveArrow = true;
+		isBordersMovable = false;
+		bordersPosition = PSTricksConstants.BORDERS_MIDDLE;
+		borders=null;
+		addPoint(p1);
+		addPoint(p2);
+
+		updateGravityCenter();
+	
+		updateAandB();
+		
+		arrowHeadL = new ArrowHead(p1, this, this);
+		arrowHeadR = new ArrowHead(p2, this, this);
+
+		canBeFilled = false;
+		shape = createShape2D();
+	}
+	
+	
+	
+	/**
+	 * @return Creates a Line2D.Double shape from the Line.
+	 * @since 2.0.0
+	 */
+	public Line2D toLine2D()
+	{
+		return new Line2D.Double(getPt1().x, getPt1().y, getPt2().x, getPt2().y);
+	}
+
+
+
+	/**
+	 * Allows to update the y-intercept b and slope a
+	 */
+	public void updateAandB()
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0);
+		LaTeXDrawPoint2D pt2 = getPoint(1);
+		
+		a = (pt1.y - pt2.y)/(pt1.x - pt2.x);
+		b = (pt1.y - a * pt1.x);
+		updateGravityCenter();
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void shift(double shiftX, double shiftY)
+	{
+		if(shiftX==0 && shiftY==0) return ;
+		
+		super.shift(shiftX, shiftY);
+
+		updateAandB();
+		shape = createShape2D();
+	}
+	
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0);
+		LaTeXDrawPoint2D pt2 = getPoint(1);
+		Color formerCol = g.getColor();
+		g.setColor(linesColor);
+		double x1, y1, x2, y2;
+		double dx=0, dy=0;
+		boolean arrow1Drawable = arrowHeadL.isDrawable() && arrowHeadL.getArrowStyle().compareTo(PSTricksConstants.NONEARROW_STYLE)!=0;
+		boolean arrow2Drawable = arrowHeadR.isDrawable() && arrowHeadR.getArrowStyle().compareTo(PSTricksConstants.NONEARROW_STYLE)!=0;
+		updateAandB();
+		
+		if(arrow1Drawable)
+		{
+			double lineAngle = Math.atan(getA());
+			double xRot,yRot;
+			Point2D.Double pos = arrowHeadL.getPosition()==pt1 ? pt1 : pt2;
+			double lgth = arrowHeadL.getArrowHeadLength();
+	
+			if(Math.abs(lineAngle)==(Math.PI/2.))
+			{
+				y1 = pt1.y<pt2.y ? pos.y+lgth : pos.y-lgth;
+				x1 = pos.x;
+			}
+			else
+			{
+				xRot = Math.cos(-lineAngle)*pos.x-Math.sin(-lineAngle)*(pos.y-b); 
+				yRot = Math.sin(-lineAngle)*pos.x+Math.cos(-lineAngle)*(pos.y-b)+b;
+				if(pt1.x<pt2.x) xRot+=lgth;
+				else xRot-=lgth;
+				x1 = Math.cos(lineAngle)*xRot-Math.sin(lineAngle)*(yRot-b);
+				y1 = Math.sin(lineAngle)*xRot+Math.cos(lineAngle)*(yRot-b)+b;	
+			}	
+		}
+		else
+		{
+			x1 = pt1.x;
+			y1 = pt1.y;
+		}
+		
+		
+		if(arrow2Drawable)
+		{
+			double lineAngle = Math.atan(getA());
+			double xRot,yRot;
+			Point2D.Double pos = arrowHeadR.getPosition()==pt1 ? pt1 : pt2;
+			double lgth = arrowHeadR.getArrowHeadLength();
+			
+			if(Math.abs(lineAngle)==(Math.PI/2.))
+			{
+				y2 = pt2.y<pt1.y ? pos.y+lgth : pos.y-lgth;				
+				x2 = pos.x;
+			}
+			else
+			{
+				xRot = Math.cos(-lineAngle)*pos.x-Math.sin(-lineAngle)*(pos.y-b); 
+				yRot = Math.sin(-lineAngle)*pos.x+Math.cos(-lineAngle)*(pos.y-b)+b;
+				if(pt2.x<=pt1.x) xRot+=lgth;
+				else xRot-=lgth;
+				x2 = Math.cos(lineAngle)*xRot-Math.sin(lineAngle)*(yRot-b);
+				y2 = Math.sin(lineAngle)*xRot+Math.cos(lineAngle)*(yRot-b)+b;	
+			}	
+		}
+		else
+		{
+			x2 = pt2.x;
+			y2 = pt2.y;
+		}
+		
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+		{
+			double lineAngle = Math.atan(getA());
+			double xRot,yRot;
+			
+			if(Math.abs(lineAngle)==(Math.PI/2.))
+				y1 = pt2.y>pt1.y ? y1+thickness/2. : y1-thickness/2.;				
+			else
+			{
+				xRot = Math.cos(-lineAngle)*x1-Math.sin(-lineAngle)*(y1-b); 
+				yRot = Math.sin(-lineAngle)*x1+Math.cos(-lineAngle)*(y1-b)+b;
+				if(pt2.x>pt1.x) xRot+=thickness/2.;
+				else xRot-=thickness/2.;
+				x1 = Math.cos(lineAngle)*xRot-Math.sin(lineAngle)*(yRot-b);
+				y1 = Math.sin(lineAngle)*xRot+Math.cos(lineAngle)*(yRot-b)+b;	
+			}	
+		}
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		if(((float)x1)==((float)x2) && ((float)y1)==((float)y2))
+			x2--;
+		
+		Line2D.Double l = new Line2D.Double(x1, y1, x2, y2);
+		
+		if(hasDoubleBoundary)
+		{
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			{
+				Shape s[] = getDbleBoundariesOutInOrMiddle(l);
+				
+				if(hasShadow)
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.draw(s[0]);
+					g.draw(s[1]);
+					Line2D l1 = (Line2D)s[0], l2 = (Line2D)s[1];
+					int[] xs = {(int)l1.getX1(), (int)l1.getX2(), (int)l2.getX2(), (int)l2.getX1()};
+					int[] ys = {(int)l1.getY1(), (int)l1.getY2(), (int)l2.getY2(), (int)l2.getY1()};
+					Polygon p = new Polygon(xs, ys, 4);
+					g.fill(p);
+					g.draw(p);
+					
+					if(arrow1Drawable)
+					{
+						Stroke stroke = g.getStroke();
+						Color old  = linesColor;
+						linesColor = shadowColor;
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+						arrowHeadL.draw(g, interiorColor, true);
+						linesColor = old;
+						g.setStroke(stroke);
+					}
+					
+					if(arrow2Drawable)
+					{
+						Stroke stroke = g.getStroke();
+						Color old  = linesColor;
+						linesColor = shadowColor;
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+						arrowHeadR.draw(g, interiorColor, true);
+						linesColor = old;
+						g.setStroke(stroke);
+					}
+					g.translate(-dx, -dy);
+				}
+				g.setColor(doubleColor);
+				g.setStroke(new BasicStroke((float)(doubleSep + thickness), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.draw(l);
+				g.setColor(linesColor);
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.draw(s[0]);
+				g.draw(s[1]);
+			}
+			else
+			{
+				if(hasShadow)
+				{
+					Stroke stroke = g.getStroke();
+					Shape s[] = getDbleBoundariesOutInOrMiddle(l);
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.draw(s[0]);
+					g.draw(s[1]);
+					Line2D l1 = (Line2D)s[0], l2 = (Line2D)s[1];
+					int[] xs = {(int)l1.getX1(), (int)l1.getX2(), (int)l2.getX2(), (int)l2.getX1()};
+					int[] ys = {(int)l1.getY1(), (int)l1.getY2(), (int)l2.getY2(), (int)l2.getY1()};
+					Polygon p = new Polygon(xs, ys, 4);
+					g.fill(p);
+					g.draw(p);
+					
+					if(arrow1Drawable)
+					{
+						Stroke stroke2 = g.getStroke();
+						Color old  = linesColor;
+						linesColor = shadowColor;
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+						arrowHeadL.draw(g, interiorColor, true);
+						linesColor = old;
+						g.setStroke(stroke2);
+					}
+					
+					if(arrow2Drawable)
+					{
+						Stroke stroke2 = g.getStroke();
+						Color old  = linesColor;
+						linesColor = shadowColor;
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+						arrowHeadR.draw(g, interiorColor, true);
+						linesColor = old;
+						g.setStroke(stroke2);
+					}
+					g.translate(-dx, -dy);
+					g.setStroke(stroke);
+				}
+				
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_ROUND,
+							BasicStroke.JOIN_MITER,1.f,new float[]{0,(float)(thickness*2+doubleSep+dotSep)},0));
+				else
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep),
+								BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+								new float[] { blackDashLength, whiteDashLength }, 0));
+					
+				g.setColor(linesColor);
+				g.draw(l);
+				g.setStroke(new BasicStroke((float)doubleSep, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.setColor(doubleColor);
+				g.draw(l);
+			}	
+		}
+		else
+		{
+			if(hasShadow)
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.translate(dx, dy);
+				g.setColor(shadowColor);
+				g.draw(l);
+				
+				if(arrow1Drawable)
+				{
+					Color old  = linesColor;
+					linesColor = shadowColor;
+					arrowHeadL.draw(g, interiorColor, true);
+					linesColor = old;
+				}
+				
+				if(arrow1Drawable)
+				{
+					Color old  = linesColor;
+					linesColor = shadowColor;
+					arrowHeadR.draw(g, interiorColor, true);
+					linesColor = old;
+				}
+				g.translate(-dx, -dy);
+			}
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			else
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND,
+												BasicStroke.JOIN_MITER, 1.f, new float[] { 0, thickness + dotSep }, 0));
+				else
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+												new float[] { blackDashLength, whiteDashLength }, 0));
+			
+			g.setColor(linesColor);
+			g.draw(l);
+		}
+
+		g.setStroke(new BasicStroke(hasDoubleBoundary() ? thickness*2f+(float)getDoubleSep() : thickness, 
+					BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+		
+		if(arrow1Drawable)
+			arrowHeadL.draw(g, interiorColor, false);
+		
+		if(arrow2Drawable)
+			arrowHeadR.draw(g, interiorColor, false);
+		
+		g.setColor(formerCol);
+		
+		if(isSelected && delimiters.size()==2)
+		{
+			delimiters.elementAt(0).draw(g);
+			delimiters.elementAt(1).draw(g);
+		}
+	}
+
+	
+	
+	@Override
+	public void setIsFilled(boolean filled)
+	{
+		/* A line cannot be filled. */
+	}
+		
+	
+	
+	/**
+	 * Allows to set the style of the left arrow of the line
+	 * @param style The new style of the left arrow of the line
+	 */
+	public synchronized void setArrow1Style(String style)
+	{
+		arrowHeadL.setArrowStyle(style);			
+	}
+	
+	
+	
+
+	/**
+	 * Allows to set the style of the right arrow of the line
+	 * @param style The new style of the right arrow of the line
+	 */
+	public synchronized void setArrow2Style(String style)
+	{
+		arrowHeadR.setArrowStyle(style);
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setLastPoint(LaTeXDrawPoint2D pt)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0);
+		LaTeXDrawPoint2D pt2 = getPoint(1);
+
+		if(pt1.x!=pt.x || pt1.y!=pt.y)
+		{
+			pt2.x = pt.x;
+			pt2.y = pt.y;			
+			updateAandB();
+			shape = createShape2D();
+		}
+	}
+
+	
+	@Override
+	public synchronized void setFirstPoint(LaTeXDrawPoint2D pt)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0);
+		LaTeXDrawPoint2D pt2 = getPoint(1);
+
+		if(pt2.x!=pt.x || pt2.y!=pt.y)
+		{
+			pt1.x = pt.x;
+			pt1.y = pt.y;			
+			updateAandB();
+			shape = createShape2D();
+		}
+	}
+	
+	
+	
+	@Override
+	public synchronized void setRotationAngle(double theta)
+	{
+		super.setRotationAngle(theta);
+		updateAandB();
+		shape = createShape2D();
+	}
+	
+	
+	
+	
+	
+	@Override
+	public synchronized void setThickness(float val) 
+	{
+		super.setThickness(val);
+		
+		if(!Double.isInfinite(val) && !Double.isNaN(val) && val>0)
+		{
+			double dim = 1.33*val+3.33 +1;
+			if(dim<6.) 
+				dim = 6;
+		
+			Delimitor d1 = delimiters.elementAt(0);
+			Delimitor d2 = delimiters.elementAt(1);
+			if(d1!=null) d1.setDim(dim);
+			if(d2!=null) d2.setDim(dim);
+			shape = createShape2D();
+		}
+	}
+	
+	
+	
+	
+	
+	@Override
+	public LaTeXDrawPoint2D getTheNWPoint()
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0);
+		LaTeXDrawPoint2D pt2 = getPoint(1);
+		
+		return new LaTeXDrawPoint2D(pt1.x<pt2.x ? pt1.x : pt2.x, pt1.y<pt2.y ? pt1.y : pt2.y);
+	}
+
+	
+	
+	
+	
+	@Override
+	public LaTeXDrawPoint2D getTheNWRotatedPoint()
+	{// For a line, there is no difference between the line and the rotated
+		// line because at a change of the rotation angle, we really
+		// rotate the points of the line, whereas for other figure, we create
+		// a rotated figure at each display.
+		return getTheNWPoint();
+	}
+	
+	
+	
+	
+	@Override
+	public LaTeXDrawPoint2D getTheSERotatedPoint()
+	{
+//		 For a line, there is no difference between the line and the rotated
+		// line because at a change of the rotation angle, we really
+		// rotate the points of the line, whereas for other figure, we create
+		// a rotated figure at each display.
+		return getTheSEPoint();
+	}
+	
+	
+	
+	
+	@Override
+	public LaTeXDrawPoint2D getTheSEPoint()
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0);
+		LaTeXDrawPoint2D pt2 = getPoint(1);
+		
+		return new LaTeXDrawPoint2D(pt1.x<pt2.x ? pt2.x : pt1.x, pt1.y<pt2.y ? pt2.y : pt1.y);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the style of the left arrow of the line
+	 * @return The style of the left arrow of the line
+	 */
+	public synchronized String getArrow1Style() 
+	{
+		return arrowHeadL.getArrowStyle();
+	}
+	
+
+	
+	
+	
+	/**
+	 * Allows to get the style of the right arrow of the line
+	 * @return The style of the left arrow of the line
+	 */
+	public synchronized String getArrow2Style()
+	{
+		return arrowHeadR.getArrowStyle();
+	}
+	
+	
+	
+	
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt) 
+	{			
+		updateAandB();
+		LaTeXDrawPoint2D pt1 = getPoint(0);
+		LaTeXDrawPoint2D pt2 = getPoint(1);
+		Delimitor d1 = delimiters.elementAt(0);
+		Delimitor d2 = delimiters.elementAt(1);
+		
+		if(d1!=null && d2!=null)		
+			if(d1.isIn(pt)|| d2.isIn(pt))
+				return true;
+		
+		float dec;
+		boolean in = true;
+		
+		if(hasDoubleBoundary)
+			dec = (float)(thickness+doubleSep/2.);
+		else
+			dec = (float)(thickness/2.);
+
+		if(pt1.y<pt2.y)
+		{
+			if(pt.y<pt1.y-dec || pt.y>pt2.y+dec)
+				in = false;	
+		}
+		else
+			if(pt.y>pt1.y+dec || pt.y<pt2.y-dec)
+				in = false;	
+		
+		if(pt1.x<pt2.x)
+		{
+			if(pt.x<pt1.x-dec || pt.x>pt2.x+dec)
+				in = false;	
+		}
+		else
+			if(pt.x>pt1.x+dec || pt.x<pt2.x-dec)
+				in = false;	
+
+		// In the case : x = alpha (unable to compute a)
+		if(in && pt1.x>=pt2.x-dec && pt1.x<=pt2.x+dec)
+			return true;
+			
+			
+		// Calculate the equation of the line (y = ax + b)
+		double axb = a*pt.x+b;
+
+		if(in && a==0) // If the equation is y = alpha
+		{
+			if(pt1.x<pt2.x)
+				in = pt.x>=pt1.x-dec && pt.x<=pt2.x+dec;
+			else
+				in = pt.x>=pt2.x-dec && pt.x<=pt1.x+dec;
+		}
+		
+		if(in)
+			in = pt.y>=axb-dec && pt.y<=axb+dec;
+		
+		return in;
+	} 
+
+	
+	
+	
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		LaTeXDrawPoint2D pt1 = getPoint(0);
+		LaTeXDrawPoint2D pt2 = getPoint(1);
+		double x1 = pt1.x - d.x, x2 = pt2.x - d.x, y1 = d.y - pt1.y, y2 = d.y - pt2.y;
+		String add ="", arrowsCode=""; //$NON-NLS-1$ //$NON-NLS-2$
+		double threshold = 0.001;
+		
+		if(!linesColor.equals(PSTricksConstants.DEFAULT_LINE_COLOR))
+		{
+			String name = DviPsColors.getColourName(linesColor);
+			if(name==null)
+			{
+				name = "color"+number;//$NON-NLS-1$
+				DviPsColors.addUserColour(linesColor, name); 
+			}
+			add += ",linecolor="+name; //$NON-NLS-1$
+		}
+		
+		if(hasShadow)
+		{
+			add+=",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				add+=",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+			
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				add+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC), threshold);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				add += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+		}
+		
+		if(!interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR))
+		{
+			String name = DviPsColors.getColourName(interiorColor);
+			if(name==null)
+			{
+				name = "color"+number+'b';//$NON-NLS-1$
+				DviPsColors.addUserColour(interiorColor, name); 
+			}
+			add += ",fillcolor=" + name; //$NON-NLS-1$
+		}
+		
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			add += ",linestyle="+lineStyle+",dotsep="+ //$NON-NLS-1$ //$NON-NLS-2$
+			LaTeXDrawNumber.getCutNumber(dotSep/ppc, threshold)+ "cm";	 //$NON-NLS-1$
+		else
+		if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+			add += ",linestyle="+lineStyle+",dash=" +  //$NON-NLS-1$ //$NON-NLS-2$
+			LaTeXDrawNumber.getCutNumber(blackDashLength/ppc, threshold) + "cm "+  //$NON-NLS-1$
+			LaTeXDrawNumber.getCutNumber(whiteDashLength/ppc, threshold) + "cm"; //$NON-NLS-1$
+		
+		String currentArrowLStyle = arrowHeadL.getArrowStyle();
+		String currentArrowRStyle = arrowHeadR.getArrowStyle();		
+		String paramsR = ","+ arrowHeadR.getParametersCode(); //$NON-NLS-1$
+		String paramsL = ","+ arrowHeadL.getParametersCode(); //$NON-NLS-1$
+		if(paramsR.equals(",")) paramsR = ""; //$NON-NLS-1$ //$NON-NLS-2$
+		if(paramsL.equals(",")) paramsL = ""; //$NON-NLS-1$ //$NON-NLS-2$
+		
+		if(!currentArrowLStyle.equals(PSTricksConstants.NONEARROW_STYLE))
+		{
+			arrowsCode="{"+currentArrowLStyle+'-'; //$NON-NLS-1$
+			
+			if(!currentArrowRStyle.equals(PSTricksConstants.NONEARROW_STYLE))
+				arrowsCode+=currentArrowRStyle;
+			arrowsCode+='}';
+			
+			if(!arrowHeadL.isOfTheSameTypeAs(arrowHeadR))
+			{
+				if((currentArrowRStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+					currentArrowRStyle.equals(PSTricksConstants.RRBRACKET_STYLE)  ||
+					currentArrowRStyle.equals(PSTricksConstants.RSBRACKET_STYLE)  ||
+					currentArrowRStyle.equals(PSTricksConstants.RSBRACKET_STYLE))	&&
+					(currentArrowLStyle.equals(PSTricksConstants.BAREND_STYLE) ||
+					currentArrowLStyle.equals(PSTricksConstants.BARIN_STYLE) ||
+					currentArrowLStyle.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+					currentArrowLStyle.equals(PSTricksConstants.RRBRACKET_STYLE)  ||
+					currentArrowLStyle.equals(PSTricksConstants.RSBRACKET_STYLE)  ||
+					currentArrowLStyle.equals(PSTricksConstants.RSBRACKET_STYLE)))
+					add = paramsR;
+				else
+					add+= paramsL + paramsR;
+			}else add+=paramsR;
+		}
+		else 
+			if(!currentArrowRStyle.equals(PSTricksConstants.NONEARROW_STYLE))
+			{
+				add+=paramsR;
+				arrowsCode="{-"+currentArrowRStyle+'}'; //$NON-NLS-1$
+			}
+		
+		if(hasDoubleBoundary)
+		{
+			add+=",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc), threshold); //$NON-NLS-1$
+			
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name); 
+				}
+				add+= ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}
+		
+		return "\\psline[linewidth=" + LaTeXDrawNumber.getCutNumber(thickness/ppc, threshold)+"cm"   //$NON-NLS-1$ //$NON-NLS-2$
+			+ add + "]"+ arrowsCode + "(" + LaTeXDrawNumber.getCutNumber((float)(x1/ppc), threshold) + ","  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			+ LaTeXDrawNumber.getCutNumber((float)(y1/ppc), threshold)  + ")(" //$NON-NLS-1$
+			+ LaTeXDrawNumber.getCutNumber((float)(x2/ppc), threshold) + ","  //$NON-NLS-1$
+			+ LaTeXDrawNumber.getCutNumber((float)(y2/ppc), threshold) + ")"; //$NON-NLS-1$
+	}
+
+
+	
+	
+	
+	/**
+	 * Allows to get the X-coordinate thanks to the equation of the
+	 * line and the Y-coordinate of the point
+	 * @param y The Y-coordinate of the point
+	 * @return The X-coordinate of the point
+	 */
+	public double getXWithEquation(double y)
+	{
+		updateAandB();
+		return (y-b)/a;
+	}
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to get the Y-coordinate thanks to the equation of the
+	 * line and the X-coordinate of the point
+	 * @param x The X-coordinate of the point
+	 * @return The Y-coordinate of the point
+	 */
+	public double getYWithEquation(double x)
+	{
+		updateAandB();
+		return a*x+b;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the points which are on the line and at the distance
+	 * "distance" of the point "p" of the line.
+	 * @param p The point of reference
+	 * @param distance The distance between p and the points we must find
+	 * @return The points found
+	 * @throws LaTeXDrawException
+	 */
+	public LaTeXDrawPoint2D[] findPoints(Point p, double distance) throws LaTeXDrawException
+	{	
+		return findPoints(p.x, p.y, distance);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the points which are on the line and at the distance
+	 * "distance" of the point "p" of the line.
+	 * @param p The point of reference
+	 * @param distance The distance between p and the points we must find
+	 * @return The points found
+	 * @throws LaTeXDrawException
+	 */
+	public LaTeXDrawPoint2D[] findPoints(LaTeXDrawPoint2D p, double distance) throws LaTeXDrawException
+	{	
+		return findPoints(p.x, p.y, distance);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the points which are on the line and at the distance
+	 * "distance" of the point "p" of the line.
+	 * @param x The x-coordinate of the point of reference
+	 * @param y The y-coordinate of the point of reference
+	 * @param distance The distance between p and the points we must find
+	 * @return The found points
+	 * @throws LaTeXDrawException
+	 */
+	public LaTeXDrawPoint2D[] findPoints(double x, double y, double distance) throws LaTeXDrawException
+	{
+		if(distance==0)
+		{
+			LaTeXDrawPoint2D[] sol = new LaTeXDrawPoint2D[1];
+			sol[0] = new LaTeXDrawPoint2D(x,y);
+			return sol;
+		}
+		
+		updateAandB();
+		
+		if(Double.isInfinite(b) || Double.isNaN(b))
+		{// A vertical line
+			LaTeXDrawPoint2D sol[] = new LaTeXDrawPoint2D[2];
+			sol[0] = new LaTeXDrawPoint2D(x, y-distance);
+			sol[1] = new LaTeXDrawPoint2D(x, y+distance);
+			
+			return sol;
+		}
+		
+		double A = a*a+1, B = -2*(x+y*a-a*b);
+		double C = b*b-(2*y*b)+y*y+x*x-(distance*distance);
+		double delta = B*B-4*A*C;
+
+		if(delta>0)
+		{
+			double x1, x2, y1, y2;
+			LaTeXDrawPoint2D sol[] = new LaTeXDrawPoint2D[2];
+			x1 = (-B+Math.sqrt(delta))/(2*A);
+			x2 = (-B-Math.sqrt(delta))/(2*A);
+			y1 = a*x1+b;
+			y2 = a*x2+b;
+			sol[0] = new LaTeXDrawPoint2D(x1, y1);
+			sol[1] = new LaTeXDrawPoint2D(x2, y2);
+			return sol;
+		}
+		else
+			if(delta==0)
+			{
+				double x2, y2;
+				LaTeXDrawPoint2D sol[] = new LaTeXDrawPoint2D[1];
+				x2 = -B/2*A;
+				y2 = a*x2+b;
+				sol[0] = new LaTeXDrawPoint2D(x2, y2);
+				return sol;
+			}
+			else 
+				throw new LaTeXDrawException(LaTeXDrawException.INCORRECT_VALUE);
+	}
+	
+	
+
+	
+	/**
+	 * Allows to create the line which is perpendicular to the current
+	 * line at the point pt
+	 * @param pt The point of crossing between the two lines
+	 * @return The perpendicular line
+	 */
+	public Line getPerpendicularLine(LaTeXDrawPoint2D pt, boolean increaseMeter)
+	{
+		if(pt.x==0)
+		{
+			LaTeXDrawPoint2D pt3 = getPt2();
+			LaTeXDrawPoint2D pt2 = Figure.rotatePoint(pt3, pt, Math.PI/2.);
+			return new Line(pt2, pt, increaseMeter);
+		}
+		double a2 = -1./a;
+		return new Line(pt.y-a2*pt.x, pt, increaseMeter);
+	}
+	
+	
+	
+	/**
+	 * Allows to translate the line following a gap t. In fact, we only
+	 * change the y-intersect
+	 * @param t The gap
+	 * @return A new line, result of this translation
+	 */
+	public Line translate(double t, boolean increaseMeter)
+	{
+		return new Line(a, b+t, increaseMeter);
+	}
+
+
+	
+	
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Line l = (Line) super.clone();
+		l.borders = null;
+
+		updateGravityCenter();
+		
+		l.arrowHeadL = arrowHeadL.clone(false);
+		l.arrowHeadL.setPosition(l.getPoint(0));
+		l.arrowHeadL.setLine(l);
+		l.arrowHeadL.setFigure(l);
+
+		l.arrowHeadR = arrowHeadR.clone(false);
+		l.arrowHeadR.setPosition(l.getPoint(1));
+		l.arrowHeadR.setLine(l);
+		l.arrowHeadR.setFigure(l);
+		
+		l.canBeFilled = false;
+		l.a = a;
+		l.b = b;
+		l.shape = l.createShape2D();
+		
+		return l;
+	}
+
+	
+	
+	
+	@Override
+	public void updateGravityCenter() 
+	{
+		if(pts.size()==LINE_NB_POINTS)
+		{
+			LaTeXDrawPoint2D pt1 = getPoint(0);
+			LaTeXDrawPoint2D pt2 = getPoint(1);
+			gravityCenter.setLocation((pt1.x+pt2.x)/2., (pt1.y+pt2.y)/2.);
+		}
+	}
+
+	
+	/**
+	 * Allows to get the a from y=ax+b
+	 * @return The a
+	 */
+	public double getA()
+	{
+		return a;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the b from y=ax+b
+	 * @return The b
+	 */
+	public double getB()
+	{
+		return b;
+	}
+	
+	
+	
+	
+	@Override
+	public LaTeXDrawRectangle getBorders()
+	{ 
+		LaTeXDrawPoint2D NW = (LaTeXDrawPoint2D)getTheNWPoint().clone();
+		LaTeXDrawPoint2D SE = (LaTeXDrawPoint2D)getTheSEPoint().clone();
+		
+		return new LaTeXDrawRectangle((LaTeXDrawPoint2D)NW.clone(), new LaTeXDrawPoint2D(SE.x,NW.y),
+				new LaTeXDrawPoint2D(NW.x,SE.y),SE, false);
+	}
+
+	
+	
+	
+	@Deprecated
+	@Override
+	public void updateBorders(LaTeXDrawPoint2D pt)
+	{	
+		/* */
+	}
+	
+	
+	@Deprecated
+	@Override
+	public void updateBorders()
+	{
+		/* */
+	}
+	
+	
+	
+	@Override
+	public void removePointAt(int id)
+	{
+		if(id<0 || id>pts.size()) return ;
+		
+		if(pts.size()>2)
+		{
+			pts.remove(id);
+			delimiters.remove(id);
+			if(id==0)
+			{
+				arrowHeadL.setPosition(getPoint(0));
+				arrowHeadR.setPosition(getPoint(1));
+				
+			}
+			else 
+				if(id==0)
+					arrowHeadR.setPosition(getPoint(1));
+				
+			updateAandB();
+		}
+	}
+	
+	
+	
+	
+
+	@Override
+	public void onDragged(Point formerPt, Point newPt) throws Exception 
+	{	
+		if(formerPt.equals(newPt)) return;
+		
+		if(isOnRotation && dSelected!=null)
+		{
+			double theta = computeRotationAngle(formerPt, newPt);
+			double rotationA = rotationAngle+ theta;
+			rotationA%=(Math.PI*2);
+			setRotationAngle(rotationA);
+		}
+		else
+		if(dSelected==null)// We dragged the figure or a delimiter of the 
+				shift(formerPt, newPt);
+		else
+			dSelected.setCoordinates(newPt.x, newPt.y);			
+		
+		updateGravityCenter();
+		updateShape();
+	}
+
+	
+	
+	
+	
+	
+	
+	@Override
+	public LaTeXDrawPoint2D getBordersPoint(int id)
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint();
+		LaTeXDrawPoint2D SE = getTheSEPoint();
+		
+		if(id==-1 || id==3) return SE;
+		if(id<0 || id>LaTeXDrawRectangle.NB_POINTS_FRAME-1)
+			throw new IllegalArgumentException();
+		
+		if(id==0) return NW;
+		if(id==1) return new LaTeXDrawPoint2D(SE.x,NW.y);
+		if(id==2) return new LaTeXDrawPoint2D(NW.x,SE.y);
+		
+		return null;
+	}
+
+	
+	
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow = true;
+		canHaveArrow  = true;
+		interiorColor = (Color) ois.readObject();
+		lineStyle = (String) ois.readObject();
+		rotationAngle = ois.readDouble();
+		thickness = ois.readFloat();
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		pts = (Vector) ois.readObject();
+		arrowHeadL = (ArrowHead) ois.readObject();
+		arrowHeadR = (ArrowHead) ois.readObject();
+		
+		arrowHeadR.setArrowInset(arrowHeadL.getArrowInset());
+		arrowHeadR.setArrowLength(arrowHeadL.getArrowLength());
+		arrowHeadR.setArrowSizeDim(arrowHeadL.getArrowSizeDim());
+		arrowHeadR.setArrowSizeNum(arrowHeadL.getArrowSizeNum());
+		arrowHeadR.setBracketNum(arrowHeadL.getBracketNum());
+		arrowHeadR.setDotSizeDim(arrowHeadL.getDotSizeDim());
+		arrowHeadR.setDotSizeNum(arrowHeadL.getDotSizeNum());
+		arrowHeadR.setRBracketNum(arrowHeadL.getRBracketNum());
+		arrowHeadR.setTBarSizeDim(arrowHeadL.getTBarSizeDim());
+		arrowHeadR.setTBarSizeNum(arrowHeadL.getTBarSizeNum());
+		
+		if(pts.size()!=LINE_NB_POINTS)
+			throw new ArrayIndexOutOfBoundsException();
+		
+		arrowHeadL.setPosition(pts.firstElement());
+		arrowHeadR.setPosition(pts.elementAt(1));
+		arrowHeadL.setFigure(this);
+		arrowHeadR.setFigure(this);
+		
+		delimiters = new Vector();
+		for(int i=0, size = pts.size();i<size; i++)
+			delimiters.add(new Delimitor(pts.elementAt(i)));
+			
+		setThickness(thickness);
+		updateAandB();
+		updateGravityCenter();
+		canBeFilled = false;
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0)//$NON-NLS-1$
+		{
+			hasDoubleBoundary = ois.readBoolean();
+			doubleColor = (Color)ois.readObject();
+			doubleSep = ois.readDouble();
+		}
+		else
+		{
+			hasDoubleBoundary  = DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor = DEFAULT_DOUBLE_COLOR;
+			doubleSep   = DEFAULT_DOUBLESEP;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+		}
+	}
+
+	
+	
+	
+	
+	@Override
+	public Shape createShape2D()
+	{
+		if(getNbPoints()<2)
+			return null;
+		
+		Shape area;
+		Shape s = new Line2D.Double(getPt1(), getPt2());
+
+		if(hasDoubleBoundary)
+		{//Fixes #1557509
+			Line2D.Double[] s2 = (Line2D.Double[])getDbleBoundariesMiddle(s);
+			int[] xs = new int[4], ys = new int[5];
+			xs[0] = (int)s2[0].x1;
+			xs[1] = (int)s2[0].x2;
+			xs[2] = (int)s2[1].x1;
+			xs[3] = (int)s2[1].x2;
+			ys[0] = (int)s2[0].y1;
+			ys[1] = (int)s2[0].y2;
+			ys[2] = (int)s2[1].y1;
+			ys[3] = (int)s2[1].y2;
+			area = new Polygon(xs, ys, 4);
+		}
+		else
+			area = s;
+
+		return area;
+	}
+
+	
+	
+	
+	
+	/**
+	 * @return Returns the arrowHead1.
+	 */
+	public ArrowHead getArrowHead1()
+	{
+		return arrowHeadL;
+	}
+
+	
+	
+	/**
+	 * @return Returns the arrowHead2.
+	 */
+	public ArrowHead getArrowHead2()
+	{
+		return arrowHeadR;
+	}
+
+	
+	
+	
+	/**
+	 * Allows to get the intersection between two lines
+	 * @param l The second lines
+	 * @return The intersection
+	 */
+	public LaTeXDrawPoint2D getIntersection(Line l)
+	{
+		if(l==null) return null;
+		
+		boolean bInf = false;
+		double y;
+
+		if(Double.isInfinite(b) || Double.isNaN(b))
+			// The equation is x = alpha;
+			bInf = true;
+		
+		if(Double.isInfinite(l.b) || Double.isNaN(l.b))
+		{// The equation is x = alpha;
+			if(bInf)// The two lines a parallels
+				return null;
+			
+			y = a*l.getPt1().x+b;
+			return new LaTeXDrawPoint2D((y-b)/a, y);
+		}
+		
+		if(bInf)
+		{
+			y = l.a*getPt1().x+l.b;
+			return new LaTeXDrawPoint2D((y-l.b)/l.a, y);
+		}
+		double x = (b-l.b)/(l.a-a);
+
+		return new LaTeXDrawPoint2D(x, a*x+b);
+	}
+
+
+	
+	
+	
+	
+	@Override
+	public Shape[] getDbleBoundariesMiddle(Shape classicBord)
+	{
+		try
+		{
+			Point2D.Double p1 = (Point2D.Double)((Line2D.Double)classicBord).getP1();
+			Point2D.Double p2 = (Point2D.Double)((Line2D.Double)classicBord).getP2();			
+			Line l = new Line(new LaTeXDrawPoint2D(p1.x, p1.y), 
+							  new LaTeXDrawPoint2D(p2.x, p2.y), false);
+			
+			LaTeXDrawPoint2D[] pts1 = l.getPerpendicularLine(
+					(LaTeXDrawPoint2D)l.getPt1().clone(), false).findPoints(
+								l.getPt1(), (doubleSep+thickness)/2.);
+			
+			LaTeXDrawPoint2D[] pts2 =l.getPerpendicularLine(
+					(LaTeXDrawPoint2D)l.getPt2().clone(), false).findPoints(
+								l.getPt2(), (doubleSep+thickness)/2.);
+			
+			if(pts1.length<2 || pts2.length<2)
+				throw new IndexOutOfBoundsException();
+			
+			Shape[] s = new Line2D.Double[2];
+			s[0] = new Line2D.Double(pts1[0], pts2[0]);
+			s[1] = new Line2D.Double(pts1[1], pts2[1]);
+
+			return s;
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			return null; 
+		}
+	}
+
+
+	
+	
+	
+	/** 
+	 * Allow to get the first point of the line
+	 * @return The first point of the line
+	 */
+	public LaTeXDrawPoint2D getPt1() 
+	{ 
+		return getPoint(0); 
+	}
+	
+	
+	
+	
+	/**
+	 * Allow to get the second point o the line
+	 * @return The second point of the line
+	 */
+	public LaTeXDrawPoint2D getPt2() 
+	{ 
+		return getPoint(1); 
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to get the middle point of the line
+	 * @return The middle point of the line
+	 */
+	public LaTeXDrawPoint2D getMiddlePt()
+	{
+		LaTeXDrawPoint2D p1 = pts.elementAt(0);
+		LaTeXDrawPoint2D p2 = pts.elementAt(1);
+		
+		return new LaTeXDrawPoint2D((p1.x+p2.x)/2., (p1.y+p2.y)/2.);
+	}
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to get the point of the intersection between of the two segments
+	 * @param l The second line
+	 * @return The intersection point
+	 */
+	public LaTeXDrawPoint2D getIntersectsSegment(Line l)
+	{
+		if(l==null) return null;
+		
+		LaTeXDrawPoint2D p = getIntersection(l);
+		
+		if(p==null) return null;
+
+		LaTeXDrawPoint2D NW = getTheNWPoint();
+		LaTeXDrawPoint2D SE = getTheSEPoint();
+		LaTeXDrawPoint2D NW2 = l.getTheNWPoint();
+		LaTeXDrawPoint2D SE2 = l.getTheSEPoint();
+		
+		if( (p.x>NW.x && p.x<SE.x && p.y>NW.y && p.y<SE.y) &&
+			(p.x>NW2.x && p.x<SE2.x && p.y>NW2.y && p.y<SE2.y))
+			return p;
+		return null;
+	}
+	
+	
+	
+	@Override
+	public boolean isTooSmallToBeRescaled()
+	{
+		return pts.firstElement().equals(pts.elementAt(1), 0);
+	}
+
+
+
+	@Override
+	public String toString()
+	{
+		return getPt1()+" " +getPt2()+", a="+a+", b="+b;   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+	}
+	
+	
+	
+	//Fixes #1557509
+	@Override
+	public void updateShape()
+	{
+		updateGravityCenter();
+		shape = createShape2D();
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()^arrowHeadL.getArrowStyle().hashCode();
+	}
+
+
+
+	public boolean hasTwoLeftArrows()
+	{
+		return false;
+	}
+}
diff --git a/current/latexDraw/figures/Picture.java b/current/latexDraw/figures/Picture.java
new file mode 100644
index 0000000..de2c118
--- /dev/null
+++ b/current/latexDraw/figures/Picture.java
@@ -0,0 +1,566 @@
+package latexDraw.figures;
+
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.Shape;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawException;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+import org.sourceforge.jlibeps.epsgraphics.EpsGraphics2D;
+
+
+/**
+ * This class defines a kind of figure: a picture.<br>
+ * <br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ * LaTeXDraw is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.<br>
+ * <br>
+ * LaTeXDraw is distributed without any warranty; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.<br>
+ * <br>
+ * 02/03/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Picture extends Figure
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The position of the picture */
+	protected LaTeXDrawPoint2D position;
+
+	/** The picture */
+	protected transient Image picture;
+
+	/** The path of the picture */
+	protected String pathTarget;
+
+	/** The path of the source picture */
+	protected String pathSource;
+
+
+	
+	public Picture(boolean increaseMeter)
+	{
+		super(increaseMeter);
+		
+		canHaveShadow 		= false;
+		isBordersMovable 	= false;
+		isCustomizable 		= false;
+		isDashableOrDotable 	= false;
+		isDoubleBoundaryable 	= false;
+		isResizable 		= false;
+		isThicknessable 	= false;
+		canBeFilled 		= false;
+		position 			= new LaTeXDrawPoint2D();
+	}
+
+	
+
+	/**
+	 * The constructor by default
+	 * @param increaseMeter True: the figure will increase the number of figures
+	 * @param pathSource The path of the source picture.
+	 */
+	public Picture(boolean increaseMeter, String pathSource)
+	{
+		this(increaseMeter, new LaTeXDrawPoint2D(), pathSource);
+	}
+
+
+
+	/**
+	 * The constructor taking the position of the picture
+	 * @param increaseMeter True: the figure will increase the number of figures
+	 * @param p The position of the figure
+	 * @param pathSource The path of the source picture
+	 */
+	public Picture(boolean increaseMeter, LaTeXDrawPoint2D p, String pathSource)
+	{
+		this(increaseMeter);
+
+		if(pathSource==null)
+			throw new IllegalArgumentException();
+		
+		if(p==null)
+			p = new LaTeXDrawPoint2D();
+		
+		position = p;
+
+		this.pathSource = pathSource;
+		picture = getImage();
+		createEPSImage();
+		borders = new LaTeXDrawRectangle((LaTeXDrawPoint2D)position.clone(), new LaTeXDrawPoint2D(
+						position.x+picture.getWidth(null), position.x+picture.getHeight(null)), false);
+		borders.setIsFilled(true);
+		updateShape();
+	}
+
+
+
+	@Override
+	protected void finalize() throws Throwable
+	{
+		picture.flush();
+		
+		super.finalize();
+	}
+
+
+
+	/**
+	 * @return An AWT image from the source path or null.
+	 * @since 2.0.0
+	 */
+	public Image getImage()
+	{
+		return pathSource==null ? null : LaTeXDrawFrame.convertFrame.getImage(new File(pathSource));
+	}
+	
+	
+	
+	/**
+	 * Creates an EPS.
+	 * @throws IllegalArgumentException If the writing is not possible.
+	 * @since 2.0.0
+	 */
+	public void createEPSImage()
+	{
+		if(pathSource==null || picture==null)
+			return ;
+		
+		String name = pathSource.substring(pathSource.lastIndexOf(File.separator)+1, pathSource.lastIndexOf('.'))+LaTeXDrawResources.EPS_EXTENSION;
+		pathTarget = pathSource+File.separator+name;
+		File file = new File(pathTarget);
+	
+		if(!file.canWrite())
+		{
+			pathTarget = LaTeXDrawFrame.getPathExport()+File.separator+name;
+			file = new File(pathTarget);
+		}
+		
+		try
+		{
+			FileOutputStream finalImage = new FileOutputStream(file);
+			EpsGraphics2D g = new EpsGraphics2D("LaTeXDrawPicture", finalImage, 0, 0, picture.getWidth(null), picture.getHeight(null));//$NON-NLS-1$
+			
+			g.drawImage(picture, 0, 0, null);
+			g.flush();
+			g.close();
+			finalImage.close();
+		}
+		catch(Exception e) { throw new IllegalArgumentException(); }
+	}
+
+
+	
+
+	@Override
+	public Shape createShape2D()
+	{
+		if(borders==null)
+			return null;
+		return borders.shape;
+	}
+
+
+
+
+	@Override
+	public Shape createNonRotatedShape2D()
+	{
+		if(borders==null)
+			return null;
+		return borders.createNonRotatedShape2D();
+	}
+
+
+
+
+	@Override
+	public void onDragged(Point formerPt, Point newPt) throws Exception
+	{
+		if(formerPt.equals(newPt))
+			return;
+
+		if(isOnRotation&&borders.dSelected!=null)
+		{
+			borders.onDragged(formerPt, newPt);
+			rotationAngle = borders.getRotationAngle();
+		}
+		else
+			shift(formerPt, newPt);
+		
+		updateShape();
+	}
+
+
+
+
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx-Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx+Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x)-Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x)+Math.cos(-rotationAngle)*(cy-c2y);
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.rotate(rotationAngle);
+			g.translate(c3x, c3y);
+		}
+
+	    g.drawImage(picture, (int)position.x, (int)position.y, null);
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+
+		if(isSelected)
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+
+
+
+	@Override
+	@Deprecated
+	public void setLastPoint(double x, double y)
+	{
+		// empty method
+	}
+
+
+
+	@Override
+	@Deprecated
+	public void setFirstPoint(double x, double y)
+	{
+		// empty method
+	}
+
+
+
+
+	@Override
+	public void shift(double shiftX, double shiftY)
+	{
+		if(position!=null)
+		{
+			position.x += shiftX;
+			position.y += shiftY;
+		}
+		
+		if(borders!=null)
+			borders.shift(shiftX, shiftY);
+		
+		updateShape();
+	}
+
+
+
+
+	@Override
+	@Deprecated
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound)
+	{
+		// not rescalable
+	}
+
+
+
+
+	@Override
+	@Deprecated
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound)
+	{
+		// not rescalable
+	}
+
+
+
+
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt)
+	{
+		if(borders==null)
+			return false;
+		
+		return borders.isIn(pt);
+	}
+
+
+
+
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		if(picture==null)
+			return null;
+
+		double threshold = 0.001;
+		String addBegin = "", addEnd = ""; //$NON-NLS-1$ //$NON-NLS-2$
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint();
+		LaTeXDrawPoint2D SE = borders.getTheSEPoint();
+		float x = LaTeXDrawNumber.getCutNumber((float)((position.x+(SE.x-NW.x)/2.-d.x)/ppc),threshold);
+		float y = LaTeXDrawNumber.getCutNumber((float)(((d.y-position.y)/ppc)),threshold);
+
+		if(rotationAngle%(Math.PI*2)!=0.)
+		{
+			double angle = -Math.toDegrees(rotationAngle);
+			double cx = (gravityCenter.x-d.x)/ppc;
+			double cy = (d.y-gravityCenter.y)/ppc;
+			double x2 = -Math.cos(-rotationAngle)*cx+Math.sin(-rotationAngle)*cy+cx;
+			double y2 = -Math.sin(-rotationAngle)*cx-Math.cos(-rotationAngle)*cy+cy;
+			addBegin += "\\rput{"+(float)angle+"}("+LaTeXDrawNumber.getCutNumber((float)x2,threshold)+','+LaTeXDrawNumber.getCutNumber((float)y2,threshold)+"){"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			addEnd = "}"; //$NON-NLS-1$
+		}
+
+		String path2 = pathTarget;
+		path2 = path2.replaceAll("\\\\", "/");//$NON-NLS-1$ //$NON-NLS-2$
+
+		if(path2.contains(" "))//$NON-NLS-1$
+			addBegin += LaTeXDrawLang.getString1_6("Picture.0") //$NON-NLS-1$
+					+System.getProperty("line.separator").charAt(0);//$NON-NLS-1$
+
+		return addBegin+"\\rput("+x+","+y+"){"+ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				"\\includegraphics{"+path2+"}}"+addEnd; //$NON-NLS-1$ //$NON-NLS-2$ 
+	}
+
+
+
+
+	/**
+	 * @return the picture
+	 */
+	public synchronized Image getPicture()
+	{
+		return picture;
+	}
+
+
+
+
+	/**
+	 * @param picture the picture to set
+	 */
+	public synchronized void setPicture(Image picture)
+	{
+		if(picture!=null)
+			this.picture = picture;
+	}
+
+
+
+
+	/**
+	 * @return the position
+	 */
+	public synchronized LaTeXDrawPoint2D getPosition()
+	{
+		return position;
+	}
+
+
+
+
+	/**
+	 * @param position the position to set
+	 */
+	public synchronized void setPosition(LaTeXDrawPoint2D position)
+	{
+		if(position!=null)
+			this.position = position;
+	}
+
+
+
+
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Picture p = (Picture)super.clone();
+		p.borders = (LaTeXDrawRectangle)borders.clone();
+		p.position = (LaTeXDrawPoint2D)position.clone();
+		p.pathSource = pathSource;
+		p.pathTarget = pathTarget;
+		p.updateShape();
+
+		return p;
+	}
+
+
+
+
+	/**
+	 * @return the path of the target picture.
+	 */
+	public synchronized String getPathTarget()
+	{
+		return pathTarget;
+	}
+
+
+
+
+	/**
+	 * @param path the path of the target picture to set.
+	 */
+	public synchronized void setPathTarget(String path)
+	{
+		this.pathTarget = path;
+	}
+
+
+
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException, LaTeXDrawException
+	{
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		borders = (LaTeXDrawRectangle)ois.readObject();
+		position = (LaTeXDrawPoint2D)ois.readObject();
+		pathTarget = (String)ois.readObject();
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.9.5")>=0)//$NON-NLS-1$
+			pathSource = (String)ois.readObject();
+		else
+			pathSource = pathTarget;
+		
+		gravityCenter = borders.getGravityCenter();
+		
+		try
+		{
+			picture = LaTeXDrawFrame.convertFrame.getImage(new File(pathSource));
+			
+		    if(picture==null || picture.getWidth(null)<1 || picture.getHeight(null)<1)
+		    	throw new LaTeXDrawException(LaTeXDrawException.INVALID_PICTURE);
+		}
+		catch(Exception e)
+		{
+			throw new LaTeXDrawException(LaTeXDrawException.INVALID_PICTURE);
+		}
+	}
+
+
+
+
+	@Override
+	public void updateShape()
+	{
+		updateGravityCenter();
+		shape = createShape2D();
+	}
+
+
+
+
+	@Override
+	public boolean isTooSmallToBeRescaled()
+	{
+		return true;
+	}
+
+
+
+
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{// Fixes #1564477
+		borders.mirrorHorizontal(origin);
+		position.setLocation(borders.getTheNWPoint().x, position.y);
+		updateShape();
+	}
+
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{// Fixes #1564477
+		borders.mirrorVertical(origin);
+		position.setLocation(position.x, borders.getTheNWPoint().y);
+		updateShape();
+	}
+
+
+
+
+	@Override
+	@Deprecated
+	public LaTeXDrawPoint2D getLastPoint()
+	{
+		return null;
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		position.setLocation(grid.getTransformedPointToGrid(position, false));
+	}
+
+
+
+
+	@Override
+	public int getSelectedDelimitorOrientation()
+	{
+		return DELIMITOR_ORIENTATION_NONE;
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()+picture.hashCode();
+	}
+
+
+	
+	/**
+	 * @return the pathSource.
+	 * @since 2.0.0
+	 */
+	public synchronized String getPathSource()
+	{
+		return pathSource;
+	}
+
+
+
+
+	/**
+	 * @param pathSource the pathSource to set.
+	 * @since 2.0.0
+	 */
+	public synchronized void setPathSource(String pathSource)
+	{
+		this.pathSource = pathSource;
+	}
+}
diff --git a/current/latexDraw/figures/Rhombus.java b/current/latexDraw/figures/Rhombus.java
new file mode 100644
index 0000000..9116588
--- /dev/null
+++ b/current/latexDraw/figures/Rhombus.java
@@ -0,0 +1,1127 @@
+package latexDraw.figures;
+
+import static java.lang.Math.toDegrees;
+
+import java.awt.*;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Area;
+import java.awt.geom.GeneralPath;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import latexDraw.figures.properties.BordersMovable;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines a rhombus.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Rhombus extends LaTeXDrawPolygon implements BordersMovable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The number of points of a rhombus */
+	public static final short NB_POINTS_RHOMBUS = 4;
+	
+	
+
+	/** 
+	 * The constructor by default
+	 */
+	public Rhombus(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), increaseMeter);
+	}
+	
+	
+	
+	
+	/**
+	 * @param f The figure to copy.
+	 * @param sameNumber True if the figure will have the same number of the copy.
+	 * @throws IllegalArgumentException If f is null.
+	 */
+	public Rhombus(Figure f, boolean sameNumber)
+	{
+		super(f, sameNumber);
+		
+		borders = new LaTeXDrawRectangle(getPoint(0), getPoint(1), getPoint(2), getPoint(3), false);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+		updateGravityCenter();
+		isBordersMovable = true;
+	}
+	
+
+	
+	/**
+	 * The constructor using four points
+	 * @param pt1 The top left point of rectangle containing the rhombus
+	 * @param pt2 The top right point of the rectangle containing the rhombus
+	 * @param pt3 The bottom left point
+	 * @param pt4 The bottom right point
+	 */
+	public Rhombus(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, 
+			LaTeXDrawPoint2D pt3, LaTeXDrawPoint2D pt4, boolean increaseMeter)
+	{
+		super(pt1, pt2, pt3, pt4, increaseMeter);
+		borders = new LaTeXDrawRectangle(pt1, pt2, pt3, pt4, false);
+		shape = getInsideOutsideOrMiddleBorders();
+		updateGravityCenter();
+		isBordersMovable = true;
+	}
+	
+	
+	
+	@Override
+	public boolean addPoint(LaTeXDrawPoint2D pt)
+	{
+		if(pts==null) pts = new Vector<LaTeXDrawPoint2D>();
+		
+		if(pt!=null)
+		{
+			Delimitor d = new Delimitor(pt);
+			d.setColorSet3();
+			delimiters.add(d);
+			pts.add(pt);
+			
+			return true;
+		}
+		
+		return false;
+	}
+
+	
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint(), SE = borders.getTheSEPoint();
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+		double dx=0, dy=0;
+		boolean changeFillStyle = false;
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		Color formerCol = g.getColor();
+		
+		if(hasDoubleBoundary)
+		{
+			Shape s0 = shape;
+			Shape s[] = getDbleBoundariesOutInOrMiddle(s0);
+			Shape s1, s2, s3;
+
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			{
+				s1 = s0;
+				s2 = s[0];
+				s3 = s[1];
+			}
+			else
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				{
+					s1 = s[0];
+					s2 = s0;
+					s3 = s[1];
+				}
+				else
+				{
+					s1 = s[0];
+					s2 = s[1];
+					s3 = s0;
+				}
+
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			{
+				if(hasShadow)
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(s1);
+					g.draw(s1);
+					g.translate(-dx, -dy);
+					
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+				}
+				
+				g.setColor(doubleColor);
+				g.setStroke(new BasicStroke((float)(doubleSep + thickness), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.draw(s2);
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, s3);
+				g.setColor(linesColor);
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.draw(s1);
+				g.draw(s3);
+			}
+			else
+			{
+				if(hasShadow)
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(s1);
+					g.draw(s1);
+					g.translate(-dx, -dy);
+					
+					g.setColor(interiorColor);
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.draw(s2);
+					
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+				}
+				
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_ROUND,
+							BasicStroke.JOIN_MITER, 1.f, new float[] { 0, (float)(thickness*2+doubleSep + dotSep) }, 0));
+				else
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep),
+							BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+							new float[] { blackDashLength, whiteDashLength }, 0));
+					
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, s2);
+				g.setColor(linesColor);
+				g.draw(s2);
+				g.setStroke(new BasicStroke((float)doubleSep, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.setColor(doubleColor);
+				g.draw(s2);
+			}				
+		}
+		else
+		{
+			if(hasShadow)
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.translate(dx, dy);
+				g.setColor(shadowColor);
+				g.fill(shape);
+				g.draw(shape);
+				g.translate(-dx, -dy);
+				
+				if(!isFilled)
+				{
+					changeFillStyle = true;
+					isFilled = true;
+				}
+				g.setColor(interiorColor);
+				g.draw(shape);
+			}
+			
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			else
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE) )
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND,
+							BasicStroke.JOIN_MITER, 1.f, new float[] { 0, thickness + dotSep }, 0));
+				}
+				else
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+							new float[] { blackDashLength, whiteDashLength }, 0));
+			
+			fillFigure(g, antiAlias, rendering, alphaInter, colorRendering,shape);
+			g.setColor(linesColor);
+			g.draw(shape);
+		}
+
+		g.setColor(formerCol);
+		
+		if(changeFillStyle) isFilled = false;
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+		
+		if(isSelected)
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+	}
+	
+	
+	
+	
+
+	/**
+	 * Allows to get the south-east point by taking into account
+	 * the angle of rotation.
+	 * @return The south-east point of the rotated rectangle
+	 */
+	@Override
+	public LaTeXDrawPoint2D getTheSERotatedPoint()
+	{
+		if(borders!=null)
+			return borders.getTheSERotatedPoint();
+		
+		return null;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to get the north-west point by taking into account
+	 * the angle of rotation.
+	 * @return The north-west point of the rotated rectangle
+	 */
+	@Override
+	public LaTeXDrawPoint2D getTheNWRotatedPoint()
+	{
+		if(borders!=null)
+			return borders.getTheNWRotatedPoint();
+		
+		return null;
+	}
+	
+	
+	
+	@Override
+	public synchronized void setBordersPosition(String doubleLinePosition)
+	{
+		super.setBordersPosition(doubleLinePosition);
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setLastPoint(LaTeXDrawPoint2D pt)
+	{
+		borders.setLastPoint(pt);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	@Override
+	public synchronized void setFirstPoint(LaTeXDrawPoint2D pt)
+	{
+		borders.setFirstPoint(pt);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	@Override
+	public synchronized void setRotationAngle(double theta)
+	{
+		if(!Double.isNaN(theta) && !Double.isInfinite(theta))
+		{
+			rotationAngle = theta%(Math.PI*2);
+			
+			if(borders!=null)
+				borders.setRotationAngle(rotationAngle);
+		}
+	}
+	
+	
+	
+
+	@Override
+	public void onDragged(Point formerPt, Point newPt) throws Exception
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		borders.onDragged(formerPt, newPt);
+		rotationAngle = borders.getRotationAngle();//update the angle(when rotation)
+		updateGravityCenter();//update centre of gravity when reshaping
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		LaTeXDrawPoint2D pt1 = borders.getPoint(0), pt2 = borders.getPoint(1);
+		LaTeXDrawPoint2D pt3 = borders.getPoint(2);
+		double Xcenter = (pt1.x+pt2.x)/2. - d.x, Ycenter = d.y - (pt1.y+pt3.y)/2.;
+		String add="", fillType=""; //$NON-NLS-1$ //$NON-NLS-2$
+		boolean isFilledWasChanged = false;
+		double threshold = 0.0001;
+		
+		if(hasShadow)
+		{
+			fillType+=",shadow=true";//$NON-NLS-1$
+			if((Math.toDegrees(shadowAngle)-Math.toDegrees(rotationAngle))!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				fillType+=",shadowangle="+(float)(Math.toDegrees(shadowAngle)-Math.toDegrees(rotationAngle));//$NON-NLS-1$
+			
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				fillType+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC),threshold);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				add += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+			if(!isFilled)
+			{
+				isFilled = true;
+				isFilledWasChanged = true;
+			}
+		}
+		
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) fillType=fillType+','+str;
+		
+		str = getPSTricksCodeLine(ppc);
+		if(str.length()>0) add=add+','+str;
+		
+		add+=",dimen="+bordersPosition;  //$NON-NLS-1$
+		
+		if(hasDoubleBoundary)
+		{
+			add+=",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc),threshold); //$NON-NLS-1$
+			
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name); 
+				}
+				add+= ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+			add+=",gangle="+(float)Math.toDegrees(-rotationAngle);//$NON-NLS-1$
+		
+		if(isFilledWasChanged) isFilled = false;
+		
+		return "\\psdiamond[linewidth=" + LaTeXDrawNumber.getCutNumber((thickness/ppc),threshold) +  //$NON-NLS-1$
+		add + fillType + "](" + LaTeXDrawNumber.getCutNumber((float)(Xcenter/ppc),threshold) + ',' +  //$NON-NLS-1$
+		LaTeXDrawNumber.getCutNumber((float)(Ycenter/ppc),threshold) + ")("  //$NON-NLS-1$
+			+ LaTeXDrawNumber.getCutNumber((float)((Math.abs(pt1.x-pt2.x)/2.)/ppc),threshold) + ',' + LaTeXDrawNumber.getCutNumber((float)((Math.abs(pt1.y-pt3.y)/2.)/ppc),threshold) + ')';
+	}
+	
+	
+
+	
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D p) 
+	{
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);
+		
+		if(isSelected && (borders.dNE.isIn(pt) || borders.dNW.isIn(pt) || borders.dSE.isIn(pt) || borders.dSW.isIn(pt) ||
+				borders.dS.isIn(pt)  || borders.dN.isIn(pt) || borders.dE.isIn(pt)  || borders.dW.isIn(pt)))
+			return true;
+		
+		GeneralPath gp;
+		
+		if(hasDoubleBoundary)
+		{
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 gp = getBorders(0, true);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 gp = getBorders(thickness*2+doubleSep, false);
+			else gp = getBorders((thickness*2+doubleSep)*2, false);
+
+			if(!gp.contains(pt))
+				return false;
+
+			if(isFilled || hasShadow || hasGradient())
+				return true;
+			
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				gp = getBorders((thickness*2+doubleSep)*2, true);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				gp = getBorders(doubleSep+2*thickness, true);
+			else gp = getBorders(0, true);
+		}
+		else
+		{
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 gp = getBorders(0, true);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 gp = getBorders(thickness, false);
+			else gp = getBorders(thickness*2, false);
+		
+			if(!gp.contains(pt))
+				return false;
+
+			if(isFilled || hasShadow || hasGradient())
+				return true;
+			
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 gp = getBorders(thickness*2, true);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 gp = getBorders(thickness, true);
+			else gp = getBorders(0, true);
+		}
+		
+		return !gp.contains(pt);
+	}
+	
+	
+	
+
+	
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Rhombus r = (Rhombus) super.clone();
+		
+		r.borders = new LaTeXDrawRectangle(r.getPoint(0), r.getPoint(1), r.getPoint(2), r.getPoint(3), false);
+		r.setThickness(thickness);
+		r.updateShape();
+	
+		return r;
+	}
+
+	
+	
+	
+	
+	@Override
+	public Shape createShape2D() 
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		Shape area = createNonRotatedShape2D();
+
+		if(rotationAngle % (Math.PI*2) != 0.)
+		{
+			double cx = (NW.x + SE.x) / 2., cy = (NW.y + SE.y) / 2.;
+			double c2x = Math.cos(rotationAngle) * cx - Math.sin(rotationAngle)* cy;
+			double c2y = Math.sin(rotationAngle) * cx + Math.cos(rotationAngle)* cy;
+
+			AffineTransform at = AffineTransform.getTranslateInstance(cx - c2x, cy - c2y);
+			at.rotate(rotationAngle);
+			area = at.createTransformedShape(area);
+		}
+
+		return area;
+	}
+
+	
+	
+	
+	
+	@Override
+	public Shape createNonRotatedShape2D() 
+	{
+		Shape area;
+		Shape s = getInsideOutsideOrMiddleBorders();
+
+		if(hasDoubleBoundary)
+		{
+			Shape[] s2 = getDbleBoundariesOutInOrMiddle(s);
+			Shape min;
+			Shape max;
+
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			{
+				max = s;
+				min = s2[1];
+			}
+			else
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				{
+					max = s2[0];
+					min = s2[1];
+				}
+				else
+				{
+					max = s2[0];
+					min = s;
+				}
+
+			area = new Area(max);
+			((Area)area).exclusiveOr(new Area(min));
+		}
+		else
+			area = s;
+		
+		return area;
+	}
+
+	
+	
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow = true;
+		interiorColor = (Color) ois.readObject();
+		lineStyle = (String) ois.readObject();
+		rotationAngle = ois.readDouble();
+		thickness = ois.readFloat();
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		pts = (Vector) ois.readObject();
+		borders = (LaTeXDrawRectangle) ois.readObject();
+		
+		delimiters = new Vector();
+		for(int i=0, size = pts.size();i<size; i++)
+			delimiters.add(new Delimitor(pts.elementAt(i)));
+			
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0)//$NON-NLS-1$
+		{
+			hasDoubleBoundary = ois.readBoolean();
+			doubleColor = (Color)ois.readObject();
+			doubleSep = ois.readDouble();
+			bordersPosition = (String)ois.readObject();
+			if(!(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0)) //$NON-NLS-1$
+				ois.readBoolean();
+			hatchingAngle = ois.readDouble();
+			hatchingColor = (Color)ois.readObject();
+			hatchingStyle = (String)ois.readObject();
+			hatchingWidth = ois.readFloat();
+			
+			if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6") < 0)//$NON-NLS-1$
+			{
+				if(hatchingStyle.equals(DECREPETED_FILL_CROSS))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_CROSSHATCH;
+				else if(hatchingStyle.equals(DECREPETED_FILL_HORIZ))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_HLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_VERT))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_VLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_NO))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_NONE;
+			}
+		}
+		else
+		{
+			hasDoubleBoundary  = DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor = DEFAULT_DOUBLE_COLOR;
+			doubleSep   = DEFAULT_DOUBLESEP;
+			bordersPosition = DEFAULT_BORDERS_POSITION;
+			hatchingAngle = DEFAULT_HATCH_ANGLE;
+			hatchingColor = DEFAULT_HATCH_COL;
+			hatchingStyle = DEFAULT_HATCH_STYLE;
+			hatchingWidth = DEFAULT_HATCH_WIDTH;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+			hatchingSep = ois.readDouble();
+		else
+			hatchingSep = DEFAULT_HATCH_SEP;
+		
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+
+
+	@Override
+	protected GeneralPath getBorders(double gap, boolean into)
+	{
+		if(gap==0.)
+			return getMiddleBorders();
+		
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		GeneralPath gp = new GeneralPath();
+		
+		if(pt1.x<pt2.x+thickness && pt1.x>pt2.x-thickness)
+		{
+			gp.moveTo((float)(pt1.x+pt2.x)/2f, (float)pt1.y);
+			gp.lineTo((float)(pt1.x+pt2.x)/2f, (float)pt2.y);
+		}
+		else
+		{
+			if(!into) 
+				gap*=-1;
+			
+			LaTeXDrawPoint2D gc = getGravityCenter();
+			LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D((pt1.x+pt2.x)/2., pt1.y);
+			LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D(pt2.x, (pt1.y+pt2.y)/2.);
+			LaTeXDrawPoint2D p3 = new LaTeXDrawPoint2D((pt1.x+pt2.x)/2., pt2.y);
+			double cornerGap1 = getCornerGap(gc, p1, p2, gap)/2.;
+			double cornerGap2 = getCornerGap(gc, p2, p3, gap)/2.;
+			
+		    if(p2.x<p3.x)
+		    	cornerGap2*=-1;
+		    
+		    if(p1.y>p2.y)
+		    	cornerGap1*=-1;
+		    
+		    gp.moveTo((float)p1.x, (float)(pt1.y + cornerGap1));
+		    gp.lineTo((float)(pt2.x - cornerGap2), (float)p2.y);
+		    gp.lineTo((float)p1.x, (float)(pt2.y - cornerGap1));
+		    gp.lineTo((float)(pt1.x + cornerGap2), (float)p2.y);
+		    gp.closePath();
+		}
+		
+		return gp;
+	}
+	
+	
+	
+
+	public GeneralPath getInsideBorders()
+	{
+		return getBorders(thickness, true);
+	}
+
+
+	
+	
+	
+	public GeneralPath getOutsideBorders()
+	{
+		return getBorders(thickness, false);
+	}
+
+	
+	
+
+	
+	public GeneralPath getMiddleBorders()
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		GeneralPath path = new GeneralPath();
+		
+		path.moveTo((float)(pt1.x+pt2.x)/2f, (float)pt2.y);
+		path.lineTo((float)pt1.x, (float)(pt2.y+pt1.y)/2f);
+		path.lineTo((float)(pt1.x+pt2.x)/2f, (float)pt1.y);
+		path.lineTo((float)pt2.x, (float)(pt2.y+pt1.y)/2f);
+		path.closePath();
+
+		return path;
+	}
+
+
+	
+	
+	@Override
+	public GeneralPath getInsideOutsideOrMiddleBorders()
+	{
+		GeneralPath path;
+
+		if (bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			path = getInsideBorders();
+		else
+			if (bordersPosition.equals(PSTricksConstants.BORDERS_OUTSIDE))
+				path = getOutsideBorders();
+			else
+				path = getMiddleBorders();
+
+		return path;
+	}
+	
+	
+	
+	
+	
+	
+	@Override
+	public GeneralPath[] getDbleBoundariesOutside(Shape classicBord)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		GeneralPath[] sx = new GeneralPath[2];
+		
+		if(pt1.x<pt2.x+thickness && pt1.x>pt2.x-thickness)
+		{
+			sx[0] = new GeneralPath(classicBord);
+			sx[1] = new GeneralPath(classicBord);
+		}
+		else
+		{
+			sx[0] = getBorders(3*thickness+2*doubleSep, false);
+			sx[1] = getBorders(2*thickness+doubleSep, false);
+		}
+		
+		return sx;
+	}
+
+
+	
+	
+
+	@Override
+	public GeneralPath[] getDbleBoundariesInside(Shape classicBord)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		GeneralPath[] sx = new GeneralPath[2];
+		
+		if(pt1.x<pt2.x+thickness && pt1.x>pt2.x-thickness)
+		{
+			sx[0] = new GeneralPath(classicBord);
+			sx[1] = new GeneralPath(classicBord);
+		}
+		else
+		{
+			sx[1] = getBorders(3*thickness+2*doubleSep, true);
+			sx[0] = getBorders(2*thickness+doubleSep, true);
+		}
+		
+		return sx;
+	}
+
+
+	
+	
+
+	@Override
+	public GeneralPath[] getDbleBoundariesMiddle(Shape classicBord)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		GeneralPath[] sx = new GeneralPath[2];
+		
+		if(pt1.x<pt2.x+thickness && pt1.x>pt2.x-thickness)
+		{
+			sx[0] = new GeneralPath(classicBord);
+			sx[1] = new GeneralPath(classicBord);
+		}
+		else
+		{
+			sx[0] = getBorders(thickness+doubleSep, false);
+			sx[1] = getBorders(thickness+doubleSep, true);
+		}
+		
+		return sx;
+	}
+	
+	
+	
+	@Override
+	public GeneralPath[] getDbleBoundariesOutInOrMiddle(Shape classicBord)
+	{
+		GeneralPath[] path;
+
+		if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			path = getDbleBoundariesInside(classicBord);
+		else
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_OUTSIDE))
+				path = getDbleBoundariesOutside(classicBord);
+			else
+				path = getDbleBoundariesMiddle(classicBord);
+
+		return path;
+	}
+
+	
+	
+	@Override
+	public void shift(double shiftX,double shiftY) 
+	{
+		if(shiftX==0 && shiftY==0) return ;
+
+		borders.shift(shiftX, shiftY);
+		updateShape();
+	}
+
+	
+	
+	
+	@Override
+	public synchronized void setThickness(float val)
+	{
+		if(!Double.isInfinite(val) && !Double.isNaN(val) && val>0)
+		{
+			thickness = val;
+			shape = getInsideOutsideOrMiddleBorders();
+			borders.setThickness(thickness);
+		}
+	}
+	
+	
+	
+	@Override
+	@Deprecated
+	public void updateBorders()
+	{
+		/*
+		 * Update the borders change the points of the rhombus. 
+		 */
+	}
+	
+	
+	
+	
+	@Override
+	public Shape createShadowShape()
+	{
+		if(!canHaveShadow || !hasShadow) return shape;
+		
+		Shape shadowS;
+		
+		if(hasDoubleBoundary)
+		{
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 shadowS = getBorders(0, true);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 shadowS = getBorders(thickness*2+doubleSep, false);
+			else shadowS = getBorders((thickness*2+doubleSep)*2, false);
+		}
+		else
+		{
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 shadowS = getBorders(0, false);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 shadowS = getBorders(thickness, false);
+			else shadowS = getBorders(thickness*2, false);
+		}
+		
+		double dx=0, dy=0;
+		LaTeXDrawPoint2D cg = getGravityCenter();
+		LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+		AffineTransform at = new AffineTransform();
+		
+		shadowCg.setLocation(cg.x+shadowSize, cg.y);
+		shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+		dx = shadowCg.x-cg.x;
+		dy = cg.y-shadowCg.y;
+		at.translate(dx, dy);
+		
+		return at.createTransformedShape(shadowS);
+	}
+	
+	
+	
+	
+	@Override
+	public String getPSTricksCodeFilling(float ppc)
+	{
+		String str="fillstyle=";//$NON-NLS-1$
+		double threshold = 0.001;
+		
+		if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_NONE))
+		{
+			if(isFilled)
+				str += "solid"; //$NON-NLS-1$
+			else str = "";//$NON-NLS-1$
+		}
+		else
+			if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_GRADIENT))
+			{
+				str+= "gradient,gradlines=2000";//$NON-NLS-1$
+				
+				if(!gradientStartColor.equals(PSTricksConstants.DEFAULT_GRADIENT_START_COLOR))
+				{
+					String name = DviPsColors.getColourName(gradientStartColor);
+					if(name==null)
+					{
+						name = "color"+number+'g';//$NON-NLS-1$
+						DviPsColors.addUserColour(gradientStartColor, name); 
+					}
+					str += ",gradbegin=" + name; //$NON-NLS-1$
+				}
+				
+				if(!gradientEndColor.equals(PSTricksConstants.DEFAULT_GRADIENT_END_COLOR))
+				{
+					String name = DviPsColors.getColourName(gradientEndColor);
+					if(name==null)
+					{
+						name = "color"+number+'f';//$NON-NLS-1$
+						DviPsColors.addUserColour(gradientEndColor, name); 
+					}
+					str += ",gradend=" + name; //$NON-NLS-1$
+				}
+				
+				if(gradientMidPoint!=PSTricksConstants.DEFAULT_GRADIENT_MID_POINT)
+					str+=",gradmidpoint="+(float)gradientMidPoint;//$NON-NLS-1$
+				
+				if(((toDegrees(gradientAngle)-Math.toDegrees(rotationAngle))%360.)!=PSTricksConstants.DEFAULT_GRADIENT_ANGLE)
+					str+=",gradangle="+(float)((toDegrees(gradientAngle)-Math.toDegrees(rotationAngle))%360.);//$NON-NLS-1$
+			}
+			else
+			{
+				if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH))
+					str += "crosshatch"; //$NON-NLS-1$
+				else
+					if (hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_HLINES))
+						str += "hlines"; //$NON-NLS-1$
+					else
+						str += "vlines"; //$NON-NLS-1$
+	
+				if(isFilled)
+					str += "*"; //$NON-NLS-1$
+	
+				str += ",hatchwidth=" + LaTeXDrawNumber.getCutNumber(hatchingWidth/PPC,threshold) + ",hatchangle=" + //$NON-NLS-1$ //$NON-NLS-2$
+						(float)((-Math.toDegrees(rotationAngle))%360.);
+				//TODO hatching angle
+				if(!hatchingColor.equals(PSTricksConstants.DEFAULT_HATCHING_COLOR))
+				{
+					String name = DviPsColors.getColourName(hatchingColor);
+					if(name==null)
+					{
+						name = "color"+number+'c';//$NON-NLS-1$
+						DviPsColors.addUserColour(hatchingColor, name); 
+					}
+					str += ",hatchcolor=" + name; //$NON-NLS-1$
+				}
+			}
+		
+		if(isFilled)
+		{
+			if (!interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR))
+			{
+				String name = DviPsColors.getColourName(interiorColor);
+				if(name==null)
+				{
+					name = "color"+number+'b';//$NON-NLS-1$
+					DviPsColors.addUserColour(interiorColor, name); 
+				}
+				str += ",fillcolor=" + name; //$NON-NLS-1$
+			}
+		}
+		
+		return str;
+	}
+
+
+
+
+	@Override
+	@Deprecated
+	public void updateBorders(LaTeXDrawPoint2D pt)
+	{
+		// Nothing must be done.
+	}
+	
+	
+	
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		borders.mirrorHorizontal(origin);
+		updateShape();
+	}
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		borders.mirrorVertical(origin);
+		updateShape();
+	}
+	
+	
+	
+	@Override
+	public synchronized LaTeXDrawPoint2D getLastPoint()
+	{
+		return borders.getLastPoint();
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		borders.updateToGrid(grid);
+		updateShape();
+	}
+
+
+
+
+	@Override
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound)
+	{
+		borders.rescaleX(formerX, newX, percent, bound);
+		updateShape();
+	}
+
+
+
+
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound)
+	{
+		borders.rescaleY(formerY, newY, percent, bound);
+		updateShape();
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return (int)(super.hashCode()/1.5);
+	}
+}
diff --git a/current/latexDraw/figures/Square.java b/current/latexDraw/figures/Square.java
new file mode 100644
index 0000000..0f342fb
--- /dev/null
+++ b/current/latexDraw/figures/Square.java
@@ -0,0 +1,910 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.geom.Area;
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines a square.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/16/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Square extends LaTeXDrawRectangle
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** The width of the square */
+	protected double width;
+	
+	
+	
+	/**
+	 * @param f The figure to copy.
+	 * @param sameNumber If the new figure must have the same id than the copy.
+	 */
+	public Square(Figure f, boolean sameNumber)
+	{
+		super(f, sameNumber);
+		width = f.getTheSEPoint().x - f.getTheNWPoint().x;
+		updateGravityCenter();
+		setThickness(thickness);
+	}
+
+
+
+
+	/**
+	 * The constructor by default
+	 */
+	public Square(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), increaseMeter);
+	}
+	
+	
+	
+	/**
+	 * The constructor taking the four points of the square
+	 * @param pt1 The first point of the square
+	 * @param pt2 The second point of the square
+	 * @param pt3 The third point of the square
+	 * @param pt4 The fourth point of the square
+	 */
+	public Square(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, LaTeXDrawPoint2D pt3, LaTeXDrawPoint2D pt4, boolean increaseMeter)
+	{
+		super(pt1, pt2, pt3, pt4, increaseMeter);
+		width = Math.abs(pt1.x-pt2.x);
+		updateGravityCenter();
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Sets the width of the square.
+	 * @param w The new width of the square.
+	 * @throws IllegalArgumentException if w<0.
+	 */
+	public synchronized void setWidth(double w)
+	{
+		if(w<=0)
+			throw new IllegalArgumentException();
+		
+		width = w;
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, boolean drawBorders, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+
+		if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+		else 
+		if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER,
+					1.f, new float[]{0,thickness+dotSep}, 0));
+		else
+		if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+			g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER,
+					1.f, new float[]{blackDashLength, whiteDashLength}, 0));
+		
+		
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+		double dx=0, dy=0;
+		boolean changeFillStyle = false;
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		if(drawBorders)
+		{
+			Color formerCol = g.getColor();
+
+			if(hasDoubleBoundary)
+			{
+				Shape s0 = shape;
+				Shape s[] = getDbleBoundariesOutInOrMiddle(s0);
+				Shape s1, s2, s3;
+
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				{
+					s1 = s0;
+					s2 = s[0];
+					s3 = s[1];
+				}
+				else
+					if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+					{
+						s1 = s[0];
+						s2 = s0;
+						s3 = s[1];
+					}
+					else
+					{
+						s1 = s[0];
+						s2 = s[1];
+						s3 = s0;
+					}
+
+				if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					if(hasShadow)
+					{
+						g.translate(dx, dy);
+						g.setColor(shadowColor);
+						g.fill(s1);
+						g.draw(s1);
+						g.translate(-dx, -dy);
+						
+						if(!isFilled)
+						{
+							changeFillStyle = true;
+							isFilled = true;
+						}
+					}
+					g.setColor(doubleColor);
+					Area area = new Area(s1);
+					area.subtract(new Area(s3));
+					g.fill(area);
+					fillFigure(g, antiAlias, rendering, alphaInter, colorRendering,s3);
+					g.setColor(linesColor);
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.draw(s1);
+					g.draw(s3);
+				}
+				else
+				{
+					if(hasShadow)
+					{
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+						g.translate(dx, dy);
+						g.setColor(shadowColor);
+						g.fill(s1);
+						g.draw(s1);
+						g.translate(-dx, -dy);
+						g.setColor(interiorColor);
+						g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+						g.draw(s2);
+						
+						
+						if(!isFilled)
+						{
+							changeFillStyle = true;
+							isFilled = true;
+						}
+					}
+
+					if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+						g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_ROUND,
+								BasicStroke.JOIN_MITER, 1.f, new float[]
+								{ 0, (float)(thickness*2+doubleSep + dotSep) }, 0));
+					else
+						g.setStroke(new BasicStroke((float)(thickness*2+doubleSep),
+								BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+								new float[] { blackDashLength, whiteDashLength }, 0));
+						
+					fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, s2);
+					g.setColor(linesColor);
+					g.draw(s2);
+					g.setStroke(new BasicStroke((float)doubleSep, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.setColor(doubleColor);
+					g.draw(s2);
+				}				
+			}
+			else
+			{
+				Shape shape2 = shape;
+				if(hasShadow)
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(shape);
+					g.draw(shape);
+					g.translate(-dx, -dy);
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+					g.setColor(interiorColor);
+					g.draw(shape);
+				}
+
+				if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				else
+					if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+					{
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND,
+								BasicStroke.JOIN_MITER, 1.f, new float[]{ 0, thickness + dotSep }, 0));
+					}
+					else
+						g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+								new float[] { blackDashLength, whiteDashLength }, 0));
+				
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering,shape2);
+				g.setColor(linesColor);
+				g.draw(shape);
+			}
+
+			if(changeFillStyle) isFilled = false;
+			g.setColor(formerCol);
+		}
+		
+		if(isSelected)
+		{
+			dNW.draw(g);
+			dSE.draw(g);
+			dNE.draw(g);
+			dSW.draw(g);
+		}
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering) 
+	{
+		draw(g, true, antiAlias, rendering, alphaInter, colorRendering);
+	}
+	
+	
+	
+	
+	
+	
+	@Override
+	public void onDragged(Point formerPt, Point newPt)
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		if(dSelected!=null)
+		{
+			if(isOnRotation)
+				rotate(formerPt, newPt);
+			else
+			{
+				LaTeXDrawPoint2D newPt2 = rotateInvertPoint(newPt);
+				LaTeXDrawPoint2D oldGc = (LaTeXDrawPoint2D)gravityCenter.clone();
+				
+				if(dSelected.getCenter()==pts.elementAt(0))
+					setFirstPoint(newPt2);
+				else
+					if(dSelected.getCenter()==pts.elementAt(1))
+						setSecondPoint(newPt2);
+					else
+						if(dSelected.getCenter()==pts.elementAt(2))
+							setThirdPoint(newPt2);
+						else
+							setLastPoint(newPt2);
+	
+				width = Math.abs(pts.elementAt(0).x 
+								- pts.elementAt(1).x);
+				
+				if(rotationAngle!=0)
+					recenterDraggedOnRotation(oldGc);
+				
+				updateGravityCenter();		
+			}
+		}
+		else //	 If the user has clicked on the line
+		{
+			shift(formerPt, newPt);		
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+	}
+	
+	
+	
+	
+
+	@Override
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound)
+	{
+		if(percent==1.) return ;
+		
+		int i, size = getNbPoints();
+
+		if(size>0)
+		{
+			LaTeXDrawPoint2D bNW = bound.getTheNWPoint(), bSE = bound.getTheSEPoint(),farest,p;
+			
+			if(Math.abs(newX-bSE.x)<Math.abs(newX-bNW.x))
+				  farest = bNW;
+			else  farest = bSE;
+			
+			for(i=0; i<size; i++)
+			{// We rescale each point
+				p = getPoint(i);
+				p.x = farest.x+(p.x-farest.x)*percent;				
+			}
+			
+			LaTeXDrawPoint2D pt1 = getPoint(0), pt4 = getPoint(3);
+			width = Math.abs(pt1.x-pt4.x);
+			
+			if(pt1.x<pt4.x)
+			{
+				if(pt1.y<pt4.y)
+				{
+					setThirdPoint(new LaTeXDrawPoint2D(pt1.x,pt1.y+width));
+					setLastPoint(pt1.x+width, pt1.y+width);
+				}
+				else
+				{
+					setThirdPoint(new LaTeXDrawPoint2D(pt1.x,pt1.y-width));
+					setLastPoint(pt1.x+width, pt1.y-width);
+				}
+			}
+			else
+				if(pt1.y<pt4.y)
+				{
+					setThirdPoint(new LaTeXDrawPoint2D(pt1.x,pt1.y+width));
+					setLastPoint(pt1.x-width, pt1.y+width);
+				}
+				else
+				{
+					setThirdPoint(new LaTeXDrawPoint2D(pt1.x,pt1.y-width));
+					setLastPoint(pt1.x-width, pt1.y-width);
+				}
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+	}
+	
+	
+	
+	
+
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound)
+	{
+		if(percent==1.) return ;
+		
+		int i, size = getNbPoints();
+		
+		if(size>0)
+		{
+			LaTeXDrawPoint2D NW = bound.getTheNWPoint(), SE = bound.getTheSEPoint(),farest,p;
+	
+			if(Math.abs(newY-SE.y)<Math.abs(newY-NW.y))
+				  farest = NW;
+			else  farest = SE;
+			
+			for(i=0; i<size; i++)
+			{// We rescale each point
+				p = getPoint(i);
+				p.y = farest.y+(p.y-farest.y)*percent;
+			}
+			LaTeXDrawPoint2D pt1 = getPoint(0), pt4 = getPoint(3);
+			width = Math.abs(pt1.y-pt4.y);
+			
+			if(pt1.x<pt4.x)
+			{
+				if(pt1.y<pt4.y)
+				{
+					setSecondPoint(new LaTeXDrawPoint2D(pt1.x+width,pt1.y));
+					setLastPoint(pt1.x+width, pt1.y+width);
+				}
+				else
+				{
+					setSecondPoint(new LaTeXDrawPoint2D(pt1.x-width,pt1.y));
+					setLastPoint(pt1.x+width, pt1.y-width);
+				}
+			}
+			else
+				if(pt1.y<pt4.y)
+				{
+					setSecondPoint(new LaTeXDrawPoint2D(pt1.x+width,pt1.y));
+					setLastPoint(pt1.x-width, pt1.y+width);
+				}
+				else
+				{
+					setSecondPoint(new LaTeXDrawPoint2D(pt1.x-width,pt1.y));
+					setLastPoint(pt1.x-width, pt1.y-width);
+				}
+			shape = getInsideOutsideOrMiddleBorders();
+		}
+	}
+	
+	
+	
+	@Override
+	public synchronized void setFirstPoint(double x, double y)
+	{
+		setFirstPoint(new LaTeXDrawPoint2D(x,y));
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setLastPoint(double x, double y)
+	{
+		setLastPoint(new LaTeXDrawPoint2D(x,y));
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setFirstPoint(LaTeXDrawPoint2D pt)
+	{	
+		// As the this second point pt doesn't necessary
+		// creates a square but a rectangle, we need to change
+		// this point in the goal that it allows to create a square
+		LaTeXDrawPoint2D third = getPoint(2), second = getPoint(1);
+		LaTeXDrawPoint2D first = getPoint(0), fourth = getPoint(3);
+
+		width = Math.abs(second.x-pt.x);
+		double x, y;
+		
+		if(fourth.y<pt.y)
+			   y = fourth.y + width;
+		else   y = fourth.y - width;
+		
+		if(fourth.x<pt.x)
+			   x = fourth.x + width;
+		else   x = fourth.x - width;
+		
+		// This new point allows to create a square and not a rectangle
+		first.setLocation(x, y);
+		third.x = x;
+		second.y = y;
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setLastPoint(LaTeXDrawPoint2D pt)
+	{	
+		// As the this second point pt doesn't necessary
+		// creates a square but a rectangle, we need to change
+		// this point in the goal that it allows to create a square
+		LaTeXDrawPoint2D third = getPoint(2), fourth = getPoint(3), second = getPoint(1);
+		LaTeXDrawPoint2D first = getPoint(0);
+		
+		width = Math.abs(first.x-pt.x);
+		double x, y;
+		
+		if(first.y<pt.y)
+			   y = first.y + width;
+		else   y = first.y - width;
+		
+		if(first.x<pt.x)
+			   x = first.x + width;
+		else   x = first.x - width;
+		
+		// This new point allows to create a square and not a rectangle
+		fourth.setLocation(x, y);
+		third.y = y;
+		second.x = x;
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	/**
+	 * This method allows to set the third point of the square
+	 * @param pt The new third point
+	 */
+	public synchronized void setThirdPoint(LaTeXDrawPoint2D pt)
+	{
+		// As the this second point pt doesn't necessary
+		// creates a square but a rectangle, we need to change
+		// this point in the goal that it allows to create a square
+		LaTeXDrawPoint2D third = getPoint(2), fourth = getPoint(3), second = getPoint(1);
+		LaTeXDrawPoint2D first = getPoint(0);
+
+		width = Math.abs(fourth.x-pt.x);
+		double x, y;
+		
+		if(second.y<pt.y)
+			   y = second.y + width;
+		else   y = second.y - width;
+		
+		if(second.x<pt.x)
+			   x = second.x + width;
+		else   x = second.x - width;
+		
+		// This new point allows to create a square and not a rectangle
+		third.setLocation(x, y);
+		fourth.y = y;
+		first.x = x;
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	/**
+	 * This method allows to set the fourth point of the square
+	 * @param pt The new fourth point
+	 */
+	public synchronized void setSecondPoint(LaTeXDrawPoint2D pt)
+	{
+		// As the this second point pt doesn't necessary
+		// creates a square but a rectangle, we need to change
+		// this point in the goal that it allows to create a square
+		LaTeXDrawPoint2D third = getPoint(2), fourth = getPoint(3), second = getPoint(1);
+		LaTeXDrawPoint2D first = getPoint(0);
+		
+		width = Math.abs(first.x-pt.x);
+		double x, y;
+		
+		if(third.y<pt.y)
+			   y = third.y + width;
+		else   y = third.y - width;
+		
+		if(third.x<pt.x)
+			   x = third.x + width;
+		else   x = third.x - width;
+		
+		// This new point allows to create a square and not a rectangle
+		second.setLocation(x, y);
+		first.y  = y;
+		fourth.x = x;
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D pt1 = pts.elementAt(0);
+		LaTeXDrawPoint2D pt2 = pts.elementAt(1);
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		boolean isFilledWasChanged = false;
+		double x, y;
+		String add="", addBegin="", addEnd="", fillType=""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		double threshold = 0.001;
+		
+		y = pt1.y>pt2.y ? pt1.y - width : pt1.y;
+		x = pt1.x>pt2.x ? pt1.x - width : pt1.x;
+		x = x - d.x;
+		y = d.y - y;
+		
+		if(hasShadow)
+		{
+			fillType+=",shadow=true";//$NON-NLS-1$
+			if(Math.toDegrees(shadowAngle)!=PSTricksConstants.DEFAULT_SHADOW_ANGLE)
+				fillType+=",shadowangle="+(float)Math.toDegrees(shadowAngle);//$NON-NLS-1$
+			
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				fillType+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC),threshold);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				add += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+			if(!isFilled)
+			{
+				isFilled = true;
+				isFilledWasChanged = true;
+			}
+		}
+
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) fillType=fillType+','+str;
+		
+		str = getPSTricksCodeLine(ppc);
+		if(str.length()>0) add=add+','+str;
+		
+		if(isRound)
+			add+=",framearc="+(float)frameArc; //$NON-NLS-1$
+		
+		if(rotationAngle%(Math.PI*2)!=0.)
+		{
+			double angle = -Math.toDegrees(rotationAngle);
+			double cx = (gravityCenter.x-d.x)/ppc;
+			double cy = (d.y-gravityCenter.y)/ppc;
+			double x2 = -Math.cos(-rotationAngle)*cx+
+						Math.sin(-rotationAngle)*cy+cx;
+			double y2 =  -Math.sin(-rotationAngle)*cx-
+						Math.cos(-rotationAngle)*cy+cy;
+			
+			if(Math.abs(x2) < 0.001) x2 = 0;
+			if(Math.abs(y2) < 0.001) y2 = 0;
+			
+			addBegin +="\\rput{"+(float)angle+ "}("+(float)x2+','+(float)y2+"){"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			addEnd = "}"; //$NON-NLS-1$
+		}
+		
+		add+=",dimen="+bordersPosition;  //$NON-NLS-1$
+		
+		if(hasDoubleBoundary)
+		{
+			add+=",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc),threshold); //$NON-NLS-1$
+			
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name); 
+				}
+				add+= ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}
+		
+		if(isFilledWasChanged) isFilled = false;
+		
+		return addBegin+"\\psframe[linewidth=" + LaTeXDrawNumber.getCutNumber(thickness/ppc,threshold) +  //$NON-NLS-1$
+				add + fillType+"](" + LaTeXDrawNumber.getCutNumber((float)((x+width)/ppc),threshold) + ',' +  //$NON-NLS-1$
+				LaTeXDrawNumber.getCutNumber((float)(y/ppc),threshold) + ")("  //$NON-NLS-1$
+				+ LaTeXDrawNumber.getCutNumber((float)(x/ppc),threshold) + ',' + LaTeXDrawNumber.getCutNumber((float)((y-width)/ppc),threshold) + ')'+addEnd;
+	}
+
+	
+	
+	
+	@Override
+	public Square clone() throws CloneNotSupportedException
+	{
+		Square s = (Square) super.clone();
+		s.width = width;
+
+		return s;
+	}
+	
+	
+	
+	
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		interiorColor = (Color) ois.readObject();
+		lineStyle = (String) ois.readObject();
+		rotationAngle = ois.readDouble();
+		float thick = ois.readFloat();
+		thickness = DEFAULT_THICKNESS;
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		pts = (Vector) ois.readObject();
+		isRound = ois.readBoolean();
+		frameArc = ois.readDouble();
+		width = ois.readDouble();
+		
+		if(pts.size()!=NB_POINTS_FRAME)
+			throw new ArrayIndexOutOfBoundsException();
+		
+		dNW = new Delimitor(pts.firstElement());
+		dNE = new Delimitor(pts.elementAt(1));
+		dSW = new Delimitor(pts.elementAt(2));
+		dSE = new Delimitor(pts.elementAt(3));
+
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0)//$NON-NLS-1$
+		{
+			hasDoubleBoundary = ois.readBoolean();
+			doubleColor = (Color)ois.readObject();
+			doubleSep = ois.readDouble();
+			bordersPosition = (String)ois.readObject();
+			if(!(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0)) //$NON-NLS-1$
+				ois.readBoolean();
+			hatchingAngle = ois.readDouble();
+			hatchingColor = (Color)ois.readObject();
+			hatchingStyle = (String)ois.readObject();
+			hatchingWidth = ois.readFloat();
+			
+			if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6") < 0)//$NON-NLS-1$
+			{
+				if(hatchingStyle.equals(DECREPETED_FILL_CROSS))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_CROSSHATCH;
+				else if(hatchingStyle.equals(DECREPETED_FILL_HORIZ))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_HLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_VERT))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_VLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_NO))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_NONE;
+			}
+		}
+		else
+		{
+			hasDoubleBoundary  = DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor = DEFAULT_DOUBLE_COLOR;
+			doubleSep   = DEFAULT_DOUBLESEP;
+			bordersPosition = DEFAULT_BORDERS_POSITION;
+			hatchingAngle = DEFAULT_HATCH_ANGLE;
+			hatchingColor = DEFAULT_HATCH_COL;
+			hatchingStyle = DEFAULT_HATCH_STYLE;
+			hatchingWidth = DEFAULT_HATCH_WIDTH;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+			hatchingSep = ois.readDouble();
+		else
+			hatchingSep = DEFAULT_HATCH_SEP;
+		
+		canHaveShadow = true;
+		setThickness(thick);
+		updateStyleOfDelimitors();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+
+
+	
+
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D p)
+	{
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);
+		
+		if(isSelected() && (dNW.isIn(pt) || dSE.isIn(pt) || dSW.isIn(pt) || dNE.isIn(pt)))
+			return true;
+
+		LaTeXDrawPoint2D NW = getTheNWNonRotatedBoundPoint();
+		LaTeXDrawPoint2D SE = getTheSENonRotatedBoundPoint();
+		Rectangle2D.Double s = new Rectangle2D.Double(NW.x, NW.y, 
+				Math.abs(NW.x - SE.x), Math.abs(NW.y - SE.y));
+
+		if (!s.contains(pt))
+			return false;
+
+		if(isFilled || hasShadow ||  hasGradient())
+			return true;
+
+		Shape s2;
+
+		if (hasDoubleBoundary)
+			s2 = new Rectangle2D.Double(NW.x + thickness * 2 + doubleSep,
+					NW.y + thickness * 2 + doubleSep, Math.abs(NW.x - SE.x)
+					- 4 * thickness - 2 * doubleSep, Math.abs(NW.y - SE.y) - 4 * thickness - 2 * doubleSep);
+		else
+			s2 = new Rectangle2D.Double(NW.x + thickness, NW.y + thickness,
+					Math.abs(NW.x - SE.x) - 2 * thickness, Math.abs(NW.y - SE.y) - 2 * thickness);
+
+		return !s2.contains(pt);
+	}
+
+
+	
+	
+	@Override
+	public void onClick(Point p)
+	{
+		updateNSEWDelimitors();
+		
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);
+		
+		if(dSE.isIn(pt))      dSelected = dSE;
+		else if(dNW.isIn(pt)) dSelected = dNW;
+		else if(dNE.isIn(pt)) dSelected = dNE;
+		else if(dSW.isIn(pt)) dSelected = dSW;
+		isSelected = true;
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		LaTeXDrawPoint2D pt0 = getPoint(0);
+		LaTeXDrawPoint2D pt1 = getPoint(1);
+		LaTeXDrawPoint2D pt2 = getPoint(2);
+		LaTeXDrawPoint2D pt3 = getPoint(3);
+		
+		pt0.setLocation(grid.getTransformedPointToGrid(pt0, false));
+		pt1.setLocation(grid.getTransformedPointToGrid(pt1, false));
+		width = Math.abs(pt0.x-pt1.x);
+		pt2.x = pt0.x;
+		pt2.y = pt0.y + width;
+		pt3.x = pt1.x;
+		pt3.y = pt1.y + width;
+		
+		dNW.setCoordinates(pt0);
+		dNE.setCoordinates(pt1);
+		dSW.setCoordinates(getPoint(2));
+		dSE.setCoordinates(getPoint(3));
+		
+		updateShape();
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()+(int)width;
+	}
+}
diff --git a/current/latexDraw/figures/Text.java b/current/latexDraw/figures/Text.java
new file mode 100644
index 0000000..ab53a36
--- /dev/null
+++ b/current/latexDraw/figures/Text.java
@@ -0,0 +1,2168 @@
+package latexDraw.figures;
+
+import java.awt.*;
+import java.awt.font.FontRenderContext;
+import java.awt.font.TextLayout;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
+import java.util.Vector;
+
+import javax.swing.JComboBox;
+
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.DrawContainer;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines a text.
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Text extends Figure
+{
+	private static final long serialVersionUID = 1L;
+	
+	public class TextPosition
+	{
+		protected int start;
+		
+		protected int end;
+		
+		protected LaTeXDrawPoint2D pos;
+		
+		public TextPosition(int s, int e, LaTeXDrawPoint2D p)
+		{
+			start 	= s;
+			end		= e;
+			pos		= p;
+		}
+		
+		
+		public TextPosition(int s, int e, double x, double y)
+		{
+			start 	= s;
+			end		= e;
+			pos		= new LaTeXDrawPoint2D(x, y);
+		}
+
+
+		/**
+		 * @return the start.
+		 * @since 2.0.0
+		 */
+		public synchronized int getStart()
+		{
+			return start;
+		}
+
+
+		/**
+		 * @return the end.
+		 * @since 2.0.0
+		 */
+		public synchronized int getEnd()
+		{
+			return end;
+		}
+
+
+		/**
+		 * @return the pos.
+		 * @since 2.0.0
+		 */
+		public synchronized LaTeXDrawPoint2D getPos()
+		{
+			return pos;
+		}
+	}
+
+	
+	
+	/** The text which must be displayed */
+	protected String text;
+	
+	/** The position of the first character of the text */
+	protected LaTeXDrawPoint2D position;
+
+	/** The current font*/
+	protected Font currentFont;
+	
+	/** The current size of the text */
+	protected TextSize currentSize;
+
+	/** Allows to know if the text is bold */
+	protected boolean isBold;
+	
+	/** Allows to know if the text is italic */
+	protected boolean isItalic;
+	
+	/** The text is in italic or not by default */
+	public static final boolean DEFAULT_ISITALIC = false;
+	
+	/** The text is bold or not by default */
+	public static final boolean DEFAULT_ISBOLD = false;
+	
+	/** The text is or not framed by default. */
+	public static final boolean DEFAULT_HAS_BOX = false;
+	
+	/** Define if the text is opaque by default. */
+	public static final boolean DEFAULT_IS_OPAQUE = false;
+	
+	/** The text has a simple box or not by default */
+	public static final boolean DEFAULT_HAS_SIMPLE_BOX = true;
+	
+	/** The colour of the opacity by default. */
+	public static final Color DEFAULT_OPACITY_COLOR = Color.WHITE;
+	
+	/** The current font metrics of the text */
+	protected FontMetrics fontMetrics;
+	
+	/** The current FontRenderContext of the text. */
+	protected transient FontRenderContext fontRenderContext;
+	
+	/** The simple framed box of the text. */
+	protected FramedBox simpleBox;
+	
+	/** Define if the text has a framed box. */
+	protected boolean hasFramedBox;
+	
+	/** Define if the text has a simple or a complex framed box. */
+	protected boolean hasSimpleFramedBox;
+	
+	/** The size of the labels which is used when the grid is drawn (takes account the PPC).*/
+	protected double textSizeDrawn;
+	
+	/** Define if the background of the text is opaque. */
+	protected boolean isOpaque;
+	
+	/** Contains all the boxes define by the user when she has selected multiple boxes. */
+	protected Vector<FramedBox> multipleBox;
+	
+	/** 
+	 * Contains the boxes of the vector multipleBox and some textPostions but in the order to by displayed. 
+	 * The parts of the non-boxed text are contained in this vector as TextPosition. In order to display
+	 * the words of the text in the order.
+	 */
+	protected transient Vector<FramedBox> multipleBoxDisplay;
+	
+	protected transient Vector<TextPosition> textPos;
+	
+	/** Define if a text has been change and so, if several parameters (font, ...) must be
+	 * updated. */
+	protected transient boolean hasChanged;
+	
+	/** The colour of the opacity */
+	protected Color opacityColor;
+	
+	
+	
+	
+	/**
+	 * Allows to define a font of text
+	 * 01/20/06<br>
+	 * @author Arnaud BLOUIN<br>
+	 * @version 0.5<br>
+	 */
+	public static class TextFont implements Cloneable, Serializable
+	{
+		private static final long serialVersionUID = 1L;
+
+		/** The name of the font */
+		protected String name;
+		
+		/** The family of the font */
+		protected String family;
+		
+		/** The encoding of the font */
+		protected String encoding;
+		
+		
+		/**
+		 * The constructor by default
+		 * @param name The name of the font
+		 * @param family The family of the font
+		 * @param encoding The encoding of the font (cf. LaTeX : T1, ...)
+		 */
+		public TextFont(String name, String family, String encoding)
+		{
+			this.name = name;
+			this.family = family;
+			this.encoding = encoding;
+		}
+		
+		
+		/**
+		 * Allows to get the name of the font
+		 * @return The name of the font
+		 */
+		public String getName()
+		{
+			return name;
+		}
+		
+		
+		
+		/**
+		 * Allows to get the family of the font
+		 * @return The family of the font
+		 */
+		public String getFamily()
+		{
+			return family;
+		}
+		
+		
+		
+		/**
+		 * Allows to get the encoding of the font
+		 * @return The encoding of the font
+		 */
+		public String getEncoding()
+		{
+			return encoding;
+		}
+		
+		
+		@Override
+		public Object clone() throws CloneNotSupportedException
+		{
+			return super.clone();
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to define a size of text
+	 * 01/20/06<br>
+	 * @author Arnaud BLOUIN<br>
+	 * @version 0.5<br>
+	 */
+	public static class TextSize implements Cloneable, Serializable
+	{
+		private static final long serialVersionUID = 1L;
+
+		/** The label of the size */
+		protected String label;
+		
+		/** The (pstricks) keyword of the size */
+		protected String keyword;
+		
+		/** The size */
+		protected int size;
+		
+		
+		
+		/**
+		 * The constructor by default
+		 * @param label The label of the size
+		 * @param keyword The pstricks keyword of the size
+		 * @param size The size
+		 */
+		public TextSize(String label, String keyword, int size)
+		{
+			this.label = label;
+			this.keyword = keyword;
+			this.size = size;
+		}
+		
+		
+		
+		/**
+		 * Allows to get the label of the size
+		 * @return The label of the size
+		 */
+		public String getLabel()
+		{
+			return label;
+		}
+		
+		
+		/**
+		 * Allows to get the pstricks keyword of the size 
+		 * @return The keyword
+		 */
+		public String getKeyword()
+		{
+			return keyword;
+		}
+		
+		
+		
+		/**
+		 * Allows to get the size
+		 * @return The size
+		 */
+		public int getSize()
+		{
+			return size;
+		}
+		
+		
+		
+		@Override
+		public Object clone() throws CloneNotSupportedException
+		{
+			return super.clone();
+		}
+	}
+	
+	
+	/** The tiny size */
+	public static final TextSize SIZE_TINY = new TextSize("Tiny", PSTricksConstants.COMMAND_TEXT_TINY, 11); //$NON-NLS-1$ 
+	/** The script size */
+	public static final TextSize SIZE_SCRIPT = new TextSize("Script size", PSTricksConstants.COMMAND_TEXT_SCRIPT, 14); //$NON-NLS-1$ 
+	/** The footnote size */
+	public static final TextSize SIZE_FOOTNOTE = new TextSize("Footnote size", PSTricksConstants.COMMAND_TEXT_FOOTNOTE, 16); //$NON-NLS-1$
+	/** The small size */
+	public static final TextSize SIZE_SMALL = new TextSize("Small", PSTricksConstants.COMMAND_TEXT_SMALL, 17); //$NON-NLS-1$ 
+	/** The normal size */
+	public static final TextSize SIZE_NORMAL = new TextSize("Normal", PSTricksConstants.COMMAND_TEXT_NORMAL, 18); //$NON-NLS-1$ 
+	/** The large size */
+	public static final TextSize SIZE_LARGE1 = new TextSize("Large", PSTricksConstants.COMMAND_TEXT_LARGE1, 22); //$NON-NLS-1$ 
+	/** The very large size */
+	public static final TextSize SIZE_LARGE2 = new TextSize("Very large", PSTricksConstants.COMMAND_TEXT_LARGE2, 24); //$NON-NLS-1$ 
+	/** The very very large size */
+	public static final TextSize SIZE_LARGE3 = new TextSize("Very very large", PSTricksConstants.COMMAND_TEXT_LARGE3, 30); //$NON-NLS-1$ 
+	/** The huge size */
+	public static final TextSize SIZE_HUGE1 = new TextSize("huge", PSTricksConstants.COMMAND_TEXT_HUGE1, 35); //$NON-NLS-1$ 
+	/** The very huge size */
+	public static final TextSize SIZE_HUGE2 = new TextSize("Very huge", PSTricksConstants.COMMAND_TEXT_HUGE2, 44); //$NON-NLS-1$ 
+	
+	/** The times new roman font */
+	public static final TextFont TEXTFONT_TIMES = new TextFont("Times New Roman", "ptm", "T1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	
+	/** The courier font */
+	public static final TextFont TEXTFONT_COURIER = new TextFont("Courier New", "pcr", "T1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	
+	/** The palatino font */
+	public static final TextFont TEXTFONT_PALATINO = new TextFont("Palatino Linotype", "ppl", "T1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+	public static final TextFont TEXTFONT_DIALOG = new TextFont("Dialog", "Dialog.plain", "T1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	
+	/** The font used by default */
+	public static final TextFont DEFAULT_TEXTFONT = TEXTFONT_TIMES;
+	
+	/** The size by default of the text */
+	public static final TextSize DEFAULT_SIZE = SIZE_NORMAL;
+	
+	/** The style of the text by default */
+	public static final int DEFAULT_STYLE = Font.PLAIN;
+	
+	/** The current textFont */
+	protected TextFont currentTextFont;
+	
+	protected static final Graphics2D		 INS_GRAPHICS;
+	protected static final FontMetrics 		 INS_FONT_METRICS;
+	protected static final FontRenderContext INS_FONT_RENDER_CONT;
+	
+	static
+	{
+		BufferedImage bufferImage = new BufferedImage(2, 2, BufferedImage.TYPE_INT_RGB);
+		INS_GRAPHICS = bufferImage.createGraphics();
+		
+		INS_GRAPHICS.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+		INS_GRAPHICS.setFont(new Font(DEFAULT_TEXTFONT.getName(), DEFAULT_STYLE, DEFAULT_SIZE.getSize()));
+
+		INS_FONT_METRICS 	 = INS_GRAPHICS.getFontMetrics();
+		INS_FONT_RENDER_CONT = INS_GRAPHICS.getFontRenderContext();
+		
+		bufferImage.flush();
+		bufferImage = null;
+	}
+
+	
+
+
+	/**
+	 * The constructor by default
+	 */
+	public Text(boolean increaseMeter)
+	{
+		this("", new LaTeXDrawPoint2D(), increaseMeter);//$NON-NLS-1$
+	}
+	
+	
+	
+	
+	/**
+	 * The constructor using two parameters
+	 * @param t The text
+	 * @param increaseMeter If true the meter of figures will be increased
+	 */
+	public Text(String t, boolean increaseMeter)
+	{
+		this(t, new LaTeXDrawPoint2D(), increaseMeter);
+	}
+	
+	
+	
+	
+	/**
+	 * The constructor using three parameters
+	 * @param t The text.
+	 * @param increaseMeter If true the meter of figures will be increased.
+	 * @param pos The position of the text.
+	 */
+	public Text(String t, LaTeXDrawPoint2D pos, boolean increaseMeter)
+	{
+		super(increaseMeter);
+		
+		opacityColor = DEFAULT_OPACITY_COLOR;
+		hasChanged = true;
+		textPos = new Vector<TextPosition>();
+		multipleBox = new Vector<FramedBox>();
+		multipleBoxDisplay = new Vector<FramedBox>();
+		hasFramedBox		= false;
+		hasSimpleFramedBox	= true;
+		simpleBox			= null;
+		canHaveShadow 		= false;
+		isBordersMovable 	= false;
+		isResizable 		= false;
+		isDashableOrDotable = false;
+		isDoubleBoundaryable= false;
+		isThicknessable = false;
+		canBeFilled = false;
+		currentFont = new Font(DEFAULT_TEXTFONT.getName(), DEFAULT_STYLE, DEFAULT_SIZE.getSize());
+		currentSize = DEFAULT_SIZE;
+		currentTextFont = DEFAULT_TEXTFONT;
+		isItalic = DEFAULT_ISITALIC;
+		isBold   = DEFAULT_ISBOLD;
+		text = t==null ? "" : t; //$NON-NLS-1$
+		position = pos;
+		borders = new LaTeXDrawRectangle((LaTeXDrawPoint2D)pos.clone(), (LaTeXDrawPoint2D)pos.clone(),false);
+		borders.setIsFilled(true);
+		borders.setBordersPosition(PSTricksConstants.BORDERS_OUTSIDE);
+		
+		fontMetrics = INS_FONT_METRICS;
+		fontRenderContext = INS_FONT_RENDER_CONT;
+		
+		updateBorders(fontMetrics);
+		shape = createShape2D();
+		textSizeDrawn = currentSize.getSize();
+		currentFont = new Font(currentFont.getFontName(), currentFont.getStyle(), (int)textSizeDrawn);
+		updateFontsBorders();
+		hasChanged = true;
+	}
+	
+	
+	
+	/**
+	 * Allows to know if the given label is a valid size of text
+	 * @param label The label to check
+	 * @return True if the label is valid
+	 */
+	public static boolean isValidSize(String label)
+	{
+		return label.equals(SIZE_TINY.getLabel()) ||
+				label.equals(SIZE_SMALL.getLabel()) ||
+				label.equals(SIZE_SCRIPT.getLabel()) ||
+				label.equals(SIZE_FOOTNOTE.getLabel()) ||
+				label.equals(SIZE_NORMAL.getLabel()) ||
+				label.equals(SIZE_LARGE1.getLabel()) ||
+				label.equals(SIZE_LARGE2.getLabel()) ||
+				label.equals(SIZE_LARGE3.getLabel()) ||
+				label.equals(SIZE_HUGE1.getLabel()) ||
+				label.equals(SIZE_HUGE2.getLabel());
+	}
+	
+	
+	
+	/**
+	 * Allows to create a list with the different size of text
+	 * @return The list
+	 */
+	public static JComboBox getChoiceSize()
+	{
+		JComboBox c = new JComboBox();
+		
+		c.addItem(SIZE_TINY.getLabel());
+		c.addItem(SIZE_SCRIPT.getLabel());
+		c.addItem(SIZE_FOOTNOTE.getLabel());
+		c.addItem(SIZE_SMALL.getLabel());
+		c.addItem(SIZE_NORMAL.getLabel());
+		c.addItem(SIZE_LARGE1.getLabel());
+		c.addItem(SIZE_LARGE2.getLabel());
+		c.addItem(SIZE_LARGE3.getLabel());
+		c.addItem(SIZE_HUGE1.getLabel());
+		c.addItem(SIZE_HUGE2.getLabel());
+		
+		return c;
+	}
+	
+	
+	
+	/**
+	 * Allows to create a list of the different fonts.
+	 * @return The list
+	 */
+	public static JComboBox getChoiceFont()
+	{
+		JComboBox c = new JComboBox();
+		
+		c.addItem(TEXTFONT_TIMES.getName());
+		c.addItem(TEXTFONT_COURIER.getName());
+		c.addItem(TEXTFONT_PALATINO.getName());
+		
+		return c;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update the borders of the text
+	 */
+	public synchronized void updateBorders()
+	{
+		updateBorders(fontMetrics);
+	}
+	
+	
+	
+	
+	/**
+	 * @since 1.7
+	 * Update the simple or the complexes boxes of the text.
+	 */
+	public synchronized void updateFramedBoxes()
+	{
+		if(!hasFramedBox)
+			return ;
+		
+		if(hasSimpleFramedBox)
+		{
+			if(simpleBox!=null)
+				simpleBox.updateBoxSize();
+		}
+		else 
+		{
+			FramedBox.updateDimensions(multipleBox, this);
+			updateBoxesOrder();
+		}
+	}
+	
+	
+	
+	/**
+	 * Allows to update the borders of the text. It is possible that you need to
+	 * update the framed boxes before: updateFramedBoxes.
+	 */
+	public synchronized void updateBorders(FontMetrics f)
+	{
+		fontMetrics = f;
+		
+		if(hasSeveralBoxes() && !multipleBox.isEmpty())
+		{
+			FramedBox.updateDimensions(multipleBox, this);
+			return ;
+		}
+		
+		if(text.length()!=0)
+		{			
+			if(hasFramedBox && hasSimpleFramedBox && simpleBox!=null)
+			{
+				borders.setFirstPoint((LaTeXDrawPoint2D)simpleBox.getBorders().getPoint(0).clone());
+				borders.setLastPoint((LaTeXDrawPoint2D)simpleBox.getBorders().getPoint(-1).clone());
+			}
+			else
+			{
+				TextLayout tl = new TextLayout(text, currentFont, fontRenderContext);
+				Rectangle2D bounds = tl.getBounds();
+				borders.setFirstPoint(position.x+bounds.getX(), bounds.getY()+position.y);
+				borders.setLastPoint(position.x+bounds.getWidth()+bounds.getX(), 
+									 position.y+bounds.getHeight()+bounds.getY());
+			}
+			gravityCenter = borders.getGravityCenter();
+			shape = createShape2D();
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Text t = (Text) super.clone();
+		
+		t.isOpaque = isOpaque;
+		t.opacityColor = opacityColor;
+		t.textPos = new Vector<TextPosition>();
+		t.text = text;
+		t.textSizeDrawn = textSizeDrawn;
+		t.borders = (LaTeXDrawRectangle) borders.clone();
+		t.position = (LaTeXDrawPoint2D)t.position.clone();
+		t.hasFramedBox = hasFramedBox;
+		t.hasSimpleFramedBox = hasSimpleFramedBox;
+		t.updateBorders(fontMetrics);
+		t.shape = t.createShape2D();
+		if(simpleBox!=null) 
+		{
+			t.simpleBox = (FramedBox)simpleBox.clone();
+			t.simpleBox.setText(t);
+		}
+		t.multipleBox = new Vector<FramedBox>();
+		t.multipleBoxDisplay = new Vector<FramedBox>(); 
+		int i, size = multipleBox.size();
+		for(i=0; i<size; i++)
+		{
+			FramedBox fb = (FramedBox)multipleBox.elementAt(i).clone();
+			fb.setText(t);
+			t.multipleBox.add(fb);
+		}
+		
+		t.updateFramedBoxes();
+		t.updateFontsBorders();
+		t.hasChanged = true;
+		return t;
+	}
+
+	
+	
+	
+	@Override
+	public void onDragged(Point formerPt, Point newPt) throws Exception 
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		if(isOnRotation && borders.dSelected!=null)
+		{
+			borders.onDragged(formerPt, newPt);
+			rotationAngle = borders.getRotationAngle();
+			
+			if(hasFramedBox())
+				updateFramedBoxes();
+		}
+		else
+			shift(formerPt, newPt);
+		
+		hasChanged = true;
+	}
+
+	
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering)
+	{
+		g.setFont(currentFont);
+		
+		if(hasChanged)
+		{
+			updateFramedBoxes();
+			updateFontsBorders();
+			hasChanged = false;
+		}
+		
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		TextLayout layout;
+		Color formerCol = g.getColor();
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}
+	
+		if(text.length()==0) return;
+	
+		if(simpleBox!=null && hasFramedBox() && hasSimpleFramedBox())
+			simpleBox.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+		else 
+			if(hasSeveralBoxes() && !multipleBox.isEmpty())
+			{
+				for(TextPosition tp : textPos)
+				{
+					for(FramedBox fb : multipleBoxDisplay)
+						if(fb.start==tp.start)
+							fb.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+					
+					layout = new TextLayout(text.substring(tp.getStart(), tp.getEnd()+1), currentFont, fontRenderContext);
+					g.setColor(linesColor);
+					layout.draw(g, (float)tp.getPos().x, (float)tp.getPos().y);
+				}
+			}
+			else
+				if(isOpaque() && borders!=null)
+				{
+					Color formerC = borders.getLinesColor();
+					borders.setLinesColor(getOpacityColor());
+					borders.setInteriorColor(getOpacityColor());
+					borders.setIsFilled(true);
+					borders.draw(g, antiAlias, rendering, alphaInter, colorRendering);
+					borders.setLinesColor(formerC);
+				}
+		
+		if(!hasSeveralBoxes() || multipleBox.isEmpty())
+		{
+			layout = new TextLayout(text, currentFont, fontRenderContext);
+			g.setColor(linesColor);
+			layout.draw(g, (float)position.x, (float)position.y);
+		}
+
+		g.setColor(formerCol);
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+		
+		if(isSelected && borders!=null)
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+	
+	
+	
+	/**
+	 * @return A rectangle corresponding to the opaque background of the text or null is the background is not opaque.
+	 * @since 2.0.0
+	 * TODO 2.1: To put in the Java view
+	 */
+	public LaTeXDrawRectangle getOpaqueBackGround()
+	{
+		LaTeXDrawRectangle f;
+		
+		if(isOpaque())
+			try
+			{
+				f = (LaTeXDrawRectangle)borders.clone();
+				f.setLinesColor(getOpacityColor());
+				f.setInteriorColor(getOpacityColor());
+				f.setIsFilled(true);
+			}
+			catch(CloneNotSupportedException e) { f = null; }
+		else
+			f = null;
+		
+		return f;
+	}
+	
+	
+	
+	
+	/**
+	 * Update the font: takes the style, the size and creates a new font.
+	 */
+	public void updateFont()
+	{
+		int currentStyle = Font.PLAIN;
+		if(isItalic())
+		{
+			currentStyle = Font.ITALIC;
+			if(isBold())
+				currentStyle+=Font.BOLD;
+		}
+		else 
+			if(isBold()) currentStyle = Font.BOLD;
+	
+		currentFont = new Font(getCurrentTextFont().getName(), currentStyle, (int)textSizeDrawn);
+		updateFramedBoxes();
+	}
+	
+	
+	
+	@Override
+	@Deprecated
+	public void setLastPoint(double x, double y) 
+	{
+		/*
+		 * This function is disable
+		 */
+	}
+	
+	
+	@Override
+	@Deprecated
+	public void setFirstPoint(double x, double y) 
+	{
+		/*
+		 * This function is disable
+		 */
+	}
+
+	
+	
+	
+	@Override
+	public void shift(double shiftX, double shiftY)
+	{
+		if(shiftX==0. && shiftY==0.) return ;
+		
+		position.x+=shiftX;
+		position.y+=shiftY;
+		updateFramedBoxes();
+		updateFontsBorders();
+		hasChanged = true;
+	}
+
+	
+	
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D pt) 
+	{
+		if(hasFramedBox() && hasSimpleFramedBox() && getSimpleBox()!=null)
+		{
+			boolean formerF = simpleBox.box.isFilled();
+			simpleBox.box.setIsFilled(true);
+			boolean in = simpleBox.box.isIn(pt);
+			simpleBox.box.setIsFilled(formerF);
+			if(in) return true;
+			
+			formerF = borders.isFilled;
+			borders.setIsFilled(false);
+			in = borders.isIn(pt);
+			borders.setIsFilled(formerF);
+			return in;
+		}
+		return borders.isIn(pt);
+	}
+
+	
+	
+	
+	/**
+	 * Allows to get the position of the text
+	 * @return The position of the text
+	 */
+	public synchronized LaTeXDrawPoint2D getPosition()
+	{
+		return position;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the current font @see TextFont
+	 * @return The current TextFont
+	 */
+	public synchronized TextFont getCurrentTextFont()
+	{
+		return currentTextFont;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to know if the text is bold
+	 * @return True if the text is bold
+	 */
+	public synchronized boolean isBold()
+	{
+		return isBold;
+	}
+	
+	
+	
+	/**
+	 * Allows to know if the text is italic or not
+	 * @return True if the text is italic
+	 */
+	public synchronized boolean isItalic()
+	{
+		return isItalic;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the text
+	 * @return The text
+	 */
+	public synchronized String getText()
+	{
+		return text;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the current size of the text
+	 * @return The current size of the text
+	 */
+	public synchronized TextSize getTextSize()
+	{
+		return currentSize;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to set the position of the first character of the text
+	 * @param p The new position
+	 */
+	public synchronized void setPosition(LaTeXDrawPoint2D p)
+	{
+		if(p==null)
+			return ;
+		
+		position = p;
+		if(simpleBox!=null)
+			simpleBox.updateBoxSize();
+		hasChanged = true;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the X-coordinate of the text
+	 * @param x The new X-coordinate of the text
+	 */
+	public synchronized void setX(double x)
+	{
+		position.x = x;
+		if(simpleBox!=null)
+			simpleBox.updateBoxSize();
+		hasChanged = true;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the Y-coordinate of the text
+	 * @param y The new Y-coordinate of the text
+	 */
+	public synchronized void setY(double y)
+	{
+		position.y = y;
+		if(simpleBox!=null)
+			simpleBox.updateBoxSize();
+		hasChanged = true;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set if the text must be bold or not
+	 * @param is True : the text must be bold
+	 */
+	public synchronized void setIsBold(boolean is)
+	{
+		isBold = is;
+		updateFont();
+		hasChanged = true;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set if the text is italic or not
+	 * @param is True : the text is italic
+	 */
+	public synchronized void setIsItalic(boolean is)
+	{
+		isItalic = is;
+		updateFont();
+		hasChanged = true;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the text
+	 * @param t The new text
+	 */
+	public synchronized void setText(String t)
+	{
+		if(t==null)
+			return ;
+		
+		text = t;
+		
+		if(simpleBox!=null)
+			simpleBox.updateBoxSize();
+		
+		hasChanged = true;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the font of the text
+	 * @param name The name of the new font
+	 */
+	public synchronized void setTextFont(String name)
+	{
+		if(name==null)
+			return ;
+		
+		if(name.equals(TEXTFONT_TIMES.getName()))
+			currentTextFont = TEXTFONT_TIMES;
+		else
+		if(name.equals(TEXTFONT_COURIER.getName()))
+			currentTextFont = TEXTFONT_COURIER;
+		else
+		if(name.equals(TEXTFONT_PALATINO.getName()) || name.equals(TEXTFONT_DIALOG.getName()))
+			currentTextFont = TEXTFONT_PALATINO;
+		
+		updateFont();
+		updateFontsBorders();
+		hasChanged = true;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the font of the text
+	 * @param fam The family of the new font
+	 */
+	public synchronized void setTextFontByFamily(String fam)
+	{
+		if(fam==null)
+			return ;
+		
+		if(fam.equals(TEXTFONT_TIMES.getFamily()))
+			currentTextFont = TEXTFONT_TIMES;
+		else
+		if(fam.equals(TEXTFONT_COURIER.getFamily()))
+			currentTextFont = TEXTFONT_COURIER;
+		else
+		if(fam.equals(TEXTFONT_PALATINO.getFamily()) || fam.equals(TEXTFONT_DIALOG.getFamily()))
+			currentTextFont = TEXTFONT_PALATINO;
+		
+		updateFont();
+		hasChanged = true;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the current size of the text.
+	 * @param cmd The command of the size of the text (\large, ...).
+	 */
+	public synchronized void setSizeByCommand(String cmd)
+	{
+		if(cmd==null)
+			return ;
+		
+		int formerSize=currentSize.getSize();
+		
+		if(cmd.equals(SIZE_TINY.getKeyword()))
+			currentSize = SIZE_TINY;
+		else
+		if(cmd.equals(SIZE_SCRIPT.getKeyword()))
+			currentSize = SIZE_SCRIPT;
+		else 
+		if(cmd.equals(SIZE_FOOTNOTE.getKeyword()))
+			currentSize = SIZE_FOOTNOTE;
+		else
+		if(cmd.equals(SIZE_SMALL.getKeyword()))
+			currentSize = SIZE_SMALL;
+		else
+		if(cmd.equals(SIZE_NORMAL.getKeyword()))
+			currentSize = SIZE_NORMAL;
+		else
+		if(cmd.equals(SIZE_LARGE1.getKeyword()))
+			currentSize = SIZE_LARGE1;
+		else
+		if(cmd.equals(SIZE_LARGE2.getKeyword()))
+			currentSize = SIZE_LARGE2;
+		else
+		if(cmd.equals(SIZE_LARGE3.getKeyword()))
+			currentSize = SIZE_LARGE3;
+		else
+		if(cmd.equals(SIZE_HUGE1.getKeyword()))
+			currentSize = SIZE_HUGE1;
+		else
+		if(cmd.equals(SIZE_HUGE2.getKeyword()))
+			currentSize = SIZE_HUGE2;
+		
+		if(formerSize!=currentSize.getSize())
+			textSizeDrawn = (textSizeDrawn*currentSize.getSize())/formerSize;
+		
+		updateFont();
+		hasChanged = true;
+	}
+	
+	
+
+	/**
+	 * Sets the size of the text.
+	 * @param size The new size (must corresponds to the size of one of the SIZE_XXX constants.
+	 * @since 2.0.0
+	 */
+	public synchronized void setSize(int size)
+	{
+		TextSize ts = null;
+		
+		if(size==SIZE_FOOTNOTE.getSize())
+			ts = SIZE_FOOTNOTE;
+		else
+		if(size==SIZE_HUGE1.getSize())
+			ts = SIZE_HUGE1;
+		else
+		if(size==SIZE_HUGE2.getSize())
+			ts = SIZE_HUGE2;
+		else
+		if(size==SIZE_LARGE1.getSize())
+			ts = SIZE_LARGE1;
+		else
+		if(size==SIZE_LARGE2.getSize())
+			ts = SIZE_LARGE2;
+		else
+		if(size==SIZE_LARGE3.getSize())
+			ts = SIZE_LARGE3;
+		else
+		if(size==SIZE_NORMAL.getSize())
+			ts = SIZE_NORMAL;
+		else
+		if(size==SIZE_SCRIPT.getSize())
+			ts = SIZE_SCRIPT;
+		else
+		if(size==SIZE_SMALL.getSize())
+			ts = SIZE_SMALL;
+		else
+		if(size==SIZE_TINY.getSize())
+			ts = SIZE_TINY;
+		
+		if(ts!=null)
+			setSize(ts.getLabel());
+	}
+	
+	
+	
+	/**
+	 * Allows to set the current size of the text
+	 * @param label The label of the size of the text
+	 */
+	public synchronized void setSize(String label)
+	{
+		if(label==null)
+			return ;
+		
+		int formerSize=currentSize.getSize();
+		
+		if(label.equals(SIZE_TINY.getLabel()))
+			currentSize = SIZE_TINY;
+		else
+		if(label.equals(SIZE_SCRIPT.getLabel()))
+			currentSize = SIZE_SCRIPT;
+		else 
+		if(label.equals(SIZE_FOOTNOTE.getLabel()))
+			currentSize = SIZE_FOOTNOTE;
+		else
+		if(label.equals(SIZE_SMALL.getLabel()))
+			currentSize = SIZE_SMALL;
+		else
+		if(label.equals(SIZE_NORMAL.getLabel()))
+			currentSize = SIZE_NORMAL;
+		else
+		if(label.equals(SIZE_LARGE1.getLabel()))
+			currentSize = SIZE_LARGE1;
+		else
+		if(label.equals(SIZE_LARGE2.getLabel()))
+			currentSize = SIZE_LARGE2;
+		else
+		if(label.equals(SIZE_LARGE3.getLabel()))
+			currentSize = SIZE_LARGE3;
+		else
+		if(label.equals(SIZE_HUGE1.getLabel()))
+			currentSize = SIZE_HUGE1;
+		else
+		if(label.equals(SIZE_HUGE2.getLabel()))
+			currentSize = SIZE_HUGE2;
+		
+		if(formerSize!=currentSize.getSize())
+			textSizeDrawn = (textSizeDrawn*currentSize.getSize())/formerSize;
+		
+		updateFont();
+		updateFontsBorders();
+		hasChanged = true;
+	}
+	
+	
+
+	
+	public synchronized String getCodePSTricksBody(DrawBorders drawBorders, float ppc)
+	{
+		if(text==null || text.length()==0) return null;
+		
+		String add="";
+		
+		if(!linesColor.equals(PSTricksConstants.DEFAULT_LINE_COLOR))
+		{
+			String name = DviPsColors.getColourName(linesColor);
+			if(name==null)
+			{
+				name = "color"+number;//$NON-NLS-1$
+				DviPsColors.addUserColour(linesColor, name); 
+			}
+			add += "\\color{"+name+"}"; //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		
+		String txt = text;
+		
+		if(hasFramedBox)
+			if(hasSimpleFramedBox)
+				txt = simpleBox.getCodePSTricks(drawBorders, ppc);
+			else
+				txt = FramedBox.getCode(multipleBox, drawBorders, ppc);
+		else
+			if(isOpaque)
+			{
+				String name = DviPsColors.getColourName(opacityColor);
+				
+				if(name==null)
+				{
+					name = "color"+number+"z";//$NON-NLS-1$ //$NON-NLS-2$
+					DviPsColors.addUserColour(opacityColor, name); 
+				}
+					
+				txt = "\\psframebox*[framesep=0, boxsep=false,fillcolor="+name+ //$NON-NLS-1$
+				"] {"+txt+"}";//$NON-NLS-1$ //$NON-NLS-2$ 
+			}
+		
+		return add + txt;
+	}
+
+	
+	
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		if(text==null || text.length()==0) return null;
+		
+		double threshold = 0.001;
+		String addBegin="", addEnd="", size="", font=""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		double yGap = 0;
+		
+		if(fontMetrics!=null)
+			yGap = fontMetrics.getHeight()/4.;
+		
+		TextLayout tl = new TextLayout(text, currentFont, fontRenderContext);
+		Rectangle2D bounds = tl.getBounds();
+		double xa = position.x+bounds.getX(), xb = position.x+bounds.getWidth()+bounds.getX();
+		
+		float x = (float)((position.x + (xb-xa)/2. - d.x)/ppc);
+		float y = (float)(((d.y - position.y+yGap)/ppc));
+		
+		if(rotationAngle%(Math.PI*2)!=0.)
+		{
+			float angle = LaTeXDrawNumber.getCutNumber((float)-Math.toDegrees(rotationAngle), threshold);
+			float cx = LaTeXDrawNumber.getCutNumber((float)((gravityCenter.x-d.x)/ppc), threshold);
+			float cy = LaTeXDrawNumber.getCutNumber((float)((d.y-gravityCenter.y)/ppc), threshold);
+			float x2 = LaTeXDrawNumber.getCutNumber((float)(-Math.cos(-rotationAngle)*cx+
+						Math.sin(-rotationAngle)*cy+cx), threshold);
+			float y2 =  LaTeXDrawNumber.getCutNumber((float)(-Math.sin(-rotationAngle)*cx-
+						Math.cos(-rotationAngle)*cy+cy), threshold);
+			
+			addBegin +="\\rput{"+angle+ "}("+x2+','+y2+"){"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			addEnd = "}"; //$NON-NLS-1$
+		}
+		
+		
+		if(!currentSize.getLabel().equals(SIZE_NORMAL.getLabel()))
+			size = currentSize.getKeyword();
+		
+		font = "\\usefont{"+currentTextFont.getEncoding()+"}{"+ //$NON-NLS-1$ //$NON-NLS-2$
+				currentTextFont.getFamily()+"}{"; //$NON-NLS-1$
+		
+		if(isBold)
+			  font+="b}{"; //$NON-NLS-1$
+		else  font+="m}{"; //$NON-NLS-1$
+		
+		if(isItalic)
+			  font+="it}\n"; //$NON-NLS-1$
+		else  font+="n}\n"; //$NON-NLS-1$
+
+		if(hasFramedBox)
+			if(hasSimpleFramedBox)
+			{
+				if(simpleBox.getBoxType()==FramedBox.BOX_TRIANGLE)
+				{
+					double height = (simpleBox.box.getTheSEBoundPoint().y-simpleBox.box.getTheNWBoundPoint().y)/4.;
+					y+=(height/ppc);
+				}
+			}
+			else
+			{
+				FramedBox fb, max=null;
+				double xMin=Double.MAX_VALUE;
+				int i=0, size2 = getMultipleBox().size();
+				
+				while(i<size2)
+				{
+					fb = getMultipleBox().elementAt(i);
+					if(fb.isBoxSep() && fb.getBox().getTheNWBoundPoint().x<xMin && fb.getBoxType()==FramedBox.BOX_TRIANGLE)
+					{
+						xMin = fb.getBox().getTheNWBoundPoint().x;
+						max = fb;
+					}
+					else i++;
+				}
+				
+				if(max!=null)
+				{
+					double height = (max.getBox().getTheSEBoundPoint().y-max.getBox().getTheNWBoundPoint().y)/4.;
+					y+=(height/ppc);
+				}
+			}
+		else
+			if(isOpaque)
+			{
+				String name = DviPsColors.getColourName(opacityColor);
+				
+				if(name==null)
+				{
+					name = "color"+number+"z";//$NON-NLS-1$ //$NON-NLS-2$
+					DviPsColors.addUserColour(opacityColor, name); 
+				}
+			}
+		
+		return font + addBegin+"\\rput(" + x + "," + y +"){"+ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				size + getCodePSTricksBody(drawBorders, ppc) +"}"+addEnd; //$NON-NLS-1$ 
+	}
+
+
+
+	@Override
+	public Shape createShape2D() 
+	{
+		Shape s = borders.shape;
+		double ra = borders.getRotationAngle();
+		
+		if(ra%(Math.PI*2)!=0)
+		{
+			LaTeXDrawPoint2D NW = borders.getTheNWPoint();
+			LaTeXDrawPoint2D SE = borders.getTheSEPoint();
+			double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+
+			double c2x = Math.cos(ra)*cx-Math.sin(ra)*cy;
+			double c2y = Math.sin(ra)*cx+Math.cos(ra)*cy;
+
+			AffineTransform at = AffineTransform.getTranslateInstance(cx-c2x, cy-c2y);
+			at.rotate(ra);
+			s = at.createTransformedShape(s);
+		}
+		
+		return s;
+	}
+
+
+	
+
+	@Override
+	@Deprecated
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound) 
+	{
+		/*
+		 * We can't resize a text
+		 */
+	}
+
+
+	
+
+
+	@Override
+	@Deprecated
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound) 
+	{
+		/*
+		 * We can't resize a text
+		 */
+	}
+	
+	
+	
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		textPos = new Vector<TextPosition>();
+		interiorColor 	= (Color) ois.readObject();
+		lineStyle 		= (String) ois.readObject();
+		rotationAngle 	= ois.readDouble();
+		thickness 		= ois.readFloat();
+		isFilled 		= ois.readBoolean();
+		isSelected 		= ois.readBoolean();
+		isOnRotation 	= ois.readBoolean();
+		linesColor 		= (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep 			= ois.readFloat();
+		whiteDashLength = ois.readFloat();	
+		borders 		= (LaTeXDrawRectangle) ois.readObject();
+		text 			= (String) ois.readObject();
+		position 		= (LaTeXDrawPoint2D) ois.readObject();
+		currentFont 	= (Font)ois.readObject();
+		currentSize 	= (TextSize) ois.readObject();
+		currentTextFont = (TextFont) ois.readObject();
+		isItalic 		= ois.readBoolean();
+		isBold 			= ois.readBoolean();
+		textSizeDrawn 	= DrawContainer.DEFAULT_PIXPERCM;
+		currentFont = new Font(currentTextFont.getName(), currentFont.getStyle(), currentSize.getSize());
+		multipleBoxDisplay = new Vector<FramedBox>();
+		textPos = new Vector<TextPosition>();
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0)//$NON-NLS-1$
+		{
+			hasFramedBox = ois.readBoolean();
+			hasSimpleFramedBox = ois.readBoolean();
+			isOpaque = ois.readBoolean();
+			simpleBox = (FramedBox)ois.readObject();
+			multipleBox = new Vector<FramedBox>();
+			int size = ois.readInt();
+			for(int i=0; i<size; i++)
+			{
+				FramedBox fb = (FramedBox)ois.readObject();
+				fb.setText(this);
+				multipleBox.add(fb);
+			}
+			opacityColor = (Color)ois.readObject();
+			
+			if(simpleBox!=null)
+				simpleBox.setText(this);
+		}
+		else
+		{
+			hasFramedBox = DEFAULT_HAS_BOX;
+			hasSimpleFramedBox = DEFAULT_HAS_SIMPLE_BOX;
+			isOpaque = DEFAULT_IS_OPAQUE;
+			simpleBox = new FramedBox(this);
+			multipleBox = new Vector<FramedBox>();
+		}
+		
+		updateFontsBorders();
+		updateFramedBoxes();
+		shape = createShape2D();
+		textSizeDrawn = currentSize.getSize();
+		currentFont = new Font(currentFont.getFontName(), currentFont.getStyle(), (int)textSizeDrawn);
+		updateFontsBorders();
+		hasChanged = true;
+	}
+
+
+	
+	
+	
+	/**
+	 * Allows to update the Font, the FontMetrics and
+	 * the borders of the text.
+	 */
+	public void updateFontsBorders()
+	{
+		INS_GRAPHICS.setFont(getCurrentFont());
+		fontRenderContext = INS_GRAPHICS.getFontRenderContext();
+		updateBorders(INS_GRAPHICS.getFontMetrics());
+	}
+	
+
+	
+	
+	@Override
+	public Shape createNonRotatedShape2D()
+	{
+		return borders.createNonRotatedShape2D();
+	}
+
+
+
+
+	@Override
+	public synchronized void updateShape()
+	{
+		shape = createShape2D();
+	}
+	
+	
+	
+	
+	/**
+	 * @return the currentFont
+	 */
+	public synchronized Font getCurrentFont()
+	{
+		return currentFont;
+	}
+
+
+	
+	/**
+	 * Allows to get the width of the text.
+	 * @return The width of the text.
+	 */
+	public synchronized double getWidth()
+	{
+		return fontMetrics.stringWidth(getText());
+	}
+
+	
+	/**
+	 * Allows to get the height of the text.
+	 * @return The height of the text.
+	 */
+	public synchronized double getHeight()
+	{
+		return fontMetrics.getHeight();
+	}
+
+
+
+	/**
+	 * @return the fontMetrics
+	 */
+	public synchronized FontMetrics getFontMetrics()
+	{
+		return fontMetrics;
+	}
+
+
+
+
+	@Override
+	public synchronized boolean isTooSmallToBeRescaled()
+	{
+		return true;
+	}
+
+
+
+
+	/**
+	 * @since 1.7
+	 * @return the simpleBox
+	 */
+	public synchronized FramedBox getSimpleBox()
+	{
+		return simpleBox;
+	}
+
+
+
+
+	/**
+	 * @return the hasFramedBox
+	 */
+	public synchronized boolean hasFramedBox()
+	{
+		return hasFramedBox;
+	}
+
+
+
+
+	/**
+	 * @param hasFramedBox the hasFramedBox to set
+	 */
+	public synchronized void setHasFramedBox(boolean hasFramedBox)
+	{
+		this.hasFramedBox = hasFramedBox;
+		if(simpleBox==null)
+			simpleBox = new FramedBox(this);
+		
+		updateFramedBoxes();
+		hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * @return the hasSimpleFramedBox
+	 */
+	public synchronized boolean hasSimpleFramedBox()
+	{
+		return hasSimpleFramedBox && hasFramedBox();
+	}
+
+
+
+
+	/**
+	 * Must be used with setHasFramedBox.
+	 * @param hasSimpleFramedBox the hasSimpleFramedBox to set.
+	 */
+	public synchronized void setHasSimpleFramedBox(boolean hasSimpleFramedBox)
+	{
+		if(hasSimpleFramedBox)
+			isOpaque = false;
+		
+		this.hasSimpleFramedBox = hasSimpleFramedBox;
+		
+		if(simpleBox==null)
+			simpleBox = new FramedBox(this);
+		
+		updateBorders();
+		hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * @since 1.7
+	 * @param simpleBox the simpleBox to set.
+	 */
+	public synchronized void setSimpleBox(FramedBox simpleBox)
+	{
+		if(simpleBox==null)
+			return ;
+		
+		Figure box = simpleBox.getBox();
+		if(box!=null && (box instanceof LaTeXDrawRectangle || box instanceof Circle || 
+			box instanceof Ellipse || box instanceof Triangle || box instanceof Rhombus))
+			this.simpleBox = simpleBox;
+		
+		this.simpleBox.text = this;
+		hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * @return the fontRenderContext.
+	 */
+	public synchronized FontRenderContext getFontRenderContext()
+	{
+		return fontRenderContext;
+	}
+
+
+
+
+
+	@Override
+	public boolean intersected(Rectangle2D.Double r)
+	{
+		if(hasFramedBox() && hasSimpleFramedBox() && simpleBox!=null)
+		{
+			Shape s = simpleBox.getBox().createShape2D();
+			return s.intersects(r) && !s.contains(r);
+		}
+		
+		Shape s;
+		
+		if(shape==null)
+			s = createShape2D();
+		else s = shape;
+		
+		return s.intersects(r) && !s.contains(r);
+	}
+
+
+
+
+	/**
+	 * @since 1.7
+	 * @return the isOpaque.
+	 */
+	public synchronized boolean isOpaque()
+	{
+		return isOpaque;
+	}
+
+
+
+
+	/**
+	 * @since 1.7
+	 * @param isOpaque the isOpaque to set.
+	 */
+	public synchronized void setOpaque(boolean isOpaque)
+	{
+		this.isOpaque = isOpaque;
+		if(isOpaque)
+			hasSimpleFramedBox = false;
+		updateBorders();
+		hasChanged = true;
+	}
+	
+	
+	
+	/**
+	 * @return True if the text has several framed boxes (not only or no one).
+	 */
+	public synchronized boolean hasSeveralBoxes()
+	{
+		return hasFramedBox && !hasSimpleFramedBox;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to add a box to frame a part of the text.
+	 * @since 1.7
+	 * @param box The new box to add.
+	 * @return True if the box has been added and false of it is not possible.
+	 */
+	public synchronized boolean addBox(FramedBox box)
+	{
+		if(multipleBox==null)
+			multipleBox = new Vector<FramedBox>();
+		
+		if(box==null)
+			return false;
+		
+		boolean valid = true;
+		int i=0, size = multipleBox.size();
+		
+		while(valid && i<size)
+			if(multipleBox.elementAt(i).overlap(box))
+				valid = false;
+			else i++;
+		
+		if(!valid) return false;
+		
+		box.setText(this);
+		multipleBox.add(box);
+		updateBoxesOrder();
+		updateFramedBoxes();
+		updateBorders();
+		
+		return true;
+	}
+	
+	
+	
+	
+	/**
+	 * @since 1.7
+	 * Allows to remove a box.
+	 * @param b The box to remove.
+	 */
+	public synchronized void removeBox(FramedBox b)
+	{
+		if(b==null) return ;
+		multipleBox.remove(b);
+		updateFramedBoxes();
+		updateBorders();
+		hasChanged = true;
+	}
+
+
+
+
+	/**
+	 * @since 1.7
+	 * @return the multipleBox.
+	 */
+	public synchronized Vector<FramedBox> getMultipleBox()
+	{
+		return multipleBox;
+	}
+	
+	
+	
+	
+	/**
+	 * Update the position of the elements of the text by taking account of the
+	 * multiple boxes.
+	 */
+	public void updateTextPosition()
+	{
+		if(!hasSeveralBoxes())
+			return ;
+		
+		textPos.removeAllElements();
+		
+		textPos.add(new TextPosition(0,text.length()-1, (LaTeXDrawPoint2D)position.clone()));
+		boolean found, ok;
+		int i, size, j;
+		TextPosition tp, add;
+		double x;
+		
+		for(FramedBox fb : multipleBox)
+		{
+			i=0;
+			found = false;
+			size = textPos.size();
+			while(i<size && !found)
+				if(fb.start>=textPos.elementAt(i).start && fb.end<=(textPos.elementAt(i).end+1))
+					found = true;
+				else i++;
+			
+			if(found)
+			{
+				tp = textPos.elementAt(i);
+				
+				if(fb.start!=tp.start || (fb.end-1)!=tp.end)
+				{
+					textPos.remove(i);
+					
+					x = tp.pos.x + (tp.start==fb.start ? 0 : 
+						fontMetrics.stringWidth(text.substring(tp.start, fb.start)));
+					
+					if(fb.start>tp.start)
+						textPos.add(i++, new TextPosition(tp.start, fb.start-1, (LaTeXDrawPoint2D)tp.pos.clone()));
+					
+					add = new TextPosition(fb.start, fb.end-1, x, tp.pos.y);
+					textPos.add(i++, add);
+					
+					if((fb.end-1)<tp.end)
+						textPos.add(i, new TextPosition(fb.end, tp.end, new LaTeXDrawPoint2D(
+							x +fontMetrics.stringWidth(text.substring(fb.start, fb.end)), position.y)));
+				}
+			}
+			else
+			{
+				found = false;
+				i=0;
+				while(!found && i<size)
+					if(fb.start>textPos.elementAt(i).start && fb.start<(textPos.elementAt(i).end+1))
+						found = true;
+					else i++;
+				
+				if(found)
+				{
+					tp = textPos.remove(i);
+					
+					if(fb.start>tp.start)
+						textPos.add(i++, new TextPosition(tp.start, fb.start-1, (LaTeXDrawPoint2D)tp.pos.clone()));
+					
+					x = tp.pos.x + fontMetrics.stringWidth(text.substring(tp.start, fb.start));
+					add = new TextPosition(fb.start, tp.end, x, tp.pos.y);
+					textPos.add(i, add);
+				}
+				
+				found = false;
+				i=0;
+				size = textPos.size();
+				
+				while(!found && i<size)
+					if(fb.end>textPos.elementAt(i).start && fb.end<(textPos.elementAt(i).end+1))
+						found = true;
+					else i++;
+				
+				if(found)
+				{
+					tp = textPos.remove(i);
+					
+					add = new TextPosition(tp.start, fb.end-1, (LaTeXDrawPoint2D)tp.pos.clone());
+					textPos.add(i, add);
+					
+					if(fb.end<(tp.end+1))
+					{
+						x = tp.pos.x + fontMetrics.stringWidth(text.substring(tp.start, fb.end));
+						textPos.add(i+1, new TextPosition(fb.end, tp.end, x, tp.pos.y));
+					}
+				}
+			}//else
+		}//for
+		
+		// We update the TextPostion of the FramedBox
+		Vector<FramedBox> boxes = new Vector<FramedBox>();
+		Vector<TextPosition> tps = new Vector<TextPosition>();
+		FramedBox fb;
+		
+		for(FramedBox fb2 : multipleBox)
+		{
+			fb2.removeAllTextPosition();
+			boxes.add(fb2);
+		}
+		for(TextPosition tp2 : textPos)
+			tps.add(tp2);
+		
+		while(!boxes.isEmpty())
+		{
+			found = false;
+			i=0;
+			size = boxes.size();
+			
+			while(!found && i<size)
+			{
+				fb = boxes.elementAt(i);
+				j = 0;
+				ok = true;
+				
+				while(j<i && ok)
+					if(fb.contains(boxes.elementAt(j))==1)
+						ok = false;
+					else j++;
+				
+				j= i+1;
+				while(j<size && ok)
+					if(fb.contains(boxes.elementAt(j))==1)
+						ok = false;
+					else j++;
+				
+				if(ok)
+					found = true;
+				else i++;
+			}//while
+			
+			fb = boxes.remove(i);
+			i=0;
+			while(i<tps.size())
+			{
+				TextPosition tp2 = tps.elementAt(i);
+				if(tp2.start>=fb.start && (tp2.end+1)<=fb.end)
+				{
+					tps.remove(tp2);
+					fb.addTextPosition(tp2);
+				}
+				else i++;
+			}
+		}//while
+	}
+
+
+
+
+	/**
+	 * @since 1.7
+	 * @return the textPos.
+	 */
+	public synchronized Vector<TextPosition> getTextPos()
+	{
+		return textPos;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * @since 1.7
+	 * @return The first textPosition (where start==0 and pos.x is min) of the vector.
+	 */
+	public synchronized TextPosition getFirstTextPosition()
+	{
+		if(textPos==null || textPos.isEmpty())
+			return null;
+		
+		TextPosition tp = null;
+		for(TextPosition tp2 : textPos)
+			if(tp2.start==0)
+				if(tp==null) tp = tp2;
+				else if(tp.pos.x>tp2.pos.x) tp = tp2;
+		
+		return tp;
+	}
+	
+	
+	
+	/**
+	 * @since 1.7
+	 * @return The last textPosition (where end==text.length-1 and pos.x is max) of the vector.
+	 */
+	public synchronized TextPosition getLastTextPosition()
+	{
+		if(textPos==null || textPos.isEmpty())
+			return null;
+		
+		TextPosition tp = null;
+		int size = text.length()-1;
+		
+		for(TextPosition tp2 : textPos)
+			if(tp2.end==size)
+				if(tp==null) tp = tp2;
+				else if(tp.pos.x<tp2.pos.x) tp = tp2;
+		
+		return tp;
+	}
+	
+	
+	
+	/**
+	 * @since 1.7
+	 * Remove all the boxes (from the vector multipleBox). Set hasFramedBox to false.
+	 */
+	public void removeAllBoxes()
+	{
+		if(multipleBox!=null)
+		{
+			multipleBox.removeAllElements();
+			hasFramedBox = false;
+			updateBorders();
+		}
+		hasChanged = true;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * @since 1.7
+	 * Allows to update the order of the boxes when they will be displayed.
+	 * Using the borders of the boxes and the textPositions, so they must be updated.
+ 	 */
+	public synchronized void updateBoxesOrder()
+	{
+		if(multipleBox.isEmpty())
+			return ;
+		
+		Vector<FramedBox> boxes = new Vector<FramedBox>();
+
+		for(FramedBox fb : multipleBox)
+			boxes.add(fb);
+		
+		multipleBoxDisplay.removeAllElements();
+		
+		while(!boxes.isEmpty())
+		{
+			FramedBox first=null, fb;
+			int start=text.length()+1, i;
+			
+			for(i = boxes.size()-1; i>=0; i--)
+			{
+				fb = boxes.elementAt(i);
+				if(fb.start<start)
+				{
+					first = fb;
+					start = fb.start;
+				}
+				else
+					if(fb.start==start && first!=null && first.end<fb.end)
+					{
+						first = fb;
+						start = fb.start;
+					}
+			}
+			
+			multipleBoxDisplay.add(first);
+			boxes.remove(first);
+		}
+	}
+
+
+
+
+	/**
+	 * @since 1.7
+	 * @return the opacityColor.
+	 */
+	public synchronized Color getOpacityColor()
+	{
+		return opacityColor;
+	}
+
+
+
+
+	/**
+	 * @since 1.7
+	 * @param opacityColor the opacityColor to set.
+	 */
+	public synchronized void setOpacityColor(Color opacityColor)
+	{
+		if(opacityColor!=null)
+			this.opacityColor = opacityColor;
+	}
+
+
+
+
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		if(simpleBox!=null)
+			simpleBox.mirrorHorizontal(origin);
+		
+		for(FramedBox f : multipleBox)
+			f.mirrorHorizontal(origin);
+		
+		LaTeXDrawPoint2D se = borders.getTheSEPoint(), nw = borders.getTheNWPoint();
+		double distance = se.x-nw.x, distance2 = distance-se.x+position.x;
+		se.x-=distance2;
+		position.setLocation(se.horizontalSymmetry(origin).getX(), position.y);
+		
+		updateFramedBoxes();
+		updateFontsBorders();
+		hasChanged = true;
+	}
+
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{// Fixes #1564478
+		if(getSimpleBox()!=null)
+			getSimpleBox().mirrorVertical(origin);
+		
+		for(FramedBox f : multipleBox)
+			f.mirrorVertical(origin);
+		
+		LaTeXDrawPoint2D se = borders.getTheSEPoint(), nw = borders.getTheNWPoint();
+		double distance = se.y-nw.y, distance2 = distance-se.y+position.y;
+		se.y-=distance2;
+		position.setLocation(position.x, se.verticalSymmetry(origin).getY());
+		
+		updateFramedBoxes();
+		updateFontsBorders();
+		hasChanged = true;
+	}
+
+
+
+
+	@Override
+	@Deprecated
+	public LaTeXDrawPoint2D getLastPoint()
+	{
+		return null;
+	}
+
+
+
+
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		position.setLocation(grid.getTransformedPointToGrid(position, false));
+		updateFramedBoxes();
+		updateBorders();
+		updateShape();
+	}
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return super.hashCode()^9;
+	}
+
+
+
+	/**
+	 * @return the multipleBoxDisplay.
+	 * @since 2.0.0
+	 */
+	public synchronized Vector<FramedBox> getMultipleBoxDisplay()
+	{
+		return multipleBoxDisplay;
+	}
+}
diff --git a/current/latexDraw/figures/Triangle.java b/current/latexDraw/figures/Triangle.java
new file mode 100644
index 0000000..62d25f7
--- /dev/null
+++ b/current/latexDraw/figures/Triangle.java
@@ -0,0 +1,1168 @@
+package latexDraw.figures;
+
+import static java.lang.Math.toDegrees;
+
+import java.awt.*;
+import java.awt.geom.*;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import latexDraw.figures.properties.BordersMovable;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.util.LaTeXDrawNumber;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines a triangle.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Triangle extends LaTeXDrawPolygon implements BordersMovable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The number of points in a triangle */
+	public static final short NB_PTS_TRIANGLE = 3;
+
+	
+
+	/**
+	 * The constructor by default
+	 */
+	public Triangle(boolean increaseMeter)
+	{
+		this(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), increaseMeter);
+	}
+	
+	
+	
+	
+	/**
+	 * @param f The figure to copy.
+	 * @param sameNumber True if the figure will have the same number of the copy.
+	 */
+	public Triangle(Figure f, boolean sameNumber)
+	{
+		super(f, sameNumber);
+		
+		if(f==null)
+			return ;
+		
+		LaTeXDrawRectangle b = f.getBorders();
+		if(b==null) return ;
+		
+		borders = new LaTeXDrawRectangle(getPoint(0), getPoint(1), getPoint(2), getPoint(3), false);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+		updateGravityCenter();
+		isBordersMovable = true;
+	}
+
+	
+	/**
+	 * The constructor using four points
+	 * @param pt1 The top left point of rectangle containing the triangle
+	 * @param pt2 The top right point of the rectangle containing the triangle
+	 * @param pt3 The bottom left point
+	 * @param pt4 The bottom right point
+	 */
+	public Triangle(LaTeXDrawPoint2D pt1, LaTeXDrawPoint2D pt2, LaTeXDrawPoint2D pt3, LaTeXDrawPoint2D pt4, boolean increaseMeter)
+	{
+		super(pt1, pt2, pt3, pt4, increaseMeter);
+		borders = new LaTeXDrawRectangle(pt1, pt2, pt3, pt4, false);
+		shape = getInsideOutsideOrMiddleBorders();
+		updateGravityCenter();
+		isBordersMovable = true;
+	}
+	
+	
+
+	
+	@Override
+	public boolean addPoint(LaTeXDrawPoint2D pt)
+	{
+		if(pts==null) pts = new Vector<LaTeXDrawPoint2D>();
+		
+		if(pt!=null)
+		{
+			Delimitor d = new Delimitor(pt);
+			d.setColorSet3();
+			delimiters.add(d);
+			pts.add(pt);
+			
+			return true;
+		}
+		return false;
+	}
+
+	
+	
+	
+	@Override
+	public Shape createShape2D() 
+	{
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		Shape area = createNonRotatedShape2D();
+
+		if(rotationAngle % (Math.PI*2)!= 0.)
+		{
+			double cx = (NW.x + SE.x) / 2., cy = (NW.y + SE.y) / 2.;
+			double c2x = Math.cos(rotationAngle) * cx - Math.sin(rotationAngle)* cy;
+			double c2y = Math.sin(rotationAngle) * cx + Math.cos(rotationAngle)* cy;
+
+			AffineTransform at = AffineTransform.getTranslateInstance(cx - c2x, cy - c2y);
+			at.rotate(rotationAngle);
+			area = at.createTransformedShape(area);
+		}
+
+		return area;
+	}
+
+	
+	
+	
+	
+	@Override
+	public Shape createNonRotatedShape2D() 
+	{
+		Shape area;
+		Shape s = getInsideOutsideOrMiddleBorders();
+
+		if(hasDoubleBoundary)
+		{
+			Shape[] s2 = getDbleBoundariesOutInOrMiddle(s);
+			Shape min;
+			Shape max;
+
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			{
+				max = s;
+				min = s2[1];
+			}
+			else
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				{
+					max = s2[0];
+					min = s2[1];
+				}
+				else
+				{
+					max = s2[0];
+					min = s;
+				}
+
+			area = new Area(max);
+			((Area)area).exclusiveOr(new Area(min));
+		}
+		else
+			area = s;
+		
+		return area;
+	}
+	
+	
+
+	
+	
+	@Override
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, Object colorRendering) 
+	{
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint(), SE = borders.getTheSEPoint();
+		double cx = (NW.x+SE.x)/2., cy = (NW.y+SE.y)/2.;
+		double c2x = Math.cos(rotationAngle)*cx - Math.sin(rotationAngle)*cy;
+		double c2y = Math.sin(rotationAngle)*cx + Math.cos(rotationAngle)*cy;
+		double c3x = Math.cos(-rotationAngle)*(cx-c2x) - Math.sin(-rotationAngle)*(cy-c2y);
+		double c3y = Math.sin(-rotationAngle)*(cx-c2x) + Math.cos(-rotationAngle)*(cy-c2y);
+		double dx=0, dy=0;
+		boolean changeFillStyle = false;
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+		{		
+			g.rotate(rotationAngle);
+			g.translate(c3x,c3y);
+		}
+		
+		if(hasShadow)
+		{
+			LaTeXDrawPoint2D cg = getGravityCenter();
+			LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+			shadowCg.setLocation(cg.x+shadowSize, cg.y);
+			shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+			dx = shadowCg.x-cg.x;
+			dy = cg.y-shadowCg.y;
+		}
+		
+		Color formerCol = g.getColor();
+
+		if(hasDoubleBoundary)
+		{
+			Shape s0 = shape;
+			Shape s[] = getDbleBoundariesOutInOrMiddle(s0);
+			Shape s1, s2, s3;
+
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			{
+				s1 = s0;
+				s2 = s[0];
+				s3 = s[1];
+			}
+			else
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				{
+					s1 = s[0];
+					s2 = s0;
+					s3 = s[1];
+				}
+				else
+				{
+					s1 = s[0];
+					s2 = s[1];
+					s3 = s0;
+				}
+
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+			{
+				if(hasShadow)
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(s1);
+					g.draw(s1);
+					g.translate(-dx, -dy);
+					
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+				}
+				g.setColor(doubleColor);
+				g.setStroke(new BasicStroke((float)(doubleSep + thickness), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.draw(s2);
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering,s3);
+				g.setColor(linesColor);
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.draw(s1);
+				g.draw(s3);
+			}
+			else
+			{
+				if(hasShadow)
+				{
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.translate(dx, dy);
+					g.setColor(shadowColor);
+					g.fill(s1);
+					g.draw(s1);
+					g.translate(-dx, -dy);
+					
+					g.setColor(interiorColor);
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+					g.draw(s2);
+					
+					if(!isFilled)
+					{
+						changeFillStyle = true;
+						isFilled = true;
+					}
+				}
+
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep), BasicStroke.CAP_ROUND,
+							BasicStroke.JOIN_MITER, 1.f, new float[]{ 0, (float)(thickness*2+doubleSep + dotSep) }, 0));
+				else
+					g.setStroke(new BasicStroke((float)(thickness*2+doubleSep),
+							BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f, new float[] { blackDashLength, whiteDashLength }, 0));
+					
+				fillFigure(g, antiAlias, rendering, alphaInter, colorRendering, s2);
+				g.setColor(linesColor);
+				g.draw(s2);
+				g.setStroke(new BasicStroke((float)doubleSep, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.setColor(doubleColor);
+				g.draw(s2);
+			}				
+		}
+		else
+		{
+			if(hasShadow)
+			{
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+				g.translate(dx, dy);
+				g.setColor(shadowColor);
+				g.fill(shape);
+				g.draw(shape);
+				g.translate(-dx, -dy);
+				
+				if(!isFilled)
+				{
+					changeFillStyle = true;
+					isFilled = true;
+				}
+				
+				g.setColor(interiorColor);
+				g.draw(shape);
+			}
+			
+			if(lineStyle.equals(PSTricksConstants.LINE_NONE_STYLE))
+				g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+			else
+				if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_ROUND,
+									BasicStroke.JOIN_MITER, 1.f, new float[] { 0, thickness + dotSep }, 0));
+				else
+					g.setStroke(new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.f,
+								new float[] { blackDashLength, whiteDashLength }, 0));
+			
+			if(shape==null)
+				shape = getInsideOutsideOrMiddleBorders();
+			
+			fillFigure(g, antiAlias, rendering, alphaInter, colorRendering,shape);
+			g.setColor(linesColor);
+			g.draw(shape);
+		}
+
+		if(changeFillStyle) isFilled = false;
+		g.setColor(formerCol);
+
+		if(rotationAngle%(Math.PI*2)!=0)
+		{
+			g.translate(-c3x, -c3y);
+			g.rotate(-rotationAngle);
+		}
+
+		if(isSelected)
+			borders.draw(g, false, antiAlias, rendering, alphaInter, colorRendering);
+	}
+
+
+	
+	
+	
+	@Override
+	public void setLastPoint(LaTeXDrawPoint2D pt)
+	{
+		borders.setLastPoint(pt);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	@Override
+	public void setFirstPoint(LaTeXDrawPoint2D pt)
+	{
+		borders.setFirstPoint(pt);
+		updateGravityCenter();
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+
+	@Override
+	public synchronized void setBordersPosition(String doubleLinePosition)
+	{
+		super.setBordersPosition(doubleLinePosition);
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void setRotationAngle(double theta)
+	{
+		if(!Double.isNaN(theta) && !Double.isInfinite(theta))
+		{
+			rotationAngle = theta%(Math.PI*2);
+			
+			if(borders!=null)
+				borders.setRotationAngle(rotationAngle);
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public synchronized void shift(double shiftX,double shiftY) 
+	{
+		if(shiftX==0 && shiftY==0) return ;
+
+		borders.shift(shiftX, shiftY);
+		updateShape();
+	}
+
+	
+	
+	
+	
+	@Override
+	public void onDragged(Point formerPt, Point newPt) throws Exception
+	{
+		if(formerPt.equals(newPt)) return;
+		
+		borders.onDragged(formerPt, newPt);
+		rotationAngle = borders.getRotationAngle();//update the angle (when rotation)
+		updateShape();
+	}
+	
+	
+	
+	
+
+	@Override
+	public synchronized String getCodePSTricks(DrawBorders drawBorders, float ppc)
+	{
+		LaTeXDrawPoint2D d = drawBorders.getOriginPoint();
+		LaTeXDrawPoint2D NW = getTheNWPoint(), SE = getTheSEPoint();
+		float baseX = (float) ((NW.x+SE.x)/2. - d.x), baseY = (float) (d.y - SE.y) ;
+		String add="", fillType=""; //$NON-NLS-1$ //$NON-NLS-2$ 
+		String addBegin = "";//$NON-NLS-1$
+		String addEnd = "";//$NON-NLS-1$
+		LaTeXDrawPoint2D pt1 = borders.getPoint(0), pt2 = borders.getPoint(2);
+		boolean isFilledWasChanged = false;
+		double threshold = 0.001;
+		
+		if(pt1.y>pt2.y || rotationAngle%(Math.PI*2)!=0.)
+		{
+			double angle = -Math.toDegrees(rotationAngle);
+			if(pt1.y>pt2.y) angle-=180;
+			double angleRad = Math.toRadians(angle);
+			
+			double cx = (gravityCenter.x-d.x)/ppc;
+			double cy = (d.y-gravityCenter.y)/ppc;
+			double x = -Math.cos(angleRad)*cx+Math.sin(angleRad)*cy+cx;
+			double y = -Math.sin(angleRad)*cx-Math.cos(angleRad)*cy+cy;
+			
+			if(Math.abs(x) < 0.001) x = 0;
+			if(Math.abs(y) < 0.001) y = 0;
+			
+			addBegin +="\\rput{"+(float)angle+ "}("+(float)x+','+(float)y+"){"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			addEnd = "}"; //$NON-NLS-1$
+		}
+		
+		if(hasShadow)
+		{
+			fillType+=",shadow=true";//$NON-NLS-1$
+			fillType+=",shadowangle="+LaTeXDrawNumber.getCutNumber((float)(Math.toDegrees(shadowAngle)-(pt1.y>pt2.y?180:0)),threshold);//$NON-NLS-1$
+			
+			if(((float)shadowSize)!=((float)DEFAULT_SHADOW_SIZE))
+				fillType+=",shadowsize="+LaTeXDrawNumber.getCutNumber((float)(shadowSize/PPC),threshold);//$NON-NLS-1$
+			
+			if(!shadowColor.equals(PSTricksConstants.DEFAULT_SHADOW_COLOR))
+			{
+				String name = DviPsColors.getColourName(shadowColor);
+				if(name==null)
+				{
+					name = "color"+number+'e';//$NON-NLS-1$
+					DviPsColors.addUserColour(shadowColor, name); 
+				}
+				fillType += ",shadowcolor=" + name; //$NON-NLS-1$
+			}
+			if(!isFilled)
+			{
+				isFilled = true;
+				isFilledWasChanged = true;
+			}
+		}
+		
+		String str = getPSTricksCodeFilling(ppc);
+		if(str.length()>0) fillType=fillType+','+str;
+		
+		str = getPSTricksCodeLine(ppc);
+		if(str.length()>0) add=add+','+str;
+		
+		add+=",dimen="+bordersPosition;  //$NON-NLS-1$
+
+		if(hasDoubleBoundary)
+		{
+			add+=",doubleline=true,doublesep="+LaTeXDrawNumber.getCutNumber((float)(doubleSep/ppc),threshold); //$NON-NLS-1$
+			
+			if(doubleColor!=PSTricksConstants.DEFAULT_DOUBLE_COLOR)
+			{
+				String name = DviPsColors.getColourName(doubleColor);
+				if(name==null)
+				{
+					name = "color"+number+'d';//$NON-NLS-1$
+					DviPsColors.addUserColour(doubleColor, name); 
+				}
+				add+= ",doublecolor="+name; //$NON-NLS-1$
+			}
+		}
+		
+		if(isFilledWasChanged) isFilled = false;
+		
+		return addBegin+"\\pstriangle[linewidth=" +  //$NON-NLS-1$
+				LaTeXDrawNumber.getCutNumber(thickness/ppc,threshold) + add + fillType + "]("  //$NON-NLS-1$
+				+ LaTeXDrawNumber.getCutNumber(baseX/ppc, threshold) + ',' + LaTeXDrawNumber.getCutNumber(baseY/ppc, threshold) + ")("  //$NON-NLS-1$
+				+ LaTeXDrawNumber.getCutNumber((float)(Math.abs(NW.x-SE.x)/ppc),threshold) + ',' 
+				+ LaTeXDrawNumber.getCutNumber((float)(Math.abs(NW.y-SE.y)/ppc),threshold) + ')'+addEnd;
+	}
+
+
+	
+	
+
+	/**
+	 * Allows to get the south-east point by taking into account
+	 * the angle of rotation.
+	 * @return The south-east point of the rotated rectangle
+	 */
+	@Override
+	public LaTeXDrawPoint2D getTheSERotatedPoint()
+	{
+		if(borders!=null)
+			return borders.getTheSERotatedPoint();
+		return null;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to get the north-west point by taking into account
+	 * the angle of rotation.
+	 * @return The north-west point of the rotated rectangle
+	 */
+	@Override
+	public LaTeXDrawPoint2D getTheNWRotatedPoint()
+	{
+		if(borders!=null)
+			return borders.getTheNWRotatedPoint();
+		return null;
+	}
+	
+	
+
+	
+	@Override
+	public boolean isIn(LaTeXDrawPoint2D p)
+	{
+		LaTeXDrawPoint2D pt = rotateInvertPoint(p);
+		
+		if(isSelected && (borders.dNE.isIn(pt) || borders.dNW.isIn(pt) || 
+			borders.dSE.isIn(pt) || borders.dSW.isIn(pt) || borders.dS.isIn(pt)  || 
+			borders.dN.isIn(pt) || borders.dE.isIn(pt)  || borders.dW.isIn(pt)))
+			return true;
+		
+		GeneralPath path;
+		
+		if(hasDoubleBoundary)
+		{
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 path = getBorders(0, true);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 path = getBorders(thickness*2+doubleSep, false);
+			else path = getBorders((thickness*2+doubleSep)*2, false);
+
+			if(!path.contains(pt))
+				return false;
+
+			if(isFilled || hasShadow || hasGradient())
+				return true;
+			
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				path = getBorders((thickness*2+doubleSep)*2, true);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				path = getBorders(doubleSep+2*thickness, true);
+			else path = getBorders(0, true);
+		}
+		else
+		{
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 path = getBorders(0, true);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 path = getBorders(thickness, false);
+			else path = getBorders(thickness*2, false);
+		
+			if(!path.contains(pt))
+				return false;
+
+			if(isFilled || hasShadow || hasGradient())
+				return true;
+			
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 path = getBorders(thickness*2, true);
+			else if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 path = getBorders(thickness, true);
+			else path = getBorders(0, true);
+		}
+		
+		return !path.contains(pt);
+	}
+
+	
+	
+	
+	
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Triangle t = (Triangle) super.clone();
+		t.borders = new LaTeXDrawRectangle(t.getPoint(0), t.getPoint(1), t.getPoint(2), t.getPoint(3), false);
+		t.setThickness(thickness);
+		t.updateShape();
+		
+		return t;
+	}
+	
+
+	
+	@SuppressWarnings("unchecked")
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		canHaveShadow = true;
+		interiorColor = (Color) ois.readObject();
+		lineStyle = (String) ois.readObject();
+		rotationAngle = ois.readDouble();
+		thickness = ois.readFloat();
+		isFilled = ois.readBoolean();
+		isSelected = ois.readBoolean();
+		isOnRotation = ois.readBoolean();
+		linesColor = (Color) ois.readObject();
+		blackDashLength = ois.readFloat();
+		dotSep = ois.readFloat();
+		whiteDashLength = ois.readFloat();
+		pts = (Vector) ois.readObject();
+		borders = (LaTeXDrawRectangle) ois.readObject();
+		
+		delimiters = new Vector();
+		for(int i=0, size = pts.size();i<size; i++)
+			delimiters.add(new Delimitor(pts.elementAt(i)));
+			
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0)//$NON-NLS-1$
+		{
+			hasDoubleBoundary = ois.readBoolean();
+			doubleColor = (Color)ois.readObject();
+			doubleSep = ois.readDouble();
+			bordersPosition = (String)ois.readObject();
+			if(!(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0)) //$NON-NLS-1$
+				ois.readBoolean();
+			hatchingAngle = ois.readDouble();
+			hatchingColor = (Color)ois.readObject();
+			hatchingStyle = (String)ois.readObject();
+			hatchingWidth = ois.readFloat();
+			
+			if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6") < 0)//$NON-NLS-1$
+			{
+				if(hatchingStyle.equals(DECREPETED_FILL_CROSS))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_CROSSHATCH;
+				else if(hatchingStyle.equals(DECREPETED_FILL_HORIZ))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_HLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_VERT))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_VLINES;
+				else if(hatchingStyle.equals(DECREPETED_FILL_NO))
+					hatchingStyle = PSTricksConstants.TOKEN_FILL_NONE;
+			}
+		}
+		else
+		{
+			hasDoubleBoundary  = DEFAULT_HAS_DOUBLE_BOUNDARY;
+			doubleColor = DEFAULT_DOUBLE_COLOR;
+			doubleSep   = DEFAULT_DOUBLESEP;
+			bordersPosition = DEFAULT_BORDERS_POSITION;
+			hatchingAngle = DEFAULT_HATCH_ANGLE;
+			hatchingColor = DEFAULT_HATCH_COL;
+			hatchingStyle = DEFAULT_HATCH_STYLE;
+			hatchingWidth = DEFAULT_HATCH_WIDTH;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0) //$NON-NLS-1$
+		{
+			hasShadow 	= ois.readBoolean();
+			shadowAngle = ois.readDouble();
+			shadowSize	= ois.readDouble();
+			shadowColor	= (Color)ois.readObject();
+			gradientEndColor = (Color)ois.readObject();
+			gradientStartColor = (Color)ois.readObject();
+			gradientAngle = ois.readDouble();
+			gradientMidPoint = ois.readDouble();
+		}
+		else
+		{
+			hasShadow 	= DEFAULT_SHADOW_HAS;
+			shadowAngle	= DEFAULT_SHADOW_ANGLE;
+			shadowSize	= DEFAULT_SHADOW_SIZE;
+			shadowColor	= DEFAULT_SHADOW_COLOR;
+			gradientEndColor = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+			gradientStartColor = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+			gradientAngle = DEFAULT_GRADIENT_ANGLE;
+			gradientMidPoint = DEFAULT_GRADIENT_MID_POINT;
+		}
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+			hatchingSep = ois.readDouble();
+		else
+			hatchingSep = DEFAULT_HATCH_SEP;
+		
+		shape = getInsideOutsideOrMiddleBorders();
+	}
+	
+
+
+	
+
+	@Override
+	protected GeneralPath getBorders(double gap, boolean into)
+	{
+		if(gap==0.)
+			return getMiddleBorders();
+		
+		GeneralPath gp = new GeneralPath();
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		
+		if(pt1.x<pt2.x+thickness && pt1.x>pt2.x-thickness)
+		{
+			gp.moveTo((float)(pt1.x+pt2.x)/2f, (float)pt1.y);
+			gp.lineTo((float)(pt1.x+pt2.x)/2f, (float)pt2.y);
+		}
+		else
+		{
+			if(!into) 
+				gap*=-1;
+			
+			LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D((pt1.x+pt2.x)/2., pt1.y);
+			LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D(pt2.x, pt2.y);
+			LaTeXDrawPoint2D p3 = new LaTeXDrawPoint2D(pt1.x, pt2.y);
+		    double cornerGap1 = Figure.getCornerGap(new LaTeXDrawPoint2D(p1.x, p2.y), p1, p2, gap)/2.;
+		    double cornerGap2 = Figure.getCornerGap(getGravityCenter(), p2, p3, gap)/2.;
+		    
+		    if(p2.x<p3.x)
+		    	cornerGap2*=-1;
+		    
+		    if(p1.y>p2.y)
+		    	cornerGap1*=-1;
+		    
+		    gp.moveTo((float)p1.x, (float)(p1.y + cornerGap1));
+		    gp.lineTo((float)(p2.x - cornerGap2), (float)(p2.y + (p1.y>p2.y ? gap/2. : -gap/2.)));
+		    gp.lineTo((float)(p3.x + cornerGap2), (float)(p2.y + (p1.y>p2.y ? gap/2. : -gap/2.)));
+		    gp.closePath();
+		}
+			
+		return gp;
+	}
+	
+	
+
+	public GeneralPath getInsideBorders()
+	{
+		return getBorders(thickness, true);
+	}
+
+
+	
+	
+	
+	public GeneralPath getOutsideBorders()
+	{
+		return getBorders(thickness, false);
+	}
+
+	
+	
+
+	
+	public GeneralPath getMiddleBorders()
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		GeneralPath gp = new GeneralPath();
+		
+		gp.moveTo((float)(pt2.x + pt1.x)/2f, (float)pt1.y);
+		gp.lineTo((float)pt1.x, (float)pt2.y);
+		gp.lineTo((float)pt2.x, (float)pt2.y);
+		gp.closePath();
+
+		return gp;
+	}
+
+
+	
+	
+	
+	@Override
+	public GeneralPath getInsideOutsideOrMiddleBorders()
+	{
+		GeneralPath path;
+		
+		if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			path = getInsideBorders();
+		else
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_OUTSIDE))
+				path = getOutsideBorders();
+			else
+				path = getMiddleBorders();
+
+		return path;
+	}
+	
+	
+	
+	
+	
+	
+	@Override
+	public GeneralPath[] getDbleBoundariesOutside(Shape classicBord)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		GeneralPath[] sx = new GeneralPath[2];
+		
+		if(pt1.x<pt2.x+thickness && pt1.x>pt2.x-thickness)
+		{
+			sx[0] = new GeneralPath(classicBord);
+			sx[1] = new GeneralPath(classicBord);
+		}
+		else
+		{
+			sx[0] = getBorders(3*thickness+2*doubleSep, false);
+			sx[1] = getBorders(2*thickness+doubleSep, false);
+		}
+		
+		return sx;
+	}
+
+
+	
+	
+
+	@Override
+	public GeneralPath[] getDbleBoundariesInside(Shape classicBord)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		GeneralPath[] sx = new GeneralPath[2];
+		
+		if(pt1.x<pt2.x+thickness && pt1.x>pt2.x-thickness)
+		{
+			sx[0] = new GeneralPath(classicBord);
+			sx[1] = new GeneralPath(classicBord);
+		}
+		else
+		{
+			sx[1] = getBorders(3*thickness+2*doubleSep, true);
+			sx[0] = getBorders(2*thickness+doubleSep, true);
+		}
+		
+		return sx;
+	}
+
+
+	
+	
+
+	@Override
+	public GeneralPath[] getDbleBoundariesMiddle(Shape classicBord)
+	{
+		LaTeXDrawPoint2D pt1 = getPoint(0), pt2 = getPoint(-1);
+		GeneralPath[] sx = new GeneralPath[2];
+		
+		if(pt1.x<pt2.x+thickness && pt1.x>pt2.x-thickness)
+		{
+			sx[0] = new GeneralPath(classicBord);
+			sx[1] = new GeneralPath(classicBord);
+		}
+		else
+		{
+			sx[0] = getBorders(thickness+doubleSep, false);
+			sx[1] = getBorders(thickness+doubleSep, true);
+		}
+		
+		return sx;
+
+	}
+	
+	
+	
+	@Override
+	public GeneralPath[] getDbleBoundariesOutInOrMiddle(Shape classicBord)
+	{
+		GeneralPath[] path;
+
+		if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+			path = getDbleBoundariesInside(classicBord);
+		else
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_OUTSIDE))
+				path = getDbleBoundariesOutside(classicBord);
+			else
+				path = getDbleBoundariesMiddle(classicBord);
+
+		return path;
+	}
+
+	
+	
+	@Override
+	public synchronized void setThickness(float val)
+	{
+		if(!Double.isInfinite(val) && !Double.isNaN(val) && val>0)
+		{
+			thickness = val;
+			shape = getInsideOutsideOrMiddleBorders();
+			borders.setThickness(thickness);
+		}
+	}
+	
+	
+	
+	@Override
+	@Deprecated
+	public void updateBorders()
+	{
+		/*
+		 * Update the borders change the points of the triangle. 
+		 */
+	}
+	
+	
+	
+	@Override
+	public Shape createShadowShape()
+	{
+		if(!canHaveShadow || !hasShadow) return shape;
+		
+		Shape shadowS;
+		
+		if(hasDoubleBoundary)
+		{
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 shadowS = getBorders(0, true);
+			else 
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 shadowS = getBorders(thickness*2+doubleSep, false);
+			else 
+				shadowS = getBorders((thickness*2+doubleSep)*2, false);
+		}
+		else
+		{
+			if(bordersPosition.equals(PSTricksConstants.BORDERS_INSIDE))
+				 shadowS = getBorders(0, false);
+			else 
+				if(bordersPosition.equals(PSTricksConstants.BORDERS_MIDDLE))
+				 shadowS = getBorders(thickness, false);
+			else 
+				shadowS = getBorders(thickness*2, false);
+		}
+		
+		double dx=0, dy=0;
+		LaTeXDrawPoint2D cg = getGravityCenter();
+		LaTeXDrawPoint2D shadowCg = (LaTeXDrawPoint2D)cg.clone();
+		AffineTransform at = new AffineTransform();
+		
+		shadowCg.setLocation(cg.x+shadowSize, cg.y);
+		shadowCg = Figure.rotatePoint(shadowCg, cg, shadowAngle);
+		dx = shadowCg.x-cg.x;
+		dy = cg.y-shadowCg.y;
+		at.translate(dx, dy);
+		
+		return at.createTransformedShape(shadowS);
+	}
+
+	
+	
+	
+	@Override
+	public String getPSTricksCodeFilling(float ppc)
+	{
+		String str="fillstyle=";//$NON-NLS-1$
+
+		if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_NONE))
+		{
+			if(isFilled)
+				str += "solid"; //$NON-NLS-1$
+			else str = "";//$NON-NLS-1$
+		}
+		else
+			if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_GRADIENT))
+			{
+				str+= "gradient,gradlines=2000";//$NON-NLS-1$
+				
+				if(!gradientStartColor.equals(PSTricksConstants.DEFAULT_GRADIENT_START_COLOR))
+				{
+					String name = DviPsColors.getColourName(gradientStartColor);
+					if(name==null)
+					{
+						name = "color"+number+'g';//$NON-NLS-1$
+						DviPsColors.addUserColour(gradientStartColor, name); 
+					}
+					str += ",gradbegin=" + name; //$NON-NLS-1$
+				}
+				
+				if(!gradientEndColor.equals(PSTricksConstants.DEFAULT_GRADIENT_END_COLOR))
+				{
+					String name = DviPsColors.getColourName(gradientEndColor);
+					if(name==null)
+					{
+						name = "color"+number+'f';//$NON-NLS-1$
+						DviPsColors.addUserColour(gradientEndColor, name); 
+					}
+					str += ",gradend=" + name; //$NON-NLS-1$
+				}
+				
+				if(gradientMidPoint!=PSTricksConstants.DEFAULT_GRADIENT_MID_POINT)
+					str+=",gradmidpoint="+(float)gradientMidPoint;//$NON-NLS-1$
+				
+				boolean reverse = getPoint(0).y>getPoint(2).y;
+				if(Math.toDegrees(gradientAngle)!=PSTricksConstants.DEFAULT_GRADIENT_ANGLE ||
+						(reverse && (Math.toDegrees(gradientAngle)+180)!=PSTricksConstants.DEFAULT_GRADIENT_ANGLE))
+					str+=",gradangle="+(float)(toDegrees(gradientAngle)-//$NON-NLS-1$
+							 (reverse? 180 : 0));
+			}
+			else
+			{
+				if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH))
+					str += "crosshatch"; //$NON-NLS-1$
+				else
+					if (hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_HLINES))
+						str += "hlines"; //$NON-NLS-1$
+					else
+						str += "vlines"; //$NON-NLS-1$
+	
+				if(isFilled)
+					str += "*"; //$NON-NLS-1$
+	
+				str += ",hatchwidth=" + (hatchingWidth / ppc) + ",hatchangle=" + //$NON-NLS-1$ //$NON-NLS-2$
+						(float)Math.toDegrees(hatchingAngle);
+				if(!hatchingColor.equals(PSTricksConstants.DEFAULT_HATCHING_COLOR))
+				{
+					String name = DviPsColors.getColourName(hatchingColor);
+					if(name==null)
+					{
+						name = "color"+number+'c';//$NON-NLS-1$
+						DviPsColors.addUserColour(hatchingColor, name); 
+					}
+					str += ",hatchcolor=" + name; //$NON-NLS-1$
+				}
+			}
+		
+		if(isFilled)
+		{
+			if (!interiorColor.equals(PSTricksConstants.DEFAULT_INTERIOR_COLOR))
+			{
+				String name = DviPsColors.getColourName(interiorColor);
+				if(name==null)
+				{
+					name = "color"+number+'b';//$NON-NLS-1$
+					DviPsColors.addUserColour(interiorColor, name); 
+				}
+				str += ",fillcolor=" + name; //$NON-NLS-1$
+			}
+		}
+		
+		return str;
+	}
+	
+	
+	
+	@Override
+	@Deprecated
+	public void updateBorders(LaTeXDrawPoint2D pt)
+	{
+		// Nothing must be done.
+	}
+	
+	
+	@Override
+	public void mirrorHorizontal(LaTeXDrawPoint2D origin)
+	{
+		borders.mirrorHorizontal(origin);
+		updateShape();
+	}
+
+
+
+	@Override
+	public void mirrorVertical(LaTeXDrawPoint2D origin)
+	{
+		borders.mirrorVertical(origin);
+		updateShape();
+	}
+
+
+
+
+	@Override
+	public synchronized LaTeXDrawPoint2D getLastPoint()
+	{
+		return borders.getLastPoint();
+	}
+	
+	
+	@Override
+	public void updateToGrid(MagneticGrid grid)
+	{
+		borders.updateToGrid(grid);
+		updateShape();
+	}
+	
+	
+	@Override
+	public void rescaleX(double formerX, double newX, double percent, LaTeXDrawRectangle bound)
+	{
+		borders.rescaleX(formerX, newX, percent, bound);
+		updateShape();
+	}
+
+
+
+
+	@Override
+	public void rescaleY(double formerY, double newY, double percent, LaTeXDrawRectangle bound)
+	{
+		borders.rescaleY(formerY, newY, percent, bound);
+		updateShape();
+	}
+	
+	
+	
+	
+	/**
+	 * Computes the altitude ha of the <b>right-triangle<b> ABC, right in A.
+	 * @param a The point A.
+	 * @param b The point B.
+	 * @param c The point C.
+	 * @return The altitude ha or 0.
+	 * @since 2.0.0
+	 */
+	public static double getAltitude(Point2D a, Point2D b, Point2D c)
+	{
+		if(a==null || b==null || c==null)
+			return 0.;
+		
+		double ac = a.distance(c), ab = a.distance(b);
+		
+		if(((float)ab) == ((float)ac))
+			return a.distance((b.getX()+c.getX())/2., (b.getY()+c.getY())/2.);
+		
+		return ab * ac / b.distance(c);
+	}
+	
+	
+	
+	
+	@Override
+	public int hashCode()
+	{
+		return (int)(super.hashCode()/3.5);
+	}
+}
diff --git a/current/latexDraw/figures/properties/Arrowable.java b/current/latexDraw/figures/properties/Arrowable.java
new file mode 100644
index 0000000..1e4170e
--- /dev/null
+++ b/current/latexDraw/figures/properties/Arrowable.java
@@ -0,0 +1,48 @@
+package latexDraw.figures.properties;
+
+import latexDraw.figures.ArrowHead;
+
+/** 
+ * This class defines a property of figures: if a shape can have (two) arrows, this interface
+ * defines the prototype of the methods for the management of these arrows.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 07/25/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @since 1.8<br>
+ * @version 2.0.0<br>
+ */
+public interface Arrowable
+{
+	/** Allows to get the style of the first arrow. */
+	public String getArrow1Style();
+	
+	/** Allows to get the style of the second arrow. */
+	public String getArrow2Style();
+	
+	/** Allows to get the first arrow. */
+	public ArrowHead getArrowHead1();
+	
+	/** Allows to get the second arrow. */
+	public ArrowHead getArrowHead2();
+	
+	/** Allows to set the first arrow. */
+	public void setArrow1Style(String style);
+	
+	/** Allows to set the first arrow. */
+	public void setArrow2Style(String style);
+	
+	/** Some figures like joined-lines, axes, Bézier curves, have not a left arrow and a right arrow but two left arrows. */
+	public boolean hasTwoLeftArrows();
+}
diff --git a/current/latexDraw/figures/properties/BordersMovable.java b/current/latexDraw/figures/properties/BordersMovable.java
new file mode 100644
index 0000000..4d79e30
--- /dev/null
+++ b/current/latexDraw/figures/properties/BordersMovable.java
@@ -0,0 +1,36 @@
+package latexDraw.figures.properties;
+
+import java.awt.Shape;
+
+
+/** 
+ * This class defines a properties of figures: if the borders can move,
+ * these methods allow the user to get the different positions of the
+ * borders.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public interface BordersMovable
+{
+	public Shape getInsideBorders();
+	
+	public Shape getOutsideBorders();
+	
+	public Shape getMiddleBorders();
+	
+	public Shape getInsideOutsideOrMiddleBorders();
+}
diff --git a/current/latexDraw/figures/properties/DoubleBoundaryable.java b/current/latexDraw/figures/properties/DoubleBoundaryable.java
new file mode 100644
index 0000000..8bfc038
--- /dev/null
+++ b/current/latexDraw/figures/properties/DoubleBoundaryable.java
@@ -0,0 +1,66 @@
+package latexDraw.figures.properties;
+
+import java.awt.Shape;
+
+/** 
+ * This class define a properties of figures : if the figure can have 
+ * double boundaries, then these methods allows the user to get the two of 
+ * three borders of the double boundaries (the third boundary is the classic
+ * borders of the figure).
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public interface DoubleBoundaryable
+{
+	/**
+	 * Allows to get the two others borders of the double boundary
+	 * @param classicBord The initial border
+	 * @return The two others borders of the double boundary (shape[0] is the
+	 * bigger of the two borders).
+	 */
+	public Shape[] getDbleBoundariesOutside(Shape classicBord);
+	
+	
+	
+	/**
+	 * Allows to get the two others borders of the double boundary
+	 * @param classicBord The initial border
+	 * @return The two others borders of the double boundary (shape[0] is the
+	 * bigger of the two borders).
+	 */
+	public Shape[] getDbleBoundariesInside(Shape classicBord);
+	
+	
+	
+	/**
+	 * Allows to get the two others borders of the double boundary
+	 * @param classicBord The initial border
+	 * @return The two others borders of the double boundary (shape[0] is the
+	 * bigger of the two borders).
+	 */
+	public Shape[] getDbleBoundariesMiddle(Shape classicBord);
+	
+	
+	
+	
+	/**
+	 * Allows to get the two others borders of the figure according to the position
+	 * of the borders: inside, outside or in the middle.
+	 * @return The two others borders
+	 */
+	public Shape[] getDbleBoundariesOutInOrMiddle(Shape classicBord);
+}
diff --git a/current/latexDraw/figures/properties/Drawable.java b/current/latexDraw/figures/properties/Drawable.java
new file mode 100644
index 0000000..61bbabb
--- /dev/null
+++ b/current/latexDraw/figures/properties/Drawable.java
@@ -0,0 +1,44 @@
+package latexDraw.figures.properties;
+
+import java.awt.Graphics2D;
+
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.util.LaTeXDrawException;
+
+/**
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/01/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public interface Drawable
+{
+	/**
+	 * Allows to draw the figure.
+	 * @param g The graphic
+	 * @param antiAlias The antialiasing value
+	 * @param rendering The rendering value
+	 * @param alphaInter The alphainterpolation value
+	 * @param colorRendering The colour rendering value
+	 * @throws LaTeXDrawException
+	 */
+	public void draw(Graphics2D g, Object antiAlias, Object rendering, Object alphaInter, 
+					Object colorRendering) throws Exception;
+	
+	
+	/**
+	 * @return The borders of the drawn figure.
+	 */
+	public LaTeXDrawRectangle getBorders();
+}
diff --git a/current/latexDraw/filters/BMPFilter.java b/current/latexDraw/filters/BMPFilter.java
new file mode 100644
index 0000000..d1e5d3d
--- /dev/null
+++ b/current/latexDraw/filters/BMPFilter.java
@@ -0,0 +1,49 @@
+/*
+ * BMPFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines a filter for bmp files (*.bmp)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ *<br>
+ * 02/04/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class BMPFilter extends FileFilter
+{
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(LaTeXDrawResources.BMP_EXTENSION)|| file.isDirectory();
+	}
+
+	
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + LaTeXDrawResources.BMP_EXTENSION; //$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/filters/EPSFilter.java b/current/latexDraw/filters/EPSFilter.java
new file mode 100644
index 0000000..583b25a
--- /dev/null
+++ b/current/latexDraw/filters/EPSFilter.java
@@ -0,0 +1,50 @@
+/*
+ * EPSFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines a filter for eps files (*.eps)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class EPSFilter extends FileFilter
+{
+
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(LaTeXDrawResources.EPS_EXTENSION)|| file.isDirectory();
+	}
+
+	
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + LaTeXDrawResources.EPS_EXTENSION; //$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/filters/GIFFilter.java b/current/latexDraw/filters/GIFFilter.java
new file mode 100644
index 0000000..7ba0174
--- /dev/null
+++ b/current/latexDraw/filters/GIFFilter.java
@@ -0,0 +1,49 @@
+/*
+ * GIFFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines a filter for gif files (*.gif)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ *<br>
+ * 01/03/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class GIFFilter extends FileFilter
+{
+	
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(LaTeXDrawResources.GIF_EXTENSION) || file.isDirectory();
+	}
+
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + LaTeXDrawResources.GIF_EXTENSION; //$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/filters/JPGFilter.java b/current/latexDraw/filters/JPGFilter.java
new file mode 100644
index 0000000..eda3420
--- /dev/null
+++ b/current/latexDraw/filters/JPGFilter.java
@@ -0,0 +1,50 @@
+/*
+ * JPGFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines a filter for jpg files (*.jpg)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class JPGFilter extends FileFilter
+{
+
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(LaTeXDrawResources.JPG_EXTENSION)|| file.isDirectory();
+	}
+
+	
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + LaTeXDrawResources.JPG_EXTENSION; //$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/filters/LaTeXDrawFilter.java b/current/latexDraw/filters/LaTeXDrawFilter.java
new file mode 100644
index 0000000..0f90c43
--- /dev/null
+++ b/current/latexDraw/filters/LaTeXDrawFilter.java
@@ -0,0 +1,49 @@
+/*
+ * LaTeXDrawFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+import latexDraw.util.LaTeXDrawResources;
+
+/** 
+ * This class defines a filter for LaTeXDraw files (*.ldp)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class LaTeXDrawFilter extends FileFilter
+{
+
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(LaTeXDrawResources.PROJECT_EXTENSION)|| file.isDirectory();
+	}
+
+	
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + LaTeXDrawResources.PROJECT_EXTENSION; //$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/filters/LaTeXDrawTemplateFilter.java b/current/latexDraw/filters/LaTeXDrawTemplateFilter.java
new file mode 100644
index 0000000..b122025
--- /dev/null
+++ b/current/latexDraw/filters/LaTeXDrawTemplateFilter.java
@@ -0,0 +1,49 @@
+/*
+ * LaTeXDrawFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+import latexDraw.util.LaTeXDrawResources;
+
+/** 
+ * This class defines a filter for LaTeXDraw templates files (*.ldt)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class LaTeXDrawTemplateFilter extends FileFilter
+{
+
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(LaTeXDrawResources.TEMPLATE_EXTENSION);
+	}
+
+	
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + LaTeXDrawResources.TEMPLATE_EXTENSION;//$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/filters/PDFFilter.java b/current/latexDraw/filters/PDFFilter.java
new file mode 100644
index 0000000..e44bad1
--- /dev/null
+++ b/current/latexDraw/filters/PDFFilter.java
@@ -0,0 +1,43 @@
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+/** 
+ * This class defines a filter for pdf documents (*.pdf)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 12/08/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.3<br>
+ * @since 2.0.3
+ */
+public class PDFFilter extends FileFilter
+{
+	public static final String PDF_EXTENSION = ".pdf";//$NON-NLS-1$
+
+	
+	@Override
+	public boolean accept(File f)
+	{
+		return f!=null && (f.getName().endsWith(PDF_EXTENSION)|| f.isDirectory());
+	}
+
+	@Override
+	public String getDescription()
+	{
+		return "*" + PDF_EXTENSION; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/current/latexDraw/filters/PNGFilter.java b/current/latexDraw/filters/PNGFilter.java
new file mode 100644
index 0000000..c13c954
--- /dev/null
+++ b/current/latexDraw/filters/PNGFilter.java
@@ -0,0 +1,49 @@
+/*
+ * PNGFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines a filter for png files (*.png)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ *<br>
+ * 01/27/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class PNGFilter extends FileFilter
+{
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(LaTeXDrawResources.PNG_EXTENSION)|| file.isDirectory();
+	}
+
+	
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + LaTeXDrawResources.PNG_EXTENSION; //$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/filters/PPMFilter.java b/current/latexDraw/filters/PPMFilter.java
new file mode 100644
index 0000000..47e9d6a
--- /dev/null
+++ b/current/latexDraw/filters/PPMFilter.java
@@ -0,0 +1,49 @@
+/*
+ * PPMFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines a filter for ppm files (*.ppm)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ *<br>
+ * 02/06/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class PPMFilter extends FileFilter
+{
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(LaTeXDrawResources.PPM_EXTENSION)|| file.isDirectory();
+	}
+
+	
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + LaTeXDrawResources.PPM_EXTENSION; //$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/filters/PSFilter.java b/current/latexDraw/filters/PSFilter.java
new file mode 100644
index 0000000..a606381
--- /dev/null
+++ b/current/latexDraw/filters/PSFilter.java
@@ -0,0 +1,45 @@
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+/** 
+ * This class defines a filter for ps documents (*.ps)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 12/08/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.3<br>
+ * @since 2.0.3
+ */
+public class PSFilter extends FileFilter
+{
+	public static final String PS_EXTENSION = ".ps";//$NON-NLS-1$
+	
+	
+	@Override
+	public boolean accept(File f)
+	{
+		return f!=null && (f.getName().endsWith(PS_EXTENSION)|| f.isDirectory());
+	}
+
+
+
+	@Override
+	public String getDescription()
+	{
+		return "*" + PS_EXTENSION; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/current/latexDraw/filters/SVGFilter.java b/current/latexDraw/filters/SVGFilter.java
new file mode 100644
index 0000000..a63a784
--- /dev/null
+++ b/current/latexDraw/filters/SVGFilter.java
@@ -0,0 +1,51 @@
+/*
+ * SVGFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+/** 
+ * This class define a filter for SVG files (*.svg).<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * 
+ *<br>
+ * 09/06/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 2.0.0
+ */
+public class SVGFilter extends FileFilter
+{
+	public static final String SVG_EXTENSION = ".svg";//$NON-NLS-1$
+	
+	
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(SVG_EXTENSION)|| file.isDirectory();
+	}
+
+	
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + SVG_EXTENSION; //$NON-NLS-1$
+	}
+
+}
diff --git a/current/latexDraw/filters/TeXFilter.java b/current/latexDraw/filters/TeXFilter.java
new file mode 100644
index 0000000..20c5b83
--- /dev/null
+++ b/current/latexDraw/filters/TeXFilter.java
@@ -0,0 +1,61 @@
+/*
+ * TeXFilter.java
+ */
+
+package latexDraw.filters;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+
+
+/** 
+ * This class define a filter for TeX files (*.tex)<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * 
+ * 
+ * <br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>>
+ * history :<br>
+ * 	- 09/02/05 : creation of this file<br>
+ *  - 09/09/05 : version 0.5<br>
+ *  - 10/09/05 : version 1<br>
+ *  - 01/11/06 : version 1.5<br>
+ *  - 01/20/06 : version 1.5.1<br>
+ */
+public class TeXFilter extends FileFilter
+{
+    /** The name of the extension of TeX file*/
+    public final static String TEX_EXTENSION = ".tex"; //$NON-NLS-1$
+
+	@Override
+	public boolean accept(File file) 
+	{
+		return file.getName().endsWith(TEX_EXTENSION)|| file.isDirectory();
+	}
+
+	
+	
+	@Override
+	public String getDescription() 
+	{
+		return "*" + TEX_EXTENSION;//$NON-NLS-1$
+	}
+}
+
+
+
diff --git a/current/latexDraw/generators/svg/CSSStylesGenerator.java b/current/latexDraw/generators/svg/CSSStylesGenerator.java
new file mode 100644
index 0000000..0d8c1aa
--- /dev/null
+++ b/current/latexDraw/generators/svg/CSSStylesGenerator.java
@@ -0,0 +1,46 @@
+package latexDraw.generators.svg;
+
+import latexDraw.figures.Figure;
+import latexDraw.parsers.svg.CSSStyleList;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.elements.SVGDefsElement;
+
+/**
+ * Defines method to get/set CSS style from/to a LaTeXDraw shape.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class CSSStylesGenerator
+{
+	/**
+	 * Sets the CSS styles of the given list to the given LaTeXDraw shape.
+	 * @param f The shape to set.
+	 * @param styles The styles to set to the shape.
+	 * @param defs The definitions, may be null.
+	 * @since 2.0.0
+	 */
+	public static void setCSSStyles(Figure f, CSSStyleList styles, SVGDefsElement defs)
+	{
+		if(f==null || styles==null)
+			return ;
+		
+		LShapeSVGGenerator.setThickness(f, styles.getCSSValue(SVGAttributes.SVG_STROKE_WIDTH), styles.getCSSValue(SVGAttributes.SVG_STROKE));
+		LShapeSVGGenerator.setLineColour(f, styles.getCSSValue(SVGAttributes.SVG_STROKE));
+		LShapeSVGGenerator.setDashedDotted(f, styles.getCSSValue(SVGAttributes.SVG_STROKE_DASHARRAY), styles.getCSSValue(SVGAttributes.SVG_STROKE_LINECAP));
+		LShapeSVGGenerator.setFill(f, styles.getCSSValue(SVGAttributes.SVG_FILL), defs);
+	}
+}
diff --git a/current/latexDraw/generators/svg/LArcSVGGenerator.java b/current/latexDraw/generators/svg/LArcSVGGenerator.java
new file mode 100644
index 0000000..ecdb0d9
--- /dev/null
+++ b/current/latexDraw/generators/svg/LArcSVGGenerator.java
@@ -0,0 +1,260 @@
+package latexDraw.generators.svg;
+
+import java.awt.geom.Arc2D;
+import java.awt.geom.Point2D;
+
+import latexDraw.figures.Arc;
+import latexDraw.figures.ArrowHead;
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.*;
+import latexDraw.parsers.svg.elements.path.*;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for an arc.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LArcSVGGenerator extends LCircleSVGGenerator
+{
+	public LArcSVGGenerator(Arc f)
+	{
+		super(f);
+	}
+
+	
+	
+	public LArcSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates an arc from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @param withTransformation If true, the SVG transformations will be applied.
+	 * @since 2.0.0
+	 */
+	public LArcSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Arc(false));
+
+		Arc a = (Arc)getShape();
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		ArrowHead ah1 = a.getArrowHead1();
+		ArrowHead ah2 = a.getArrowHead2();
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGPathElement))
+			throw new IllegalArgumentException();
+		
+		SVGPathElement main = (SVGPathElement)elt2;
+		SVGPathSegList l = main.getSegList();
+		double sx, sy;
+		LaTeXDrawRectangle borders = a.getBorders();
+		
+		if(l.size()<2 && !(l.firstElement() instanceof SVGPathSegMoveto) && !(l.elementAt(1) instanceof SVGPathSegArc))
+			throw new IllegalArgumentException();
+		
+		sx = ((SVGPathSegMoveto)l.firstElement()).getX();
+		sy = ((SVGPathSegMoveto)l.firstElement()).getY();
+		Arc2D arc = ((SVGPathSegArc)l.elementAt(1)).getArc2D(sx, sy);
+		
+		a.setStartAngle(Math.toRadians(arc.getAngleStart())%(Math.PI*2));
+		a.setEndAngle(Math.toRadians(arc.getAngleExtent()+arc.getAngleStart())%(Math.PI*2));
+		borders.getPoint(0).setLocation(arc.getMinX(), arc.getMinY());
+		borders.getPoint(1).setLocation(arc.getMaxX(), arc.getMinY());
+		borders.getPoint(2).setLocation(arc.getMinX(), arc.getMaxY());
+		borders.getPoint(3).setLocation(arc.getMaxX(), arc.getMaxY());
+		
+		if(l.size()>2)
+			if(l.elementAt(2) instanceof SVGPathSegClosePath)
+				a.setType(Arc2D.CHORD);
+			else
+				if(l.size()==4 && l.elementAt(2) instanceof SVGPathSegLineto && l.elementAt(3) instanceof SVGPathSegClosePath)
+					a.setType(Arc2D.PIE);
+		
+		a.setShowPoints(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHOW_PTS)!=null);
+		setNumber(elt);
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		a.updateCenterStartEndDelimitors();
+		setSVGArrow(ah1, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_START), main);
+		setSVGArrow(ah2, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_END), main);
+		homogeniseArrows(ah1, ah2);
+		a.updateShape();
+		a.updateGravityCenter();
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null || doc.getFirstChild().getDefs()==null)
+			return null;
+		
+		Arc arc = (Arc)shape;
+		SVGDefsElement defs  = doc.getFirstChild().getDefs();
+		double rotationAngle = shape.getRotationAngle();
+		ArrowHead arrowHead1 = arc.getArrowHead1();
+		ArrowHead arrowHead2 = arc.getArrowHead2();
+		double startAngle    =  arc.getStartAngle();
+		double endAngle      =  arc.getEndAngle();
+		int type 			 =  arc.getType();
+		Point2D.Double gravityCenter = shape.getGravityCenter();
+        SVGElement root = new SVGGElement(doc), elt;
+        int number 		= shape.getNumber();
+        root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_ARC);
+        root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+        LaTeXDrawPoint2D start = arc.getStartPoint(false), end = arc.getEndPoint(false);
+        double radius = arc.getRadius();
+        boolean largeArcFlag;
+        SVGElement arrow1 = null, arrow2 = null, arrow1Shad = null, arrow2Shad = null;
+        String arrow1Name = "arrow1-" + number; //$NON-NLS-1$
+ 	   	String arrow2Name = "arrow2-" + number;//$NON-NLS-1$
+ 	   	String arrow1ShadName = "arrow1Shad-" + number;//$NON-NLS-1$
+ 	   	String arrow2ShadName = "arrow2Shad-" + number;//$NON-NLS-1$
+ 	   
+ 	   	startAngle%=2.*Math.PI;
+ 	   	endAngle%=2.*Math.PI;
+      
+        if(!arrowHead1.isWithoutStyle())
+        {
+ 			arrow1 		= new LArrowHeadSVGGenerator(arrowHead1).toSVG(doc, false);
+ 			arrow1Shad 	= new LArrowHeadSVGGenerator(arrowHead1).toSVG(doc, true);
+
+ 			arrow1.setAttribute(SVGAttributes.SVG_ID, arrow1Name);
+ 			defs.appendChild(arrow1);
+ 			
+ 			if(shape.hasShadow())
+ 			{
+ 				arrow1Shad.setAttribute(SVGAttributes.SVG_ID, arrow1ShadName);
+ 				defs.appendChild(arrow1Shad);
+ 			}
+        }
+
+        if(!arrowHead2.isWithoutStyle())
+        {
+     	   arrow2 		= new LArrowHeadSVGGenerator(arrowHead2).toSVG(doc, false);
+     	   arrow2Shad 	= new LArrowHeadSVGGenerator(arrowHead2).toSVG(doc, true);
+
+     	   arrow2.setAttribute(SVGAttributes.SVG_ID, arrow2Name);
+     	   defs.appendChild(arrow2);
+     	   
+ 			if(shape.hasShadow())
+ 			{
+ 	    	   arrow2Shad.setAttribute(SVGAttributes.SVG_ID, arrow2ShadName);
+ 	    	   defs.appendChild(arrow2Shad);
+ 			}
+        }
+        
+        largeArcFlag = startAngle>endAngle ? 2.*Math.PI-startAngle+endAngle>=Math.PI : endAngle-startAngle>Math.PI;
+        
+        SVGPathSegList path = new SVGPathSegList();
+        
+        path.add(new SVGPathSegMoveto(start.x, start.y, false));
+        path.add(new SVGPathSegArc(end.x, end.y, radius, radius, 0, largeArcFlag, false, false));
+        
+        if(type==Arc2D.CHORD)
+        	path.add(new SVGPathSegClosePath());
+        else
+        	if(type==Arc2D.PIE)
+        	{
+        		path.add(new SVGPathSegLineto(gravityCenter.x, gravityCenter.y, false));
+        		path.add(new SVGPathSegClosePath());
+        	}
+        
+        if(shape.hasShadow())
+        {
+     	   SVGElement shad = new SVGPathElement(doc);
+         	
+     	   shad.setAttribute(SVGAttributes.SVG_D, path.toString());
+     	   setSVGShadowAttributes(shad, true);
+     	   root.appendChild(shad);
+     	   
+           if(arrow1Shad!=null)
+        	   shad.setAttribute(SVGAttributes.SVG_MARKER_START, "url(#" + arrow1ShadName + ")");//$NON-NLS-1$ //$NON-NLS-2$
+           
+           if(arrow2Shad!=null)
+        	   shad.setAttribute(SVGAttributes.SVG_MARKER_END, "url(#" + arrow2ShadName + ")");//$NON-NLS-1$ //$NON-NLS-2$
+        }
+        
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE))
+        {// The background of the borders must be filled is there is a shadow.
+            elt = new SVGPathElement(doc);
+            elt.setAttribute(SVGAttributes.SVG_D, path.toString());
+            setSVGBorderBackground(elt, root);
+        }
+        
+        elt = new SVGPathElement(doc);
+        elt.setAttribute(SVGAttributes.SVG_D, path.toString());
+        root.appendChild(elt);
+        
+        setSVGRotationAttribute(root);
+        setSVGAttributes(doc, elt, true);
+        elt.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE +':'+ LaTeXDrawNamespace.XML_ROTATION, String.valueOf(rotationAngle));
+        
+        if(arrow1!=null)
+     	   elt.setAttribute(SVGAttributes.SVG_MARKER_START, "url(#" + arrow1Name + ")");//$NON-NLS-1$ //$NON-NLS-2$
+        
+        if(arrow2!=null)
+     	   elt.setAttribute(SVGAttributes.SVG_MARKER_END, "url(#" + arrow2Name + ")");//$NON-NLS-1$ //$NON-NLS-2$
+        
+        if(arc.isShowPoints())
+        	root.appendChild(getShowPointsElement(doc));
+        
+        return root;
+	}
+	
+	
+	
+	/**
+	 * Creates an SVG g element that contains the 'show points' plotting.
+	 * @param doc The owner document.
+	 * @return The created g element or null if the shape has not the 'show points' option activated.
+	 * @since 2.0.0
+	 */
+	protected SVGGElement getShowPointsElement(SVGDocument doc)
+	{
+		Arc arc = (Arc)shape;
+		
+		if(!arc.isShowPoints() || doc==null)
+			return null;
+		
+		SVGGElement showPts = new SVGGElement(doc);
+		float thickness	    = arc.getThickness()/2f;
+		
+		showPts.setAttribute(new StringBuffer(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE).append(':').append(
+				LaTeXDrawNamespace.XML_TYPE).toString(), LaTeXDrawNamespace.XML_TYPE_SHOW_PTS);
+		
+		showPts.appendChild(getShowPointsLine(doc, thickness, arc.getLinesColor(), arc.getGravityCenter(), 
+				arc.getNonRotatedStartPoint(), arc.getBlackDashLength(), arc.getWhiteDashLength(), false, 1, shape.getDoubleSep()));
+		showPts.appendChild(getShowPointsLine(doc, thickness, arc.getLinesColor(), arc.getGravityCenter(), 
+				arc.getNonRotatedEndPoint(), arc.getBlackDashLength(), arc.getWhiteDashLength(), false, 1, shape.getDoubleSep()));
+		
+		return showPts;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LArrowHeadSVGGenerator.java b/current/latexDraw/generators/svg/LArrowHeadSVGGenerator.java
new file mode 100644
index 0000000..d92576d
--- /dev/null
+++ b/current/latexDraw/generators/svg/LArrowHeadSVGGenerator.java
@@ -0,0 +1,522 @@
+package latexDraw.generators.svg;
+
+import java.awt.Color;
+
+import latexDraw.figures.ArrowHead;
+import latexDraw.figures.Figure;
+import latexDraw.figures.Line;
+import latexDraw.parsers.svg.*;
+import latexDraw.parsers.svg.elements.SVGCircleElement;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGMarkerElement;
+import latexDraw.parsers.svg.elements.SVGPathElement;
+import latexDraw.parsers.svg.elements.path.*;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for an arrow head.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LArrowHeadSVGGenerator
+{
+	/** The arrowhead generated or used to generate the SVG-arrow. */
+	protected ArrowHead arrowHead;
+	
+	
+	/**
+	 * Creates an SVG-arrowhead generator.
+	 * @param ah The arrowhead.
+	 */
+	public LArrowHeadSVGGenerator(ArrowHead ah)
+	{
+		if(ah==null)
+			throw new IllegalArgumentException();
+	
+		arrowHead = ah;
+	}
+
+	
+	
+	/**
+	 * Creates an SVG-arrowhead generator using an SVGMarkerElement.
+	 * @param elt The SVGMarkerElement uses to creates the arrowhead.
+	 * @param owner The shape that has the arrowhead.
+	 */
+	public LArrowHeadSVGGenerator(SVGMarkerElement elt, Figure owner)
+	{
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		arrowHead = new ArrowHead(owner);
+		setArrow(elt, owner);
+	}
+	
+	
+	
+	/**
+	 * Initialises the arrowhead using an SVGMarkerElement.
+	 * @param elt The SVGMarkerElement uses to initialise the arrowhead.
+	 * @param owner The figure the has the arrowhead.
+	 * @since 2.0.0
+	 */
+	public void setArrow(SVGMarkerElement elt, Figure owner)
+	{
+		if(elt==null)
+			return ;
+		
+		SVGNodeList nl = elt.getChildren(SVGElements.SVG_PATH);
+		
+		if(nl.getLength()==0)
+		{
+			nl = elt.getChildren(SVGElements.SVG_CIRCLE);
+			
+			if(nl.getLength()>0)
+				setArrow((SVGCircleElement)nl.item(0), elt, owner);
+		}
+		else
+			setArrow((SVGPathElement)nl.item(0), elt, owner);
+	}
+	
+	
+	
+	/**
+	 * Initialises the arrowhead using a circle arrowhead.
+	 * @param circle The circle element.
+	 * @param elt The arrowhead element.
+	 * @param owner The shape that has the arrowhead.
+	 * @since 2.0.0
+	 */
+	public void setArrow(SVGCircleElement circle, SVGMarkerElement elt, Figure owner)
+	{
+		if(circle==null || elt==null || owner==null)
+			return ;
+		
+		double radius = circle.getR();
+		String dotSizeNumStr = circle.getAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_DOT_SIZE_NUM);
+		double dotSizeDim;
+		double dotSizeNum;
+		double lineWidth = owner.hasDoubleBoundary() ? owner.getDoubleSep() + 2*owner.getThickness() : owner.getThickness();
+		
+		if(dotSizeNumStr==null)
+			dotSizeNum = 1;
+		else
+			try { dotSizeNum = Double.valueOf(dotSizeNumStr); }
+			catch(NumberFormatException e)
+			{ 
+				e.printStackTrace(); 
+				dotSizeNum = 1;
+			}
+			
+		if(circle.getStroke()==null)
+		{
+			arrowHead.setArrowStyle(elt.getRefX()==0 ? PSTricksConstants.DISKEND_STYLE : PSTricksConstants.DISKIN_STYLE);
+			dotSizeDim = radius*lineWidth*2.-dotSizeNum*lineWidth; 
+		}
+		else
+		{
+			arrowHead.setArrowStyle(elt.getRefX()==0 ? PSTricksConstants.CIRCLEEND_STYLE : PSTricksConstants.CIRCLEIN_STYLE);
+			dotSizeDim = (radius*lineWidth+lineWidth/2.)*2.-dotSizeNum*lineWidth; 
+		}
+		
+		if(dotSizeDim==0)
+			arrowHead.setArrowStyle(PSTricksConstants.ROUNDIN_STYLE);
+		else
+		{
+			Color filling = CSSColors.getRGBColour(circle.getFill());
+			
+			if(filling!=null)
+				arrowHead.getLine().setInteriorColor(filling);
+				
+			arrowHead.setDotSizeDim(dotSizeDim);
+			arrowHead.setDotSizeNum(dotSizeNum);
+		}
+	}
+	
+	
+	
+	/**
+	 * Initialises the arrowhead using a path arrowhead.
+	 * @param path The path element.
+	 * @param elt The arrowhead element.
+	 * @param owner The shape that has the arrowhead.
+	 * @since 2.0.0
+	 */
+	public void setArrow(SVGPathElement path, SVGMarkerElement elt, Figure owner)
+	{
+		if(path==null || path.getSegList().size()<2 || elt==null || owner==null)
+			return;
+		
+		try
+		{
+			SVGPathSegList list  = path.getSegList();
+			SVGPathSegMoveto m   = (SVGPathSegMoveto)list.firstElement();
+			SVGPathSeg seg 		 = list.elementAt(1);
+			Line line 			 = arrowHead.getLine();
+			LaTeXDrawPoint2D p1  = line.getPt1();
+			LaTeXDrawPoint2D pos = arrowHead.getPosition();
+			boolean isInverted   = pos==p1 ? false : true;
+			double lineWidth  	 = owner.hasDoubleBoundary() ? owner.getDoubleSep() + 2*owner.getThickness() : owner.getThickness();
+			
+			if(list.size()==2 || list.size()==4)// It may be a bar or a bracket
+			{
+				String tbarNumStr = path.getAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_TBAR_SIZE_NUM);
+				double tbarNum;
+				double y = Math.abs(m.getY());
+				
+				if(tbarNumStr==null)
+					tbarNum = 1;
+				else
+					try { tbarNum = Double.valueOf(tbarNumStr); }
+					catch(NumberFormatException e)
+					{
+						e.printStackTrace();
+						tbarNum = 1;
+					}
+				
+				arrowHead.setTBarSizeNum(tbarNum);
+				arrowHead.setTBarSizeDim(y*lineWidth*2 - tbarNum*lineWidth);
+					
+				if((seg instanceof SVGPathSegLineto && ((float)((SVGPathSegLineto)seg).getX())==((float)m.getX())) || (seg instanceof SVGPathSegLinetoVertical))
+					arrowHead.setArrowStyle(((float)m.getX())!=0f ? PSTricksConstants.BARIN_STYLE : PSTricksConstants.BAREND_STYLE);
+				else
+				if(seg instanceof SVGPathSegCurvetoCubic)
+				{
+					double width  = (arrowHead.getTBarSizeDim() + arrowHead.getTBarSizeNum()*lineWidth)/lineWidth;
+					double rBrack = (Math.abs(m.getX())-0.5)/width;
+					
+					arrowHead.setArrowStyle(Math.abs(m.getX())==0.5 ? isInverted ? PSTricksConstants.LRBRACKET_STYLE : PSTricksConstants.RRBRACKET_STYLE :
+											isInverted ? PSTricksConstants.RRBRACKET_STYLE : PSTricksConstants.LRBRACKET_STYLE);
+					arrowHead.setRBracketNum(rBrack);
+				}
+				else
+				if(list.size()==4 && seg instanceof SVGPathSegLineto && list.elementAt(2) instanceof SVGPathSegLineto && 
+					list.elementAt(3) instanceof SVGPathSegLineto)// It may be a bracket.
+				{
+					double lgth = Math.abs(m.getX()-((SVGPathSegLineto)seg).getX());
+					String style = elt.getRefX()>0? 
+									PSTricksConstants.RSBRACKET_STYLE : PSTricksConstants.LSBRACKET_STYLE; 
+					
+					y = y + (m.getY()>0 ? -0.5 : 0.5);
+					arrowHead.setTBarSizeDim(y*lineWidth*2 - tbarNum*lineWidth);
+					arrowHead.setBracketNum(((lgth-0.5)*lineWidth)/(arrowHead.getTBarSizeDim()/Figure.PPC + 
+											arrowHead.getTBarSizeNum()*lineWidth));
+					
+					arrowHead.setArrowStyle(style);
+				}
+			}
+			else if(list.size()==5 || list.size()==10)// It may be an arrow or a double arrow
+			{
+				if(!(seg instanceof SVGPathSegLineto && list.get(2) instanceof SVGPathSegLineto && 
+					list.get(3) instanceof SVGPathSegLineto && list.get(4) instanceof SVGPathSegClosePath))
+					return ;
+				
+				String arrNumStr = path.getAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_SIZE_NUM);
+				double arrNum, arrDim;
+				double lgth = Math.abs(((SVGPathSegLineto)seg).getX() - m.getX());
+				
+				if(arrNumStr==null)
+					arrNum = 1;
+				else
+					try { arrNum = Double.valueOf(arrNumStr); }
+					catch(NumberFormatException e)
+					{
+						e.printStackTrace();
+						arrNum = 1;
+					}
+				
+				if(isInverted)
+					if(list.size()==10)
+						arrowHead.setArrowStyle(m.getX()!=0. || m.getY()!=0. ? PSTricksConstants.DLARROW_STYLE : PSTricksConstants.DRARROW_STYLE);
+					else
+						arrowHead.setArrowStyle(m.getX()!=0. || m.getY()!=0. ? PSTricksConstants.LARROW_STYLE : PSTricksConstants.RARROW_STYLE);
+				else
+					if(list.size()==10)
+						arrowHead.setArrowStyle(m.getX()!=0. || m.getY()!=0. ? PSTricksConstants.DRARROW_STYLE : PSTricksConstants.DLARROW_STYLE);
+					else
+						arrowHead.setArrowStyle(m.getX()!=0. || m.getY()!=0. ? PSTricksConstants.RARROW_STYLE : PSTricksConstants.LARROW_STYLE);
+				
+				arrDim = lineWidth*(((SVGPathSegLineto)seg).getY()*2 - arrNum);
+				arrowHead.setArrowLength(lgth/((arrNum*lineWidth + arrDim)/lineWidth));
+				arrowHead.setArrowSizeDim(arrDim);
+				arrowHead.setArrowSizeNum(arrNum);
+				arrowHead.setArrowInset((Math.abs(((SVGPathSegLineto)seg).getX()-((SVGPathSegLineto)list.get(2)).getX()))/lgth);
+			}
+		}
+		catch(ClassCastException e) { e.printStackTrace(); }
+	}
+	
+	
+	
+	
+	/**
+	 * Return the SVG tree of the arrowhead or null if this arrowhead has no style.
+	 * @param doc The document used to create elements.
+	 * @return The SVG tree of the arrowhead or null if doc is null.
+	 * @since 2.0.0
+	 */
+	public SVGElement toSVG(SVGDocument doc, boolean isShadow)
+	{
+		if(doc==null)
+			return null;
+		
+		if(arrowHead.isWithoutStyle())
+			return null;
+		
+		String arrowStyle = arrowHead.getArrowStyle();
+		Figure figure 	  = arrowHead.getFigure();
+		SVGElement marker = new SVGMarkerElement(doc);
+		double lineWidth  = figure.hasDoubleBoundary() ? figure.getDoubleSep() + 2*figure.getThickness() : figure.getThickness();
+		double gapPostion = 0.;
+		
+		if(arrowStyle.equals(PSTricksConstants.CIRCLEEND_STYLE) || arrowStyle.equals(PSTricksConstants.CIRCLEIN_STYLE))
+		{
+			SVGElement circle = new SVGCircleElement(doc);
+			double r = (arrowHead.getDotSizeDim()+arrowHead.getDotSizeNum()*lineWidth)/2.-lineWidth/2.;
+			
+			circle.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_DOT_SIZE_NUM, 
+								String.valueOf(arrowHead.getDotSizeNum()));
+			circle.setAttribute(SVGAttributes.SVG_R, String.valueOf(r/lineWidth));
+			circle.setAttribute(SVGAttributes.SVG_FILL, 
+					CSSColors.getColorName(figure.getInteriorColor(), true));
+			circle.setAttribute(SVGAttributes.SVG_STROKE, 
+					CSSColors.getColorName(isShadow ? figure.getShadowColor() : figure.getLinesColor(), true));
+			circle.setStrokeWidth(1);
+			marker.appendChild(circle);
+			
+			if(arrowStyle.equals(PSTricksConstants.CIRCLEIN_STYLE))
+				gapPostion = lineWidth *  (arrowHead.isLeftArrow() ? -1 : 1);
+		}
+		else
+		if(arrowStyle.equals(PSTricksConstants.DISKEND_STYLE) || arrowStyle.equals(PSTricksConstants.DISKIN_STYLE))
+		{
+			SVGElement circle = new SVGCircleElement(doc);
+			double r = (arrowHead.getDotSizeDim()+arrowHead.getDotSizeNum()*lineWidth)/2.;
+			
+			circle.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_DOT_SIZE_NUM, String.valueOf(arrowHead.getDotSizeNum()));
+			circle.setAttribute(SVGAttributes.SVG_R, String.valueOf(r/lineWidth));
+			circle.setAttribute(SVGAttributes.SVG_FILL, 
+					CSSColors.getColorName(isShadow ? figure.getShadowColor() : figure.getLinesColor(), true));
+			marker.appendChild(circle);
+			
+			if(arrowStyle.equals(PSTricksConstants.DISKIN_STYLE))
+				gapPostion = lineWidth *  (arrowHead.isLeftArrow() ? -1 : 1);
+		}
+		else
+		if(arrowStyle.equals(PSTricksConstants.BARIN_STYLE) || arrowStyle.equals(PSTricksConstants.BAREND_STYLE))
+		{
+			SVGPathElement bar = new SVGPathElement(doc);
+			double width = arrowHead.getTBarSizeDim() + arrowHead.getTBarSizeNum()*lineWidth;
+			SVGPathSegList path = new SVGPathSegList();
+			double x = arrowStyle.equals(PSTricksConstants.BARIN_STYLE) ? arrowHead.isLeftArrow() ? 0.5 : -0.5 : 0;
+			
+			bar.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_TBAR_SIZE_NUM, 
+								String.valueOf(arrowHead.getTBarSizeNum()));
+			path.add(new SVGPathSegMoveto(x, -width/(lineWidth*2), false));
+			path.add(new SVGPathSegLineto(x, width/(lineWidth*2), false));
+			bar.setPathData(path);
+			bar.setAttribute(SVGAttributes.SVG_STROKE, 
+					CSSColors.getColorName(isShadow ? figure.getShadowColor() : figure.getLinesColor(), true));
+			bar.setAttribute(SVGAttributes.SVG_FILL, SVGAttributes.SVG_VALUE_NONE);
+			bar.setPathData(path);
+			bar.setStrokeWidth(1);
+			marker.appendChild(bar);
+		}
+		else
+		if(arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE) || arrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+		{
+			SVGPathElement bar = new SVGPathElement(doc);
+			double width = arrowHead.getTBarSizeDim() + arrowHead.getTBarSizeNum()*lineWidth;
+			SVGPathSegList path = new SVGPathSegList();
+			double lgth = (arrowHead.getBracketNum()*(arrowHead.getTBarSizeDim()/Figure.PPC + 
+							arrowHead.getTBarSizeNum()*lineWidth))/lineWidth;
+			boolean isInverted  = arrowHead.isInverted();//FIXME Figure.PPC
+			double lgth2;
+			
+			bar.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_TBAR_SIZE_NUM, 
+								String.valueOf(arrowHead.getTBarSizeNum()));
+
+			if((arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE)))
+			{
+				lgth2 = isInverted ? -lgth : 0;
+				
+				path.add(new SVGPathSegMoveto(lgth+lgth2+0.5, -width/(lineWidth*2)+0.5, false));
+				path.add(new SVGPathSegLineto(lgth2, -width/(lineWidth*2)+0.5, false));
+				path.add(new SVGPathSegLineto(lgth2, width/(lineWidth*2)-0.5, false));
+				path.add(new SVGPathSegLineto(lgth+lgth2+0.5, width/(lineWidth*2)-0.5, false));
+				gapPostion = isInverted ? -lineWidth/4. : -lineWidth/2.;
+			}
+			else
+			{
+				lgth2 = isInverted ? lgth : 0;
+				
+				path.add(new SVGPathSegMoveto(-lgth+lgth2-0.5, -width/(lineWidth*2)+0.5, false));
+				path.add(new SVGPathSegLineto(lgth2, -width/(lineWidth*2)+0.5, false));
+				path.add(new SVGPathSegLineto(lgth2, width/(lineWidth*2)-0.5, false));
+				path.add(new SVGPathSegLineto(-lgth+lgth2-0.5, width/(lineWidth*2)-0.5, false));
+				gapPostion = isInverted ? lineWidth/4. : lineWidth/2.;
+			}
+			
+			marker.appendChild(bar);
+			bar.setAttribute(SVGAttributes.SVG_STROKE, 
+					CSSColors.getColorName(isShadow ? figure.getShadowColor() : figure.getLinesColor(), true));
+			bar.setAttribute(SVGAttributes.SVG_FILL, SVGAttributes.SVG_VALUE_NONE);
+			bar.setPathData(path);
+			bar.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, "1"); //$NON-NLS-1$
+		}	
+		else
+		if(arrowStyle.equals(PSTricksConstants.RARROW_STYLE) || arrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+		{
+			SVGElement arrow = new SVGPathElement(doc);
+			double width  = (arrowHead.getArrowSizeNum()*lineWidth + arrowHead.getArrowSizeDim())/lineWidth;
+			double length = arrowHead.getArrowLength()*width, inset = arrowHead.getArrowInset()*length;
+			SVGPathSegList path = new SVGPathSegList();
+			boolean isInverted  = arrowHead.isInverted();
+			double lgth2;
+			
+			if((arrowStyle.equals(PSTricksConstants.LARROW_STYLE)))
+			{
+				lgth2 = isInverted ? -length : 0;
+				
+				path.add(new SVGPathSegMoveto(lgth2, 0., false));
+				path.add(new SVGPathSegLineto(length+lgth2, width/2., false));
+				path.add(new SVGPathSegLineto(length-inset+lgth2, 0.,  false));
+				path.add(new SVGPathSegLineto(length+lgth2, -width/2., false));
+				path.add(new SVGPathSegClosePath());
+			}
+			else
+			{
+				lgth2 = isInverted ? length : 0;
+				
+				path.add(new SVGPathSegMoveto(lgth2, 0., false));
+				path.add(new SVGPathSegLineto(-length+lgth2, width/2., false));
+				path.add(new SVGPathSegLineto(-length+inset+lgth2, 0.,  false));
+				path.add(new SVGPathSegLineto(-length+lgth2, -width/2., false));
+				path.add(new SVGPathSegClosePath());
+			}
+			
+			arrow.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_SIZE_NUM, 
+								String.valueOf(arrowHead.getArrowSizeNum()));
+			marker.appendChild(arrow);
+			arrow.setAttribute(SVGAttributes.SVG_FILL, 
+					CSSColors.getColorName(isShadow ? figure.getShadowColor() : figure.getLinesColor(), true));
+			arrow.setAttribute(SVGAttributes.SVG_D, path.toString());
+		}
+		else
+		if(arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE) || arrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+		{
+			SVGPathElement rbracket = new SVGPathElement(doc);
+			double width = (arrowHead.getTBarSizeDim() + arrowHead.getTBarSizeNum()*lineWidth)/lineWidth;
+			double lgth  = arrowHead.getRBracketNum()*width;
+			double lgth2;
+			SVGPathSegList path = new SVGPathSegList();
+			boolean isInverted  = arrowHead.isInverted();
+			
+			if((arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE)))
+			{
+				lgth2 = isInverted ? -lgth : 0;
+				
+				path.add(new SVGPathSegMoveto(lgth+lgth2+0.5, width/2., false));
+				path.add(new SVGPathSegCurvetoCubic(lgth+lgth2+0.5, -width/2., 0, width/2., 0, -width/2., false));
+			}
+			else
+			{
+				lgth2 = isInverted ? lgth : 0;
+				
+				path.add(new SVGPathSegMoveto(-lgth+lgth2-0.5, width/2., false));
+				path.add(new SVGPathSegCurvetoCubic(-lgth+lgth2-0.5, -width/2., 0, width/2., 0, -width/2., false));
+			}
+			
+			marker.appendChild(rbracket);
+			rbracket.setAttribute(SVGAttributes.SVG_STROKE, 
+					CSSColors.getColorName(isShadow ? figure.getShadowColor() : figure.getLinesColor(), true));
+			rbracket.setAttribute(SVGAttributes.SVG_FILL, SVGAttributes.SVG_VALUE_NONE);
+			rbracket.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_TBAR_SIZE_NUM, 
+									String.valueOf(arrowHead.getTBarSizeNum()));
+			rbracket.setPathData(path);
+			rbracket.setStrokeWidth(1);
+		}
+		else
+		if(arrowStyle.equals(PSTricksConstants.DLARROW_STYLE) || arrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+		{
+			SVGElement arrow = new SVGPathElement(doc);
+			double width  = (arrowHead.getArrowSizeNum()*lineWidth + arrowHead.getArrowSizeDim())/lineWidth;
+			double length = arrowHead.getArrowLength()*width, inset = arrowHead.getArrowInset()*length;
+			SVGPathSegList path = new SVGPathSegList();
+			double lgth2;
+			boolean isInverted  = arrowHead.isInverted();
+			
+			if((arrowStyle.equals(PSTricksConstants.DLARROW_STYLE)))
+			{
+				lgth2 = isInverted ? -length*2 : 0;
+				
+				path.add(new SVGPathSegMoveto(lgth2, 0, false));
+				path.add(new SVGPathSegLineto(length+lgth2, width/2., false));
+				path.add(new SVGPathSegLineto(length-inset+lgth2, 0, false));
+				path.add(new SVGPathSegLineto(length+lgth2, -width/2., false));
+				path.add(new SVGPathSegClosePath());
+				path.add(new SVGPathSegMoveto(length+lgth2, 0, false));
+				path.add(new SVGPathSegLineto(length*2+lgth2, width/2., false));
+				path.add(new SVGPathSegLineto(length*2-inset+lgth2, 0, false));
+				path.add(new SVGPathSegLineto(length*2+lgth2, -width/2., false));
+				path.add(new SVGPathSegClosePath());
+			}
+			else
+			{
+				lgth2 = isInverted ? length*2 : 0;
+				
+				path.add(new SVGPathSegMoveto(lgth2, 0, false));
+				path.add(new SVGPathSegLineto(-length+lgth2, width/2., false));
+				path.add(new SVGPathSegLineto(-length+inset+lgth2, 0, false));
+				path.add(new SVGPathSegLineto(-length+lgth2, -width/2., false));
+				path.add(new SVGPathSegClosePath());
+				path.add(new SVGPathSegMoveto(-length+lgth2, 0, false));
+				path.add(new SVGPathSegLineto(-length*2+lgth2, width/2., false));
+				path.add(new SVGPathSegLineto(-length*2+inset+lgth2, 0, false));
+				path.add(new SVGPathSegLineto(-length*2+lgth2, -width/2., false));
+				path.add(new SVGPathSegClosePath());
+			}
+			
+			marker.appendChild(arrow);
+			arrow.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ARROW_SIZE_NUM, 
+					String.valueOf(arrowHead.getArrowSizeNum()));
+			arrow.setAttribute(SVGAttributes.SVG_FILL, 
+					CSSColors.getColorName(isShadow ? figure.getShadowColor() : figure.getLinesColor(), true));
+			arrow.setAttribute(SVGAttributes.SVG_D, path.toString());
+		}
+		else
+			if(arrowStyle.equals(PSTricksConstants.ROUNDIN_STYLE))
+			{
+				SVGElement circle = new SVGCircleElement(doc);
+				
+				circle.setAttribute(SVGAttributes.SVG_R, "0.5");
+				circle.setAttribute(SVGAttributes.SVG_FILL, 
+						CSSColors.getColorName(isShadow ? figure.getShadowColor() : figure.getLinesColor(), true));
+				marker.appendChild(circle);
+			}
+		
+		if(gapPostion!=0f)
+			marker.setAttribute(SVGAttributes.SVG_REF_X, String.valueOf(gapPostion/lineWidth));
+		
+		marker.setAttribute(SVGAttributes.SVG_OVERFLOW, SVGAttributes.SVG_VALUE_VISIBLE);
+		marker.setAttribute(SVGAttributes.SVG_ORIENT, SVGAttributes.SVG_VALUE_AUTO);
+		
+		return marker;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LAxeSVGGenerator.java b/current/latexDraw/generators/svg/LAxeSVGGenerator.java
new file mode 100644
index 0000000..2189fbd
--- /dev/null
+++ b/current/latexDraw/generators/svg/LAxeSVGGenerator.java
@@ -0,0 +1,788 @@
+package latexDraw.generators.svg;
+
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.*;
+import latexDraw.parsers.svg.*;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.parsers.svg.elements.SVGLineElement;
+import latexDraw.parsers.svg.elements.SVGTextElement;
+import latexDraw.parsers.svg.parsers.SVGPointsParser;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for an axe.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LAxeSVGGenerator extends LShapeSVGGenerator
+{
+
+	public LAxeSVGGenerator(Axe f)
+	{
+		super(f);
+	}
+
+	
+	
+	public LAxeSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+
+	/**
+	 * Creates axes from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @param withTransformation If true, the SVG transformations will be applied.
+	 * @since 2.0.0
+	 */
+	public LAxeSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Axe(new LaTeXDrawPoint2D(), false));
+
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		setNumber(elt);
+		setSVGParameters(elt);
+		
+		Vector<Point2D> values;
+		String pref = LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':';
+		String str;
+		Axe axe = (Axe)getShape();
+		
+		axe.setYLabelWest(Boolean.valueOf(elt.getAttribute(pref+LaTeXDrawNamespace.XML_AXE_IS_WEST)).booleanValue());
+		axe.setXLabelSouth(Boolean.valueOf(elt.getAttribute(pref+LaTeXDrawNamespace.XML_AXE_IS_SOUTH)).booleanValue());
+		axe.setShowOrigin(Boolean.valueOf(elt.getAttribute(pref+LaTeXDrawNamespace.XML_AXE_SHOW_ORIGIN)).booleanValue());
+		axe.setAxesStyleToken(elt.getAttribute(pref+LaTeXDrawNamespace.XML_STYLE));
+		axe.setTicksDisplayedToken(elt.getAttribute(pref+LaTeXDrawNamespace.XML_AXE_SHOW_TICKS));
+		axe.setTicksStyleToken(elt.getAttribute(pref+LaTeXDrawNamespace.XML_AXE_TICKS_STYLE));
+		axe.setLabelsDisplayedToken(elt.getAttribute(pref+LaTeXDrawNamespace.XML_AXE_LABELS_STYLE));
+		str = elt.getAttribute(pref+LaTeXDrawNamespace.XML_AXE_TICKS_SIZE);
+		
+		if(str!=null)
+			try{ axe.setTicksSize(Double.valueOf(str)); }
+			catch(NumberFormatException e) { /* */ }
+			
+		values = SVGPointsParser.getPoints(elt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_END));
+		
+		if(values!=null && values.size()>0) { 
+			axe.setGridEndX((int)values.elementAt(0).getX());  
+			axe.setGridEndY((int)values.elementAt(0).getY());  
+		}
+	
+		values = SVGPointsParser.getPoints(elt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_START));
+		
+		if(values!=null && values.size()>0) { 
+			axe.setGridStartX((int)values.elementAt(0).getX());  
+			axe.setGridStartY((int)values.elementAt(0).getY());  
+		}
+		
+		values = SVGPointsParser.getPoints(elt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_ORIGIN));
+	
+		if(values!=null && values.size()>0) { 
+			axe.setOriginX((int)values.elementAt(0).getX());  
+			axe.setOriginY((int)values.elementAt(0).getY());  
+		}
+		
+		values = SVGPointsParser.getPoints(elt.getAttribute(pref+LaTeXDrawNamespace.XML_AXE_INCREMENT));
+			
+		if(values!=null && values.size()>0) { 
+			axe.setIncrementX(values.elementAt(0).getX());  
+			axe.setIncrementY(values.elementAt(0).getY());  
+		}
+		
+		values = SVGPointsParser.getPoints(elt.getAttribute(pref+LaTeXDrawNamespace.XML_AXE_DIST_LABELS));
+			
+		if(values!=null && values.size()>0) { 
+			axe.setDistLabelsX(values.elementAt(0).getX());  
+			axe.setDistLabelsY(values.elementAt(0).getY());  
+		}
+		
+		/* Looking for the two axe in order to get the position of the axes. */
+		SVGNodeList nl = elt.getChildren(SVGElements.SVG_G);
+		int i=0, size = nl.getLength();
+		SVGGElement l1=null, l2=null;
+		SVGElement element;
+		
+		while((l1==null || l2==null) && i<size)
+		{
+			element = nl.item(i);
+			
+			if(element instanceof SVGGElement)
+				if(l1==null)
+					l1 = (SVGGElement)element;
+				else
+					l2 = (SVGGElement)element;
+			
+			i++;
+		}
+		
+		if(l1!=null && l2!=null)
+			try
+			{
+				Line la = (Line)new LLineSVGGenerator(l1, false).shape;
+				Line lb = (Line)new LLineSVGGenerator(l2, false).shape;
+				
+				axe.setPosition(new LaTeXDrawPoint2D(lb.getPt1().x, la.getPt1().y));
+				axe.setLineStyle(la.getLineStyle());
+				
+				if(axe.isXLabelSouth())
+				{
+					axe.setArrow1Style(la.getArrow1Style());
+					axe.setArrow2Style(la.getArrow2Style());
+				}
+				else
+				{
+					axe.setArrow1Style(la.getArrow2Style());
+					axe.setArrow2Style(la.getArrow1Style());
+				}
+				
+				la = null;
+				lb = null;
+			}
+			catch(IllegalArgumentException e) { e.printStackTrace(); }
+
+		homogeniseArrows(axe.getArrowHead1(), axe.getArrowHead2());
+		axe.updateGravityCenter();
+		axe.updateBorders();
+		applyTransformations(elt);
+		
+		l1 		= null;
+		l2 		= null;
+		element = null;
+		nl 		= null;
+		values 	= null;
+	}
+
+	
+
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null)
+			return null;
+		
+		Axe axe = (Axe)getShape();
+		String pref = LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':';
+		SVGElement root = new SVGGElement(doc);
+		setThickness(root, axe.getThickness(), false, 0.);
+		root.setStroke(axe.getLinesColor());
+		
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_AXE_IS_WEST, String.valueOf(axe.isYLabelWest()));
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_AXE_IS_SOUTH, String.valueOf(axe.isXLabelSouth()));
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_STYLE, axe.getAxesStyleToken());
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_START, axe.getGridStart().x + " " + axe.getGridStart().y); //$NON-NLS-1$
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_END, axe.getGridEnd().x + " " + axe.getGridEnd().y);//$NON-NLS-1$
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_ORIGIN, axe.getOrigin().x + " " + axe.getOrigin().y);//$NON-NLS-1$
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_AXE_INCREMENT, axe.getIncrement().x + " " + axe.getIncrement().y);//$NON-NLS-1$
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_AXE_DIST_LABELS, axe.getDistLabelsX() + " " + axe.getDistLabelsY());//$NON-NLS-1$
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_AXE_TICKS_SIZE, String.valueOf(axe.getTicksSize()));
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_AXE_SHOW_ORIGIN, String.valueOf(axe.isShowOrigin()));
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_AXE_SHOW_TICKS, axe.getTicksDisplayedToken());
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_AXE_LABELS_STYLE, axe.getLabelsDisplayedToken());
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_AXE_TICKS_STYLE, axe.getTicksStyleToken());
+		
+		createSVGAxe(root, doc);
+		
+		return root;
+	}
+	
+	
+	
+	
+	protected void createSVGAxe(SVGElement elt, SVGDocument document)
+	{
+		if(elt==null || document==null)
+			return ;
+		
+		Axe axe = (Axe)shape;
+		double minX, maxX, minY, maxY, maxX3, minX3, maxY3, minY3;
+		Point2D.Double increment = axe.getIncrement();
+		Point2D.Double gridEnd   = axe.getGridEnd();
+		Point2D.Double gridStart = axe.getGridStart();
+		Point2D.Double position  = axe.getPosition();
+		Point2D.Double origin    = axe.getOrigin();
+		double distLabelsX = axe.getDistLabelsX();
+		double distLabelsY = axe.getDistLabelsY();
+		double gapX = distLabelsX==0. ? Figure.PPC : (distLabelsX/increment.x)*Figure.PPC, i; 
+		double gapY = distLabelsY==0. ? Figure.PPC : (distLabelsY/increment.y)*Figure.PPC;
+		double rotationAngle = shape.getRotationAngle();
+		double lgth;
+		int ticksStyle = axe.getTicksStyle();
+		int axesStyle  = axe.getAxesStyle();
+		int ticksDisplayed  = axe.getTicksDisplayed();
+		int labelsDisplayed  = axe.getLabelsDisplayed();
+		double ticksSize  = axe.getTicksSize();
+		boolean isYLabelWest  = axe.isYLabelWest();
+		boolean isXLabelSouth = axe.isXLabelSouth();
+		boolean showOrigin    = axe.isShowOrigin();
+		FontMetrics fontMetrics = axe.getFontMetrics();
+		Font font = axe.getFont();
+		ArrowHead arrowHead1 = axe.getArrowHead1();
+		ArrowHead arrowHead2 = axe.getArrowHead2();
+		boolean ticksBot = ticksStyle==Axe.TICKS_STYLE_BOTTOM_VALUE || ticksStyle==Axe.TICKS_STYLE_FULL_VALUE;
+		double thickness = shape.getThickness();
+		int j;
+
+        elt.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_AXE);
+        elt.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+		
+		if(gridEnd.x<gridStart.x)
+		{
+			minX = gridEnd.x;
+			maxX = gridStart.x;
+		}
+		else
+		{
+			minX = gridStart.x;
+			maxX = gridEnd.x;
+		}
+		
+		if(gridEnd.getY()<gridStart.getY())
+		{
+			minY = gridEnd.getY();
+			maxY = gridStart.getY();
+		}
+		else
+		{
+			minY = gridStart.getY();
+			maxY = gridEnd.getY();
+		}
+		
+		if(distLabelsX!=0.)
+		{
+			if(maxX!=0.)
+			{
+				maxX = maxX/distLabelsX;
+				if(maxX==0.)
+					maxX=0.1;
+			}
+			
+			if(minX!=0)
+			{
+				minX = minX/distLabelsX;
+				if(minX==0.)
+					minX=0.1;
+			}
+		}
+		
+		if(distLabelsY!=0.)
+		{
+			if(maxY!=0.)
+			{
+				maxY = maxY/distLabelsY;
+				if(maxY==0.)
+					maxY=0.1;
+			}
+			
+			if(minY!=0.)
+			{
+				minY = minY/distLabelsY;
+				if(minY==0.)
+					minY=0.1;
+			}
+		}
+		
+		boolean arrow1Ok = !arrowHead1.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE);
+		boolean arrow2Ok = !arrowHead2.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE);
+		
+		minX3 = axesStyle==Axe.AXES_STYLE_AXES_VALUE && ((arrow1Ok && isYLabelWest) || 
+				(arrow2Ok && !isYLabelWest)) && gridStart.x!=0 && (distLabelsX==0. || distLabelsX==1.)? minX+1 : minX; 		
+		
+		minY3 = axesStyle==Axe.AXES_STYLE_AXES_VALUE && ((arrow1Ok && isXLabelSouth) || 
+				(arrow2Ok && !isXLabelSouth)) && gridStart.getY()!=0 && (distLabelsY==0. || distLabelsY==1.)? minY+1 : minY; 			 
+					 
+		maxX3 = axesStyle==Axe.AXES_STYLE_AXES_VALUE &&
+		 		((arrow2Ok && isYLabelWest) || (arrow1Ok && !isYLabelWest)) && (distLabelsX==0. || distLabelsX==1.)? maxX-1 : maxX; 
+		
+		maxY3 = axesStyle==Axe.AXES_STYLE_AXES_VALUE &&
+		 		((arrow2Ok && isXLabelSouth) || (arrow1Ok && !isXLabelSouth)) && (distLabelsY==0. || distLabelsY==1.)? maxY-1 : maxY; 	
+		
+		minX3 = minX>0 ? 0 : minX3;
+		maxX3 = maxX<0 ? 0 : maxX3;
+		minY3 = minY>0 ? 0 : minY3;
+		maxY3 = maxY<0 ? 0 : maxY3;
+		
+		switch(axesStyle)
+		{
+			case Axe.AXES_STYLE_AXES_VALUE:
+				
+				boolean arrowOk = (float)minX!=(float)maxX || (float)maxX!=(float)minY || (float)minY!=(float)maxY;
+				Line xLine = new Line(new LaTeXDrawPoint2D(position.x+gridStart.x*Figure.PPC, position.getY()), 
+										new LaTeXDrawPoint2D(position.x+gridEnd.x*Figure.PPC, position.getY()), true);
+				Line yLine = new Line(new LaTeXDrawPoint2D(position.x, position.getY()-gridEnd.getY()*Figure.PPC), 
+										new LaTeXDrawPoint2D(position.x, position.getY()-gridStart.getY()*Figure.PPC), true);
+
+				xLine.setLinesColor(shape.getLinesColor());
+				xLine.setLineStyle(shape.getLineStyle());
+				xLine.setThickness((float)thickness);
+				yLine.setLinesColor(shape.getLinesColor());
+				yLine.setLineStyle(shape.getLineStyle());
+				yLine.setThickness((float)thickness);
+				
+				if(!arrowHead1.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE) && arrowOk)
+				{
+					String arrowStyle = arrowHead1.getArrowStyle();
+					lgth = arrowHead1.getArrowHeadLength();
+					boolean isArrow = arrowHead1.needReduceLine();
+					
+					if((minX!=0 && isYLabelWest) || (maxX!=0 && !isYLabelWest) || maxY==minY)
+					{
+						if(isArrow && !isYLabelWest)
+						{
+							if(arrowStyle.equals(PSTricksConstants.RARROW_STYLE))
+								arrowStyle = PSTricksConstants.LARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+								arrowStyle = PSTricksConstants.RARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DLARROW_STYLE))
+								arrowStyle = PSTricksConstants.DRARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+								arrowStyle = PSTricksConstants.DLARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LSBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RSBRACKET_STYLE;
+						}
+						
+						if(isArrow)
+							if(isYLabelWest)
+								 xLine.getPt1().x-=lgth;
+							else xLine.getPt2().x+=lgth;
+						
+						if(isYLabelWest)
+							xLine.setArrow1Style(arrowStyle);
+						else
+							xLine.setArrow2Style(arrowStyle);
+					}
+					
+					if((minY!=0 && isXLabelSouth) || (maxY!=0 && !isXLabelSouth) || maxX==minX)
+					{
+						arrowStyle = arrowHead1.getArrowStyle();
+						
+						if(isArrow && isXLabelSouth)
+						{
+							if(arrowStyle.equals(PSTricksConstants.RARROW_STYLE))
+								arrowStyle = PSTricksConstants.LARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+								arrowStyle = PSTricksConstants.RARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DLARROW_STYLE))
+								arrowStyle = PSTricksConstants.DRARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+								arrowStyle = PSTricksConstants.DLARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LSBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RSBRACKET_STYLE;
+						}
+						
+						if(isArrow)
+							if(isXLabelSouth)
+								 yLine.getPt2().y+=lgth;
+							else yLine.getPt1().y-=lgth;
+						
+						if(isXLabelSouth)
+							yLine.setArrow2Style(arrowStyle);
+						else
+							yLine.setArrow1Style(arrowStyle);
+					}
+				}
+				
+				if(!arrowHead2.getArrowStyle().equals(PSTricksConstants.NONEARROW_STYLE) && arrowOk)
+				{
+					String arrowStyle = arrowHead2.getArrowStyle();
+					lgth = arrowHead2.getArrowHeadLength();
+					boolean isArrow = arrowHead2.needReduceLine();
+					
+					if((maxY!=0 && isXLabelSouth) || (minY!=0 && !isXLabelSouth) || maxY==minY)
+					{
+						if(isArrow && !isXLabelSouth)
+						{
+							if(arrowStyle.equals(PSTricksConstants.RARROW_STYLE))
+								arrowStyle = PSTricksConstants.LARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+								arrowStyle = PSTricksConstants.RARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DLARROW_STYLE))
+								arrowStyle = PSTricksConstants.DRARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+								arrowStyle = PSTricksConstants.DLARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LSBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RSBRACKET_STYLE;
+						}
+						
+						if(maxY==minY && minY==0)
+						{
+							if(isArrow)
+								if(maxX>0)
+									 xLine.getPt1().y-=lgth;
+								else xLine.getPt2().y+=lgth;
+							
+							if(maxX>0)
+								xLine.setArrow1Style(arrowStyle);
+							else
+								xLine.setArrow2Style(arrowStyle);
+						}
+						else
+						{
+							if(isArrow)
+								if(isXLabelSouth)
+									 yLine.getPt1().y-=lgth;
+								else yLine.getPt2().y+=lgth;
+							
+							if(isXLabelSouth)
+								yLine.setArrow1Style(arrowStyle);
+							else
+								yLine.setArrow2Style(arrowStyle);
+						}
+					}
+					
+					if((maxX!=0 && isYLabelWest) || (minX!=0 && !isYLabelWest) || maxX==minX)
+					{
+						arrowStyle = arrowHead2.getArrowStyle();
+						
+						if(isArrow && isYLabelWest)
+						{
+							if(arrowStyle.equals(PSTricksConstants.RARROW_STYLE))
+								arrowStyle = PSTricksConstants.LARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LARROW_STYLE))
+								arrowStyle = PSTricksConstants.RARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DLARROW_STYLE))
+								arrowStyle = PSTricksConstants.DRARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.DRARROW_STYLE))
+								arrowStyle = PSTricksConstants.DLARROW_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RRBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.LSBRACKET_STYLE;
+							else if(arrowStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+								arrowStyle = PSTricksConstants.RSBRACKET_STYLE;
+						}
+						
+						if(maxX==minX && minX==0)
+						{
+							if(isArrow)
+								if(maxY>0)
+									 yLine.getPt2().x+=lgth;
+								else xLine.getPt1().x-=lgth;
+							
+							if(maxY>0)
+								yLine.setArrow2Style(arrowStyle);
+							else
+								yLine.setArrow1Style(arrowStyle);
+						}
+						else
+						{
+							if(isArrow)
+								if(isYLabelWest)
+									 xLine.getPt2().x+=lgth;
+								else xLine.getPt1().x-=lgth;
+							
+							if(isYLabelWest)
+								xLine.setArrow2Style(arrowStyle);
+							else
+								xLine.setArrow1Style(arrowStyle);
+						}
+					}
+				}
+
+				elt.appendChild(new LLineSVGGenerator(xLine).toSVG(document));
+				elt.appendChild(new LLineSVGGenerator(yLine).toSVG(document));
+				
+				break;
+				
+			case Axe.AXES_STYLE_FRAME_VALUE:
+				
+				if(gridEnd.x>0 || gridEnd.y>0)
+				{
+					double xMax = position.x+gridEnd.x*Figure.PPC;
+					double yMax = position.y-gridEnd.y*Figure.PPC;
+					
+					LaTeXDrawRectangle r = new LaTeXDrawRectangle(
+							new LaTeXDrawPoint2D(position.x, gridEnd.y>0?yMax:position.y), 
+							new LaTeXDrawPoint2D(gridEnd.x>0?xMax:position.x, position.y), false);
+					
+					r.setBordersPosition(PSTricksConstants.BORDERS_MIDDLE);
+					r.setLinesColor(shape.getLinesColor());
+					r.setLineStyle(shape.getLineStyle());
+					r.setThickness((float)thickness);
+					elt.appendChild(new LRectangleSVGGenerator(r).toSVG(document));
+				}
+				break;
+		}
+		
+		double endX = distLabelsX!=0. ? maxX3 : maxX3/increment.x;
+		double endY = distLabelsY!=0. ? maxY3 : maxY3/increment.getY();
+		double startX = distLabelsX!=0. ? minX3 : minX3/increment.x;
+		double startY = distLabelsY!=0. ? minY3 : minY3/increment.getY();
+		
+		if(ticksDisplayed!=Axe.LABELS_DISPLAYED_NON_VALUE)// We draw the ticks
+		{
+			if(ticksStyle==Axe.TICKS_STYLE_FULL_VALUE || (ticksStyle==Axe.TICKS_STYLE_TOP_VALUE && maxY>0) ||
+			  (ticksStyle==Axe.TICKS_STYLE_BOTTOM_VALUE && maxY<=0))
+				if(ticksDisplayed==Axe.LABELS_DISPLAYED_X_VALUE || ticksDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE)
+				{
+					SVGElement ticksX = new SVGGElement(document);
+					Line l = new Line(false);
+					l.setThickness((float)thickness);
+					l.setLinesColor(shape.getLinesColor());
+					
+					for(j=1; j<=endX; j++)
+						try{ ticksX.appendChild(new SVGLineElement(position.x+j*gapX*increment.x, position.y,
+								            position.x+j*gapX*increment.x, position.y-ticksSize-thickness/2., document)); }
+						catch(MalformedSVGDocument e) { /* */ }
+					
+					for(j=-1; j>=startX; j--)
+						try{ ticksX.appendChild(new SVGLineElement(position.x+j*gapX*increment.x, position.y,
+											position.x+j*gapX*increment.x, position.y-ticksSize-thickness/2., document)); }
+						catch(MalformedSVGDocument e) { /* */ }
+					
+					elt.appendChild(ticksX);
+				}
+			
+			if(ticksStyle==Axe.TICKS_STYLE_FULL_VALUE || (ticksStyle==Axe.TICKS_STYLE_TOP_VALUE && maxX>0) ||
+			  (ticksStyle==Axe.TICKS_STYLE_BOTTOM_VALUE && maxX<=0))
+				if(ticksDisplayed==Axe.LABELS_DISPLAYED_Y_VALUE || ticksDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE)
+				{
+					SVGElement ticksY = new SVGGElement(document);
+					
+					for(j=1; j<=endY; j++)
+						try{ ticksY.appendChild(new SVGLineElement(position.x, position.y-j*gapY*increment.getY(),
+								  			position.x+ticksSize+thickness/2., position.y-j*gapY*increment.getY(), document)); }
+						catch(MalformedSVGDocument e) { /* */ }
+					
+					for(j=-1; j>=startY; j--)
+						try{ ticksY.appendChild(new SVGLineElement(position.x, position.y-j*gapY*increment.getY(), 
+											position.x+ticksSize+thickness/2., position.y-j*gapY*increment.getY(), document)); }
+						catch(MalformedSVGDocument e) { /* */ }
+					
+					elt.appendChild(ticksY);
+				}
+			
+			if(ticksStyle==Axe.TICKS_STYLE_FULL_VALUE || (ticksStyle==Axe.TICKS_STYLE_BOTTOM_VALUE && maxY>0) ||
+			  (ticksStyle==Axe.TICKS_STYLE_TOP_VALUE && maxY<=0))
+				if(ticksDisplayed==Axe.LABELS_DISPLAYED_X_VALUE || ticksDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE)
+				{
+					SVGElement ticksX = new SVGGElement(document);
+					
+					for(j=1; j<=endX; j++)
+						try{ ticksX.appendChild(new SVGLineElement(position.x+j*gapX*increment.x, position.y, 
+											position.x+j*gapX*increment.x, position.y+ticksSize+thickness/2., document)); }
+						catch(MalformedSVGDocument e) { /* */ }
+					
+					for(j=-1; j>=startX; j--)
+						try{ ticksX.appendChild(new SVGLineElement(position.x+j*gapX*increment.x, position.y,
+											position.x+j*gapX*increment.x, position.y+ticksSize+thickness/2., document)); }
+						catch(MalformedSVGDocument e) { /* */ }
+					
+					elt.appendChild(ticksX);
+				}
+			
+			if(ticksStyle==Axe.TICKS_STYLE_FULL_VALUE || (ticksStyle==Axe.TICKS_STYLE_BOTTOM_VALUE && maxX>0) ||
+				(ticksStyle==Axe.TICKS_STYLE_TOP_VALUE && maxX<=0))
+				if(ticksDisplayed==Axe.LABELS_DISPLAYED_Y_VALUE || ticksDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE)
+				{
+					SVGElement ticksY = new SVGGElement(document);
+					
+					for(j=1; j<=endY; j++)
+						try{ ticksY.appendChild(new SVGLineElement(position.x, position.y-j*gapY*increment.getY(), 
+											position.x-ticksSize-thickness/2., position.y-j*gapY*increment.getY(), document)); }
+						catch(MalformedSVGDocument e) { /* */ }
+					
+					for(j=-1; j>=startY; j--)
+						try{ ticksY.appendChild(new SVGLineElement(position.x, position.y-j*gapY*increment.getY(), 
+											position.x-ticksSize-thickness/2., position.y-j*gapY*increment.getY(), document)); }
+						catch(MalformedSVGDocument e) { /* */ }
+					
+					elt.appendChild(ticksY);
+				}
+		}
+
+		if(labelsDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE || labelsDisplayed==Axe.LABELS_DISPLAYED_X_VALUE)
+		{// We show the labels on the X-axe.
+			float height 	= fontMetrics.getAscent();
+			double gap 		= ((ticksDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE||
+							  ticksDisplayed==Axe.LABELS_DISPLAYED_X_VALUE)&&
+							((isXLabelSouth && (ticksStyle==Axe.TICKS_STYLE_BOTTOM_VALUE || ticksStyle==Axe.TICKS_STYLE_FULL_VALUE)) ||
+							 (!isXLabelSouth && (ticksStyle==Axe.TICKS_STYLE_TOP_VALUE || ticksStyle==Axe.TICKS_STYLE_FULL_VALUE)))?
+							  ticksSize:0)+thickness/2.+Axe.GAP_LABEL;
+			double sep		= maxY<=0 || !isXLabelSouth? -gap-Axe.GAP_LABEL : gap+height;
+			String str;
+
+			if(((isXLabelSouth && gridStart.y>=0) || (!isXLabelSouth && 
+				gridEnd.y<=0)) && (gridStart.x!=gridEnd.x || gridStart.x!=0) && gridStart.y<=0 && showOrigin)
+			{
+				SVGElement text = new SVGTextElement(document);
+				text.setAttribute(SVGAttributes.SVG_FONT_SIZE, String.valueOf(font.getSize()));
+				text.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, "1");//$NON-NLS-1$
+				text.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.CSS_BLACK_NAME);
+				text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(position.x-fontMetrics.stringWidth(String.valueOf((int)origin.x))/2.)));
+				text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(position.y+sep)));
+				text.setTextContent(String.valueOf((int)origin.x));
+				elt.appendChild(text);
+			}
+			
+			SVGElement texts = new SVGGElement(document);
+			texts.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.CSS_BLACK_NAME);
+			texts.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, "1");//$NON-NLS-1$
+			texts.setAttribute(SVGAttributes.SVG_FONT_SIZE, String.valueOf(font.getSize()));
+			SVGElement text;
+			
+			for(i=increment.x, j=1; j<=endX; i+=increment.x, j++)
+			{
+				text = new SVGTextElement(document);
+				str = (((int)increment.x)==increment.x?String.valueOf((int)(i+origin.x)) : String.valueOf(i+origin.x));
+				text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(position.x+j*gapX*increment.x-fontMetrics.stringWidth(str)/2.)));
+				text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(position.y+sep)));
+				text.setTextContent(str);
+				texts.appendChild(text);
+			}
+			
+			for(i=-increment.x, j=-1; j>=startX; i-=increment.x, j--)
+			{
+				text = new SVGTextElement(document);
+				str = (((int)increment.x)==increment.x?String.valueOf((int)(i+origin.x)) : String.valueOf(i+origin.x));
+				text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(position.x+j*gapX*increment.x-fontMetrics.stringWidth(str)/2.)));
+				text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(position.y+sep)));
+				text.setTextContent(str);
+				texts.appendChild(text);
+			}
+			
+			elt.appendChild(texts);
+		}
+		
+		if(labelsDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE || labelsDisplayed==Axe.LABELS_DISPLAYED_Y_VALUE)
+		{// We show the labels on the Y-axe.
+			float height = fontMetrics.getAscent();
+			String str;
+
+			if(maxX>0 && isYLabelWest)
+			{
+				double gap	= (ticksBot && (ticksDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE ||
+								ticksDisplayed==Axe.LABELS_DISPLAYED_Y_VALUE)?ticksSize:0)+thickness/2.;
+			
+				if(gridStart.x==0 && (gridStart.y!=gridEnd.y || gridStart.y!=0) && showOrigin)
+				{
+					SVGElement text = new SVGTextElement(document);
+					text.setAttribute(SVGAttributes.SVG_FONT_SIZE, String.valueOf(font.getSize()));
+					text.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, "1");//$NON-NLS-1$
+					text.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.CSS_BLACK_NAME);
+					text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(position.x-gap-fontMetrics.stringWidth(String.valueOf((int)origin.y))-Axe.GAP_LABEL)));
+					text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(position.y+height/2.)));
+					text.setTextContent(String.valueOf((int)origin.y));
+					elt.appendChild(text);
+				}
+				
+				SVGElement texts = new SVGGElement(document);
+				texts.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.CSS_BLACK_NAME);
+				texts.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, "1");//$NON-NLS-1$
+				texts.setAttribute(SVGAttributes.SVG_FONT_SIZE, String.valueOf(font.getSize()));
+				SVGElement text;
+				
+				for(i=increment.getY(), j=1; j<=endY; i+=increment.getY(), j++)
+				{
+					text = new SVGTextElement(document);
+					str = ((int)increment.getY())==increment.getY()?String.valueOf((int)(i+origin.y)):String.valueOf(i+origin.y);
+					text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(position.x-gap-fontMetrics.stringWidth(str)-Axe.GAP_LABEL)));
+					text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(position.y+height/2.-j*gapY*increment.getY())));
+					text.setTextContent(str);
+					texts.appendChild(text);
+				}
+				
+				for(i=-increment.getY(), j=-1; j>=startY; i-=increment.getY(), j--)
+				{
+					text = new SVGTextElement(document);
+					str = ((int)increment.getY())==increment.getY()?String.valueOf((int)(i+origin.y)):String.valueOf(i+origin.y);
+					text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(position.x-gap-fontMetrics.stringWidth(str)-Axe.GAP_LABEL)));
+					text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(position.y+height/2.-j*gapY*increment.getY())));
+					text.setTextContent(str);
+					texts.appendChild(text);
+				}
+				
+				elt.appendChild(texts);
+			}
+			else
+			{
+				double gap	= ((!ticksBot || ticksStyle==Axe.TICKS_STYLE_FULL_VALUE) && (ticksDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE||
+								ticksDisplayed==Axe.LABELS_DISPLAYED_Y_VALUE)?ticksSize:0)+thickness/2.;
+				
+				if((!isYLabelWest && gridEnd.x<=0) || (isYLabelWest && gridStart.x>=0) && (gridStart.y!=gridEnd.y  || gridStart.y!=0) && showOrigin)
+				{
+					SVGElement text = new SVGTextElement(document);
+					text.setAttribute(SVGAttributes.SVG_FONT_SIZE, String.valueOf(font.getSize()));
+					text.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, "1");//$NON-NLS-1$
+					text.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.CSS_BLACK_NAME);
+					text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(position.x+gap+Axe.GAP_LABEL)));
+					text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(position.y+height/2.)));
+					text.setTextContent(String.valueOf((int)origin.y));
+					elt.appendChild(text);
+				}
+				
+				SVGElement texts = new SVGGElement(document);
+				texts.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.CSS_BLACK_NAME);
+				texts.setAttribute(SVGAttributes.SVG_FONT_SIZE, String.valueOf(font.getSize()));
+				texts.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, "1");//$NON-NLS-1$
+				SVGElement text;
+				
+				for(i=increment.getY(), j=1; j<=endY; i+=increment.getY(), j++)
+				{
+					text = new SVGTextElement(document);
+					text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(position.x+gap+Axe.GAP_LABEL)));
+					text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(position.y+height/2.-j*gapY*increment.getY())));
+					text.setTextContent(((int)increment.getY())==increment.getY()?String.valueOf((int)(i+origin.y)):String.valueOf(i+origin.y));
+					texts.appendChild(text);
+				}
+				
+				for(i=-increment.getY(), j=-1; j>=startY; i-=increment.getY(), j--)
+				{
+					text = new SVGTextElement(document);
+					text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(position.x+gap+Axe.GAP_LABEL)));
+					text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(position.y+height/2.-j*gapY*increment.getY())));
+					text.setTextContent(((int)increment.getY())==increment.getY()?String.valueOf((int)(i+origin.y)):String.valueOf(i+origin.y));
+					texts.appendChild(text);
+				}
+				
+				elt.appendChild(texts);
+			}
+		}
+		
+		if(rotationAngle%(Math.PI*2)!=0)
+			setSVGRotationAttribute(elt);
+	}
+}
diff --git a/current/latexDraw/generators/svg/LBezierCurveSVGGenerator.java b/current/latexDraw/generators/svg/LBezierCurveSVGGenerator.java
new file mode 100644
index 0000000..575724c
--- /dev/null
+++ b/current/latexDraw/generators/svg/LBezierCurveSVGGenerator.java
@@ -0,0 +1,397 @@
+package latexDraw.generators.svg;
+
+import java.awt.Color;
+
+import latexDraw.figures.ArrowHead;
+import latexDraw.figures.BezierCurve;
+import latexDraw.figures.Line;
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGDefsElement;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.parsers.svg.elements.SVGPathElement;
+import latexDraw.parsers.svg.elements.path.SVGPathSegClosePath;
+import latexDraw.parsers.svg.elements.path.SVGPathSegCurvetoCubic;
+import latexDraw.parsers.svg.elements.path.SVGPathSegList;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for a Bézier curve.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LBezierCurveSVGGenerator extends LPolygonSVGGenerator
+{
+	public LBezierCurveSVGGenerator(BezierCurve f)
+	{
+		super(f);
+	}
+	
+	
+	public LBezierCurveSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	/**
+	 * Creates a Bézier curve from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LBezierCurveSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new BezierCurve(false));
+
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGPathElement))
+			throw new IllegalArgumentException();
+		
+		SVGPathElement main = (SVGPathElement)elt2;
+		BezierCurve bc = (BezierCurve)getShape();
+		ArrowHead arrowHead1 = bc.getArrowHead1();
+		ArrowHead arrowHead2 = bc.getArrowHead2();
+		
+		setPath(main.getSegList());
+		setNumber(elt);
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		LaTeXDrawPoint2D pt1 = new LaTeXDrawPoint2D(bc.getPoint(0));
+		LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D(bc.getPoint(-1));
+		
+		arrowHead1.setPosition(pt1);
+		arrowHead1.setLine(new Line(pt1, bc.getFirstControlPoint(0), false));
+		arrowHead1.setFigure(bc);
+		arrowHead2.setPosition(pt2);
+		arrowHead2.setLine(new Line(pt2, bc.getFirstControlPoint(-1), false));
+		arrowHead2.setFigure(bc);
+		
+		setSVGArrow(arrowHead1, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_START), main);
+		setSVGArrow(arrowHead2, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_END), main);
+		homogeniseArrows(arrowHead1, arrowHead2);
+		
+		bc.setShowPoints(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHOW_PTS)!=null);
+		bc.updateShape();
+		bc.updateBorders();
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+	
+	/**
+	 * Sets the shape path according to the given SVG path segments.
+	 * @param list The SVG path segments list
+	 * @since 2.0.0
+	 */
+	public void setPath(SVGPathSegList list)
+	{
+		if(list==null || list.size()<2 || !(list.firstElement() instanceof SVGPathSegMoveto))
+			throw new IllegalArgumentException();
+		
+		BezierCurve bc = (BezierCurve)getShape();
+		SVGPathSegMoveto m = (SVGPathSegMoveto)list.firstElement();
+		SVGPathSegCurvetoCubic c;
+		int i=1, size = list.size();
+		
+		bc.addPoint(new LaTeXDrawPoint2D(m.getX(), m.getY()));
+		
+		if(i>0 && list.elementAt(1) instanceof SVGPathSegCurvetoCubic)
+		{// We set the control point of the first point.
+			c = (SVGPathSegCurvetoCubic)list.elementAt(1);
+			bc.getFirstControlPoint(-1).setLocation(c.getX1(), c.getY1());
+		}
+		
+		while(i<size && list.elementAt(i) instanceof SVGPathSegCurvetoCubic)
+		{
+			c = (SVGPathSegCurvetoCubic)list.elementAt(i);
+			bc.addPoint(new LaTeXDrawPoint2D(c.getX(), c.getY()));
+			bc.getFirstControlPoint(-1).setLocation(c.getX2(), c.getY2());
+			i++;
+		}
+		
+		bc.removePointAt(0); // We remove the two first points created during the first initialisation.
+		bc.removePointAt(0);
+		
+		if(bc.getPoint(-1).equals(bc.getPoint(0), 0.00001))// We set the shape as closed
+		{
+			bc.removePointAt(-1);
+			bc.setOpen(false);
+			bc.setCloseType(BezierCurve.CLOSE_TYPE_CURVE);
+		}
+		else
+			if(i<size && list.elementAt(i) instanceof SVGPathSegClosePath) // There is something else at the end of the path.
+			{
+				bc.setOpen(false);
+				bc.setCloseType(BezierCurve.CLOSE_TYPE_LINE);
+			}
+			else
+				bc.setOpen(true);
+		
+		bc.updateSecondControlPoints();
+		bc.updateShape();
+	}
+	
+	
+	
+	
+	/**
+	 * @return The SVG segment path list of the current Bézier curve.
+	 * @since 2.0.0
+	 */
+	protected SVGPathSegList getPathSegList()
+	{
+		BezierCurve bc = (BezierCurve)shape;
+		
+		if(bc.getNbPoints()<2)
+			return null;
+		
+		int size = bc.getNbPoints(), i;
+		SVGPathSegList path = new SVGPathSegList();
+
+		path.add(new SVGPathSegMoveto(bc.getPoint(0).x, bc.getPoint(0).y, false));
+		path.add(new SVGPathSegCurvetoCubic(bc.getPoint(1).x, bc.getPoint(1).y, bc.getFirstControlPoint(0).x, 
+					bc.getFirstControlPoint(0).y, bc.getFirstControlPoint(1).x, bc.getFirstControlPoint(1).y, false));
+		
+		for(i=2; i<size; i++)
+			path.add(new SVGPathSegCurvetoCubic(bc.getPoint(i).x, bc.getPoint(i).y, 
+												bc.getSecondControlPoint(i-1).x, bc.getSecondControlPoint(i-1).y, 
+												bc.getFirstControlPoint(i).x, bc.getFirstControlPoint(i).y, false));
+		
+		if(!bc.isOpen())
+		{
+			if(bc.getCloseType()==BezierCurve.CLOSE_TYPE_CURVE)
+			{
+				LaTeXDrawPoint2D ctrl1b = bc.getFirstControlPoint(0).centralSymmetry(bc.getPoint(0));
+				LaTeXDrawPoint2D ctrl2b = bc.getFirstControlPoint(-1).centralSymmetry(bc.getPoint(-1));
+				
+				path.add(new SVGPathSegCurvetoCubic(bc.getPoint(0).x, bc.getPoint(0).y, ctrl2b.x, ctrl2b.y, ctrl1b.x, ctrl1b.y, false));
+			}
+			
+			path.add(new SVGPathSegClosePath());
+		}
+
+		return path;
+	}
+
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null || doc.getFirstChild().getDefs()==null)
+			return null;
+
+		BezierCurve bc = (BezierCurve)shape;
+		SVGDefsElement defs = doc.getFirstChild().getDefs();
+		SVGElement root = new SVGGElement(doc), elt;
+		ArrowHead arrowHead1 = ((Arrowable)shape).getArrowHead1();
+		ArrowHead arrowHead2 = ((Arrowable)shape).getArrowHead2();
+		String path = getPathSegList().toString();
+		SVGElement arrow1 = null, arrow2 = null, arrow1Shad = null, arrow2Shad = null;
+		String arrow1Name = "arrow1-" + shape.getNumber();//$NON-NLS-1$
+		String arrow2Name = "arrow2-" + shape.getNumber();//$NON-NLS-1$
+		String arrow1ShadName = "arrow1Shad-" + shape.getNumber();//$NON-NLS-1$
+		String arrow2ShadName = "arrow2Shad-" + shape.getNumber();//$NON-NLS-1$
+
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_BEZIER_CURVE);
+		root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+		
+		if(!arrowHead1.isWithoutStyle())
+		{
+			arrow1     = new LArrowHeadSVGGenerator(arrowHead1).toSVG(doc, false);
+			arrow1Shad = new LArrowHeadSVGGenerator(arrowHead1).toSVG(doc, true);
+
+			arrow1.setAttribute(SVGAttributes.SVG_ID, arrow1Name);
+			defs.appendChild(arrow1);
+
+			if(shape.hasShadow())
+			{
+				arrow1Shad.setAttribute(SVGAttributes.SVG_ID, arrow1ShadName);
+				defs.appendChild(arrow1Shad);
+			}
+		}
+
+		if(!arrowHead2.isWithoutStyle() && bc.isOpen())
+		{
+			arrow2     = new LArrowHeadSVGGenerator(arrowHead2).toSVG(doc, false);
+			arrow2Shad = new LArrowHeadSVGGenerator(arrowHead2).toSVG(doc, true);
+
+			arrow2.setAttribute(SVGAttributes.SVG_ID, arrow2Name);
+			defs.appendChild(arrow2);
+
+			if(shape.hasShadow())
+			{
+				arrow2Shad.setAttribute(SVGAttributes.SVG_ID, arrow2ShadName);
+				defs.appendChild(arrow2Shad);
+			}
+		}
+       
+       	if(shape.hasShadow())
+		{
+       		SVGElement shad = new SVGPathElement(doc);
+
+			shad.setAttribute(SVGAttributes.SVG_D, path);
+			setSVGShadowAttributes(shad, false);
+			root.appendChild(shad);
+
+			if(arrow1Shad != null)
+				shad.setAttribute(SVGAttributes.SVG_MARKER_START, "url(#" + arrow1ShadName + ")");//$NON-NLS-1$ //$NON-NLS-2$
+
+			if(arrow2Shad != null)
+				shad.setAttribute(SVGAttributes.SVG_MARKER_END, "url(#" + arrow2ShadName + ")");//$NON-NLS-1$ //$NON-NLS-2$
+		}
+       	
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE) && shape.isFilled())
+        {// The background of the borders must be filled is there is a shadow.
+    		elt = new SVGPathElement(doc);
+    		elt.setAttribute(SVGAttributes.SVG_D, path);
+    		setSVGBorderBackground(elt, root);
+        }
+       
+		elt = new SVGPathElement(doc);
+		elt.setAttribute(SVGAttributes.SVG_D, path);
+		root.appendChild(elt);
+        
+		if(shape.hasDoubleBoundary())
+		{
+			SVGElement dblBord = new SVGPathElement(doc);
+			dblBord.setAttribute(SVGAttributes.SVG_D, path);
+			setSVGDoubleBordersAttributes(dblBord);
+			root.appendChild(dblBord);
+		}
+		
+		setSVGAttributes(doc, elt, false);
+		elt.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE +':'+ LaTeXDrawNamespace.XML_ROTATION, String.valueOf(shape.getRotationAngle()));
+
+		if(arrow1 != null)
+			elt.setAttribute(SVGAttributes.SVG_MARKER_START, "url(#" + arrow1Name + ")");//$NON-NLS-1$ //$NON-NLS-2$
+
+		if(arrow2 != null)
+			elt.setAttribute(SVGAttributes.SVG_MARKER_END, "url(#" + arrow2Name + ")");//$NON-NLS-1$ //$NON-NLS-2$
+
+		if(bc.isShowPoints())
+			root.appendChild(getShowPointsElement(doc));
+		
+		return root;
+	}
+	
+	
+	
+	/**
+	 * Creates an SVG g element that contains the 'show points' plotting.
+	 * @param doc The owner document.
+	 * @return The created g element or null if the shape has not the 'show points' option activated.
+	 * @since 2.0.0
+	 */
+	protected SVGGElement getShowPointsElement(SVGDocument doc)
+	{
+		BezierCurve bc = (BezierCurve)shape;
+		
+		if(!bc.isShowPoints() || doc==null)
+			return null;
+		
+		float blackDash  = bc.getBlackDashLength();
+		float whiteDash  = bc.getWhiteDashLength();
+		boolean hasDble  = bc.hasDoubleBoundary();
+		Color col        = bc.getLinesColor();
+		double doubleSep = bc.getDoubleSep();
+		boolean isOpen   = bc.isOpen();
+		int closeType    = bc.getCloseType();
+		SVGGElement showPts  = new SVGGElement(doc);
+		ArrowHead arrowHead1 = ((Arrowable)shape).getArrowHead1();
+		ArrowHead arrowHead2 = ((Arrowable)shape).getArrowHead2();
+		double thick = (hasDble ? bc.getDoubleSep()+bc.getThickness()*2. : bc.getThickness())/2.;
+		double rad   = (arrowHead1.getDotSizeDim() + arrowHead1.getDotSizeNum()*thick*2.)/2.;
+		int i = 0, size = bc.getNbPoints();
+		
+		showPts.setAttribute(new StringBuffer(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE).append(':').append(
+											LaTeXDrawNamespace.XML_TYPE).toString(), LaTeXDrawNamespace.XML_TYPE_SHOW_PTS);
+		
+		/* Plotting the lines. */
+		for(i=3; i<size; i+=2)
+		{
+			showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getPoint(i-1), bc.getSecondControlPoint(i-1),
+								blackDash, whiteDash, hasDble, 1, doubleSep));
+			showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getSecondControlPoint(i-1), bc.getFirstControlPoint(i),
+					  			blackDash, whiteDash, hasDble, 1, doubleSep));
+			showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getFirstControlPoint(i), bc.getPoint(i),
+					  			blackDash, whiteDash, hasDble, 1, doubleSep));
+		}
+		
+		for(i=2; i<size; i+=2)
+		{
+			showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getPoint(i-1), bc.getSecondControlPoint(i-1),
+								blackDash, whiteDash, hasDble, 1, doubleSep));
+			showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getSecondControlPoint(i-1), bc.getFirstControlPoint(i),
+					  			blackDash, whiteDash, hasDble, 1, doubleSep));
+			showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getFirstControlPoint(i), bc.getPoint(i),
+					  			blackDash, whiteDash, hasDble, 1, doubleSep));
+		}
+		
+		if(!isOpen && closeType==BezierCurve.CLOSE_TYPE_CURVE)
+		{
+			showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getPoint(-1), bc.getSecondControlPoint(-1),
+								blackDash, whiteDash, hasDble, 1, doubleSep));
+			showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getSecondControlPoint(-1), bc.getSecondControlPoint(0),
+					  			blackDash, whiteDash, hasDble, 1, doubleSep));
+			showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getSecondControlPoint(0), bc.getPoint(0),
+					  			blackDash, whiteDash, hasDble, 1, doubleSep));
+		}
+		
+		showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getPoint(0), bc.getFirstControlPoint(0),
+							blackDash, whiteDash, hasDble, 1, doubleSep));
+		showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getFirstControlPoint(0), bc.getFirstControlPoint(1),
+							blackDash, whiteDash, hasDble, 1, doubleSep));
+		showPts.appendChild(getShowPointsLine(doc, (float) thick, col, bc.getFirstControlPoint(1), bc.getPoint(1),
+							blackDash, whiteDash, hasDble, 1, doubleSep));
+			
+		// Plotting the dots.
+		if(arrowHead1.isWithoutStyle() || (!isOpen && closeType==BezierCurve.CLOSE_TYPE_CURVE))
+			showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, bc.getPoint(0), col));
+		
+		if(arrowHead2.isWithoutStyle() || (!isOpen && closeType==BezierCurve.CLOSE_TYPE_CURVE))
+			showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, bc.getPoint(-1), col));
+		
+		for(i=1; i<size-1; i++)
+		{
+			showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, bc.getPoint(i), col));
+			showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, bc.getSecondControlPoint(i), col));
+		}
+		
+		for(i=0; i<size; i++)
+			showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, bc.getFirstControlPoint(i), col));
+		
+		if(!isOpen && closeType==BezierCurve.CLOSE_TYPE_CURVE)
+		{
+			showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, bc.getSecondControlPoint(-1), col));
+			showPts.appendChild(LShapeSVGGenerator.getShowPointsDot(doc, rad, bc.getSecondControlPoint(0), col));
+		}
+		
+		return showPts;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LCircleSVGGenerator.java b/current/latexDraw/generators/svg/LCircleSVGGenerator.java
new file mode 100644
index 0000000..8282140
--- /dev/null
+++ b/current/latexDraw/generators/svg/LCircleSVGGenerator.java
@@ -0,0 +1,152 @@
+package latexDraw.generators.svg;
+
+import latexDraw.figures.Circle;
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGCircleElement;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for a circle.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LCircleSVGGenerator extends LEllipseSVGGenerator
+{
+	public LCircleSVGGenerator(Circle f)
+	{
+		super(f);
+	}
+
+
+	
+	/**
+	 * Creates a circle from an SVG circle element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LCircleSVGGenerator(SVGCircleElement elt)
+	{
+		this(new Circle(true));
+		
+		Circle c = (Circle)getShape();
+		setSVGParameters(elt);
+		LaTeXDrawRectangle borders = c.getBorders(); 
+		borders.getPoint(0).setLocation(elt.getCx()-elt.getR(), elt.getCy()-elt.getR());
+		borders.getPoint(1).setLocation(elt.getCx()+elt.getR(), elt.getCy()-elt.getR());
+		borders.getPoint(2).setLocation(elt.getCx()-elt.getR(), elt.getCy()+elt.getR());
+		borders.getPoint(3).setLocation(elt.getCx()+elt.getR(), elt.getCy()+elt.getR());
+		c.updateShape();
+		c.updateGravityCenter();
+		c.setBordersPosition(PSTricksConstants.BORDERS_MIDDLE);
+		applyTransformations(elt);
+	}
+	
+	
+	
+	
+	public LCircleSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a circle from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LCircleSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Circle(false));
+
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGCircleElement))
+			throw new IllegalArgumentException();
+		
+		SVGCircleElement main = (SVGCircleElement)elt2;
+		LaTeXDrawRectangle borders = shape.getBorders(); 
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		double gap = getPositionGap()/2.;
+		
+		borders.getPoint(0).setLocation(main.getCx()-main.getR()+gap, main.getCy()-main.getR()+gap);
+		borders.getPoint(1).setLocation(main.getCx()+main.getR()-gap, main.getCy()-main.getR()+gap);
+		borders.getPoint(2).setLocation(main.getCx()-main.getR()+gap, main.getCy()+main.getR()-gap);
+		borders.getPoint(3).setLocation(main.getCx()+main.getR()-gap, main.getCy()+main.getR()-gap);
+		shape.updateShape();
+		shape.updateGravityCenter();
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null || doc.getFirstChild().getDefs()==null)
+			return null;
+
+		LaTeXDrawPoint2D nw = shape.getTheNWPoint();
+		LaTeXDrawPoint2D se = shape.getTheSEPoint();
+		SVGElement elt, shad = null, dblBord = null;
+		SVGElement root = new SVGGElement(doc);
+        root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_CIRCLE);
+        root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+        double gap = getPositionGap();
+
+        if(shape.hasShadow())
+        {
+        	shad = new SVGCircleElement((se.x+nw.x)/2., (se.y+nw.y)/2., (se.x-nw.x+gap)/2., doc);
+        	setSVGShadowAttributes(shad, true);
+        	root.appendChild(shad);
+        }
+        
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE))
+        {// The background of the borders must be filled is there is a shadow.
+	        elt = new SVGCircleElement((se.x+nw.x)/2., (se.y+nw.y)/2., (se.x-nw.x+gap)/2., doc);
+	        setSVGBorderBackground(elt, root);
+        }
+        
+        elt = new SVGCircleElement((se.x+nw.x)/2., (se.y+nw.y)/2., (se.x-nw.x+gap)/2., doc);
+        root.appendChild(elt);
+        
+        if(shape.hasDoubleBoundary())
+        {
+        	dblBord = new SVGCircleElement((se.x+nw.x)/2., (se.y+nw.y)/2., (se.x-nw.x+gap)/2., doc);
+        	setSVGDoubleBordersAttributes(dblBord);
+        	root.appendChild(dblBord);
+        }
+
+        setSVGAttributes(doc, elt, true);
+        setSVGRotationAttribute(root);
+        
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LDotSVGGenerator.java b/current/latexDraw/generators/svg/LDotSVGGenerator.java
new file mode 100644
index 0000000..483eb97
--- /dev/null
+++ b/current/latexDraw/generators/svg/LDotSVGGenerator.java
@@ -0,0 +1,345 @@
+package latexDraw.generators.svg;
+
+import static latexDraw.parsers.svg.SVGAttributes.SVG_HEIGHT;
+import static latexDraw.parsers.svg.SVGAttributes.SVG_WIDTH;
+import static latexDraw.parsers.svg.SVGAttributes.SVG_X;
+import static latexDraw.parsers.svg.SVGAttributes.SVG_Y;
+
+import java.awt.Color;
+import java.awt.Polygon;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.Dot;
+import latexDraw.figures.Figure;
+import latexDraw.parsers.svg.CSSColors;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.*;
+import latexDraw.parsers.svg.parsers.SVGPointsParser;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for a dot.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LDotSVGGenerator extends LShapeSVGGenerator
+{
+	public LDotSVGGenerator(Dot f)
+	{
+		super(f);
+	}
+
+
+	public LDotSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a dot from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LDotSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Dot(false));
+
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		Dot d = (Dot)getShape();
+		String v = elt.getAttribute(elt.getUsablePrefix(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI)+LaTeXDrawNamespace.XML_SIZE);
+		SVGElement main = getLaTeXDrawElement(elt, null);
+		
+		try { d.setCurrentStyle(elt.getAttribute(elt.getUsablePrefix(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI)+LaTeXDrawNamespace.XML_DOT_SHAPE)); }
+		catch(IllegalArgumentException e) { /* */ }
+		
+		if(v!=null)
+			try { d.setWidth(Double.valueOf(v).floatValue()); }
+			catch(NumberFormatException e) { /* */ }
+			
+		v = elt.getAttribute(elt.getUsablePrefix(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI)+LaTeXDrawNamespace.XML_POSITION);
+		
+		Vector<Point2D> pos = SVGPointsParser.getPoints(v); 
+		
+		if(pos!=null && !pos.isEmpty())
+			d.setCenter(new LaTeXDrawPoint2D(pos.firstElement()));
+		
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		setNumber(elt);
+		
+		if(withTransformation)
+			applyTransformations(elt);
+		
+		if(!d.canBeFilled())
+			d.setLinesColor(CSSColors.getRGBColour(main.getFill()));
+	}
+
+
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null)
+			return null;
+		
+		Dot d = (Dot)shape;
+		float width = d.getWidth();
+		Point2D.Double center = d.getCenter();
+		String currentStyle = d.getCurrentStyle();
+        SVGElement root = new SVGGElement(doc), dot;
+		LaTeXDrawPoint2D NW = new LaTeXDrawPoint2D(center.x-width/2., center.y-width/2.);
+		LaTeXDrawPoint2D SE = new LaTeXDrawPoint2D(center.x+width/2., center.y+width/2.);
+		float dec = width/Dot.THICKNESS_o_STYLE_FACTOR;
+		
+        root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_DOT);
+        root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+
+		if(currentStyle.equals(PSTricksConstants.DOT_STYLE))
+		{	
+			dot = new SVGCircleElement(doc);
+			
+			dot.setAttribute(SVGAttributes.SVG_FILL, CSSColors.getColorName(d.getLinesColor(), true));
+			dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(NW.x+width/2.));
+			dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(NW.y+width/2.));
+			dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(width/2.));
+		}
+		else if(currentStyle.equals(PSTricksConstants.O_STYLE) || currentStyle.equals(PSTricksConstants.OPLUS_STYLE) ||
+				currentStyle.equals(PSTricksConstants.OTIMES_STYLE))
+		{	
+			float t;
+			dot = new SVGGElement(doc);
+			SVGElement o = new SVGCircleElement(doc);
+			
+			if(currentStyle.equals(PSTricksConstants.O_STYLE))
+				dec = (float)(width*(0.1/3.6))*2;
+			else
+				dec = (float)(width*(0.1/2.6))*2;
+			
+			if(currentStyle.equals(PSTricksConstants.OPLUS_STYLE) || currentStyle.equals(PSTricksConstants.OTIMES_STYLE))
+				dot.setAttribute(SVGAttributes.SVG_FILL, SVGAttributes.SVG_VALUE_NONE);
+			else
+				dot.setAttribute(SVGAttributes.SVG_FILL, 
+						CSSColors.getColorName(d.isFilled()? d.getInteriorColor() : Color.WHITE, true));
+			
+			dot.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(d.getLinesColor(), true));
+			dot.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(dec));
+			o.setAttribute(SVGAttributes.SVG_CX, String.valueOf(NW.x+width/2.));
+			o.setAttribute(SVGAttributes.SVG_CY, String.valueOf(NW.y+width/2.));
+			o.setAttribute(SVGAttributes.SVG_R, String.valueOf(width/2.-dec/2.));
+			dot.appendChild(o);
+			
+			if(currentStyle.equals(PSTricksConstants.OPLUS_STYLE))
+			{
+				SVGElement p1 = new SVGLineElement(doc);
+				SVGElement p2 = new SVGLineElement(doc);
+				
+				t = dec*2;
+				
+				p1.setAttribute(SVGAttributes.SVG_X1, String.valueOf((NW.x+SE.x)/2.));
+				p1.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(NW.y+t));
+				p1.setAttribute(SVGAttributes.SVG_X2, String.valueOf((NW.x+SE.x)/2.));
+				p1.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(SE.y-t));
+				p2.setAttribute(SVGAttributes.SVG_X1, String.valueOf(NW.x+t));
+				p2.setAttribute(SVGAttributes.SVG_Y1, String.valueOf((NW.y+SE.y)/2.));
+				p2.setAttribute(SVGAttributes.SVG_X2, String.valueOf(SE.x-t));
+				p2.setAttribute(SVGAttributes.SVG_Y2, String.valueOf((NW.y+SE.y)/2.));
+				dot.appendChild(p1);
+				dot.appendChild(p2);
+			}
+			else if(currentStyle.equals(PSTricksConstants.OTIMES_STYLE))
+			{
+				SVGElement p1 = new SVGLineElement(doc);
+				SVGElement p2 = new SVGLineElement(doc);
+				
+				t = dec*2+Figure.DEFAULT_THICKNESS*2;
+				
+				p1.setAttribute(SVGAttributes.SVG_X1, String.valueOf(NW.x+t));
+				p1.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(NW.y+t));
+				p1.setAttribute(SVGAttributes.SVG_X2, String.valueOf(SE.x-t));
+				p1.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(SE.y-t));
+				p2.setAttribute(SVGAttributes.SVG_X1, String.valueOf(SE.x-t));
+				p2.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(NW.y+t));
+				p2.setAttribute(SVGAttributes.SVG_X2, String.valueOf(NW.x+t));
+				p2.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(SE.y-t));
+				dot.appendChild(p1);
+				dot.appendChild(p2);
+			}			
+		}
+		else if(currentStyle.equals(PSTricksConstants.BAR_STYLE))
+		{
+			dot = new SVGLineElement(doc);
+			dot.setAttribute(SVGAttributes.SVG_STROKE_LINECAP, SVGAttributes.SVG_LINECAP_VALUE_SQUARE);
+			dot.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(d.getLinesColor(), true));
+			dot.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(d.getBarThickness()));
+			dot.setAttribute(SVGAttributes.SVG_X1, String.valueOf((NW.x+SE.x)/2.));
+			dot.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(NW.y+d.getBarThickness()/2.));
+			dot.setAttribute(SVGAttributes.SVG_X2, String.valueOf((NW.x+SE.x)/2.));
+			dot.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(SE.y+d.getBarGap()));
+		}
+		else if(currentStyle.equals(PSTricksConstants.PLUS_STYLE))
+		{
+			dot = new SVGGElement(doc);
+			SVGElement p1 = new SVGLineElement(doc);
+			SVGElement p2 = new SVGLineElement(doc);
+			double plusGap = d.getPlusGap(); 
+				
+			dot.setAttribute(SVGAttributes.SVG_STROKE_LINECAP, SVGAttributes.SVG_LINECAP_VALUE_SQUARE);
+			dot.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(d.getLinesColor(), true));
+			dot.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(width/Dot.PLUS_COEFF_WIDTH));
+			
+			p1.setAttribute(SVGAttributes.SVG_X1, String.valueOf((NW.x+SE.x)/2.));
+			p1.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(NW.y-plusGap));
+			p1.setAttribute(SVGAttributes.SVG_X2, String.valueOf((NW.x+SE.x)/2.));
+			p1.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(SE.y+plusGap));
+			p2.setAttribute(SVGAttributes.SVG_X1, String.valueOf(NW.x-plusGap));
+			p2.setAttribute(SVGAttributes.SVG_Y1, String.valueOf((NW.y+SE.y)/2.));
+			p2.setAttribute(SVGAttributes.SVG_X2, String.valueOf(SE.x+plusGap));
+			p2.setAttribute(SVGAttributes.SVG_Y2, String.valueOf((NW.y+SE.y)/2.));
+			dot.appendChild(p1);
+			dot.appendChild(p2);
+		}
+		else if(currentStyle.equals(PSTricksConstants.SQUARE_STYLE) || currentStyle.equals(PSTricksConstants.FSQUARE_STYLE))
+		{
+			Color c = d.getLinesColor();
+			
+			if(currentStyle.equals(PSTricksConstants.SQUARE_STYLE))
+				if(d.isFilled())
+					 c = d.getInteriorColor();
+				else
+				     c = Color.WHITE;
+			
+			dec = (float)(width*(0.1/4))*2;
+			dot = new SVGRectElement(doc);
+			dot.setAttribute(SVG_X, String.valueOf(NW.x+dec*1.5));
+			dot.setAttribute(SVG_Y, String.valueOf(NW.y+dec*1.5));
+			dot.setAttribute(SVG_WIDTH, String.valueOf(Math.abs(NW.x-SE.x)-3*dec));
+			dot.setAttribute(SVG_HEIGHT, String.valueOf(Math.abs(NW.y - SE.y)-3*dec));
+			dot.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(d.getLinesColor(), true));
+			dot.setAttribute(SVGAttributes.SVG_FILL, CSSColors.getColorName(c, true));
+			dot.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(dec));
+		}
+		else if(currentStyle.equals(PSTricksConstants.TRIANGLE_STYLE) || currentStyle.equals(PSTricksConstants.FTRIANGLE_STYLE) ||
+				currentStyle.equals(PSTricksConstants.DIAMOND_STYLE) || currentStyle.equals(PSTricksConstants.FDIAMOND_STYLE) ||
+				currentStyle.equals(PSTricksConstants.PENTAGON_STYLE) || currentStyle.equals(PSTricksConstants.FPENTAGON_STYLE))
+		{
+			Polygon p;
+			Color c = d.getLinesColor();
+			String path;
+			dot = new SVGPathElement(doc);
+			
+			if(currentStyle.equals(PSTricksConstants.TRIANGLE_STYLE) || currentStyle.equals(PSTricksConstants.FTRIANGLE_STYLE))
+				p = d.createTriangle();
+			else
+				if(currentStyle.equals(PSTricksConstants.PENTAGON_STYLE) || currentStyle.equals(PSTricksConstants.FPENTAGON_STYLE))
+					p = d.createPentagon();
+				else
+					p = d.createDiamond();
+			
+			if(currentStyle.equals(PSTricksConstants.TRIANGLE_STYLE) || currentStyle.equals(PSTricksConstants.DIAMOND_STYLE) ||
+				currentStyle.equals(PSTricksConstants.PENTAGON_STYLE))
+				if(d.isFilled())
+					c = d.getInteriorColor();
+				else
+					c = Color.WHITE;
+			
+			if(p.npoints==0)
+				return null;
+			
+			int[] xp = p.xpoints;
+			int[] yp = p.ypoints;
+			//TODO use path
+			path = "M " + xp[0] + " " + yp[0]; //$NON-NLS-1$ //$NON-NLS-2$
+			
+			for(int i = 1; i<p.npoints; i++)
+				path += " L " + xp[i] + " " + yp[i];  //$NON-NLS-1$ //$NON-NLS-2$
+			
+			path += " Z"; //$NON-NLS-1$
+			
+			dot.setAttribute(SVGAttributes.SVG_D, path);
+			dot.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(d.getLinesColor(), true));
+			dot.setAttribute(SVGAttributes.SVG_FILL, CSSColors.getColorName(c, true));
+			dot.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(dec));
+		}
+		else if(currentStyle.equals(PSTricksConstants.X_STYLE))
+		{
+			double crossGap = d.getCrossGap();
+			dot = new SVGGElement(doc);
+			SVGElement p1 = new SVGLineElement(doc);
+			SVGElement p2 = new SVGLineElement(doc);
+			
+			dot.setAttribute(SVGAttributes.SVG_STROKE_LINECAP, SVGAttributes.SVG_LINECAP_VALUE_SQUARE);
+			dot.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(d.getLinesColor(), true));
+			dot.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(crossGap));
+			
+			p1.setAttribute(SVGAttributes.SVG_X1, String.valueOf(NW.x+crossGap));
+			p1.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(NW.y+crossGap));
+			p1.setAttribute(SVGAttributes.SVG_X2, String.valueOf(SE.x-crossGap));
+			p1.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(SE.y-crossGap));
+			p2.setAttribute(SVGAttributes.SVG_X1, String.valueOf(SE.x-crossGap));
+			p2.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(NW.y+crossGap));
+			p2.setAttribute(SVGAttributes.SVG_X2, String.valueOf(NW.x+crossGap));
+			p2.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(SE.y-crossGap));
+			dot.appendChild(p1);
+			dot.appendChild(p2);
+		}
+		else
+		{
+			dot = new SVGGElement(doc);
+			SVGElement l1 = new SVGLineElement(doc);
+			SVGElement l2 = new SVGLineElement(doc);
+			SVGElement l3 = new SVGLineElement(doc);
+			double xCenter = (NW.x+SE.x)/2., yCenter = (NW.y+SE.y)/2.;
+			double radius = Math.abs((NW.y+width/10.)-(SE.y-width/10.))/2.+dec;
+			
+			dot.setAttribute(SVGAttributes.SVG_STROKE_LINECAP, SVGAttributes.SVG_LINECAP_VALUE_SQUARE);
+			dot.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(d.getLinesColor(), true));
+			dot.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(dec));
+			
+			l1.setAttribute(SVGAttributes.SVG_X1, String.valueOf((NW.x+SE.x)/2.));
+			l1.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(NW.y+width/10.-dec));
+			l1.setAttribute(SVGAttributes.SVG_X2, String.valueOf((NW.x+SE.x)/2.));
+			l1.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(SE.y-width/10.+dec));
+			l2.setAttribute(SVGAttributes.SVG_X1, String.valueOf(Math.cos(Math.PI/6.)*radius+xCenter));
+			l2.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(radius/2. + yCenter));
+			l2.setAttribute(SVGAttributes.SVG_X2, String.valueOf(Math.cos(7*Math.PI/6.)*radius+xCenter));
+			l2.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(Math.sin(7*Math.PI/6.)*radius+yCenter));
+			l3.setAttribute(SVGAttributes.SVG_X1, String.valueOf(Math.cos(5*Math.PI/6.)*radius+xCenter));
+			l3.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(Math.sin(5*Math.PI/6.)*radius+yCenter));
+			l3.setAttribute(SVGAttributes.SVG_X2, String.valueOf(Math.cos(11*Math.PI/6.)*radius+xCenter));
+			l3.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(Math.sin(11*Math.PI/6.)*radius+yCenter));
+			dot.appendChild(l1);
+			dot.appendChild(l2);
+			dot.appendChild(l3);
+		}
+		
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_SIZE, String.valueOf(d.getWidth()));
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_DOT_SHAPE, currentStyle);
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_POSITION, d.getCenter().x + " " + d.getCenter().y); //$NON-NLS-1$
+		root.appendChild(dot);
+		
+		setSVGRotationAttribute(root);
+		
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LDrawingSVGGenerator.java b/current/latexDraw/generators/svg/LDrawingSVGGenerator.java
new file mode 100644
index 0000000..a0d40e1
--- /dev/null
+++ b/current/latexDraw/generators/svg/LDrawingSVGGenerator.java
@@ -0,0 +1,108 @@
+package latexDraw.generators.svg;
+
+import java.util.Vector;
+
+import latexDraw.figures.Draw;
+import latexDraw.figures.Figure;
+import latexDraw.parsers.svg.LaTeXDrawFiguresFactory;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.util.LaTeXDrawNamespace;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Defines a SVG generator for a drawing.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LDrawingSVGGenerator extends LShapeSVGGenerator
+{
+
+	public LDrawingSVGGenerator(Draw f)
+	{
+		super(f);
+	}
+
+
+	
+	public LDrawingSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a drawing from a G element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LDrawingSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Draw(true, true));
+		
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		NodeList nl = elt.getChildNodes();
+		Figure f;
+		Draw d = (Draw)getShape();
+		
+		if(nl.getLength()<2)
+			throw new IllegalArgumentException();
+		
+		for(int i=0, size=nl.getLength(); i<size; i++)
+		{
+			f = LaTeXDrawFiguresFactory.createFigure((SVGElement)nl.item(i), withTransformation);
+			
+			if(f!=null)
+				d.addFigure(f);
+		}
+		
+		setNumber(elt);
+	}
+
+
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null)
+			return null;
+		
+		Draw d = (Draw)shape;
+		
+		if(d.isDrawFigures() && !d.isEmpty())
+		{
+			 SVGElement root = new SVGGElement(doc);
+			 Vector<Figure> figures = d.getFigures();
+			 
+			 root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_DRAWING);
+			 root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+			 
+			 for(Figure f : figures)
+				 root.appendChild(SVGShapesFactory.createSVGElement(f, doc));
+			 
+			 return root;
+		}		 
+		 
+		return null;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LEllipseSVGGenerator.java b/current/latexDraw/generators/svg/LEllipseSVGGenerator.java
new file mode 100644
index 0000000..664da61
--- /dev/null
+++ b/current/latexDraw/generators/svg/LEllipseSVGGenerator.java
@@ -0,0 +1,148 @@
+package latexDraw.generators.svg;
+
+import latexDraw.figures.Ellipse;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGEllipseElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for an ellipse.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LEllipseSVGGenerator extends LShapeSVGGenerator
+{
+	public LEllipseSVGGenerator(Ellipse f)
+	{
+		super(f);
+	}
+
+	
+	
+	/**
+	 * Creates an ellipse from an SVG ellipse element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LEllipseSVGGenerator(SVGEllipseElement elt)
+	{
+		this(new Ellipse(true));
+		
+		Ellipse e = (Ellipse)getShape();
+		
+		setSVGParameters(elt);
+		e.setFirstPoint(elt.getCx()-elt.getRx(), elt.getCy()-elt.getRy());
+		e.setLastPoint(elt.getCx()+elt.getRx(), elt.getCy()+elt.getRy());
+		e.setBordersPosition(PSTricksConstants.BORDERS_MIDDLE);
+		applyTransformations(elt);
+	}
+	
+	
+	
+	public LEllipseSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates an ellipse from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LEllipseSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Ellipse(false));
+
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		Ellipse e = (Ellipse)getShape();
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGEllipseElement))
+			throw new IllegalArgumentException();
+		
+		SVGEllipseElement main = (SVGEllipseElement)elt2;
+		
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		
+		double gap = getPositionGap()/2.;
+        
+		e.setFirstPoint(main.getCx()-main.getRx()+gap, main.getCy()-main.getRy()+gap);
+		e.setLastPoint(main.getCx()+main.getRx()-gap, main.getCy()+main.getRy()-gap);
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null || doc.getFirstChild().getDefs()==null)
+			throw new IllegalArgumentException();
+
+		LaTeXDrawPoint2D nw = shape.getTheNWPoint();
+		LaTeXDrawPoint2D se = shape.getTheSEPoint();
+		SVGElement elt;
+		SVGElement root = new SVGGElement(doc);
+        root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_ELLIPSE);
+        root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+        double gap = getPositionGap();
+
+        if(shape.hasShadow())
+        {
+        	elt = new SVGEllipseElement((se.x+nw.x)/2., (se.y+nw.y)/2., Math.max(1, (se.x-nw.x+gap)/2.), 
+        																 Math.max(1, (se.y-nw.y+gap)/2.), doc);
+        	setSVGShadowAttributes(elt, true);
+        	root.appendChild(elt);
+        }
+        
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE))
+        {// The background of the borders must be filled is there is a shadow.
+        	elt = new SVGEllipseElement((se.x+nw.x)/2., (se.y+nw.y)/2., Math.max(1, (se.x-nw.x+gap)/2.), 
+																		Math.max(1, (se.y-nw.y+gap)/2.), doc);
+        	setSVGBorderBackground(elt, root);
+        }
+        
+        elt = new SVGEllipseElement((se.x+nw.x)/2., (se.y+nw.y)/2., Math.max(1, (se.x-nw.x+gap)/2.), 
+        															Math.max(1, (se.y-nw.y+gap)/2.), doc);
+        setSVGAttributes(doc, elt, true);
+        root.appendChild(elt);
+        
+        if(shape.hasDoubleBoundary())
+        {
+        	elt = new SVGEllipseElement((se.x+nw.x)/2., (se.y+nw.y)/2., Math.max(1, (se.x-nw.x+gap)/2.), 
+        																	Math.max(1, (se.y-nw.y+gap)/2.), doc);
+        	setSVGDoubleBordersAttributes(elt);
+        	root.appendChild(elt);
+        }
+
+        setSVGRotationAttribute(root);
+        
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LFreeHandSVGGenerator.java b/current/latexDraw/generators/svg/LFreeHandSVGGenerator.java
new file mode 100644
index 0000000..10da628
--- /dev/null
+++ b/current/latexDraw/generators/svg/LFreeHandSVGGenerator.java
@@ -0,0 +1,246 @@
+package latexDraw.generators.svg;
+
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.AkinPoints;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.parsers.svg.elements.SVGPathElement;
+import latexDraw.parsers.svg.elements.path.*;
+import latexDraw.parsers.svg.parsers.SVGPointsParser;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for a free hand drawing.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LFreeHandSVGGenerator extends LPolygonSVGGenerator
+{
+
+	public LFreeHandSVGGenerator(AkinPoints f)
+	{
+		super(f);
+	}
+
+	
+	
+	public LFreeHandSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	public LFreeHandSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new AkinPoints(new LaTeXDrawPoint2D(), false));
+
+		AkinPoints ak = (AkinPoints)getShape();
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		
+		setNumber(elt);
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGPathElement))
+			throw new IllegalArgumentException();
+		
+		try{ ak.setType(Double.valueOf(elt.getAttribute(
+										LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_PATH_TYPE)).intValue()); }
+		catch(NumberFormatException e) { throw new IllegalArgumentException("Invalid path type."); }//$NON-NLS-1$
+	
+		SVGPathElement main = (SVGPathElement)elt2;
+		String v = elt.getAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_INTERVAL);
+		
+		if(v!=null)
+			try{ ak.setInterval(Double.valueOf(v).intValue()); }
+		catch(NumberFormatException e) { /* */ }
+		
+		Vector<Point2D> pts;
+		
+		pts = SVGPointsParser.getPoints(elt.getAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_POINTS)); 
+	
+		if(pts==null)
+			throw new IllegalArgumentException("No attribute pts.");
+		
+		for(Point2D pt : pts)
+			ak.addPoint(new LaTeXDrawPoint2D(pt));
+		
+		ak.removePointAt(0);
+		
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		ak.updateShape();
+		ak.updateBorders();
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		
+		v = elt.getAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ROTATION);
+		
+		if(v!=null)
+			try{ ak.setRotationAngle(Double.valueOf(v)); }
+			catch(NumberFormatException e) { /* */ }
+		
+		v = elt.getAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_PATH_TYPE);
+		
+		if(v!=null)
+			try{ ak.setType(Double.valueOf(v).intValue()); }
+			catch(NumberFormatException e) { /* */ }
+			
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+	
+	/**
+	 * @return The path of the shape.
+	 * @since 2.0.0
+	 */
+	public SVGPathSegList getPath()
+	{
+		SVGPathSegList path = new SVGPathSegList();
+		AkinPoints ak = (AkinPoints)shape;
+		int i, size = ak.getNbPoints();
+		int interval = ak.getInterval();
+		
+		if(ak.getType()==AkinPoints.TYPE_CURVES)
+		{
+			float prevx = (float)ak.getPoint(-1).x;
+			float prevy = (float)ak.getPoint(-1).y;
+			float curx = (float)ak.getPoint(0).x;
+			float cury = (float)ak.getPoint(0).y;
+	        float midx = (curx + prevx) / 2.0f;
+	        float midy = (cury + prevy) / 2.0f;
+		
+        	path.add(new SVGPathSegMoveto(curx, cury, false));
+	    	
+	        if(size>interval)
+	        {
+	            prevx = curx;
+	            prevy = cury;
+	            curx = (float)ak.getPoint(interval).x; 
+	            cury = (float)ak.getPoint(interval).y;
+	            midx = (curx + prevx) / 2.0f;
+	            midy = (cury + prevy) / 2.0f;
+	           
+	            path.add(new SVGPathSegLineto(midx, midy, false));
+	        }
+	        
+	        for(i=interval*2; i<size; i+=interval) 
+	        {
+	        	 float x1 = (midx + curx) / 2.0f;
+	             float y1 = (midy + cury) / 2.0f;
+	             prevx = curx;
+	             prevy = cury;
+	             curx = (float)ak.getPoint(i).x; 
+	             cury = (float)ak.getPoint(i).y;
+	             midx = (curx + prevx) / 2.0f;
+	             midy = (cury + prevy) / 2.0f;
+	             float x2 = (prevx + midx) / 2.0f;
+	             float y2 = (prevy + midy) / 2.0f;
+
+	             path.add(new SVGPathSegCurvetoCubic(midx, midy, x1, y1, x2, y2, false));
+	        }
+	        
+	        if((i-interval+1)<size)
+	        {
+	        	float x1 = (midx + curx) / 2.0f;
+	        	float y1 = (midy + cury) / 2.0f;
+	            prevx = curx;
+	            prevy = cury;
+	            curx = (float)ak.getPoint(-1).x; 
+	            cury = (float)ak.getPoint(-1).y;
+	            midx = (curx + prevx) / 2.0f;
+	            midy = (cury + prevy) / 2.0f;
+	            float x2 = (prevx + midx) / 2.0f;
+	            float y2 = (prevy + midy) / 2.0f;
+	          
+	            path.add(new SVGPathSegCurvetoCubic(ak.getPoint(-1).x, ak.getPoint(-1).y, x1, y1, x2, y2, false));
+	        }
+		}
+		else
+		{
+			LaTeXDrawPoint2D p = ak.getPoint(0);
+			
+			path.add(new SVGPathSegMoveto(p.x, p.y, false));
+			
+			for(i=interval; i<size; i+=interval)
+				path.add(new SVGPathSegLineto(ak.getPoint(i).x, ak.getPoint(i).y, false));
+			
+			if((i-interval)<size)
+				path.add(new SVGPathSegLineto(ak.getPoint(-1).x, ak.getPoint(-1).y, false));
+		}
+		
+		if(!ak.isOpen())
+			path.add(new SVGPathSegClosePath());
+		
+		return path;
+	}
+	
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null)
+			return null;
+		
+		SVGElement root = new SVGGElement(doc), elt;
+		AkinPoints ak = (AkinPoints)shape;
+		
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_AKIN_PTS);
+		root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_PATH_TYPE, String.valueOf(ak.getType()));
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_INTERVAL, String.valueOf(ak.getInterval()));
+		String path = getPath().toString();
+		String pts = "";//$NON-NLS-1$
+
+		for(int i = 0, size = ak.getNbPoints(); i < size; i++)
+				pts += ak.getPoint(i).x + " " + ak.getPoint(i).y + " ";//$NON-NLS-1$ //$NON-NLS-2$
+
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_POINTS, pts);
+
+		if(shape.hasShadow())
+		{
+			SVGElement shad = new SVGPathElement(doc);
+
+			shad.setAttribute(SVGAttributes.SVG_D, path);
+			setSVGShadowAttributes(shad, false);
+			root.appendChild(shad);
+		}
+		
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE) && shape.isFilled())
+        {// The background of the borders must be filled is there is a shadow.
+    		elt = new SVGPathElement(doc);
+    		elt.setAttribute(SVGAttributes.SVG_D, path);
+    		setSVGBorderBackground(elt, root);
+        }
+
+		elt = new SVGPathElement(doc);
+		elt.setAttribute(SVGAttributes.SVG_D, path);
+		root.appendChild(elt);
+
+		setSVGAttributes(doc, elt, false);
+		elt.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_ROTATION, String.valueOf(shape.getRotationAngle()));
+
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LGridSVGGenerator.java b/current/latexDraw/generators/svg/LGridSVGGenerator.java
new file mode 100644
index 0000000..dcf8aa4
--- /dev/null
+++ b/current/latexDraw/generators/svg/LGridSVGGenerator.java
@@ -0,0 +1,506 @@
+package latexDraw.generators.svg;
+
+import java.awt.Color;
+import java.awt.FontMetrics;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.Grid;
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.parsers.svg.CSSColors;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGTransform;
+import latexDraw.parsers.svg.elements.*;
+import latexDraw.parsers.svg.parsers.SVGPointsParser;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for a grid.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LGridSVGGenerator extends LShapeSVGGenerator
+{
+
+	public LGridSVGGenerator(Grid f)
+	{
+		super(f);
+	}
+
+	
+	
+	public LGridSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a grid from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LGridSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Grid(new LaTeXDrawPoint2D(), false));
+
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		String pref = LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':', v;
+		Grid g = (Grid)getShape();
+		Vector<Point2D> values;
+		
+		g.setLinesColor(elt.getStroke());
+		
+		values = SVGPointsParser.getPoints(elt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_END));
+			
+		if(values!=null && values.size()>0) { 
+			g.setGridEndX((int)values.elementAt(0).getX());  
+			g.setGridEndY((int)values.elementAt(0).getY());  
+		}
+	
+		values = SVGPointsParser.getPoints(elt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_START));
+		
+		if(values!=null && values.size()>0) { 
+			g.setGridStartX((int)values.elementAt(0).getX());  
+			g.setGridStartY((int)values.elementAt(0).getY());  
+		}
+	
+		values = SVGPointsParser.getPoints(elt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_ORIGIN));
+
+		if(values!=null && values.size()>0) { 
+			g.setOriginX((int)values.elementAt(0).getX());  
+			g.setOriginY((int)values.elementAt(0).getY());  
+		}
+		
+		v = elt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_X_SOUTH);
+		
+		if(v!=null)
+			g.setXLabelSouth(Boolean.valueOf(v));
+		
+		v = elt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_Y_WEST);
+		
+		if(v!=null)
+			g.setYLabelWest(Boolean.valueOf(v));
+		
+		SVGElement gridElt = getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_GRID_SUB);
+		
+		if(gridElt!=null)
+		{
+			boolean isGridDotted = false;
+			v = gridElt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_DOTS);
+			
+			if(v!=null)
+				try
+				{ 
+					g.setSubGridDots(Double.valueOf(v).intValue());
+					isGridDotted = g.getSubGridDots()>0;
+				}
+				catch(NumberFormatException e) { /* */ }
+				
+			v = gridElt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_SUB_DIV);
+			
+			if(v!=null)
+				try{ g.setSubGridDiv(Double.valueOf(v).intValue());  }
+				catch(NumberFormatException e) { /* */ }
+			
+			v = gridElt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_WIDTH);
+			
+			if(isGridDotted)
+				g.setSubGridColor(CSSColors.getRGBColour(gridElt.getFill()));
+			else
+				g.setSubGridColor(gridElt.getStroke());
+			
+			if(v==null)
+			{
+				double st = gridElt.getStrokeWidth();
+				
+				if(!Double.isNaN(st))
+					g.setSubGridWidth((float)st);
+			}
+			else
+				try{ g.setSubGridWidth(Double.valueOf(v).floatValue());  }
+				catch(NumberFormatException e) { /* */ }
+		}
+		
+		gridElt = getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_GRID);
+		
+		if(gridElt!=null)
+		{
+			boolean isGridDotted = false;
+			v = gridElt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_DOTS);
+			
+			if(v!=null)
+				
+				try
+				{ 
+					g.setGridDots(Double.valueOf(v).intValue());
+					isGridDotted = g.getGridDots()>0;
+				}
+				catch(NumberFormatException e) { /* */ }
+			
+			v = gridElt.getAttribute(pref+LaTeXDrawNamespace.XML_GRID_WIDTH);
+			
+			if(isGridDotted)
+				g.setLinesColor(CSSColors.getRGBColour(gridElt.getFill()));
+			else
+				g.setLinesColor(gridElt.getStroke());
+			
+			if(v==null)
+			{
+				double st = gridElt.getStrokeWidth();
+				
+				if(!Double.isNaN(st))
+					g.setGridWidth((float)st);
+			}
+			else
+				try{ g.setGridWidth(Double.valueOf(v).floatValue());  }
+				catch(NumberFormatException e) { /* */ }
+		}
+		
+		gridElt = getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_TEXT);
+		
+		if(gridElt==null)
+			g.setGridLabelsSize(0);
+		else
+		{
+			v = gridElt.getAttribute(gridElt.getUsablePrefix()+SVGAttributes.SVG_FONT_SIZE);
+			
+			if(v!=null)
+				try { g.setGridLabelsSize(Double.valueOf(v).intValue()); }
+				catch(NumberFormatException e) { /* */ }
+				
+			g.setGridLabelsColor(gridElt.getStroke());
+		}
+		
+		setNumber(elt);
+		g.updateFonts();
+		g.updateBorders(g.getFontMetrics());
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+
+	
+	protected void createSVGGrid(SVGElement elt, SVGDocument document)
+	{
+		if(elt==null || document==null)
+			return ;
+		
+		Grid grid = (Grid)shape;
+		grid.updateBorders();
+		
+		String pref = LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':';
+		double unit = grid.getUnit();
+		Point2D.Double gridEnd = grid.getGridEnd();
+		Point2D.Double gridStart = grid.getGridStart();
+		int subGridDiv = grid.getSubGridDiv();
+		LaTeXDrawRectangle borders = grid.getBorders();
+		double rotationAngle = grid.getRotationAngle();
+		double XStep = Figure.PPC*unit, i, j, XSubStep, k, l, m, n;
+		double YStep = XStep, YSubStep;
+		XStep *= gridEnd.x<gridStart.x ? -1 : 1 ;
+		YStep *= gridEnd.y<gridStart.y ? -1 : 1 ;
+		XSubStep = XStep/subGridDiv;
+		YSubStep = YStep/subGridDiv;
+		int subGridDots = grid.getSubGridDots();
+		int gridDots = grid.getGridDots();
+		int gridLabelsSize = grid.getGridLabelsSize();
+		LaTeXDrawPoint2D NW = (LaTeXDrawPoint2D)borders.getTheNWPoint().clone();
+		LaTeXDrawPoint2D SE = (LaTeXDrawPoint2D)borders.getTheSEPoint().clone();	
+		double minX, maxX, minY, maxY;
+		double absStep = Math.abs(XStep);
+		Color subGridColor = grid.getSubGridColor();
+		Color linesColor = grid.getLinesColor();
+		Color gridLabelsColor = grid.getGridLabelsColor();
+		float subGridWidth = grid.getSubGridWidth();
+		float gridWidth = grid.getGridWidth();
+		double posX = Math.min(gridStart.x, gridEnd.x)*Figure.PPC*unit;
+		double posY = -Math.min(gridStart.y, gridEnd.y)*Figure.PPC*unit;
+		FontMetrics fontMetrics = grid.getFontMetrics();
+		Point2D.Double origin = grid.getOrigin();
+		boolean isXLabelSouth = grid.isXLabelSouth();
+		boolean isYLabelWest = grid.isYLabelWest();
+		Point2D.Double position = grid.getPosition();
+		
+		NW.x -= position.x;
+		SE.x -= position.x;
+		NW.y -= position.y;
+		SE.y -= position.y;
+		elt.setAttribute(SVGAttributes.SVG_TRANSFORM, SVGTransform.createTranslation(position.x, position.y).toString());
+		
+		if(gridEnd.x<gridStart.x)
+		{
+			minX = gridEnd.x;
+			maxX = gridStart.x;
+		}else
+		{
+			minX = gridStart.x;
+			maxX = gridEnd.x;
+		}
+		
+		if(gridEnd.y<gridStart.y)
+		{
+			minY = gridEnd.y;
+			maxY = gridStart.y;
+		}else
+		{
+			minY = gridStart.y;
+			maxY = gridEnd.y;
+		}
+		
+		// We draw the sub-grid
+		if(subGridDots>0)
+		{
+			double dotStep = (unit*Figure.PPC)/(subGridDots*subGridDiv);
+			double nbX = (maxX-minX)*subGridDiv;
+			double nbY = (maxY-minY)*subGridDiv;
+			SVGElement subgridDots = new SVGGElement(document), dot;
+			
+			subgridDots.setAttribute(SVGAttributes.SVG_FILL, CSSColors.getColorName(subGridColor, true));
+			subgridDots.setAttribute(pref+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_GRID_SUB);
+			subgridDots.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_DOTS, String.valueOf(subGridDots));
+			subgridDots.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_SUB_DIV, String.valueOf(subGridDots));
+			subgridDots.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_WIDTH, String.valueOf(subGridWidth));
+			
+			for(i=0, n=NW.x; i<nbX; i++, n+=XSubStep)
+				for(j=0, m=NW.y; j<=nbY; j++, m+=YSubStep)
+					for(k=0; k<subGridDots; k++)
+					{
+						dot = new SVGCircleElement(document);
+						dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(n+k*dotStep));
+						dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(m));
+						dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(subGridWidth/2.));
+						subgridDots.appendChild(dot);
+					}
+			
+			for(j=0, n=NW.y; j<nbY; j++, n+=YSubStep)
+				for(i=0, m=NW.x; i<=nbX; i++, m+=XSubStep)
+					for(k=0; k<subGridDots; k++)
+					{
+						dot = new SVGCircleElement(document);
+						dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(m));
+						dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(n+k*dotStep));
+						dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(subGridWidth/2.));
+						subgridDots.appendChild(dot);
+					}
+			
+			dot = new SVGCircleElement(document);
+			dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(SE.x));
+			dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(SE.y));
+			dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(subGridWidth/2.));
+			
+			elt.appendChild(subgridDots);
+		}
+		else
+			if(subGridDiv>1)
+			{
+				SVGElement subgrids = new SVGGElement(document), line;
+				
+				subgrids.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(subGridWidth));
+				subgrids.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(subGridColor, true));
+				subgrids.setAttribute(SVGAttributes.SVG_STROKE_LINECAP, SVGAttributes.SVG_LINECAP_VALUE_ROUND);
+				subgrids.setAttribute(pref+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_GRID_SUB);
+				subgrids.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_DOTS, String.valueOf(subGridDots));
+				subgrids.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_SUB_DIV, String.valueOf(subGridDiv));
+
+				for(k=minX, i=posX; k<maxX; i+=XStep, k++)
+					for(j=0; j<=subGridDiv; j++)
+					{
+						line = new SVGLineElement(document);
+						line.setAttribute(SVGAttributes.SVG_X1, String.valueOf(i+XSubStep*j));
+						line.setAttribute(SVGAttributes.SVG_X2, String.valueOf(i+XSubStep*j));
+						line.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(SE.y));
+						line.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(NW.y));
+						subgrids.appendChild(line);
+					}
+				
+				for(k=minY, i=posY; k<maxY; i-=YStep, k++)
+					for(j=0; j<=subGridDiv; j++)
+					{
+						line = new SVGLineElement(document);
+						line.setAttribute(SVGAttributes.SVG_X1, String.valueOf(NW.x));
+						line.setAttribute(SVGAttributes.SVG_X2, String.valueOf(SE.x));
+						line.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(i-YSubStep*j));
+						line.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(i-YSubStep*j));
+						subgrids.appendChild(line);
+					}
+				
+				elt.appendChild(subgrids);
+			}
+		
+		if(gridDots>0)
+		{
+			double dotStep = (unit*Figure.PPC)/gridDots;
+			
+			SVGElement gridDotsElt = new SVGGElement(document), dot;
+			
+			gridDotsElt.setAttribute(SVGAttributes.SVG_FILL, CSSColors.getColorName(linesColor, true));
+			gridDotsElt.setAttribute(pref+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_GRID);
+			gridDotsElt.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_DOTS, String.valueOf(gridDots));
+			gridDotsElt.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_WIDTH, String.valueOf(gridWidth));
+
+			for(k=minX, i=posX; k<=maxX; i+=XStep, k++)
+				for(m=NW.y, n=minY; n<maxY; n++, m+=absStep)
+					for(l=0, j=m; l<gridDots; l++, j+=dotStep)
+					{
+						dot = new SVGCircleElement(document);
+						dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(i));
+						dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(j));
+						dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(gridWidth/2.));
+						gridDotsElt.appendChild(dot);
+					}
+			
+			for(k=minY, i=posY; k<=maxY; i-=YStep, k++)
+				for(m=NW.x, n=minX; n<maxX; n++, m+=absStep)
+					for(l=0, j=m; l<gridDots; l++, j+=dotStep)
+					{
+						dot = new SVGCircleElement(document);
+						dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(j));
+						dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(i));
+						dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(gridWidth/2.));
+						gridDotsElt.appendChild(dot);
+					}
+			
+			dot = new SVGCircleElement(document);
+			dot.setAttribute(SVGAttributes.SVG_CX, String.valueOf(SE.x));
+			dot.setAttribute(SVGAttributes.SVG_CY, String.valueOf(SE.y));
+			dot.setAttribute(SVGAttributes.SVG_R, String.valueOf(gridWidth/2.));
+			gridDotsElt.appendChild(dot);
+			
+			elt.appendChild(gridDotsElt);
+		}
+		else
+		{
+			SVGElement grids = new SVGGElement(document), line;
+			
+			grids.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(gridWidth));
+			grids.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(linesColor, true));
+			grids.setAttribute(SVGAttributes.SVG_STROKE_LINECAP, SVGAttributes.SVG_LINECAP_VALUE_SQUARE);
+			grids.setAttribute(pref+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_GRID);
+			
+			for(k=minX, i=posX; k<=maxX; i+=XStep, k++)
+			{
+				line = new SVGLineElement(document);
+				line.setAttribute(SVGAttributes.SVG_X1, String.valueOf(i));
+				line.setAttribute(SVGAttributes.SVG_X2, String.valueOf(i));
+				line.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(SE.y));
+				line.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(NW.y));
+				grids.appendChild(line);
+			}
+			
+			for(k=minY, i=posY; k<=maxY; i-=YStep, k++)
+			{
+				line = new SVGLineElement(document);
+				line.setAttribute(SVGAttributes.SVG_X1, String.valueOf(NW.x));
+				line.setAttribute(SVGAttributes.SVG_X2, String.valueOf(SE.x));
+				line.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(i));
+				line.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(i));
+				grids.appendChild(line);
+			}
+			
+			elt.appendChild(grids);
+		}
+
+		if(gridLabelsSize>0)
+		{
+			// We draw the labels
+			float labelHeight = fontMetrics.getAscent();
+			float labelWidth = fontMetrics.stringWidth(String.valueOf((int)maxX));
+			String label;
+			double xorigin = XStep*origin.x;
+			double yorigin = isXLabelSouth  ? YStep*origin.y+labelHeight : YStep*origin.y-2;
+			double width=gridWidth/2., tmp = isXLabelSouth ? width : -width;
+		
+			SVGElement texts = new SVGGElement(document), text;
+			
+			texts.setAttribute(SVGAttributes.SVG_FONT_SIZE, String.valueOf(grid.getFont().getSize()));
+			texts.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(gridLabelsColor, true));
+			texts.setAttribute(pref+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_TEXT);
+			
+			
+			for(i=NW.x + (isYLabelWest ? width+gridLabelsSize/4. : -width-labelWidth-gridLabelsSize/4.), j=minX; j<=maxX; i+=absStep, j++)
+			{
+				text = new SVGTextElement(document);
+				text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)i));
+				text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)(yorigin+tmp)));
+				text.setTextContent(String.valueOf((int)j));
+				texts.appendChild(text);
+			}
+	
+			if(isYLabelWest)
+				for(i=NW.y + (isXLabelSouth ? -width-gridLabelsSize/4. : width+labelHeight), j=maxY ; j>=minY; i+=absStep, j--)
+				{
+					label = String.valueOf((int)j);
+					text = new SVGTextElement(document);
+					text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(xorigin-fontMetrics.stringWidth(label)-gridLabelsSize/4.-width)));
+					text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)i));
+					text.setTextContent(label);
+					texts.appendChild(text);
+				}
+			else
+				for(i=NW.y + (isXLabelSouth ? -width-gridLabelsSize/4. : width+labelHeight), j=maxY; j>=minY; i+=absStep, j--)
+				{
+					label = String.valueOf((int)j);
+					text = new SVGTextElement(document);
+					text.setAttribute(SVGAttributes.SVG_X, String.valueOf((int)(xorigin+gridLabelsSize/4.+width)));
+					text.setAttribute(SVGAttributes.SVG_Y, String.valueOf((int)i));
+					text.setTextContent(label);
+					texts.appendChild(text);
+				}
+			
+			elt.appendChild(texts);
+		}
+
+		if(rotationAngle%(Math.PI*2)!=0)
+			setSVGRotationAttribute(elt);
+		
+		grid.updateBorders(fontMetrics);
+	}
+
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null)
+			return null;
+		
+		String pref = LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':';
+		SVGElement root = new SVGGElement(doc);
+		Grid g = (Grid)getShape();
+		
+		root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_GRID);
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_X_SOUTH, String.valueOf(g.isXLabelSouth()));
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_Y_WEST, String.valueOf(g.isYLabelWest()));
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_UNIT, String.valueOf(g.getUnit()));
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_END, g.getGridEnd().x + " " + g.getGridEnd().y);//$NON-NLS-1$
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_START, g.getGridStart().x + " " + g.getGridStart().y);//$NON-NLS-1$
+		root.setAttribute(pref+LaTeXDrawNamespace.XML_GRID_ORIGIN, g.getOrigin().x + " " + g.getOrigin().y);//$NON-NLS-1$
+		createSVGGrid(root, doc);
+		
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LLineSVGGenerator.java b/current/latexDraw/generators/svg/LLineSVGGenerator.java
new file mode 100644
index 0000000..eaecab5
--- /dev/null
+++ b/current/latexDraw/generators/svg/LLineSVGGenerator.java
@@ -0,0 +1,240 @@
+package latexDraw.generators.svg;
+
+import java.awt.geom.Line2D;
+
+import latexDraw.figures.ArrowHead;
+import latexDraw.figures.Line;
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.*;
+import latexDraw.parsers.svg.elements.path.SVGPathSegLineto;
+import latexDraw.parsers.svg.elements.path.SVGPathSegList;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for a line.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LLineSVGGenerator extends LPolygonSVGGenerator
+{
+	public LLineSVGGenerator(Line f)
+	{
+		super(f);
+	}
+
+	
+	
+	/**
+	 * Creates a line using a SVG path.
+	 * @param elt The SVG path.
+	 */
+	public LLineSVGGenerator(SVGPathElement elt)
+	{
+		super(new Line(true));
+		
+		if(elt==null || !elt.isLine())
+			throw new IllegalArgumentException();
+		
+		SVGPathSegList segs = elt.getSegList();
+		Line l = (Line)getShape();
+		
+		l.setFirstPoint(new LaTeXDrawPoint2D(((SVGPathSegMoveto)segs.firstElement()).getPoint()));
+		l.setLastPoint(new LaTeXDrawPoint2D(((SVGPathSegLineto)segs.lastElement()).getPoint()));
+		l.updateShape();
+		setSVGParameters(elt);
+		applyTransformations(elt);
+	}
+	
+	
+	
+	public LLineSVGGenerator(SVGLineElement e)
+	{
+		this(new Line(e.getX1(), e.getY1(), e.getX2(), e.getY2(), true));
+
+		setSVGParameters(e);
+		applyTransformations(e);
+	}
+	
+	
+	
+	
+	public LLineSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	public LLineSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Line(false));
+		
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		Line l = (Line)getShape();
+		ArrowHead arrowHead1 = l.getArrowHead1();
+		ArrowHead arrowHead2 = l.getArrowHead2();
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGLineElement))
+			throw new IllegalArgumentException();
+		
+		SVGLineElement main = (SVGLineElement)elt2;
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		
+		l.getPt1().setLocation(main.getX1(), main.getY1());
+		l.getPt2().setLocation(main.getX2(), main.getY2());
+		
+		arrowHead1.setPosition(l.getPoint(0));
+		arrowHead1.setLine(l);
+		arrowHead1.setFigure(l);
+		arrowHead2.setPosition(l.getPoint(1));
+		arrowHead2.setLine(l);
+		arrowHead2.setFigure(l);
+		l.updateAandB();
+		l.updateShape();
+		
+		setSVGArrow(arrowHead1, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_START), main);
+		setSVGArrow(arrowHead2, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_END), main);
+		homogeniseArrows(arrowHead1, arrowHead2);
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		SVGElement root = new SVGGElement(doc), elt;
+		int number = shape.getNumber();
+		ArrowHead arrowHeadL = ((Arrowable)shape).getArrowHead1();
+		ArrowHead arrowHeadR = ((Arrowable)shape).getArrowHead2();
+		SVGDefsElement defs = doc.getFirstChild().getDefs();
+		Line l = (Line)shape;
+		SVGElement arrow1 = null, arrow2 = null, arrow1Shad = null, arrow2Shad = null;
+		
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_LINE);
+		root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+		String arrow1Name = "arrow1-" + number;//$NON-NLS-1$
+		String arrow2Name = "arrow2-" + number;//$NON-NLS-1$
+		String arrow1ShadName = "arrow1Shad-" + number;//$NON-NLS-1$
+		String arrow2ShadName = "arrow2Shad-" + number;//$NON-NLS-1$
+		LaTeXDrawPoint2D pt1 = l.getPt1(), pt2 = l.getPt2();
+
+		if(!arrowHeadL.isWithoutStyle())
+		{
+			arrow1 = new LArrowHeadSVGGenerator(arrowHeadL).toSVG(doc, false);
+
+			arrow1.setAttribute(SVGAttributes.SVG_ID, arrow1Name);
+			defs.appendChild(arrow1);
+
+			if(l.hasShadow())
+			{
+				arrow1Shad = new LArrowHeadSVGGenerator(arrowHeadL).toSVG(doc, true);
+				arrow1Shad.setAttribute(SVGAttributes.SVG_ID, arrow1ShadName);
+				defs.appendChild(arrow1Shad);
+			}
+		}
+
+		if(!arrowHeadR.isWithoutStyle())
+		{
+			arrow2 = new LArrowHeadSVGGenerator(arrowHeadR).toSVG(doc, false);
+
+			arrow2.setAttribute(SVGAttributes.SVG_ID, arrow2Name);
+			defs.appendChild(arrow2);
+
+			if(l.hasShadow())
+			{
+				arrow2Shad = new LArrowHeadSVGGenerator(arrowHeadR).toSVG(doc, true);
+				arrow2Shad.setAttribute(SVGAttributes.SVG_ID, arrow2ShadName);
+				defs.appendChild(arrow2Shad);
+			}
+		}
+
+		if(l.hasShadow())
+		{
+			SVGElement shad = new SVGLineElement(doc);
+
+			shad.setAttribute(SVGAttributes.SVG_X1, String.valueOf(pt1.x));
+			shad.setAttribute(SVGAttributes.SVG_X2, String.valueOf(pt2.x));
+			shad.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(pt1.y));
+			shad.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(pt2.y));
+			setSVGShadowAttributes(shad, false);
+			root.appendChild(shad);
+
+			if(arrow1Shad != null)
+				shad.setAttribute(SVGAttributes.SVG_MARKER_START, "url(#" + arrow1ShadName + ")");//$NON-NLS-1$//$NON-NLS-2$
+
+			if(arrow2Shad != null)
+				shad.setAttribute(SVGAttributes.SVG_MARKER_END, "url(#" + arrow2ShadName + ")");//$NON-NLS-1$//$NON-NLS-2$
+		}
+
+		elt = new SVGLineElement(doc);
+		elt.setAttribute(SVGAttributes.SVG_X1, String.valueOf(pt1.x));
+		elt.setAttribute(SVGAttributes.SVG_X2, String.valueOf(pt2.x));
+		elt.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(pt1.y));
+		elt.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(pt2.y));
+		root.appendChild(elt);
+
+		if(l.hasDoubleBoundary())
+		{
+			SVGElement dblBord = new SVGLineElement(doc);
+
+			dblBord.setAttribute(SVGAttributes.SVG_X1, String.valueOf(pt1.x));
+			dblBord.setAttribute(SVGAttributes.SVG_X2, String.valueOf(pt2.x));
+			dblBord.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(pt1.y));
+			dblBord.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(pt2.y));
+			setSVGDoubleBordersAttributes(dblBord);
+			root.appendChild(dblBord);
+		}
+
+		setSVGAttributes(doc, elt, false);
+		elt.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_ROTATION, String.valueOf(l.getRotationAngle()));
+
+		if(arrow1 != null)
+			elt.setAttribute(SVGAttributes.SVG_MARKER_START, "url(#" + arrow1Name + ")");//$NON-NLS-1$//$NON-NLS-2$
+
+		if(arrow2 != null)
+			elt.setAttribute(SVGAttributes.SVG_MARKER_END, "url(#" + arrow2Name + ")");//$NON-NLS-1$//$NON-NLS-2$
+
+		return root;
+	}
+	
+	
+	
+	public static SVGLineElement toSVG(Line2D l, SVGDocument doc)
+	{
+		if(l==null || doc==null)
+			return null;
+		
+		SVGLineElement le;
+		
+		try { le = new SVGLineElement(l.getX1(), l.getY1(), l.getX2(), l.getY2(), doc); }
+		catch(MalformedSVGDocument e) { le = null; }
+		
+		return le;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LLinesSVGGenerator.java b/current/latexDraw/generators/svg/LLinesSVGGenerator.java
new file mode 100644
index 0000000..5504263
--- /dev/null
+++ b/current/latexDraw/generators/svg/LLinesSVGGenerator.java
@@ -0,0 +1,266 @@
+package latexDraw.generators.svg;
+
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.ArrowHead;
+import latexDraw.figures.JoinedLines;
+import latexDraw.figures.Line;
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.*;
+import latexDraw.parsers.svg.elements.path.SVGPathSegLineto;
+import latexDraw.parsers.svg.elements.path.SVGPathSegList;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for some joined lines.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LLinesSVGGenerator extends LPolygonSVGGenerator
+{
+
+	public LLinesSVGGenerator(JoinedLines f)
+	{
+		super(f);
+	}
+
+	
+	
+	/**
+	 * Creates some lines using a SVG path.
+	 * @param elt The SVG path.
+	 */
+	public LLinesSVGGenerator(SVGPathElement elt)
+	{
+		super(new JoinedLines(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(1,1), true));
+		
+		if(elt==null || !elt.isLines())
+			throw new IllegalArgumentException();
+		
+		SVGPathSegList segs = elt.getSegList();
+		JoinedLines jl = (JoinedLines)getShape();
+		int i, size;
+		
+		for(i=0, size=segs.size()-1; i<size; i++)
+			jl.addPoint(new LaTeXDrawPoint2D(((SVGPathSegLineto)segs.elementAt(i)).getPoint()));
+		
+		jl.removePointAt(0);
+		jl.removePointAt(0);
+		jl.updateShape();
+		jl.updateBorders();
+		setSVGParameters(elt);
+		applyTransformations(elt);
+	}
+	
+	
+	
+	/**
+	 * Creates some joined-liens from an SVG polyline element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LLinesSVGGenerator(SVGPolyLineElement elt)
+	{
+		this(new JoinedLines(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(1,1), true));
+		
+		JoinedLines jl = (JoinedLines)getShape();
+		
+		setSVGPolylineParameters(elt);
+		jl.removePointAt(0);
+		jl.removePointAt(0);
+		jl.updateShape();
+		jl.updateBorders();
+		applyTransformations(elt);
+	}
+	
+	
+	
+	
+	public LLinesSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates some joined-lines from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LLinesSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new JoinedLines(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(1,1), true));
+
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGPolyLineElement))
+			throw new IllegalArgumentException();
+		
+		JoinedLines l = (JoinedLines)getShape();
+		ArrowHead arrowHead1 = l.getArrowHead1();
+		ArrowHead arrowHead2 = l.getArrowHead2();
+		SVGPolyLineElement main = (SVGPolyLineElement)elt2;
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		setSVGPolylineParameters(main);
+		l.removePointAt(0);
+		l.removePointAt(0);
+		arrowHead1.setPosition(l.getPoint(0));
+		arrowHead1.setLine(new Line(l.getPoint(0), l.getPoint(1), false));
+		arrowHead1.setFigure(l);
+		arrowHead2.setPosition(l.getPoint(-1));
+		arrowHead2.setLine(new Line(l.getPoint(-1), l.getPoint(l.getNbPoints()-2), false));
+		arrowHead2.setFigure(l);
+		l.updateShape();
+		l.updateBorders();
+		
+		setSVGArrow(arrowHead1, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_START), main);
+		setSVGArrow(arrowHead2, main.getAttribute(main.getUsablePrefix()+SVGAttributes.SVG_MARKER_END), main);
+		homogeniseArrows(arrowHead1, arrowHead2);
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+	
+	private void setSVGPolylineParameters(SVGPolyLineElement e)
+	{
+		setSVGParameters(e);
+		Vector<Point2D> ptsPol = e.getPoints2D();
+		JoinedLines l = (JoinedLines)getShape();
+		
+		if(ptsPol==null)
+			throw new IllegalArgumentException();
+		
+		for(Point2D pt : ptsPol)
+			l.addPoint(new LaTeXDrawPoint2D(pt));
+	}
+	
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null)
+			return null;
+		
+		JoinedLines jl = (JoinedLines)shape;
+        SVGElement root = new SVGGElement(doc), elt;
+        int number = shape.getNumber();
+		ArrowHead arrowHead1 = ((Arrowable)shape).getArrowHead1();
+		ArrowHead arrowHead2 = ((Arrowable)shape).getArrowHead2();
+		SVGDefsElement defs = doc.getFirstChild().getDefs();
+		
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_JOINED_LINES);
+		root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+		String points = "";//$NON-NLS-1$
+		SVGElement arrow1 = null, arrow2 = null, arrow1Shad = null, arrow2Shad = null;
+		String arrow1Name = "arrow1-" + number;//$NON-NLS-1$
+		String arrow2Name = "arrow2-" + number;//$NON-NLS-1$
+		String arrow1ShadName = "arrow1Shad-" + number;//$NON-NLS-1$
+		String arrow2ShadName = "arrow2Shad-" + number;//$NON-NLS-1$
+
+		if(!arrowHead1.isWithoutStyle())
+		{
+			arrow1     = new LArrowHeadSVGGenerator(arrowHead1).toSVG(doc, false);
+			arrow1Shad = new LArrowHeadSVGGenerator(arrowHead1).toSVG(doc, true);
+
+			arrow1.setAttribute(SVGAttributes.SVG_ID, arrow1Name);
+			defs.appendChild(arrow1);
+
+			if(shape.hasShadow())
+			{
+				arrow1Shad.setAttribute(SVGAttributes.SVG_ID, arrow1ShadName);
+				defs.appendChild(arrow1Shad);
+			}
+		}
+
+		if(!arrowHead2.isWithoutStyle())
+		{
+			arrow2     = new LArrowHeadSVGGenerator(arrowHead2).toSVG(doc, false);
+			arrow2Shad = new LArrowHeadSVGGenerator(arrowHead2).toSVG(doc, true);
+
+			arrow2.setAttribute(SVGAttributes.SVG_ID, arrow2Name);
+			defs.appendChild(arrow2);
+
+			if(shape.hasShadow())
+			{
+				arrow2Shad.setAttribute(SVGAttributes.SVG_ID, arrow2ShadName);
+				defs.appendChild(arrow2Shad);
+			}
+		}
+
+		for(LaTeXDrawPoint2D pt : jl.getPoints())
+			points += pt.x + "," + pt.y + " ";//$NON-NLS-1$//$NON-NLS-2$
+
+		if(shape.hasShadow())
+		{
+			SVGElement shad = new SVGPolyLineElement(doc);
+
+			shad.setAttribute(SVGAttributes.SVG_POINTS, points);
+			setSVGShadowAttributes(shad, false);
+			root.appendChild(shad);
+
+			if(arrow1Shad != null)
+				shad.setAttribute(SVGAttributes.SVG_MARKER_START, "url(#" + arrow1ShadName + ")");//$NON-NLS-1$ //$NON-NLS-2$
+
+			if(arrow2Shad != null)
+				shad.setAttribute(SVGAttributes.SVG_MARKER_END, "url(#" + arrow2ShadName + ")");//$NON-NLS-1$ //$NON-NLS-2$
+		}
+		
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE) && shape.isFilled())
+        {// The background of the borders must be filled is there is a shadow.
+    		elt = new SVGPolyLineElement(doc);
+    		elt.setAttribute(SVGAttributes.SVG_POINTS, points);
+	        setSVGBorderBackground(elt, root);
+        }
+
+		elt = new SVGPolyLineElement(doc);
+		elt.setAttribute(SVGAttributes.SVG_POINTS, points);
+		root.appendChild(elt);
+
+		if(shape.hasDoubleBoundary())
+		{
+			SVGElement dblBord = new SVGPolyLineElement(doc);
+
+			dblBord.setAttribute(SVGAttributes.SVG_POINTS, points);
+			setSVGDoubleBordersAttributes(dblBord);
+			root.appendChild(dblBord);
+		}
+
+		setSVGAttributes(doc, elt, false);
+		elt.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_ROTATION, String.valueOf(shape.getRotationAngle()));
+
+		if(arrow1 != null)
+			elt.setAttribute(SVGAttributes.SVG_MARKER_START, "url(#" + arrow1Name + ")");//$NON-NLS-1$ //$NON-NLS-2$
+
+		if(arrow2 != null)
+			elt.setAttribute(SVGAttributes.SVG_MARKER_END, "url(#" + arrow2Name + ")");//$NON-NLS-1$ //$NON-NLS-2$
+
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LPictureSVGGenerator.java b/current/latexDraw/generators/svg/LPictureSVGGenerator.java
new file mode 100644
index 0000000..a8abf74
--- /dev/null
+++ b/current/latexDraw/generators/svg/LPictureSVGGenerator.java
@@ -0,0 +1,137 @@
+package latexDraw.generators.svg;
+
+import latexDraw.figures.Picture;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.parsers.svg.elements.SVGImageElement;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for an picture.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LPictureSVGGenerator extends LShapeSVGGenerator
+{
+	public LPictureSVGGenerator(Picture f)
+	{
+		super(f);
+	}
+
+	
+	
+	/**
+	 * Creates a picture from a SVGImage element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LPictureSVGGenerator(SVGImageElement elt)
+	{
+		this(new Picture(true));
+		
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		Picture p = (Picture)getShape();
+		p.setPathSource(elt.getURI());
+		p.setPicture(p.getImage());
+		
+		if(p.getPicture()==null)
+			throw new IllegalArgumentException();
+		
+		p.createEPSImage();
+		p.getPosition().setLocation(elt.getX(), elt.getY());
+		p.getBorders().setFirstPoint((LaTeXDrawPoint2D)p.getPosition().clone());
+		p.getBorders().setLastPoint(p.getPosition().x+p.getPicture().getWidth(null), p.getPosition().x+p.getPicture().getHeight(null));
+		p.getBorders().setIsFilled(true);
+		p.updateShape();
+		applyTransformations(elt);
+	}
+	
+	
+	
+	
+	public LPictureSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a picture from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LPictureSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Picture(false));
+		
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGImageElement))
+			throw new IllegalArgumentException();
+		
+		SVGImageElement main = (SVGImageElement)elt2;
+
+		Picture p = (Picture)getShape();
+		p.setPathSource(main.getURI());
+		p.setPicture(p.getImage());
+		
+		if(p.getPicture()==null)
+			throw new IllegalArgumentException();
+		
+		p.createEPSImage();
+		p.getPosition().setLocation(main.getX(), main.getY());
+		p.getBorders().setFirstPoint((LaTeXDrawPoint2D)p.getPosition().clone());
+		p.getBorders().setLastPoint(p.getPosition().x+p.getPicture().getWidth(null), p.getPosition().x+p.getPicture().getHeight(null));
+		p.getBorders().setIsFilled(true);
+		p.updateShape();
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+
+
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc == null)
+			return null;
+
+		SVGElement root = new SVGGElement(doc), img;
+		Picture p = (Picture)getShape();
+		
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':' + LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_PICTURE);
+		root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+		
+		img = new SVGImageElement(doc, p.getPathSource());
+		img.setAttribute(SVGAttributes.SVG_X, String.valueOf(p.getPosition().x));
+		img.setAttribute(SVGAttributes.SVG_Y, String.valueOf(p.getPosition().y));
+		img.setAttribute(SVGAttributes.SVG_HEIGHT, String.valueOf(p.getPicture().getHeight(null)));
+		img.setAttribute(SVGAttributes.SVG_WIDTH, String.valueOf(p.getPicture().getWidth(null)));
+
+		root.appendChild(img);
+
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LPolygonSVGGenerator.java b/current/latexDraw/generators/svg/LPolygonSVGGenerator.java
new file mode 100644
index 0000000..fe96ed9
--- /dev/null
+++ b/current/latexDraw/generators/svg/LPolygonSVGGenerator.java
@@ -0,0 +1,192 @@
+package latexDraw.generators.svg;
+
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.LaTeXDrawPolygon;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.*;
+import latexDraw.parsers.svg.elements.path.SVGPathSegLineto;
+import latexDraw.parsers.svg.elements.path.SVGPathSegList;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for a polygon.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LPolygonSVGGenerator extends LShapeSVGGenerator
+{
+
+	public LPolygonSVGGenerator(LaTeXDrawPolygon f)
+	{
+		super(f);
+	}
+
+	
+	
+	public LPolygonSVGGenerator(SVGPathElement elt)
+	{
+		super(new LaTeXDrawPolygon(true));
+		
+		if(elt==null || !elt.isPolygon())
+			throw new IllegalArgumentException();
+		
+		SVGPathSegList segs = elt.getSegList();
+		LaTeXDrawPolygon pol = (LaTeXDrawPolygon)getShape();
+		int i, size;
+		
+		for(i=0, size=segs.size()-1; i<size; i++)
+			pol.addPoint(new LaTeXDrawPoint2D(((SVGPathSegLineto)segs.elementAt(i)).getPoint()));
+		
+		pol.updateShape();
+		pol.updateBorders();
+		setSVGParameters(elt);
+		applyTransformations(elt);
+	}
+	
+	
+	
+	/**
+	 * Creates a polygon from an SVG polygon element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LPolygonSVGGenerator(SVGPolygonElement elt)
+	{
+		this(new LaTeXDrawPolygon(true));
+		
+		LaTeXDrawPolygon pol = (LaTeXDrawPolygon)getShape();
+		
+		setSVGPolygonParameters(elt);
+		applyTransformations(elt);
+		pol.updateShape();
+		pol.updateBorders();
+	}
+	
+	
+	
+	
+	public LPolygonSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	
+	/**
+	 * Creates a polygon from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LPolygonSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new LaTeXDrawPolygon(true));
+
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGPolygonElement))
+			throw new IllegalArgumentException();
+		
+		SVGPolygonElement main = (SVGPolygonElement)elt2;
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		setSVGPolygonParameters(main);
+		
+		((LaTeXDrawPolygon)getShape()).updateBorders();
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+	
+	private void setSVGPolygonParameters(SVGPolygonElement e)
+	{
+		setSVGParameters(e);
+		Vector<Point2D> ptsPol = e.getPoints2D();
+		LaTeXDrawPolygon p = (LaTeXDrawPolygon)getShape();
+		
+		if(ptsPol==null)
+			throw new IllegalArgumentException();
+		
+		for(Point2D pt : ptsPol)
+			p.addPoint(new LaTeXDrawPoint2D(pt));
+	}
+	
+	
+	
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null)
+			throw new IllegalArgumentException();
+		
+		SVGElement root = new SVGGElement(doc);
+		SVGPolygonElement elt;
+		String points = "";//$NON-NLS-1$
+		LaTeXDrawPolygon p = (LaTeXDrawPolygon)shape;
+		
+        root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_POLYGON);
+        root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+        
+        for(LaTeXDrawPoint2D pt : p.getPoints())
+     	   points+=pt.x + "," + pt.y + " ";//$NON-NLS-1$//$NON-NLS-2$
+        
+        if(shape.hasShadow())
+        {
+        	SVGPolygonElement shad = new SVGPolygonElement(doc);
+         	
+        	shad.setAttribute(SVGAttributes.SVG_POINTS, points);
+        	setSVGShadowAttributes(shad, true);
+        	root.appendChild(shad);
+        }
+        
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE))
+        {// The background of the borders must be filled is there is a shadow.
+        	elt = new SVGPolygonElement(doc);
+        	elt.setAttribute(SVGAttributes.SVG_POINTS, points);
+        	setSVGBorderBackground(elt, root);
+        }
+        
+        elt = new SVGPolygonElement(doc);
+        elt.setAttribute(SVGAttributes.SVG_POINTS, points);
+        root.appendChild(elt);
+        setSVGAttributes(doc, elt, true);
+        setSVGRotationAttribute(root);
+        
+        if(shape.hasDoubleBoundary())
+        {
+        	SVGPolygonElement dblBord = new SVGPolygonElement(doc);
+         	
+        	dblBord.setAttribute(SVGAttributes.SVG_POINTS, points);
+        	setSVGDoubleBordersAttributes(dblBord);
+        	root.appendChild(dblBord);
+        }
+        
+        return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LRectangleSVGGenerator.java b/current/latexDraw/generators/svg/LRectangleSVGGenerator.java
new file mode 100644
index 0000000..4bf08a0
--- /dev/null
+++ b/current/latexDraw/generators/svg/LRectangleSVGGenerator.java
@@ -0,0 +1,186 @@
+package latexDraw.generators.svg;
+
+import static java.lang.Math.min;
+
+import java.awt.geom.RectangularShape;
+
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.parsers.svg.elements.SVGRectElement;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines a SVG generator for a rectangle.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LRectangleSVGGenerator extends LPolygonSVGGenerator
+{
+
+	public LRectangleSVGGenerator(LaTeXDrawRectangle f)
+	{
+		super(f);
+	}
+	
+	
+	
+	/**
+	 * Creates a rectangle from an SVG rect element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LRectangleSVGGenerator(SVGRectElement elt)
+	{
+		this(new LaTeXDrawRectangle(true));
+		
+		setSVGRectParameters(elt);
+		applyTransformations(elt);
+	}
+	
+	
+	
+	
+	public LRectangleSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a rectangle from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LRectangleSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new LaTeXDrawRectangle(false));
+
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGRectElement))
+			throw new IllegalArgumentException();
+		
+		setSVGLatexdrawParameters(elt);
+		setSVGRectParameters((SVGRectElement)elt2);
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+	
+	private void setSVGRectParameters(SVGRectElement elt)
+	{
+		if(elt==null)
+			return ;
+		
+		setSVGParameters(elt);
+		
+		double rx = elt.getRx();
+		LaTeXDrawRectangle r = (LaTeXDrawRectangle)getShape();
+		double gap = getPositionGap()/2.;
+		
+		r.setFirstPoint(elt.getX()+gap, elt.getY()+gap);
+		r.setLastPoint(elt.getX()+elt.getWidth()-gap, elt.getY()+elt.getHeight()-gap);
+		
+		if(rx>0)
+			r.setIsRound(true);
+		
+		RectangularShape rs = (RectangularShape)r.getShape();
+		r.setFrameArc((2*rx)/(min(rs.getHeight(), rs.getWidth())- (r.hasDoubleBoundary() ? r.getDoubleSep()+r.getThickness() : 0)));
+	}
+
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument document)
+	{
+		if(document==null || document.getFirstChild().getDefs()==null)
+			throw new IllegalArgumentException();
+
+		double gap = getPositionGap();
+		LaTeXDrawPoint2D nw = shape.getTheNWPoint();
+		LaTeXDrawPoint2D se = shape.getTheSEPoint();
+		SVGElement elt;
+        SVGElement root = new SVGGElement(document);
+        root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_RECT);
+        root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+        
+        if(shape.hasShadow())
+        {
+        	elt = new SVGRectElement(nw.x-gap/2., nw.y-gap/2., Math.max(1, (se.x-nw.x)+gap), Math.max(1, (se.y-nw.y)+gap), document);
+        	setSVGShadowAttributes(elt, true);
+        	setSVGRoundCorner(elt);
+        	root.appendChild(elt);
+        }
+        
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE))
+        {// The background of the borders must be filled is there is a shadow.
+	        elt = new SVGRectElement(nw.x-gap/2., nw.y-gap/2., Math.max(1, (se.x-nw.x)+gap), Math.max(1, (se.y-nw.y)+gap), document);
+	        setSVGBorderBackground(elt, root);
+	        setSVGRoundCorner(elt);
+        }
+        
+        elt = new SVGRectElement(nw.x-gap/2., nw.y-gap/2., Math.max(1, (se.x-nw.x)+gap), Math.max(1, (se.y-nw.y)+gap), document);
+        root.appendChild(elt);
+        setSVGAttributes(document, elt, true);
+        setSVGRoundCorner(elt);
+        
+        if(shape.hasDoubleBoundary())
+        {
+        	elt = new SVGRectElement(nw.x-gap/2., nw.y-gap/2., Math.max(1, (se.x-nw.x)+gap), Math.max(1, (se.y-nw.y)+gap), document);
+        	setSVGDoubleBordersAttributes(elt);
+        	setSVGRoundCorner(elt);
+        	root.appendChild(elt);
+        }
+
+        setSVGRotationAttribute(root);
+        
+		return root;
+	}
+	
+	
+	
+	/**
+	 * Sets the roundness of the SVG shape.
+	 * @param elt The SVG element into which the roundness must be set.
+	 * @since 2.0.0
+	 */
+	protected void setSVGRoundCorner(SVGElement elt)
+	{
+		if(elt==null)
+			return ;
+		
+		if(((LaTeXDrawRectangle)shape).isRound())
+		{
+	        RectangularShape r = (RectangularShape)shape.getShape();
+			double add = shape.hasDoubleBoundary() ? shape.getDoubleSep() + shape.getThickness() : 0;
+			double value = 0.5*(min(r.getWidth(), r.getHeight())-add)*((LaTeXDrawRectangle)shape).getFrameArc();
+			
+			elt.setAttribute(SVGAttributes.SVG_RX, String.valueOf(value));
+		}
+	}
+}
diff --git a/current/latexDraw/generators/svg/LRhombusSVGGenerator.java b/current/latexDraw/generators/svg/LRhombusSVGGenerator.java
new file mode 100644
index 0000000..6e360b9
--- /dev/null
+++ b/current/latexDraw/generators/svg/LRhombusSVGGenerator.java
@@ -0,0 +1,160 @@
+package latexDraw.generators.svg;
+
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.figures.Rhombus;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.parsers.svg.elements.SVGPolygonElement;
+import latexDraw.parsers.svg.parsers.SVGPointsParser;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines an SVG generator for a polygon.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LRhombusSVGGenerator extends LPolygonSVGGenerator
+{
+
+	public LRhombusSVGGenerator(Rhombus f)
+	{
+		super(f);
+	}
+
+
+	
+	public LRhombusSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a rhombus from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LRhombusSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Rhombus(false));
+
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGPolygonElement))
+			throw new IllegalArgumentException();
+		
+		SVGPolygonElement main = (SVGPolygonElement)elt2;
+		Rhombus r = (Rhombus)getShape();
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		
+		Vector<Point2D> ptsPol = SVGPointsParser.getPoints(elt.getAttribute(
+								 elt.getUsablePrefix(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI)+LaTeXDrawNamespace.XML_POINTS));
+		
+		if(ptsPol==null || ptsPol.size()!=LaTeXDrawRectangle.NB_POINTS_FRAME)
+			throw new IllegalArgumentException();
+		
+		r.getPoint(0).setLocation(ptsPol.elementAt(0));
+		r.getPoint(1).setLocation(ptsPol.elementAt(1));
+		r.getPoint(2).setLocation(ptsPol.elementAt(2));
+		r.getPoint(3).setLocation(ptsPol.elementAt(3));
+		
+		r.updateShape();
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null)
+			return null;
+		
+		Rhombus r = (Rhombus)shape;
+		LaTeXDrawPoint2D nw = r.getTheNWPoint(), se = r.getTheSEPoint();
+		LaTeXDrawPoint2D gc = r.getGravityCenter();
+		LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D((nw.x+se.x)/2., nw.y);
+		LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D(se.x, (nw.y+se.y)/2.);
+		LaTeXDrawPoint2D p3 = new LaTeXDrawPoint2D((nw.x+se.x)/2., se.y);
+		SVGElement root = new SVGGElement(doc), elt;
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_RHOMBUS);
+		root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+	    double gap = getPositionGap()/2.;
+	    double cornerGap1 = Figure.getCornerGap(gc, p1, p2, gap);
+	    double cornerGap2 = Figure.getCornerGap(gc, p2, p3, gap);
+	    
+	    if(p2.x<p3.x)
+	    	cornerGap2*=-1;
+	    
+		String points =  (float)p1.x + "," + (float)(p1.y - cornerGap1) + " " + //$NON-NLS-1$ //$NON-NLS-2$
+						 (float)(p2.x + cornerGap2) + "," +  (float)p2.y + " " + //$NON-NLS-1$//$NON-NLS-2$
+						 (float)p3.x + "," + (float)(p3.y + cornerGap1) + " " + //$NON-NLS-1$//$NON-NLS-2$
+						 (float)(nw.x - cornerGap2)  + "," + (float)p2.y;//$NON-NLS-1$
+	    String ltdPoints = r.getPoint(0).x + " " + r.getPoint(0).y + " " + r.getPoint(1).x + " " + r.getPoint(1).y +//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+							" " + r.getPoint(2).x + " " + r.getPoint(2).y + " " + r.getPoint(3).x + " " + r.getPoint(3).y;//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+
+		if(r.hasShadow())
+		{
+			SVGElement shad = new SVGPolygonElement(doc);
+	    	
+	   		shad.setAttribute(SVGAttributes.SVG_POINTS, points);
+	   		setSVGShadowAttributes(shad, true);
+	   		root.appendChild(shad);
+		}
+		
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE))
+        {// The background of the borders must be filled is there is a shadow.
+    		elt = new SVGPolygonElement(doc);
+    		elt.setAttribute(SVGAttributes.SVG_POINTS, points);
+    		setSVGBorderBackground(elt, root);
+        }
+        
+		elt = new SVGPolygonElement(doc);
+		elt.setAttribute(SVGAttributes.SVG_POINTS, points);
+		root.appendChild(elt);
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_POINTS, ltdPoints);
+		
+		if(r.hasDoubleBoundary())
+		{
+			SVGElement dblBord = new SVGPolygonElement(doc);
+			
+			dblBord.setAttribute(SVGAttributes.SVG_POINTS, points);
+			setSVGDoubleBordersAttributes(dblBord);
+			root.appendChild(dblBord);
+		}
+		
+		setSVGAttributes(doc, elt, true);
+		setSVGRotationAttribute(root);
+		
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LShapeSVGGenerator.java b/current/latexDraw/generators/svg/LShapeSVGGenerator.java
new file mode 100644
index 0000000..c558e4c
--- /dev/null
+++ b/current/latexDraw/generators/svg/LShapeSVGGenerator.java
@@ -0,0 +1,1151 @@
+package latexDraw.generators.svg;
+
+import static java.lang.Math.PI;
+import static java.lang.Math.toDegrees;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+import java.text.ParseException;
+
+import latexDraw.figures.ArrowHead;
+import latexDraw.figures.Figure;
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.figures.Line;
+import latexDraw.parsers.svg.*;
+import latexDraw.parsers.svg.elements.*;
+import latexDraw.parsers.svg.elements.path.SVGPathSegLineto;
+import latexDraw.parsers.svg.elements.path.SVGPathSegList;
+import latexDraw.parsers.svg.elements.path.SVGPathSegMoveto;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+import latexDraw.parsers.svg.parsers.URIReferenceParser;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * This class allows the generation or the importation of SVG parameters to a general LaTeXDraw shape.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class LShapeSVGGenerator
+{
+	protected Figure shape;
+	
+	
+	public LShapeSVGGenerator(Figure f)
+	{
+		if(f==null)
+			throw new IllegalArgumentException();
+		
+		shape = f;
+	}
+	
+	
+	
+	/**
+	 * @return The SVG ID of the shape (starting with the token "id" followed by the number of the shape).
+	 * @since 2.0.0
+	 */
+	public String getSVGID()
+	{
+		return "id" + shape.getNumber(); //$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * Sets the ID of the figure according to the ID attribute of the SVGGElement, or an increment of meter if a problem occur.
+	 * @param g The SVGGElement.
+	 * @since 2.0.0
+	 */
+	public void setNumber(SVGGElement g)
+	{
+		if(g==null)
+			return;
+		
+		String nb = g.getAttribute(g.getUsablePrefix()+SVGAttributes.SVG_ID);
+		String pref = "id"; //$NON-NLS-1$
+		
+		if(nb==null)
+			shape.setNewNumber();
+		else
+			try{ shape.setNumber(Double.valueOf(nb).intValue()); }
+			catch(NumberFormatException e) 
+			{
+				if(nb.startsWith(pref))
+					try { shape.setNumber(Double.valueOf(nb.substring(pref.length())).intValue()); }
+					catch(NumberFormatException e2) 
+					{ shape.setNewNumber(); }
+				else
+					shape.setNewNumber();
+			}
+	}
+
+	
+	
+	
+	/**
+	 * Applies the set of transformations that concerned the given SVG element to the shape.
+	 * @param elt The element that contains the SVG transformation list.
+	 * @since 2.0.0
+	 */
+	public void applyTransformations(SVGElement elt)
+	{
+		if(elt==null)
+			return ;
+		
+		SVGTransformList tl = elt.getWholeTransform();	// The list of the transformations that are applied on the element.
+		
+		for(int i = tl.size()-1; i>=0; i--)
+			applyTransformation(tl.elementAt(i));
+	}
+	
+	
+	
+	
+	/**
+	 * Applies an SVG transformation on the shape.
+	 * @param t The SVG transformation to apply.
+	 * @since 2.0.0
+	 */
+	public void applyTransformation(SVGTransform t)
+	{
+		if(t!=null)
+			switch(t.getType())
+			{
+				case SVGTransform.SVG_TRANSFORM_ROTATE:
+					getShape().rotate(new LaTeXDrawPoint2D(t.getMatrix().getE(), t.getMatrix().getF()), 
+														 	Math.toRadians(t.getRotationAngle()));
+					break;
+					
+				case SVGTransform.SVG_TRANSFORM_SCALE:
+					break;
+					
+				case SVGTransform.SVG_TRANSFORM_TRANSLATE:
+					getShape().shift(t.getTX(), t.getTY());
+					break;
+					
+				//TODO Quand 'Bordel !' sera implémenté, y mettre les trucs qui vont dans 'default:'.
+			}
+	}
+	
+	
+	
+	/**
+	 * When the arrows are read from an SVG document, we need to set the parameters of the first 
+	 * arrow to the second arrow and vise et versa; because the arrows of a shape share the same
+	 * parameters. This method carries out this job.
+	 * @param ah1 The first arrow.
+	 * @param ah2 The second arrow.
+	 * @since 2.0.0
+	 */
+	public void homogeniseArrows(ArrowHead ah1, ArrowHead ah2)
+	{
+		if(ah1==null || ah2==null)
+			return ;
+		
+		homogeniseArrowFrom(ah1, ah2);
+		homogeniseArrowFrom(ah2, ah1);
+	}
+	
+	
+	
+	/**
+	 * Copies the parameters of the first arrow to the second arrow (only
+	 * the parameters of the current style are copied).
+	 * @see #homogeniseArrows(ArrowHead, ArrowHead)
+	 * @param source The arrow that will be copied.
+	 * @param target The arrow that will be set.
+	 * @since 2.0.0
+	 */
+	protected void homogeniseArrowFrom(ArrowHead source, ArrowHead target)
+	{
+		if(source==null || target==null)
+			return ;
+		
+		String style = source.getArrowStyle();
+		
+		if(style.equals(PSTricksConstants.NONEARROW_STYLE))
+			return ;
+		
+		if(style.equals(PSTricksConstants.BAREND_STYLE) || style.equals(PSTricksConstants.BARIN_STYLE))
+		{
+			target.setTBarSizeDim(source.getTBarSizeDim());
+			target.setTBarSizeNum(source.getTBarSizeNum());
+		}
+		else if(style.equals(PSTricksConstants.LARROW_STYLE) || style.equals(PSTricksConstants.RARROW_STYLE) ||
+				style.equals(PSTricksConstants.DLARROW_STYLE) || style.equals(PSTricksConstants.DRARROW_STYLE))
+		{
+			target.setArrowInset(source.getArrowInset());
+			target.setArrowLength(source.getArrowLength());
+			target.setArrowSizeDim(source.getArrowSizeDim());
+			target.setArrowSizeNum(target.getArrowSizeNum());
+		}
+		else if(style.equals(PSTricksConstants.RRBRACKET_STYLE) || style.equals(PSTricksConstants.LRBRACKET_STYLE))
+		{
+			target.setRBracketNum(source.getRBracketNum());
+			target.setTBarSizeDim(source.getTBarSizeDim());
+			target.setTBarSizeNum(source.getTBarSizeNum());
+		}
+		else if(style.equals(PSTricksConstants.RSBRACKET_STYLE) || style.equals(PSTricksConstants.LSBRACKET_STYLE))
+		{
+			target.setBracketNum(source.getBracketNum());
+			target.setTBarSizeDim(source.getTBarSizeDim());
+			target.setTBarSizeNum(source.getTBarSizeNum());
+		}
+		else if(style.equals(PSTricksConstants.DISKEND_STYLE) || style.equals(PSTricksConstants.DISKIN_STYLE) ||
+				style.equals(PSTricksConstants.CIRCLEEND_STYLE) || style.equals(PSTricksConstants.CIRCLEIN_STYLE))
+		{
+			target.setDotSizeDim(source.getDotSizeDim());
+			target.setDotSizeNum(source.getDotSizeNum());
+		}
+	}
+	
+	
+	
+	/**
+	 * Sets the shadow parameters of the figure by using an SVG element having "type:shadow".
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	protected void setSVGShadowParameters(SVGElement elt)
+	{
+		if(elt==null || !shape.canHaveShadow())
+			return ;
+		
+		String fill = elt.getFill();
+		
+		if(fill!=null && !fill.equals(SVGAttributes.SVG_VALUE_NONE) && !fill.startsWith("url(#"))//$NON-NLS-1$
+			shape.setShadowColor(CSSColors.getRGBColour(fill));
+		
+		SVGTransformList tl = elt.getTransform();
+		SVGTransform t;
+		double tx, ty;
+		boolean sSize = false, sAngle = false;
+		
+		for(int i=0, size=tl.size(); i<size && (!sSize || !sAngle); i++ )
+		{
+			t = tl.elementAt(i);
+			
+			if(t.isTranslation())
+			{
+				tx = t.getTX();
+				ty = t.getTY();
+				
+				if(ty==0. && !sSize)// It is shadowSize.
+				{
+					shape.setShadowSize(tx);
+					sSize = true;
+				}
+				else
+					if(shape.getGravityCenter()!=null)
+					{
+						shape.updateGravityCenter();
+						Point2D.Double gravityCenter = shape.getGravityCenter();
+						double angle = Double.NaN, shSize = shape.getShadowSize();
+						
+						if(ty==0.)
+							angle = tx<0. ? Math.PI : 0.;
+						else
+							if(shSize==Math.abs(tx))
+								angle = ty>0. ? -Math.PI/2. : Math.PI/2.;
+							else
+							{
+								angle = Math.acos(gravityCenter.distance(gravityCenter.x+tx+shSize, gravityCenter.y)/
+													gravityCenter.distance(gravityCenter.x+tx+shSize, gravityCenter.y+ty));
+								
+								if(tx+shSize<0)
+								{
+									if(ty<0.)
+										angle = Math.PI - angle;
+									else
+										angle += Math.PI;
+								}
+								else
+									if(ty>0.)
+										angle *= -1;
+							}
+						
+						shape.setShadowAngle(angle);
+						sAngle = true;
+					}
+			}
+		}
+		
+		shape.setHasShadow(true);
+	}
+	
+	
+	
+	/**
+	 * Sets the double borders parameters of the figure by using an SVG element.
+	 * @param elt The SVG element.
+	 * @since 2.0.0
+	 */
+	protected void setSVGDbleBordersParameters(SVGElement elt)
+	{
+		if(elt==null)
+			return ;
+		
+		shape.setDoubleSep(elt.getStrokeWidth());
+		shape.setDoubleColor(elt.getStroke());
+		shape.setThickness((float)((shape.getThickness()-shape.getDoubleSep())/2.));
+		shape.setHasDoubleBoundary(true);
+	}
+	
+	
+	
+	
+	protected void setSVGLatexdrawParameters(SVGElement elt)
+	{
+		if(elt==null)
+			return ;
+		
+		if(shape.isBordersMovable())
+		{
+			String bp = elt.getAttribute(elt.getUsablePrefix(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI)+
+										LaTeXDrawNamespace.XML_BORDERS_POS);
+			
+			if(bp!=null)
+				shape.setBordersPosition(bp);
+		}
+	}
+	
+	
+	
+	/**
+	 * Sets the global parameters of the figure by using an SVG element.
+	 * @param elt The SVG element.
+	 * @since 2.0.0
+	 */
+	protected void setSVGParameters(SVGElement elt)
+	{
+		if(elt==null)
+			return ;
+		
+		if(shape.isThicknessable())
+			shape.setThickness((float)elt.getStrokeWidth());
+		
+		shape.setLinesColor(elt.getStroke());
+		
+		if(shape.isDashableOrDotable())
+			LShapeSVGGenerator.setDashedDotted(shape, elt.getStrokeDasharray(), elt.getLinecap());
+		
+		if(shape.canBeFilled())
+			LShapeSVGGenerator.setFill(shape, elt.getFill(), elt.getSVGRoot().getDefs());
+		
+		CSSStylesGenerator.setCSSStyles(shape, elt.getStylesCSS(), elt.getSVGRoot().getDefs());
+	}
+
+	
+	
+	/**
+	 * Sets the given arrow head using the SVG arrow with the ID arrowID
+	 * @param ah The arrow head to set.
+	 * @param arrowID The SVG ID of the SVG arrow head.
+	 * @param elt An element of the SVG document (useful to get the defs of the document).
+	 * @since 2.0.0
+	 */
+	protected void setSVGArrow(ArrowHead ah, String arrowID, SVGElement elt)
+	{
+		if(ah==null || arrowID==null || elt==null)
+			return ;
+		
+		LArrowHeadSVGGenerator ahGen1 = new LArrowHeadSVGGenerator(ah);
+		
+		try{ ahGen1.setArrow((SVGMarkerElement)elt.getDef(new URIReferenceParser(arrowID).getURI()), getShape()); }
+		catch(ClassCastException e) { e.printStackTrace(); }
+	}
+	
+	
+	
+	
+	/**
+	 * @param elt The source <code>g</code> element.
+	 * @param type The type of the latexdraw element (double borders, shadow, main), if null, the main element is returned.
+	 * @return The Researched element.
+	 * @since 2.0.0
+	 */
+	protected SVGElement getLaTeXDrawElement(SVGGElement elt, String type)
+	{
+		if(elt==null)
+			return null;
+		
+		NodeList nl = elt.getChildNodes();
+		int i=0, size = nl.getLength();
+		Node ltdElt=null, n;
+		String bis = elt.lookupPrefixUsable(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI);
+		
+		if(type==null)
+			while(i<size && ltdElt==null)
+			{
+				n = nl.item(i);
+				
+				if(((SVGElement)n).getAttribute(bis+LaTeXDrawNamespace.XML_TYPE)==null)
+					ltdElt = n;
+				else
+					i++;
+			}
+		else
+			while(i<size && ltdElt==null)
+			{
+				n = nl.item(i);
+				
+				if(type.equals(((SVGElement)n).getAttribute(bis+LaTeXDrawNamespace.XML_TYPE)))
+					ltdElt = n;
+				else
+					i++;
+			}
+		
+		return (SVGElement)ltdElt;
+	}
+
+	
+	
+	/**
+	 * Sets the thickness of the given figure with the given SVG stroke-width.
+	 * @param f The figure to set.
+	 * @param strokeWidth The SVG stroke-width to convert.
+	 * @param stroke The stroke.
+	 * @since 2.0.0
+	 */
+	public static void setThickness(Figure f, String strokeWidth, String stroke)
+	{
+		if(f==null || strokeWidth==null)
+			return;
+		
+		if(stroke==null || !stroke.equals(SVGAttributes.SVG_VALUE_NONE))
+			try{ f.setThickness((float)new SVGLengthParser(strokeWidth).parseLength().getValue()); }
+			catch(ParseException e){ e.printStackTrace(); }
+	}
+	
+	
+	
+	/**
+	 * Creates an SVG element from the current latexdraw shape.
+	 * @param doc The SVG document.
+	 * @return The created SVGElement or null.
+	 * @since 2.0.0
+	 */
+	public abstract SVGElement toSVG(SVGDocument doc);
+	
+	
+	
+	
+	
+	/**
+	 * @param elt Rotates the SVG element.
+	 * @exception IllegalArgumentException If elt is null.
+	 * @since 2.0.0
+	 */
+	protected void setSVGRotationAttribute(Element elt)
+	{
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		double rotationAngle = shape.getRotationAngle();
+		LaTeXDrawPoint2D gravityCenter = shape.getGravityCenter();
+		
+		if((rotationAngle % (2*PI)) != 0)
+		{
+			double x = -Math.cos(-rotationAngle) * gravityCenter.x + Math.sin(-rotationAngle) * gravityCenter.y + gravityCenter.x;
+			double y = -Math.sin(-rotationAngle) * gravityCenter.x - Math.cos(-rotationAngle) * gravityCenter.y + gravityCenter.y;
+			String transfo  = elt.getAttribute(SVGAttributes.SVG_TRANSFORM);
+			String rotation = SVGTransform.createRotation(toDegrees(rotationAngle), 0, 0) + " " +//$NON-NLS-1$
+							  SVGTransform.createTranslation(-x, -y);
+			
+			if(transfo!=null && transfo.length()>0)
+				transfo = rotation + " " + transfo;
+			else
+				transfo = rotation;
+			
+			elt.setAttribute(SVGAttributes.SVG_TRANSFORM, transfo);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Sets the double borders parameters to the given SVG element if the current figure has double borders.
+	 * @param elt The element to set.
+	 * @exception IllegalArgumentException If elt is null.
+	 * @since 2.0.0
+	 */
+	protected void setSVGDoubleBordersAttributes(Element elt)
+	{
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		if(shape.hasDoubleBoundary())
+		{
+			elt.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(shape.getDoubleColor(), true));
+			elt.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(shape.getDoubleSep()));
+			elt.setAttribute(SVGAttributes.SVG_FILL, SVGAttributes.SVG_VALUE_NONE);
+			elt.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS);
+		}
+	}
+	
+	
+	
+	/**
+	 * 
+	 * @param elt The element to set if the current figure has a shadow.
+	 * @param shadowFills True if a shadow must fill the figure.
+	 * @exception IllegalArgumentException If elt is null.
+	 * @since 2.0.0
+	 */
+	protected void setSVGShadowAttributes(Element elt, boolean shadowFills)
+	{
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		if(shape.hasShadow())
+		{
+			LaTeXDrawPoint2D gravityCenter = shape.getGravityCenter();
+			LaTeXDrawPoint2D pt = new LaTeXDrawPoint2D(gravityCenter.x+shape.getShadowSize(), gravityCenter.y);
+			pt = shape.rotatePoint(pt, -shape.getShadowAngle());
+			
+			elt.setAttribute(SVGAttributes.SVG_TRANSFORM, 
+				SVGTransform.createTranslation((float)shape.getShadowSize(), 0) + " " + //$NON-NLS-1$
+				SVGTransform.createTranslation((float)(pt.x-gravityCenter.x-shape.getShadowSize()), (float)(pt.y-gravityCenter.y)));
+			elt.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(shape.hasDoubleBoundary() ? 
+								shape.getThickness()*2+shape.getDoubleSep() : shape.getThickness()));
+			elt.setAttribute(SVGAttributes.SVG_FILL, shadowFills || shape.isFilled() ? CSSColors.getColorName(shape.getShadowColor(), true) : SVGAttributes.SVG_VALUE_NONE);
+			elt.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(shape.getShadowColor(), true));
+			elt.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_SHADOW);
+		}
+	}
+	
+	
+	
+	/**
+	 * Sets the SVG attribute of the current figure.
+	 * @param doc The original document with which, all the elements will be created.
+	 * @param root The root element of the document.
+	 * @param shadowFills True if a shadow must fill the figure.
+	 * @since 2.0.0
+	 */
+	protected void setSVGAttributes(SVGDocument doc, SVGElement root, boolean shadowFills)
+	{
+		if(root==null || doc.getFirstChild().getDefs()==null)
+			throw new IllegalArgumentException();
+		
+		SVGDefsElement defs = doc.getFirstChild().getDefs();
+		
+		if(shape.isBordersMovable())
+	        root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE +':'+ LaTeXDrawNamespace.XML_BORDERS_POS, shape.getBordersPosition());
+		
+		if(shape.isThicknessable())
+		{
+			LShapeSVGGenerator.setThickness(root, shape.getThickness(), shape.hasDoubleBoundary(), shape.getDoubleSep());
+			root.setStroke(shape.getLinesColor());
+		}
+		
+		if(shape.canBeFilled())
+			if((shape.isFilled() || (shape.hasShadow() && shadowFills)) && !shape.isHatched() && !shape.hasGradient())
+				root.setAttribute(SVGAttributes.SVG_FILL, CSSColors.getColorName(shape.getInteriorColor(), true));
+			else
+		        if(shape.getHatchingStyle().equals(PSTricksConstants.TOKEN_FILL_NONE))
+		        	root.setAttribute(SVGAttributes.SVG_FILL, SVGAttributes.SVG_VALUE_NONE);
+		        else
+		        	if(shape.getHatchingStyle().equals(PSTricksConstants.TOKEN_FILL_GRADIENT))
+		        	{
+		        		Element grad = new SVGLinearGradientElement(doc), stop;
+		        		String id = SVGElements.SVG_LINEAR_GRADIENT + shape.getNumber();
+		        		double gradMidPt = shape.getGradientAngle()>PI || (shape.getGradientAngle()<0 && shape.getGradientAngle()>-PI)? 
+		        							1-shape.getGradientMidPoint() : shape.getGradientMidPoint();
+		        		
+		        		grad.setAttribute(SVGAttributes.SVG_ID, id);
+		        		
+		        		if(((float)(shape.getGradientAngle()%(2*PI))) != (float)(PI/2f))
+		        		{
+		        			Point2D.Float p1 = new Point2D.Float(), p2 = new Point2D.Float();
+		        			
+		        			getGradientPoints(p1, p2, true);
+		        			
+		            		grad.setAttribute(SVGAttributes.SVG_X1, String.valueOf(p1.x));
+		            		grad.setAttribute(SVGAttributes.SVG_Y1, String.valueOf(p1.y));
+		            		grad.setAttribute(SVGAttributes.SVG_X2, String.valueOf(p2.x));
+		            		grad.setAttribute(SVGAttributes.SVG_Y2, String.valueOf(p2.y));
+		            		grad.setAttribute(SVGAttributes.SVG_GRADIENT_UNITS, SVGAttributes.SVG_UNITS_VALUE_USR);
+		        		}
+		        		
+		        		
+		        		if(gradMidPt!=0)
+		        		{
+			        		stop = doc.createElement(SVGElements.SVG_STOP);
+			        		stop.setAttribute(SVGAttributes.SVG_OFFSET, "0");//$NON-NLS-1$
+			        		stop.setAttribute(SVGAttributes.SVG_STOP_COLOR, CSSColors.getColorName(shape.getGradientStartColor(), true));
+			        		grad.appendChild(stop);
+		        		}
+		        		
+		        		stop = doc.createElement(SVGElements.SVG_STOP);
+		        		stop.setAttribute(SVGAttributes.SVG_OFFSET, String.valueOf(gradMidPt));
+		        		stop.setAttribute(SVGAttributes.SVG_STOP_COLOR, CSSColors.getColorName(shape.getGradientEndColor(), true));
+		        		grad.appendChild(stop);
+		        		
+		        		if(gradMidPt!=1)
+		        		{
+		            		stop = doc.createElement(SVGElements.SVG_STOP);
+		            		stop.setAttribute(SVGAttributes.SVG_OFFSET, "1");//$NON-NLS-1$
+		            		stop.setAttribute(SVGAttributes.SVG_STOP_COLOR, CSSColors.getColorName(shape.getGradientStartColor(), true));
+		            		grad.appendChild(stop);
+		        		}
+		        		
+		        		defs.appendChild(grad);
+		        		root.setAttribute(SVGAttributes.SVG_FILL, "url(#" + id + ')');//$NON-NLS-1$
+		        	}
+		        	else
+		        	{
+		        		if(shape.isHatched())
+		        		{
+		        			String id 		= SVGElements.SVG_PATTERN + shape.getNumber();
+		        			Element hatch 	= doc.createElement(SVGElements.SVG_PATTERN);
+		        			Element gPath 	= doc.createElement(SVGElements.SVG_G);
+		        			LaTeXDrawPoint2D max = shape.getTheSENonRotatedBoundPoint();
+		        			
+		        			root.setAttribute(SVGAttributes.SVG_FILL, "url(#" + id + ')');//$NON-NLS-1$
+		        			hatch.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, shape.getHatchingStyle());
+		        			hatch.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ROTATION, 
+		        								String.valueOf(shape.getHatchingAngle()));
+		        			hatch.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_SIZE, 
+		        					String.valueOf(shape.getHatchingSep()));
+		        			hatch.setAttribute(SVGAttributes.SVG_PATTERN_UNITS, SVGAttributes.SVG_UNITS_VALUE_USR);
+		        			hatch.setAttribute(SVGAttributes.SVG_ID, id);
+		        			hatch.setAttribute(SVGAttributes.SVG_X, "0");
+		        			hatch.setAttribute(SVGAttributes.SVG_Y, "0");
+		        			hatch.setAttribute(SVGAttributes.SVG_WIDTH,  String.valueOf((int)max.x));
+		        			hatch.setAttribute(SVGAttributes.SVG_HEIGHT, String.valueOf((int)max.y));
+		        			gPath.setAttribute(SVGAttributes.SVG_STROKE, CSSColors.getColorName(shape.getHatchingColor(), true));
+		        			gPath.setAttribute(SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(shape.getHatchingWidth()));
+		        			gPath.setAttribute(SVGAttributes.SVG_STROKE_DASHARRAY, SVGAttributes.SVG_VALUE_NONE);
+		        			
+		        			Element path = doc.createElement(SVGElements.SVG_PATH);
+		        			
+		        			path.setAttribute(SVGAttributes.SVG_D, getSVGHatchingsPath().toString());
+	        				gPath.appendChild(path);
+		        			
+		        			if(shape.isFilled() || (shape.hasShadow() && shadowFills))
+		        			{
+		        				Element fill = doc.createElement(SVGElements.SVG_RECT);
+		        				fill.setAttribute(SVGAttributes.SVG_FILL,   CSSColors.getColorName(shape.getInteriorColor(), true));
+		        				fill.setAttribute(SVGAttributes.SVG_STROKE, SVGAttributes.SVG_VALUE_NONE);
+		        				fill.setAttribute(SVGAttributes.SVG_WIDTH,  String.valueOf((int)max.x));
+		        				fill.setAttribute(SVGAttributes.SVG_HEIGHT, String.valueOf((int)max.y));
+		        				
+		        				hatch.appendChild(fill);
+		        			}
+		        			
+		        			defs.appendChild(hatch);
+		        			hatch.appendChild(gPath);
+		        		}
+		        	}//else
+        
+		if(shape.isDashableOrDotable())
+	        LShapeSVGGenerator.setDashedDotted(root, shape.getBlackDashLength(), shape.getWhiteDashLength(), shape.getDotSep(), 
+	        		shape.getLineStyle(), shape.hasDoubleBoundary(), shape.getThickness(), shape.getDoubleSep());
+	}
+
+	
+	
+	/**
+	 * @return The path of the hatchings of the shape.
+	 * @since 2.0.0
+	 */
+	public SVGPathSegList getSVGHatchingsPath()
+	{
+		SVGPathSegList path = new SVGPathSegList();
+		
+		if(!shape.isHatched())
+			return path;
+
+		String hatchingStyle = shape.getHatchingStyle();
+		double hatchingAngle = shape.getHatchingAngle();
+		LaTeXDrawRectangle bound = new LaTeXDrawRectangle(shape.getTheNWNonRotatedBoundPoint(),
+														  shape.getTheSENonRotatedBoundPoint(), false);
+		
+		if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_VLINES) || 
+			hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_VLINES_F)) 
+			getSVGHatchingsPath_(path, hatchingAngle, bound);
+			else 
+				if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_HLINES) || 
+				   hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_HLINES_F)) 
+					getSVGHatchingsPath_(path, hatchingAngle>0?hatchingAngle-Math.PI/2.:hatchingAngle+Math.PI/2., bound);
+			else 
+				if(hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH) ||
+				   hatchingStyle.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH_F)) 
+				{
+					getSVGHatchingsPath_(path, hatchingAngle, bound);
+					getSVGHatchingsPath_(path, hatchingAngle>0?hatchingAngle-Math.PI/2.:hatchingAngle+Math.PI/2., bound);
+				}
+		
+		return path;
+	}
+	
+	
+	
+	private void getSVGHatchingsPath_(SVGPathSegList path, double hAngle, LaTeXDrawRectangle bound)
+	{
+		if(path == null || bound==null)
+			return;
+		
+		double angle2  = hAngle%(Math.PI*2.);
+		float halphPI  = (float)(Math.PI/2.);
+		double hatchingWidth = shape.getHatchingWidth();
+		double hatchingSep   = shape.getHatchingSep();
+		LaTeXDrawPoint2D nw = bound.getTheNWPoint();
+		LaTeXDrawPoint2D se = bound.getTheSEPoint();
+		
+		if(angle2>0)
+		{
+			if((float)angle2>3f*halphPI)
+				angle2 = angle2-Math.PI*2.;
+			else
+				if((float)angle2>halphPI)
+					angle2 = angle2-Math.PI;
+		}
+		else
+			if((float)angle2<-3f*halphPI)
+				angle2 = angle2+Math.PI*2.;
+			else
+				if((float)angle2<-halphPI)
+					angle2 = angle2+Math.PI;
+		
+		double val			= hatchingWidth+hatchingSep;
+		float fAngle		= (float)angle2;
+		
+		if(fAngle==0f)
+			for(double x = nw.x; x<se.x; x+=val)
+			{
+				path.add(new SVGPathSegMoveto(x, nw.y, false));
+				path.add(new SVGPathSegLineto(x, se.y, false));
+			}
+		else 
+			if(fAngle==halphPI || fAngle==-halphPI)
+				for(double y = nw.y; y<se.y; y+=val)
+				{
+					path.add(new SVGPathSegMoveto(nw.x, y, false));
+					path.add(new SVGPathSegLineto(se.x, y, false));
+				}
+			else 
+			{
+				double incX = val/Math.cos(angle2);
+				double incY = val/Math.sin(angle2);
+				double maxX;
+				double y1, x2, y2, x1;
+				
+				if(fAngle>0f) 
+				{
+					y1 = nw.y;
+					maxX 	= se.x + (se.y-(nw.y<0?nw.y:0)) * Math.tan(angle2);
+				}
+				else 
+				{
+					y1 = se.y;
+					maxX 	= se.x - se.y * Math.tan(angle2);
+				}
+				
+				x1 = nw.x;
+				x2 = x1;
+				y2 = y1;
+				
+				if(((float)incX)<=0f)
+					return ;
+				
+				while(x2 < maxX)
+				{
+					x2 += incX;
+					y1 += incY;
+					path.add(new SVGPathSegMoveto(x1, y1, false));
+					path.add(new SVGPathSegLineto(x2, y2, false));
+				}
+			}
+	}
+	
+	
+	
+	/**
+	 * Gets the points needed to the gradient definition. The given points must not be null, there value will be set in the method.
+	 * @param p1 The first point to set.
+	 * @param p2 The second point to set.
+	 * @param ignoreMidPt True, gradientMidPt will be ignored.
+	 * @throws IllegalArgumentException If p1 or p2 is null.
+	 * @since 2.0.0
+	 */
+	protected void getGradientPoints(Point2D.Float p1, Point2D.Float p2, boolean ignoreMidPt)
+	{
+		if(p1==null || p2==null)
+			throw new IllegalArgumentException();
+		
+		try
+		{
+			LaTeXDrawPoint2D NW = shape.getTheNWPoint();
+			LaTeXDrawPoint2D SE = shape.getTheSEPoint();
+			LaTeXDrawPoint2D pt1 = new LaTeXDrawPoint2D((NW.x+SE.x)/2., NW.y);
+			LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D((NW.x+SE.x)/2., SE.y);
+			double angle = shape.getGradientAngle()%(2*PI);
+			double gradMidPt = shape.getGradientMidPoint();
+			
+			if(angle<0)
+				angle = 2*PI + angle;
+			
+			if(angle>=PI)
+			{
+				gradMidPt = 1 - shape.getGradientMidPoint();
+				angle = angle-PI;
+			}
+			
+			if(angle!=0)
+			{
+				if((angle%(PI/2.))==0)
+				{
+					pt1 = new LaTeXDrawPoint2D(NW.x, (NW.y+SE.y)/2.);
+					pt2 = new LaTeXDrawPoint2D(SE.x, (NW.y+SE.y)/2.);
+					
+					if(!ignoreMidPt &&gradMidPt<0.5)
+						pt1.x = pt2.x - Point2D.distance(pt2.x, pt2.y, SE.x,(NW.y+SE.y)/2.);
+					
+					pt2.x = (NW.x+(SE.x-NW.x)*(ignoreMidPt ? 1 : gradMidPt));
+				}
+				else
+				{
+					LaTeXDrawPoint2D cg = shape.getGravityCenter();
+					Line l2, l;
+					
+					pt1 = Figure.rotatePoint(pt1, cg, -angle);
+					pt2 = Figure.rotatePoint(pt2, cg, -angle);
+					l = new Line(pt1, pt2, false);
+					
+					if(angle>=0 && angle<(PI/2.))
+						 l2 = l.getPerpendicularLine(NW, false);
+					else l2 = l.getPerpendicularLine(new LaTeXDrawPoint2D(NW.x,SE.y), false);
+					
+					pt1 = l.getIntersection(l2);
+					double distance = Point2D.distance(cg.x, cg.y, pt1.x, pt1.y);
+					l.setPointAt(pt1, 0);
+					LaTeXDrawPoint2D[] pts = l.findPoints(pt1, 2*distance*(ignoreMidPt ? 1 : gradMidPt));
+					pt2 = pts[0];
+					
+					if(!ignoreMidPt && gradMidPt<0.5)
+						pt1 = Figure.rotatePoint(pt1, cg, PI);
+				}
+			}//if(angle!=0)
+			else 
+			{
+				if(!ignoreMidPt && gradMidPt<0.5)
+					pt1.y = pt2.y - Point2D.distance(pt2.x, pt2.y, (NW.x+SE.x)/2.,SE.y);
+				
+				pt2.y = (NW.y+(SE.y-NW.y)*(ignoreMidPt ? 1 : gradMidPt));
+			}
+			
+			p1.setLocation(pt1.x, pt1.y);
+			p2.setLocation(pt2.x, pt2.y);
+			
+		}catch(Exception e)
+		{
+			p1.setLocation(0, 0);
+			p2.setLocation(0, 0);
+		}
+	}
+	
+	
+	
+	/**
+	 * Sets the colour of the line of the shape with the given SVG stroke.
+	 * @param f The shape to set.
+	 * @param stoke The stroke of the shape.
+	 * @since 2.0.0
+	 */
+	public static void setLineColour(Figure f, String stoke)
+	{
+		if(f==null || stoke==null)
+			return;
+		
+		f.setLinesColor(CSSColors.getRGBColour(stoke));
+	}
+	
+	
+	
+	/**
+	 * Sets the fill properties to the given figure.
+	 * @param f The figure to set.
+	 * @param fill The fill properties
+	 * @param defs The definition that may be useful to the the fill properties (url), may be null.
+	 * @since 2.0.0
+	 */
+	public static void setFill(Figure f, String fill, SVGDefsElement defs)
+	{
+		if(fill==null || f==null || fill.equals(SVGAttributes.SVG_VALUE_NONE))
+			return ;
+		
+		if(fill.startsWith("url(#") && fill.endsWith(")") && defs!=null)//$NON-NLS-1$//$NON-NLS-2$
+		{
+			String uri = fill.substring(5, fill.length()-1);
+			SVGElement def = defs.getDef(uri);
+			
+			if(def!=null)
+				if(def instanceof SVGPatternElement)
+				{
+					SVGPatternElement pat = (SVGPatternElement)def;
+					Color c 	= pat.getBackgroundColor();
+					String str 	= pat.getAttribute(pat.getUsablePrefix(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI)+LaTeXDrawNamespace.XML_TYPE);
+					double angle;
+					double sep;
+					double width;
+					String attr;
+					
+					try { angle = Double.valueOf(pat.getAttribute(pat.getUsablePrefix(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI)+
+									LaTeXDrawNamespace.XML_ROTATION));
+					}catch(Exception e) { angle = 0.; }
+
+					attr = pat.getAttribute(pat.getUsablePrefix(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI)+LaTeXDrawNamespace.XML_SIZE);
+					
+					if(attr==null)
+						sep = pat.getHatchingSep();
+					else
+						try { sep = Double.valueOf(attr);
+						}catch(Exception e) { sep = 0.; }
+					
+					if(PSTricksConstants.isValidFillStyle(str))
+						f.setHatchingStyle(str);
+					
+					if(!Double.isNaN(angle))
+						f.setHatchingAngle(angle);
+					
+					f.setIsFilled(c!=null);
+					f.setInteriorColor(c);
+					f.setHatchingColor(pat.getHatchingColor());
+					
+					if(!Double.isNaN(sep))
+						f.setHatchingSep(sep);
+					
+					width = pat.getHatchingStrokeWidth();
+					
+					if(!Double.isNaN(width))
+						f.setHatchingWidth((float)width);
+				}
+				else
+					if(def instanceof SVGLinearGradientElement)
+					{
+						SVGLinearGradientElement grad = (SVGLinearGradientElement)def;
+						
+						f.setGradientStartColor(grad.getStartColor());
+						f.setGradientEndColor(grad.getEndColor());
+						f.setHatchingStyle(PSTricksConstants.TOKEN_FILL_GRADIENT);
+						f.setGradientMidPoint(grad.getMiddlePoint());
+						f.setGradientAngle(grad.getAngle());
+					}
+		}
+		else
+		{
+			Color c = CSSColors.getRGBColour(fill);
+			
+			if(c!=null)
+			{
+				f.setInteriorColor(c);
+				f.setIsFilled(true);
+			}
+		}
+	}
+	
+	
+	
+	/**
+	 * Sets the figure properties concerning the line properties.
+	 * @param f The figure to set.
+	 * @param dashArray The dash array SVG property.
+	 * @param linecap The line cap SVG property.
+	 * @since 2.0.0
+	 */
+	public static void setDashedDotted(Figure f, String dashArray, String linecap)
+	{
+		if(f==null || dashArray==null)
+			return ;
+		
+		if(!dashArray.equals(SVGAttributes.SVG_VALUE_NONE))
+			if(linecap!=null && SVGAttributes.SVG_LINECAP_VALUE_ROUND.equals(linecap))
+				f.setLineStyle(PSTricksConstants.LINE_DOTTED_STYLE);
+			else
+				f.setLineStyle(PSTricksConstants.LINE_DASHED_STYLE);
+	}
+	
+	
+	
+	public static void setThickness(SVGElement elt, float thickness, boolean hasDoubleBorders, double doubleSep)
+	{
+		if(elt==null)
+			return ;
+		
+		elt.setStrokeWidth(hasDoubleBorders ? thickness*2. + doubleSep : thickness);
+	}
+	
+	
+	
+	public static void setDashedDotted(Element elt, float blackDash, float whiteDash, float dotSep, String lineStyle, 
+										boolean hasDoubleBorders, float thickness, double doubleSep)
+	{
+		if(elt==null)
+			return ;
+		
+        if(lineStyle.equals(PSTricksConstants.LINE_DASHED_STYLE))
+        	elt.setAttribute(SVGAttributes.SVG_STROKE_DASHARRAY, blackDash + ", " + whiteDash);//$NON-NLS-1$
+        else 
+        	if(lineStyle.equals(PSTricksConstants.LINE_DOTTED_STYLE))
+	        {
+        		elt.setAttribute(SVGAttributes.SVG_STROKE_LINECAP, SVGAttributes.SVG_LINECAP_VALUE_ROUND);
+        		elt.setAttribute(SVGAttributes.SVG_STROKE_DASHARRAY, 1 + ", " + 
+        						(dotSep + (hasDoubleBorders ? thickness*2f + doubleSep : thickness)));//$NON-NLS-1$
+	        }
+	}
+
+	
+	
+	
+	/**
+	 * If a figure can move its border, we have to compute the difference between the PSTricks shape and the SVG shape.
+	 * @return The gap computed with the border position, the thickness and the double boundary. Or NaN if the shape cannot move
+	 * its border.
+	 * @since 2.0.0
+	 */
+	protected double getPositionGap()
+	{
+		double gap;
+		
+        if(!shape.isBordersMovable() || shape.getBordersPosition().equals(PSTricksConstants.BORDERS_MIDDLE))
+        	gap = 0;
+        else 
+        	if(shape.getBordersPosition().equals(PSTricksConstants.BORDERS_INSIDE))
+        		gap = -shape.getThickness() - (shape.hasDoubleBoundary() ? (float)shape.getDoubleSep()/2f + shape.getThickness() : 0) ;
+        	else
+        		gap = shape.getThickness() + (shape.hasDoubleBoundary() ? (float)shape.getDoubleSep()/2f + shape.getThickness() : 0);
+        
+        return gap;
+	}
+	
+	
+	
+	/**
+	 * Creates a line with the style of the 'show points' option.
+	 * @param doc The document owner.
+	 * @param thickness The thickness of the line to create.
+	 * @param col The colour of the line.
+	 * @param p1 The first point of the line.
+	 * @param p2 The second point of the line.
+	 * @param blackDash The black dash interval.
+	 * @param whiteDash The white dash interval.
+	 * @param hasDble Defines if the shape had double borders.
+	 * @param dotSep The dot interval.
+	 * @return The created SVG line or null.
+	 * @since 2.0.0
+	 */
+	protected static SVGLineElement getShowPointsLine(SVGDocument doc, float thickness, Color col, 
+									LaTeXDrawPoint2D p1, LaTeXDrawPoint2D p2, float blackDash, float whiteDash, 
+									boolean hasDble, float dotSep, double doubleSep)
+	{
+		if(doc==null)
+			return null;
+		
+		SVGLineElement line = new SVGLineElement(doc);
+		
+		if(p1!=null)
+		{
+			line.setX1(p1.x);
+			line.setY1(p1.y);
+		}
+		
+		if(p2!=null)
+		{
+			line.setX2(p2.x);
+			line.setY2(p2.y);
+		}
+		
+		line.setStrokeWidth(thickness);
+		line.setStroke(col);
+		LShapeSVGGenerator.setDashedDotted(line, blackDash, whiteDash, dotSep, 
+							PSTricksConstants.LINE_DASHED_STYLE, hasDble, thickness, doubleSep);
+		
+		return line;
+	}
+	
+	
+	
+	/**
+	 * Creates an SVG circle that represents a dot for the option 'show points'.
+	 * @param doc The document owner.
+	 * @param rad The radius of the circle.
+	 * @param pt The position of the point.
+	 * @param col The colour of the dot.
+	 * @return The created dot or null.
+	 * @since 2.0.0
+	 */
+	protected static SVGCircleElement getShowPointsDot(SVGDocument doc, double rad, LaTeXDrawPoint2D pt, Color col)
+	{
+		if(doc==null)
+			return null;
+		
+		SVGCircleElement circle = new SVGCircleElement(doc);
+		
+		circle.setR(rad);
+		
+		if(pt!=null)
+		{
+			circle.setCx(pt.x);
+			circle.setCy(pt.y);
+		}
+		
+		circle.setFill(col);
+		
+		return circle;
+	}
+	
+	
+	/**
+	 * When a shape has a shadow and is filled, the background of its borders must be filled with the
+	 * colour of the interior of the shape. This method does not test if it must be done, it sets a
+	 * SVG element which carries out that.
+	 * @param elt The element that will be set to define the background of the borders.
+	 * @param root The root element to which 'elt' will be appended.
+	 * @since 2.0.0
+	 */
+	protected void setSVGBorderBackground(SVGElement elt, SVGElement root)
+	{
+		if(elt==null || root==null)
+			return ;
+		
+		elt.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_BG);
+        elt.setFill(shape.getInteriorColor());
+        elt.setStroke(shape.getInteriorColor());
+        setThickness(elt, shape.getThickness(), shape.hasDoubleBoundary(), shape.getDoubleSep());
+        root.appendChild(elt);
+	}
+
+	
+	
+	/**
+	 * @return the shape.
+	 * @since 2.0.0
+	 */
+	public Figure getShape()
+	{
+		return shape;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LSquareSVGGenerator.java b/current/latexDraw/generators/svg/LSquareSVGGenerator.java
new file mode 100644
index 0000000..97426c0
--- /dev/null
+++ b/current/latexDraw/generators/svg/LSquareSVGGenerator.java
@@ -0,0 +1,104 @@
+package latexDraw.generators.svg;
+
+import static java.lang.Math.min;
+
+import java.awt.geom.RectangularShape;
+
+import latexDraw.figures.Square;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.parsers.svg.elements.SVGRectElement;
+import latexDraw.util.LaTeXDrawNamespace;
+
+/**
+ * Defines a SVG generator for a square.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LSquareSVGGenerator extends LRectangleSVGGenerator
+{
+
+	public LSquareSVGGenerator(Square f)
+	{
+		super(f);
+	}
+	
+	
+	
+	public LSquareSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a square from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LSquareSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Square(false));
+
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		Square s = (Square)getShape();
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGRectElement))
+			throw new IllegalArgumentException();
+		
+		SVGRectElement main = (SVGRectElement)elt2;
+		double gap = getPositionGap()/2.;
+		double rx = main.getRx();
+		
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		
+		s.getPoint(0).setLocation(main.getX()+gap, main.getY()+gap);
+		s.getPoint(1).setLocation(main.getX()+main.getWidth()-gap, main.getY()+gap);
+		s.getPoint(2).setLocation(main.getX()+gap, main.getY()+main.getHeight()-gap);
+		s.getPoint(3).setLocation(main.getX()+main.getWidth()-gap, main.getY()+main.getHeight()-gap);
+		s.setWidth(main.getWidth());
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		if(rx>0)
+			s.setIsRound(true);
+		
+		RectangularShape r = (RectangularShape)s.getShape();
+		s.setFrameArc((2*rx)/(min(r.getHeight(), r.getWidth())- (s.hasDoubleBoundary() ? s.getDoubleSep()+s.getThickness() : 0)));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+
+
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null)
+			return null;
+		
+		SVGElement root = super.toSVG(doc);
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_SQUARE);
+		
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LTextSVGGenerator.java b/current/latexDraw/generators/svg/LTextSVGGenerator.java
new file mode 100644
index 0000000..426d00f
--- /dev/null
+++ b/current/latexDraw/generators/svg/LTextSVGGenerator.java
@@ -0,0 +1,263 @@
+package latexDraw.generators.svg;
+
+import java.awt.geom.Point2D;
+import java.text.ParseException;
+import java.util.Vector;
+
+import latexDraw.figures.DrawBorders;
+import latexDraw.figures.Figure;
+import latexDraw.figures.FramedBox;
+import latexDraw.figures.Text;
+import latexDraw.parsers.latexdraw.LPSTParser;
+import latexDraw.parsers.svg.CSSColors;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.parsers.svg.elements.SVGTextElement;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * Defines a SVG generator for a text.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LTextSVGGenerator extends LShapeSVGGenerator
+{
+
+	public LTextSVGGenerator(Text f)
+	{
+		super(f);
+	}
+
+	
+	
+	/**
+	 * Creates a text from an SVG text element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LTextSVGGenerator(SVGTextElement elt)
+	{
+		this(new Text(null, false));
+		
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		Text t = (Text)getShape();
+		
+		t.setText(elt.getText());
+		t.setPosition(new LaTeXDrawPoint2D(elt.getX(), elt.getY()));
+		setTextAttributes(elt);
+		applyTransformations(elt);
+	}
+	
+	
+	
+	public LTextSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a text from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LTextSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Text(null, false));
+
+		if(elt==null)
+			throw new IllegalArgumentException();
+		
+		double x, y = 0;
+		String v;
+		NodeList nl;
+		String fontFam = elt.getAttribute(SVGAttributes.SVG_FONT_FAMILY);
+		int fontSize; 
+		Text t;
+		
+		try { fontSize = Double.valueOf(elt.getAttribute(SVGAttributes.SVG_FONT_SIZE)).intValue(); }
+		catch(NumberFormatException e) { fontSize = Text.DEFAULT_SIZE.getSize(); }
+		
+		setNumber(elt);
+		setTextAttributes(elt);
+		v = elt.getAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI+':'+SVGAttributes.SVG_X);
+		x = v==null ? Double.MAX_VALUE : Double.valueOf(v).doubleValue();
+		
+		nl = elt.getElementsByTagNameNS(SVGDocument.SVG_NAMESPACE, SVGElements.SVG_TEXT);
+		
+		if(nl.getLength()>0)
+		{
+			SVGTextElement text = (SVGTextElement)nl.item(0);
+			LPSTParser parser   = new LPSTParser("\\put(0,0){" + text.getText() + "}");
+			Vector<Figure> shapes;
+			
+			try{ parser.parseFramedBox(); }
+			catch(Exception e) {e.printStackTrace(); }
+			shapes = parser.getShapes();
+			
+			if(shapes==null || shapes.isEmpty() || !(shapes.firstElement() instanceof Text))
+				throw new IllegalArgumentException();
+			
+			t = (Text)shapes.firstElement();
+			y = text.getY();
+			x = text.getX()<x ? text.getX() : x;
+			t.setPosition(new LaTeXDrawPoint2D(x, y));
+			
+			shape = t;
+		}
+		else
+			throw new IllegalArgumentException();
+
+		if(t.hasSimpleFramedBox())
+		{
+			FramedBox fb  = t.getSimpleBox();
+			Figure figure = fb.getBox();
+			
+			if(((float)fb.getFrameSep())==0f && figure.getLinesColor().equals(figure.getInteriorColor()) &&
+					figure.isFilled() && fb.getBoxType()==FramedBox.BOX_RECTANGLE)
+			{
+				t.setOpacityColor(figure.getLinesColor());
+				t.removeAllBoxes();
+				t.setOpaque(true);
+				
+			}
+		}
+		
+		t = (Text)shape;
+		t.setSize(fontSize);
+		t.setTextFont(fontFam);
+		t.setIsBold(SVGAttributes.SVG_FONT_WEIGHT_BOLD.equals(elt.getAttribute(SVGAttributes.SVG_FONT_WEIGHT)));
+		t.setIsItalic(SVGAttributes.SVG_FONT_STYLE_ITALIC.equals(elt.getAttribute(SVGAttributes.SVG_FONT_STYLE)));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+	
+	
+	/**
+	 * Sets the text attribute (is italic, font family,...) from the given SVG element.
+	 * @param e The source SVG element.
+	 * @since 2.0.0
+	 */
+	public void setTextAttributes(SVGElement e)
+	{
+		if(e==null)
+			return ;
+		
+		Text t = (Text)getShape();
+		String svgPref = e.getUsablePrefix(SVGDocument.SVG_NAMESPACE);
+		String v;
+		
+		t.setTextFontByFamily(e.getAttribute(svgPref+SVGAttributes.SVG_FONT_FAMILY));
+		t.setLinesColor(CSSColors.getRGBColour(e.getAttribute(svgPref+SVGAttributes.SVG_FILL)));
+		
+		v = e.getAttribute(svgPref+SVGAttributes.SVG_FONT_SIZE);
+		
+		if(v!=null)
+			try 
+			{ t.setSize((int)new SVGLengthParser(v).parseLength().getValue()); }
+			catch(ParseException ex) { /* */ }
+		
+		v = e.getAttribute(svgPref+SVGAttributes.SVG_FONT_STYLE);
+		t.setIsItalic(v==null || !v.equals(SVGAttributes.SVG_FONT_STYLE_ITALIC) ? false : true);
+		
+		v = e.getAttribute(svgPref+SVGAttributes.SVG_FONT_WEIGHT);
+		t.setIsBold(v==null || !v.equals(SVGAttributes.SVG_FONT_WEIGHT_BOLD) ? false : true);
+	}
+	
+	
+	
+	
+	/**
+	 * Creates an SVGTextElement from the given part of text.
+	 * @param txt The text to convert in SVG.
+	 * @param doc The document to create the text element.
+	 * @param position The position of the text.
+	 * @return The SVG text element or null if a parameter is null.
+	 * @since 2.0.0
+	 */
+	public SVGTextElement getSVGTextElement(String txt, SVGDocument doc, Point2D position)
+	{
+		if(txt==null || position==null || doc==null)
+			return null;
+		
+		SVGTextElement textElt = new SVGTextElement(doc);
+		
+		textElt.setAttribute(SVGAttributes.SVG_X, String.valueOf(position.getX()));
+		textElt.setAttribute(SVGAttributes.SVG_Y, String.valueOf(position.getY()));
+		textElt.appendChild(doc.createCDATASection(txt));
+		
+		return textElt;
+	}
+	
+	
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc == null)
+			return null;
+
+		SVGElement root = new SVGGElement(doc);
+		Text t = (Text)getShape();
+		String ltdPref = LaTeXDrawNamespace.LATEXDRAW_NAMESPACE + ':';
+		
+		root.setAttribute(ltdPref + LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_TEXT);
+		root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+		root.setAttribute(SVGAttributes.SVG_FONT_FAMILY, String.valueOf(t.getCurrentFont().getFamily()));
+		root.setAttribute(SVGAttributes.SVG_FILL, CSSColors.getColorName(t.getLinesColor(), true));
+		root.setAttribute(SVGAttributes.SVG_FONT_SIZE, String.valueOf(t.getCurrentFont().getSize()));
+		root.setAttribute(ltdPref + SVGAttributes.SVG_X, String.valueOf(t.getPosition().x));
+		
+		if(t.isItalic())
+			root.setAttribute(SVGAttributes.SVG_FONT_STYLE, SVGAttributes.SVG_FONT_STYLE_ITALIC);
+		
+		if(t.isBold())
+			root.setAttribute(SVGAttributes.SVG_FONT_WEIGHT, SVGAttributes.SVG_FONT_WEIGHT_BOLD);
+		
+		Element txt = new SVGTextElement(doc);
+		String str  = t.getCodePSTricksBody(new DrawBorders(false), Figure.PPC);
+		String cols = DviPsColors.getUserColoursCode(str);
+		
+		if(cols!=null)
+			cols = cols.replace(System.getProperty("line.separator"), "");
+		
+		txt.setAttribute(SVGAttributes.SVG_X, String.valueOf(t.getPosition().x));
+		txt.setAttribute(SVGAttributes.SVG_Y, String.valueOf(t.getPosition().y));
+		txt.appendChild(doc.createCDATASection(cols+str)); 
+		root.appendChild(txt);
+		
+		setSVGRotationAttribute(root);
+		
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/LTriangleSVGGenerator.java b/current/latexDraw/generators/svg/LTriangleSVGGenerator.java
new file mode 100644
index 0000000..057cacf
--- /dev/null
+++ b/current/latexDraw/generators/svg/LTriangleSVGGenerator.java
@@ -0,0 +1,165 @@
+package latexDraw.generators.svg;
+
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.figures.Triangle;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+import latexDraw.parsers.svg.elements.SVGGElement;
+import latexDraw.parsers.svg.elements.SVGPolygonElement;
+import latexDraw.parsers.svg.parsers.SVGPointsParser;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines an SVG generator for a triangle.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LTriangleSVGGenerator extends LPolygonSVGGenerator
+{
+
+	public LTriangleSVGGenerator(Triangle f)
+	{
+		super(f);
+	}
+
+	
+	
+	
+	public LTriangleSVGGenerator(SVGGElement elt)
+	{
+		this(elt, true);
+	}
+	
+	
+	
+	/**
+	 * Creates a triangle from a latexdraw-SVG element.
+	 * @param elt The source element.
+	 * @since 2.0.0
+	 */
+	public LTriangleSVGGenerator(SVGGElement elt, boolean withTransformation)
+	{
+		this(new Triangle(false));
+
+		setNumber(elt);
+		SVGElement elt2 = getLaTeXDrawElement(elt, null);
+		Triangle t = (Triangle)getShape();
+		
+		if(elt==null || elt2==null || !(elt2 instanceof SVGPolygonElement))
+			throw new IllegalArgumentException();
+		
+		SVGPolygonElement main = (SVGPolygonElement)elt2;
+		setSVGLatexdrawParameters(elt);
+		setSVGParameters(main);
+		
+		Vector<Point2D> ptsPol = SVGPointsParser.getPoints(elt.getAttribute(
+								 elt.getUsablePrefix(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI)+LaTeXDrawNamespace.XML_POINTS));
+		
+		if(ptsPol==null || ptsPol.size()!=LaTeXDrawRectangle.NB_POINTS_FRAME)
+			throw new IllegalArgumentException();
+		
+		t.getPoint(0).setLocation(ptsPol.elementAt(0));
+		t.getPoint(1).setLocation(ptsPol.elementAt(1));
+		t.getPoint(2).setLocation(ptsPol.elementAt(2));
+		t.getPoint(3).setLocation(ptsPol.elementAt(3));
+		
+		t.updateShape();
+		t.getBorders().updateNSEWDelimitors();
+		
+		setSVGShadowParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_SHADOW));
+		setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LaTeXDrawNamespace.XML_TYPE_DBLE_BORDERS));
+		
+		if(withTransformation)
+			applyTransformations(elt);
+	}
+	
+	
+	
+	
+	@Override
+	public SVGElement toSVG(SVGDocument doc)
+	{
+		if(doc==null || doc.getFirstChild().getDefs()==null)
+			return null;
+		
+		Triangle t = (Triangle)getShape();
+		SVGElement root = new SVGGElement(doc), elt;
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_TYPE, LaTeXDrawNamespace.XML_TYPE_TRIANGLE);
+		root.setAttribute(SVGAttributes.SVG_ID, getSVGID());
+	    double gap = getPositionGap()/2.;
+	    LaTeXDrawPoint2D pt1 = t.getPoint(0), pt2 = t.getPoint(-1);
+		LaTeXDrawPoint2D p1 = new LaTeXDrawPoint2D((pt1.x+pt2.x)/2., pt1.y);
+		LaTeXDrawPoint2D p2 = new LaTeXDrawPoint2D(pt2.x, pt2.y);
+		LaTeXDrawPoint2D p3 = new LaTeXDrawPoint2D(pt1.x, pt2.y);
+	    double cornerGap1 = Figure.getCornerGap(new LaTeXDrawPoint2D(p1.x, p2.y), p1, p2, gap);
+	    double cornerGap2 = Figure.getCornerGap(t.getGravityCenter(), p2, p3, gap);
+	   
+	    if(p2.x>p3.x)
+	    	cornerGap2*=-1;
+	    
+	    if(p1.y>p2.y)
+	    	cornerGap1*=-1;
+	    
+		String points = (float)p1.x + "," + (float)(p1.y - cornerGap1) + " " + //$NON-NLS-1$//$NON-NLS-2$
+						(float)(p2.x - cornerGap2) + "," + (float)(p2.y + (p1.y<p2.y ? gap : -gap)) + " " + //$NON-NLS-1$//$NON-NLS-2$
+						(float)(p3.x + cornerGap2) + "," + (float)(p2.y + (p1.y<p2.y ? gap : -gap));//$NON-NLS-1$
+	    String ltdPoints = pt1.x + " " + pt1.y + " " + t.getPoint(1).x + " " + t.getPoint(1).y +//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+	    					" " + t.getPoint(2).x + " " + t.getPoint(2).y + " " + pt2.x + " " + pt2.y;//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+		
+		if(t.hasShadow())
+		{
+			SVGElement shad = new SVGPolygonElement(doc);
+	    	
+	   		shad.setAttribute(SVGAttributes.SVG_POINTS, points);
+	   		setSVGShadowAttributes(shad, true);
+	   		root.appendChild(shad);
+		}
+		
+        if(shape.hasShadow() && !shape.getLineStyle().equals(PSTricksConstants.LINE_NONE_STYLE))
+        {// The background of the borders must be filled is there is a shadow.
+    		elt = new SVGPolygonElement(doc);
+    		elt.setAttribute(SVGAttributes.SVG_POINTS, points);
+    		setSVGBorderBackground(elt, root);
+        }
+        
+		elt = new SVGPolygonElement(doc);
+		elt.setAttribute(SVGAttributes.SVG_POINTS, points);
+		root.appendChild(elt);
+		root.setAttribute(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_POINTS, ltdPoints);
+		
+		if(t.hasDoubleBoundary())
+		{
+			SVGElement dblBord = new SVGPolygonElement(doc);
+			
+			dblBord.setAttribute(SVGAttributes.SVG_POINTS, points);
+			setSVGDoubleBordersAttributes(dblBord);
+			root.appendChild(dblBord);
+		}
+		
+		setSVGAttributes(doc, elt, true);
+		setSVGRotationAttribute(root);
+		
+		return root;
+	}
+}
diff --git a/current/latexDraw/generators/svg/SVGDocumentGenerator.java b/current/latexDraw/generators/svg/SVGDocumentGenerator.java
new file mode 100644
index 0000000..49f7047
--- /dev/null
+++ b/current/latexDraw/generators/svg/SVGDocumentGenerator.java
@@ -0,0 +1,175 @@
+package latexDraw.generators.svg;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Vector;
+
+import javax.swing.JProgressBar;
+import javax.swing.SwingUtilities;
+
+import latexDraw.figures.Draw;
+import latexDraw.figures.Figure;
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.*;
+import latexDraw.ui.DrawContainer;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.util.LaTeXDrawNamespace;
+
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+
+/**
+ * Defines a generator that creates SVG documents from drawings.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGDocumentGenerator
+{	
+	public static Draw toLatexdraw(File file, LaTeXDrawFrame frame, final JProgressBar progressBar) throws MalformedSVGDocument
+	{
+		if(file==null || !file.canRead())
+			return null;
+		
+		Draw drawing;
+		Figure f;
+		
+		SVGDocument svgDoc = new SVGDocument(file.toURI());
+		
+		if(progressBar!=null)
+			try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { progressBar.setValue(20); } }); }
+			catch(InterruptedException e) 		{ e.printStackTrace(); }
+			catch(InvocationTargetException e) 	{ e.printStackTrace(); }
+		
+		f = svgDoc.toLaTeXDraw(progressBar);
+		
+		if(f==null)
+			return null;
+		
+		if(f instanceof Draw)
+			drawing = (Draw)f;
+		else
+		{
+			drawing = new Draw(false, false);
+			drawing.addFigure(f);
+		}
+
+		if(frame!=null)
+			frame.getDrawPanel().getDraw().setXMLMetadata(svgDoc.getDocumentElement().getMeta());
+		
+		return drawing;
+	}
+	
+	
+	
+	public static SVGDocument toSVG(Draw drawing)
+	{
+		if(drawing==null)
+			return null;
+		
+		SVGDocument doc 		= new SVGDocument();
+		SVGSVGElement root 		= doc.getFirstChild();
+		SVGGElement g 			= new SVGGElement(doc);
+		SVGDefsElement defs		= new SVGDefsElement(doc);
+		Vector<Figure> figures  = drawing.getFigures();
+		
+		root.appendChild(defs);
+		root.appendChild(g);
+		root.setAttribute("xmlns:"+LaTeXDrawNamespace.LATEXDRAW_NAMESPACE, LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI);//$NON-NLS-1$
+		
+        for(Figure f : figures)
+        	if(f!=null)
+	        {
+        		SVGElement elt = SVGShapesFactory.createSVGElement(f, doc);
+	        	
+	        	if(elt!=null)
+	        		g.appendChild(elt);
+	        }
+        
+        return doc;
+	}
+	
+	
+	
+	
+	public static SVGDocument toSVG(DrawContainer drawing)
+	{
+		if(drawing==null)
+			return null;
+        
+		SVGDocument doc			= toSVG(new Draw(drawing.getFigures(), false, false, true));
+		SVGSVGElement root 		= doc.getFirstChild();
+		SVGMetadataElement meta = new SVGMetadataElement(doc);
+		SVGElement	metaLTD		= (SVGElement)doc.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+SVGElements.SVG_METADATA);
+		
+		meta.appendChild(metaLTD);
+		root.appendChild(meta);
+
+		drawing.getXMLMetadata(doc, metaLTD);
+		drawing.getParentPanel().getXMLMetadata(doc, metaLTD);
+		drawing.getParentPanel().getCodePanel().getXMLMetadata(doc, metaLTD);
+		drawing.getParentPanel().getFrameParent().getXMLMetadata(doc, metaLTD);
+		
+		root.setAttribute(SVGAttributes.SVG_VERSION, "1.1");//$NON-NLS-1$
+		root.setAttribute(SVGAttributes.SVG_BASE_PROFILE, "full");//$NON-NLS-1$
+        
+		return doc;
+	}
+	
+	
+	
+	public static void saveSVGDocument(String path, SVGDocument doc) throws IOException
+	{
+		if(doc==null || path==null)
+			return ;
+		
+		FileOutputStream fos = new FileOutputStream(path);
+        OutputFormat of;
+        XMLSerializer xmls;
+        
+        of = new OutputFormat(doc);
+        of.setIndenting(true);
+        xmls = new XMLSerializer(fos, of);
+        xmls.serialize(doc.getDocumentElement());
+		fos.close();
+	}
+	
+	
+	
+	public static void exportAsSVG(String path, Draw drawing) throws IOException
+	{
+		saveSVGDocument(path, SVGDocumentGenerator.toSVG(drawing));
+	}
+	
+	
+	
+	
+	/**
+	 * Exports the drawing in SVG.
+	 * @param path The path of the file.
+	 * @throws IOException 
+	 * @since 2.0.0
+	 */
+	public static void exportAsSVG(String path, DrawContainer drawing) throws IOException
+	{
+		saveSVGDocument(path, SVGDocumentGenerator.toSVG(drawing));
+	}
+}
diff --git a/current/latexDraw/generators/svg/SVGShapesFactory.java b/current/latexDraw/generators/svg/SVGShapesFactory.java
new file mode 100644
index 0000000..556cc7f
--- /dev/null
+++ b/current/latexDraw/generators/svg/SVGShapesFactory.java
@@ -0,0 +1,76 @@
+package latexDraw.generators.svg;
+
+import latexDraw.figures.*;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.elements.SVGElement;
+
+/**
+ * Creates SVG elements based on latexdraw.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/21/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGShapesFactory
+{
+	public static SVGElement createSVGElement(Figure f, SVGDocument doc)
+	{
+		SVGElement elt = null;
+		
+		if(f!=null && doc!=null)
+			try
+			{
+				if(f instanceof Square)
+					elt = new LSquareSVGGenerator((Square)f).toSVG(doc);
+				else if(f instanceof LaTeXDrawRectangle)
+					elt = new LRectangleSVGGenerator((LaTeXDrawRectangle)f).toSVG(doc);
+				else if(f instanceof Line)
+					elt = new LLineSVGGenerator((Line)f).toSVG(doc);
+				else if(f instanceof BezierCurve)
+					elt = new LBezierCurveSVGGenerator((BezierCurve)f).toSVG(doc);
+				else if(f instanceof Grid)
+					elt = new LGridSVGGenerator((Grid)f).toSVG(doc);
+				else if(f instanceof Axe)
+					elt = new LAxeSVGGenerator((Axe)f).toSVG(doc);
+				else if(f instanceof Rhombus)
+					elt = new LRhombusSVGGenerator((Rhombus)f).toSVG(doc);
+				else if(f instanceof Triangle)
+					elt = new LTriangleSVGGenerator((Triangle)f).toSVG(doc);
+				else if(f instanceof JoinedLines)
+					elt = new LLinesSVGGenerator((JoinedLines)f).toSVG(doc);
+				else if(f instanceof Dot)
+					elt = new LDotSVGGenerator((Dot)f).toSVG(doc);
+				else if(f instanceof AkinPoints)
+					elt = new LFreeHandSVGGenerator((AkinPoints)f).toSVG(doc);
+				else if(f instanceof Arc)
+					elt = new LArcSVGGenerator((Arc)f).toSVG(doc);
+				else if(f instanceof Circle)
+					elt = new LCircleSVGGenerator((Circle)f).toSVG(doc);
+				else if(f instanceof Ellipse)
+					elt = new LEllipseSVGGenerator((Ellipse)f).toSVG(doc);
+				else if(f instanceof Draw)
+					elt = new LDrawingSVGGenerator((Draw)f).toSVG(doc);
+				else if(f instanceof Picture)
+					elt = new LPictureSVGGenerator((Picture)f).toSVG(doc);
+				else if(f instanceof Text)
+					elt = new LTextSVGGenerator((Text)f).toSVG(doc);
+				else if(f instanceof LaTeXDrawPolygon)
+					elt = new LPolygonSVGGenerator((LaTeXDrawPolygon)f).toSVG(doc);
+			}
+			catch(Exception e) { e.printStackTrace(); }
+			
+		return elt;
+	}
+}
diff --git a/current/latexDraw/installer/InstallerUI.java b/current/latexDraw/installer/InstallerUI.java
new file mode 100644
index 0000000..8da21ca
--- /dev/null
+++ b/current/latexDraw/installer/InstallerUI.java
@@ -0,0 +1,773 @@
+package latexDraw.installer;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Toolkit;
+import java.io.*;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+
+import latexDraw.ui.listeners.InstallerListener;
+import latexDraw.util.LaTeXDrawPath;
+
+/** 
+ * This class defines the LaTeXDraw installer.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 05/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public final class InstallerUI extends JFrame implements Runnable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The name of the os. */
+	protected String os;
+
+	/** The listener of the installer. */
+	protected transient InstallerListener listener;
+	
+	/** The current position of the slide of the installer. */
+	protected int slidePosition;
+	
+	/** The first slide. */
+	protected JPanel panel1;
+	
+	/** The second slide. */
+	protected JPanel panel2;
+	
+	/** The third slide. */
+	protected JPanel panel3;
+	
+	/** The button "previous". */
+	protected JButton previousB;
+	
+	/** The button "next". */
+	protected JButton nextB;
+	
+	/** The field that defines the path where we have to install LaTeXDraw. */
+	protected JTextField pathInstall;
+	
+	/** The progress bar of the installation. */
+	protected JProgressBar progressBar;
+	
+	/** Used to stop the thread of the installation. */
+	protected boolean continueInstall;
+	
+	/** The thread that installs LaTeXDraw. */
+	protected transient Thread installThread;
+
+	/** The label that can appear during the installation. */
+	protected JLabel labelProgress;
+	
+	/** The path where the jar file is placed. */
+	protected String pathJar;
+	
+	/** The maximum number of slides. */
+	public static final int MAX_PANEL = 3;
+	
+	public static final String ACTION_NEXT = "next";//$NON-NLS-1$
+	
+	public static final String ACTION_PREVIOUS = "previous";//$NON-NLS-1$
+	
+	public static final String ACTION_CANCEL = "cancel";//$NON-NLS-1$
+	
+	public static final String ACTION_TERMINATE = "terminate";//$NON-NLS-1$
+	
+	public static final String LABEL_NEXT = "Next";
+	
+	public static final String LABEL_TERMINATE = "Terminate";
+	
+	public static final String ACTION_CHOOSE_FOLDER = "choose";//$NON-NLS-1$
+	
+	/** The dimension of a slide. */
+	public static final Dimension PANEL_SIZE = new Dimension(650, 350);
+	
+	public static final String NAME_TEMPLATES_DIR = "templates";//$NON-NLS-1$
+	
+	public static final String NAME_CACHE_TEMPLATES_DIR = ".cache";//$NON-NLS-1$
+	
+	public static final String DATA_DIR = "data";//$NON-NLS-1$
+	
+	
+	/**
+	 * The main function: it creates an installer and launch it.
+	 * @param argc Useless.
+	 * @since 1.9.2
+	 */
+	public static void main(String argc[])
+	{
+		InstallerUI installer  = new InstallerUI();
+		
+		installer.launch();
+	}
+	
+	
+	/**
+	 * The default constructor.
+	 */
+	public InstallerUI()
+	{
+		super("LaTeXDraw installer");
+		
+		pathJar = LaTeXDrawPath.getPathJar();
+		os = System.getProperty("os.name");//$NON-NLS-1$
+		listener = new InstallerListener(this);
+		slidePosition = 1;
+		
+		if(os.toLowerCase().equals("linux") && System.getProperty("java.version").toLowerCase().compareTo("1.6")>=0)//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+			try
+			{ UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); }//$NON-NLS-1$
+			catch(Exception e) { /* Dommage ;) */ }
+		
+		if(os.toLowerCase().contains("win")) //$NON-NLS-1$
+			try
+			{ UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); }//$NON-NLS-1$
+			catch(Exception e) { /* Dommage ;) */ }
+			
+		setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getClassLoader().getResource("res/LaTeXDrawIcon.png")));//$NON-NLS-1$
+		setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
+		createStartPanel();
+		
+		getContentPane().setLayout(new BorderLayout());
+		getContentPane().add(createHeaderPanel(), BorderLayout.NORTH);
+		getContentPane().add(panel1, BorderLayout.CENTER);
+		getContentPane().add(createControlButtonsPanel(), BorderLayout.SOUTH);
+		
+		previousB.setEnabled(false);
+		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+		pack();
+		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+		setVisible(false);
+	}
+	
+	
+	/**
+	 * Creates the first slide.
+	 * @since 1.9.2
+	 */
+	protected final void createStartPanel()
+	{
+		panel1 = new JPanel();
+		String plus;
+		
+		if(os.toLowerCase().contains("vista"))//$NON-NLS-1$
+			plus = "</li><br><li>Be careful with Vista! Files\".<br>You must have launched this installer via the script install_vista.vbs.";
+		else
+			plus = "";//$NON-NLS-1$
+		
+		panel1.add(new JLabel("<html><br><br><br><ul><li>"+"This installer will, create the necessary directories, place the templates in your profile<br>and place the latexdraw files in the chosen directory."+//$NON-NLS-1$
+				"</li><br><li>"+"You must be administrator/root to install LaTeXDraw."+ plus+"</li></ul></html>"), BorderLayout.CENTER);//$NON-NLS-1$//$NON-NLS-3$
+		
+		setPanelDimension(panel1);
+	}
+	
+	
+	
+	/**
+	 * Creates the second slide.
+	 * @since 1.9.2
+	 */
+	protected final void createPanelChoosePath()
+	{
+		JPanel p1 = new JPanel();
+		JPanel p2 = new JPanel();
+		
+		panel2 = new JPanel();
+		
+		panel2.setLayout(new BoxLayout(panel2, BoxLayout.PAGE_AXIS));
+		p1.setLayout(new BoxLayout(p1, BoxLayout.LINE_AXIS));
+		
+		pathInstall = new JTextField();
+		pathInstall.setEditable(false);
+		pathInstall.setPreferredSize(new Dimension(250, 35));
+		pathInstall.setMinimumSize(new Dimension(250, 35));
+		pathInstall.setMaximumSize(new Dimension(250, 35));
+		JButton chooseB = new JButton("Choose folder");
+		chooseB.setName(ACTION_CHOOSE_FOLDER);
+		chooseB.setActionCommand(ACTION_CHOOSE_FOLDER);
+		chooseB.addActionListener(listener);
+		
+		p2.add(new JLabel("Choose the path where the directory LaTeXDraw will be installed:"));
+		p2.add(pathInstall);
+		p2.add(chooseB);
+		
+		p2.setMaximumSize(new Dimension(450, 150));
+		p2.setMinimumSize(new Dimension(450, 150));
+		p2.setPreferredSize(new Dimension(450, 150));
+		p1.setMaximumSize(new Dimension(450, 300));
+		p1.setMinimumSize(new Dimension(450, 300));
+		p1.setPreferredSize(new Dimension(450, 300));
+		p1.add(p2);
+		panel2.add(p1);
+		setPanelDimension(panel2);
+		
+		if(os.equals("Linux"))//$NON-NLS-1$
+			pathInstall.setText("/opt");//$NON-NLS-1$
+		else
+			if(os.toLowerCase().contains("windows"))//$NON-NLS-1$
+			{
+				File dir = new File("C:\\Program Files\\");//$NON-NLS-1$
+				int cpt = 0, max = 10;
+				
+				while(!dir.exists() && cpt<max)
+					dir = new File((char)('C'+cpt++)+":\\Program Files\\");//$NON-NLS-1$
+				
+				pathInstall.setText(dir.exists() ? dir.getPath() : "C:\\");//$NON-NLS-1$
+			}
+	}
+	
+	
+	/**
+	 * Creates the third slide.
+	 * @since 1.9.2
+	 */
+	protected final void createPanelInstall()
+	{
+		JPanel p1 = new JPanel();
+		JPanel p2 = new JPanel();
+		panel3 = new JPanel();
+		
+		panel3.setLayout(new BoxLayout(panel3, BoxLayout.PAGE_AXIS));
+		p1.setLayout(new BoxLayout(p1, BoxLayout.LINE_AXIS));
+		
+		progressBar = new JProgressBar(0, 100);
+		progressBar.setMinimumSize(new Dimension(300, 30));
+		progressBar.setPreferredSize(new Dimension(300, 30));
+		labelProgress = new JLabel();
+		p2.add(progressBar);
+		p2.add(labelProgress);
+		
+		
+		p2.setMaximumSize(new Dimension(350, 150));
+		p2.setMinimumSize(new Dimension(350, 150));
+		p2.setPreferredSize(new Dimension(350, 150));
+		p1.setMaximumSize(new Dimension(350, 300));
+		p1.setMinimumSize(new Dimension(350, 300));
+		p1.setPreferredSize(new Dimension(350, 300));
+		p1.add(p2);
+		panel3.add(p1);
+		
+		nextB.setEnabled(false);
+		previousB.setEnabled(false);
+		
+		setPanelDimension(panel3);
+	}
+	
+	
+	
+	/**
+	 * Set the default dimension of a slide to the given panel.
+	 * @param p The given panel.
+	 * @since 1.9.2
+	 */
+	protected void setPanelDimension(JPanel p)
+	{
+		if(p==null)
+			throw new IllegalArgumentException();
+		
+		p.setPreferredSize(PANEL_SIZE);
+		p.setMinimumSize(PANEL_SIZE);
+		p.setMaximumSize(PANEL_SIZE);
+	}
+	
+	
+	
+	/**
+	 * @return The panel containing the control buttons (next, previous, and so on).
+	 * @since 1.9.2
+	 */
+	protected final JPanel createControlButtonsPanel()
+	{
+		JPanel ctrlPanel = new JPanel();
+		
+		JButton b = new JButton("Cancel");
+		b.setActionCommand(ACTION_CANCEL);
+		b.setName(ACTION_CANCEL);
+		b.addActionListener(listener);
+		
+		ctrlPanel.add(b);
+		
+		previousB = new JButton("Previous");
+		previousB.setActionCommand(ACTION_PREVIOUS);
+		previousB.setName(ACTION_PREVIOUS);
+		previousB.addActionListener(listener);
+		
+		ctrlPanel.add(previousB);
+		
+		nextB = new JButton(LABEL_NEXT);
+		nextB.setActionCommand(ACTION_NEXT);
+		nextB.setName(ACTION_NEXT);
+		nextB.addActionListener(listener);
+		
+		ctrlPanel.add(nextB);
+		
+		ctrlPanel.setBorder(new CompoundBorder(new TitledBorder(null, null, TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+		
+		return ctrlPanel;
+	}
+	
+	
+	
+	/**
+	 * @return The top panel (the banner in fact).
+	 * @since 1.9.2
+	 */
+	protected final JPanel createHeaderPanel()
+	{
+		JPanel header = new JPanel();
+		
+		header.add(new JLabel("<html><div align=\"center\"><font size=\"+1\" color=\"white\">"+"Assistant of installation"+"</font></div></html>"));//$NON-NLS-1$//$NON-NLS-3$
+		header.setBackground(new Color(90, 100, 130));
+		header.setBorder(new CompoundBorder(new TitledBorder(null, null, TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+		
+		return header;
+	}
+	
+	
+	
+	/**
+	 * Launch the installer.
+	 * @since 1.9.2
+	 */
+	public void launch()
+	{
+		setVisible(true);
+	}
+
+
+
+	/**
+	 * Allows to go to the next slide. 
+	 * @since 1.9.2
+	 */
+	public synchronized void incrementSlidePosition()
+	{
+		if(slidePosition<MAX_PANEL)
+		{
+			slidePosition++;
+			
+			switch(slidePosition)
+			{
+				case 2:
+					if(panel2==null)
+						createPanelChoosePath();
+					
+					File f = new File(pathInstall.getText());
+					getContentPane().remove(panel1);
+					getContentPane().add(panel2, BorderLayout.CENTER);
+					previousB.setEnabled(true);
+					nextB.setEnabled(f.exists() && f.isDirectory() && f.canRead());
+					repaint();
+					pack();
+					break;
+					
+				case 3:
+					if(panel3==null)
+						createPanelInstall();
+					
+					getContentPane().remove(panel2);
+					getContentPane().add(panel3, BorderLayout.CENTER);
+					labelProgress.setText("");//$NON-NLS-1$
+					nextB.setText(LABEL_TERMINATE);
+					nextB.setActionCommand(ACTION_TERMINATE);
+					nextB.setName(ACTION_TERMINATE);
+					repaint();
+					pack();
+					
+					installThread = new Thread(this);
+					installThread.start();
+					
+					break;
+			}
+		}
+	}
+	
+	
+	
+	/**
+	 * Allows to go to the previous slide.
+	 * @since 1.9.2
+	 */
+	public synchronized void decrementSlidePosition()
+	{
+		if(slidePosition>1)
+		{
+			slidePosition--;
+			
+			switch(slidePosition)
+			{
+				case 1:
+					getContentPane().remove(panel2);
+					getContentPane().add(panel1, BorderLayout.CENTER);
+					previousB.setEnabled(false);
+					repaint();
+					pack();
+					break;
+					
+				case 2:
+					File f = new File(pathInstall.getText());
+					getContentPane().remove(panel3);
+					getContentPane().add(panel2, BorderLayout.CENTER);
+					nextB.setText(LABEL_NEXT);
+					nextB.setActionCommand(ACTION_NEXT);
+					nextB.setName(ACTION_NEXT);
+					nextB.setEnabled(f.exists() && f.isDirectory() && f.canRead());
+					repaint();
+					pack();
+					break;
+			}
+		}
+	}
+
+
+
+	/**
+	 * @param path the pathInstall to set.
+	 * @since 0.1
+	 */
+	public synchronized void setPathInstall(String path)
+	{
+		pathInstall.setText(path);
+		File f = new File(pathInstall.getText());
+		nextB.setEnabled(f.exists() && f.isDirectory() && f.canRead());
+	}
+
+
+	
+	public void run()
+	{
+		setContinueInstall(true);
+		progressBar.setValue(progressBar.getMinimum());
+
+		LaTeXDrawPath.checkInstallDirectories();
+		LaTeXDrawPath.checkDirectories();
+		progressBar.setValue(progressBar.getValue()+20);
+		boolean okInstall = false;
+		boolean okCopying = true;
+		
+		if(!isContinueInstall())
+			return ;
+
+		try
+		{
+			okCopying = okCopying && copyFiles(pathJar+File.separator+DATA_DIR+File.separator+NAME_TEMPLATES_DIR, LaTeXDrawPath.PATH_TEMPLATES_SHARED, false);
+			okCopying = okCopying && copyFiles(pathJar+File.separator+DATA_DIR+File.separator+NAME_CACHE_TEMPLATES_DIR, LaTeXDrawPath.PATH_CACHE_SHARE_DIR, false);
+			
+			progressBar.setValue(progressBar.getValue()+20);
+			
+			if(!isContinueInstall())
+				return ;
+			
+			if(!isContinueInstall())
+				return ;
+			
+			String path = pathInstall.getText() + File.separator + "latexdraw";//$NON-NLS-1$
+			
+			File mainDir = new File(path);
+			
+			if(mainDir.exists())
+				okCopying = delete(mainDir);
+		
+			okCopying = mainDir.mkdir();
+			
+			okCopying = okCopying && mainDir.exists();
+			okCopying = okCopying && copyFile(pathJar+File.separator+DATA_DIR+File.separator+"LaTeXDraw.jar", path, true);//$NON-NLS-1$
+			okCopying = okCopying && copyFile(pathJar+File.separator+"license.txt", path, true);//$NON-NLS-1$
+			okCopying = okCopying && copyFile(pathJar+File.separator+"release_note.txt", path, true);//$NON-NLS-1$
+			okCopying = okCopying && copyFiles(pathJar+File.separator+DATA_DIR+File.separator+"lib", path+File.separator+"lib", true);//$NON-NLS-1$//$NON-NLS-2$
+			okCopying = okCopying && copyFiles(pathJar+File.separator+DATA_DIR+File.separator+"help", path+File.separator+"help", true);//$NON-NLS-1$//$NON-NLS-2$
+			progressBar.setValue(progressBar.getValue()+30);
+			
+			if(!isContinueInstall())
+				return ;
+			
+			createProgramLauncher();
+			progressBar.setValue(progressBar.getValue()+20);
+			
+			if(!isContinueInstall())
+				return ;
+		
+			okInstall = okCopying;
+			
+		}catch(Exception e) { okInstall = false; }
+		
+		if(okInstall)
+		{
+			progressBar.setValue(progressBar.getMaximum());
+			nextB.setEnabled(true);
+			previousB.setEnabled(true);
+			labelProgress.setText("<html><font color=\"green\">" + "Installation succeeded!" + "<br></font></html>");//$NON-NLS-1$//$NON-NLS-3$
+		}
+		else
+		{
+			getLabelProgress().setText("<html><font color=\"red\">" + "Installation failed!" + "<br>" + //$NON-NLS-1$//$NON-NLS-3$
+									"Launch the installer as administrator." + "</font></html>");//$NON-NLS-2$
+			previousB.setEnabled(true);
+		}
+		
+		setContinueInstall(false);
+	}
+
+	
+	
+	/**
+	 * Creates the program launcher for the OS.
+	 * @return true if the creation succeeded.
+	 * @since 1.9.2
+	 */
+	private final boolean createProgramLauncher()
+	{
+		try
+		{
+			if(os.toLowerCase().equals("linux"))//$NON-NLS-1$
+			{
+					File f = new File("/usr/bin/latexdraw");//$NON-NLS-1$
+					
+					if(!f.exists())
+					{
+						FileOutputStream fos = new FileOutputStream(f);
+						Writer osw = new OutputStreamWriter(fos);
+						
+						osw.write("#! /bin/sh\n");//$NON-NLS-1$
+						osw.write("java -jar "+getPathInstall().getText()+File.separator+"latexdraw"+File.separator+"LaTeXDraw.jar $@\n");//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+						osw.close();
+						fos.close();
+						
+						//JAVA6 Use f.setReadable() and f.setExecutable()
+						Runtime.getRuntime().exec("chmod 755 /usr/bin/latexdraw");//$NON-NLS-1$
+					}
+			}
+		
+			return true;
+		}catch(Exception e) { return false; }
+	}
+
+
+
+	/**
+	 * Copy a file.
+	 * @param from The current path of the file to move.
+	 * @param here The directory where we have to move the file.
+	 * @param replace If set to true, the file will replace any file with the same name in "here".
+	 * @return True if the move succeeded
+	 * @throws FileNotFoundException If "from" is invalid.
+	 * @throws NullPointerException If you are not lucky.
+	 * @since 1.9.2
+	 */
+	private final boolean copyFile(String from, String here, boolean replace) throws FileNotFoundException, NullPointerException
+	{
+		File source = new File(from);
+		
+		if(!source.exists() || !source.canRead())
+			throw new FileNotFoundException();
+		
+		File dest = new File(here + File.separator + source.getName());
+		
+		if(dest.exists() && replace)
+			delete(dest);
+			
+		if(!dest.exists())
+			if(source.isDirectory())
+				copyFiles(from, here, replace);
+			else
+				return copy(source, dest);
+		
+		return true;
+	}
+	
+	
+	
+	/**
+	 * Copy a file into another.
+	 * @param source The source file.
+	 * @param destination The output file.
+	 * @return True if no problem occurred.
+	 * @exception IllegalArgumentException If source or destination is null.
+	 */
+	private final static boolean copy(File source, File destination)
+	{
+		if(destination==null || source==null)
+			throw new IllegalArgumentException();
+		
+		if(!source.canRead())
+			return false;
+			
+        FileInputStream sourceFile;
+        FileOutputStream destinationFile;
+	        
+	    try 
+	    {
+	    	destination.createNewFile();
+            sourceFile = new java.io.FileInputStream(source);
+            destinationFile = new java.io.FileOutputStream(destination);
+            byte buffer[]=new byte[512*1024];
+            int nbLecture;
+	                
+            while( (nbLecture = sourceFile.read(buffer)) != -1 )
+                destinationFile.write(buffer, 0, nbLecture);
+	                
+            sourceFile.close();
+            destinationFile.close();
+            
+            return true;
+        } 
+	    catch(Exception e) { return false; }
+	} 
+	
+	
+	/**
+	 * Move a couple of files but never replace an existing file.
+	 * @param from The directory where we have to find the files to move.
+	 * @param into The destination directory.
+	 * @param replace True : the file/directory will be replaced.
+	 * @throws FileNotFoundException If a problem occurred with a source file.
+	 * @throws NullPointerException If you are not lucky.
+	 * @since 1.9.2
+	 */
+	private final boolean copyFiles(String from, String into, boolean replace) throws FileNotFoundException, NullPointerException
+	{
+		File src = new File(from);
+		File here = new File(into);
+		boolean ok = true;
+		
+		if(!src.exists() || !src.isDirectory() || !src.canRead())
+			throw new FileNotFoundException();
+
+		File[] files = src.listFiles();
+		File dest;
+		here.mkdir();
+		
+		for(File file : files)
+		{
+			dest = new File(into + File.separator + file.getName());
+			
+			if(replace)
+				delete(dest);
+			
+			if(!dest.exists())
+				if(file.isFile())
+					ok = copy(file, dest) && ok;
+				else
+				{
+					String path = file.getPath();
+					path = path.substring(path.lastIndexOf(File.separator));
+					ok = copyFiles(file.getPath(), into+path, replace) && ok;
+				}
+		}
+		
+		return ok;
+	}
+	
+	
+	
+	/**
+	 * Add progression to the progress bar.
+	 * @param add The value to add.
+	 * @since 1.9.2
+	 */
+	public synchronized void addProgressBar(int add) 
+	{
+		progressBar.setValue(progressBar.getValue()+add);
+	}
+	
+
+	/**
+	 * @return the continueInstall.
+	 * @since 0.1
+	 */
+	public synchronized boolean isContinueInstall()
+	{
+		return continueInstall;
+	}
+
+
+
+	/**
+	 * @param continueInstall the continueInstall to set.
+	 * @since 0.1
+	 */
+	public synchronized void setContinueInstall(boolean continueInstall)
+	{
+		this.continueInstall = continueInstall;
+	}
+	
+	
+	
+	/**
+	 * remove a file or directory even if it is not empty.
+	 * @param f The file to remove
+	 * @return True if the file/directory was removed.
+	 * @since 1.9.2
+	 */
+	private final static boolean delete(File f)
+	{
+	  boolean status = true;
+
+	  try 
+	  {
+		  File fileCur;
+		  String[] lstFile;
+		  int idxFile;
+	
+		  lstFile = f.list();
+	
+		  if(lstFile==null)
+		  {
+			  f.delete();
+			  return true;
+		  }
+	
+		  for(idxFile = 0; idxFile < lstFile.length && status; idxFile++) 
+		  {
+			  fileCur = new File(f, lstFile[idxFile]);
+		       
+			  if(fileCur.isDirectory()) 
+		         status = delete(fileCur);
+			  else 
+		         status = fileCur.delete();
+		  }
+		  
+		  f.delete();
+	  }
+	  catch (SecurityException se)  { return false; }
+	  
+	  return(status);
+	}
+
+
+	/**
+	 * @return the labelProgress.
+	 * @since 2.0.0
+	 */
+	public final synchronized JLabel getLabelProgress()
+	{
+		return labelProgress;
+	}
+
+
+	/**
+	 * @return the pathInstall.
+	 * @since 2.0.0
+	 */
+	public final synchronized JTextField getPathInstall()
+	{
+		return pathInstall;
+	}
+}
diff --git a/current/latexDraw/lang/LaTeXDrawLang.java b/current/latexDraw/lang/LaTeXDrawLang.java
new file mode 100644
index 0000000..2315f9e
--- /dev/null
+++ b/current/latexDraw/lang/LaTeXDrawLang.java
@@ -0,0 +1,368 @@
+package latexDraw.lang;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.dialog.PreferencesFrame;
+import latexDraw.util.LaTeXDrawException;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPath;
+
+/** 
+ * This class defines the localisation.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/01/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class LaTeXDrawLang
+{
+	/** The name of the file where preferences are saved */
+	public static final String PREF_FILENAME = ".preferences";//$NON-NLS-1$
+	
+	public static final String LANG_EN = "English";//$NON-NLS-1$
+	
+	public static final String LANG_EN_US = "English-US";//$NON-NLS-1$
+	
+	public static final String LANG_FR = "Français";//$NON-NLS-1$
+	
+	public static final String LANG_ES = "Español";//$NON-NLS-1$
+	
+	public static final String LANG_DE = "Deutsch";//$NON-NLS-1$
+	
+	public static final String LANG_IT = "Italiano";//$NON-NLS-1$
+	
+	public static final String LANG_PL = "Język polski";//$NON-NLS-1$
+	
+	public static final String MISSING_KEY = "missingKey";//$NON-NLS-1$
+	
+	private static String langCurrent = readLang();
+
+	public static final String TOKEN_LANG_EN = "lang.en";//$NON-NLS-1$
+	
+	public static final String TOKEN_LANG_EN_US = "lang.en-US";//$NON-NLS-1$
+	
+	public static final String TOKEN_LANG_FR = "lang.fr";//$NON-NLS-1$
+	
+	public static final String TOKEN_LANG_ES = "lang.es";//$NON-NLS-1$
+
+	public static final String TOKEN_LANG_DE = "lang.de";//$NON-NLS-1$
+	
+	public static final String TOKEN_LANG_IT = "lang.it";//$NON-NLS-1$
+	
+	public static final String TOKEN_LANG_PL = "lang.pl";//$NON-NLS-1$
+	
+	public static final String LANG_DEFAULT = LANG_EN;
+	
+	private static ResourceBundle resourceBundleLaTeXDrawFrame = ResourceBundle.getBundle(
+							LaTeXDrawLang.getTokenLang()+".LaTeXDrawFrame");//$NON-NLS-1$
+
+	private static ResourceBundle resourceBundleDialogFrame = ResourceBundle.getBundle(
+							LaTeXDrawLang.getTokenLang()+".dialogFrames");//$NON-NLS-1$
+
+	private static ResourceBundle resourceBundleOthers = ResourceBundle.getBundle(
+							LaTeXDrawLang.getTokenLang()+".others"); //$NON-NLS-1$
+
+	private static ResourceBundle resourceBundle1_6 = ResourceBundle.getBundle(
+							LaTeXDrawLang.getTokenLang()+".1_6"); //$NON-NLS-1$
+	
+	private static ResourceBundle resourceBundle1_7 = ResourceBundle.getBundle(
+							LaTeXDrawLang.getTokenLang()+".1_7"); //$NON-NLS-1$
+	
+	private static ResourceBundle resourceBundle1_8 = ResourceBundle.getBundle(
+							LaTeXDrawLang.getTokenLang()+".1_8"); //$NON-NLS-1$
+	
+	private static ResourceBundle resourceBundle1_9 = ResourceBundle.getBundle(
+							LaTeXDrawLang.getTokenLang()+".1_9"); //$NON-NLS-1$
+
+
+	/**
+	 * Allows to get a string of the others components
+	 * @param key The key of the string
+	 * @return The string
+	 */
+	public static String getOthersString(String key)
+	{
+		try { return resourceBundleOthers.getString(key); } 
+		catch(MissingResourceException e)	{ return '!' + key + '!'; }
+		catch(NullPointerException e) 		{ return '!' + MISSING_KEY + '!'; }
+	}
+	
+
+	
+	
+	/**
+	 * Allows to get a string of the LaTeXDrawFrame
+	 * @param key The key of the string
+	 * @return The string
+	 */
+	public static String getStringLaTeXDrawFrame(String key)
+	{
+		try { return resourceBundleLaTeXDrawFrame.getString(key); }
+		catch(MissingResourceException e) { return '!' + key + '!'; }
+		catch(NullPointerException e) 	  { return '!' + MISSING_KEY + '!'; }
+	}
+	
+	
+	
+	/**
+	 * Allows to get a string of the new 1.6 strings.
+	 * @param key The key of the string.
+	 * @return The string.
+	 */
+	public static String getString1_6(String key)
+	{
+		try { return resourceBundle1_6.getString(key); }
+		catch(MissingResourceException e) { return '!' + key + '!'; }
+		catch(NullPointerException e) 	  { return '!' + MISSING_KEY + '!'; }
+	}
+	
+	
+	
+	/**
+	 * Allows to get a string of the new 1.7 strings.
+	 * @param key The key of the string.
+	 * @return The string.
+	 * @since 1.7
+	 */
+	public static String getString1_7(String key)
+	{
+		try { return resourceBundle1_7.getString(key); }
+		catch(MissingResourceException e) { return '!' + key + '!'; }
+		catch(NullPointerException e) 	  { return '!' + MISSING_KEY + '!'; }
+	}
+	
+	
+	
+	/**
+	 * Allows to get a string of the new 1.8 strings.
+	 * @param key The key of the string.
+	 * @return The string.
+	 * @since 1.8
+	 */
+	public static String getString1_8(String key)
+	{
+		try { return resourceBundle1_8.getString(key); }
+		catch(MissingResourceException e) { return '!' + key + '!'; }
+		catch(NullPointerException e) 	  { return '!' + MISSING_KEY + '!'; }
+	}
+	
+	
+	
+	/**
+	 * Allows to get a string of the new 1.8 strings.
+	 * @param key The key of the string.
+	 * @return The string.
+	 * @since 1.8
+	 */
+	public static String getString1_9(String key)
+	{
+		try { return resourceBundle1_9.getString(key); }
+		catch(MissingResourceException e) { return '!' + key + '!'; }
+		catch(NullPointerException e) 	  { return '!' + MISSING_KEY + '!'; }
+	}
+	
+	
+	
+	/**
+	 * Allows to get a string of the dialog frames.
+	 * @param key The key of the string.
+	 * @return The string.
+	 */
+	public static String getDialogFrameString(String key)
+	{
+		try { return resourceBundleDialogFrame.getString(key); } 
+		catch (MissingResourceException e) { return '!' + key + '!'; }
+		catch(NullPointerException e) 		 { return '!' + MISSING_KEY + '!'; }
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to get the language of the program.<br>
+	 * @return The language.
+	 */
+	public static String readLang()
+	{
+		try 
+		{
+			File xml = new File(LaTeXDrawPath.PATH_PREFERENCES_XML_FILE);
+			
+			if(xml.exists())
+			{
+	            DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();
+	            DocumentBuilder constructeur = fabrique.newDocumentBuilder();
+	            Document document = constructeur.parse(xml);
+	            Node n = document.getFirstChild();
+	            NodeList nl;
+	            
+	            if(n==null || !n.getNodeName().equals(LaTeXDrawNamespace.XML_ROOT_PREFERENCES))
+	            	throw new NullPointerException();
+	            
+	            nl = n.getChildNodes();
+	            
+	            for(int i=0, size=nl.getLength() ; i<size; i++)
+	            	if(nl.item(i).getNodeName().equals(LaTeXDrawNamespace.XML_LANG))
+	            		return nl.item(i).getTextContent();
+			}
+			else
+			{
+				InputStream is = new FileInputStream(new File(LaTeXDrawPath.PATH_PREFERENCES_FILE_OLD));
+				ObjectInputStream in = new ObjectInputStream(is);
+				Object o = in.readObject();
+	
+				if(!(o instanceof String) || !((String)o).equals(PreferencesFrame.LABEL_PREFERENCES))
+					throw new LaTeXDrawException(LaTeXDrawException.NOT_TEXDRAW_FILE);
+				
+				o = in.readObject();
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readObject();
+				in.readObject();
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readObject();
+				in.readBoolean();
+				
+				if(((String)o).compareTo(LaTeXDrawFrame.VERSION)<=0)
+				{
+					in.readBoolean();
+					return (String)in.readObject();
+				}
+				
+				in.close();
+				is.close();
+			}
+		}
+		catch(Exception e) 
+		{ 
+			String userLang = System.getProperty("user.language"); //$NON-NLS-1$
+		
+			if(userLang.equals("fr")) //$NON-NLS-1$
+				return LaTeXDrawLang.LANG_FR;
+			
+			if(userLang.equals("es")) //$NON-NLS-1$
+				return LaTeXDrawLang.LANG_ES;
+
+			if(userLang.equals("de")) //$NON-NLS-1$
+				return LaTeXDrawLang.LANG_DE;
+			
+			if(userLang.equals("it")) //$NON-NLS-1$
+				return LaTeXDrawLang.LANG_IT;
+			
+			if(userLang.equals("pl")) //$NON-NLS-1$
+				return LaTeXDrawLang.LANG_PL;
+			
+			return LaTeXDrawLang.LANG_DEFAULT; 
+		}
+		
+		return LaTeXDrawLang.LANG_DEFAULT;
+	}
+
+	
+	
+	
+	/**
+	 * Allows to get the language of the package.
+	 * @return The language of the package.
+	 */
+	public static final String getTokenLang()
+	{
+		if(langCurrent==null)
+		{
+			String userLang = System.getProperty("user.language");//$NON-NLS-1$
+			
+			if(userLang.equals("fr"))//$NON-NLS-1$
+				return  TOKEN_LANG_FR;
+			
+			if(userLang.equals("es"))//$NON-NLS-1$
+				return TOKEN_LANG_ES;
+
+			if(userLang.equals("de"))//$NON-NLS-1$
+				return TOKEN_LANG_DE;
+			
+			if(userLang.equals("it"))//$NON-NLS-1$
+				return TOKEN_LANG_IT;
+			
+			if(userLang.equals("pl"))//$NON-NLS-1$
+				return TOKEN_LANG_PL;
+			
+			return TOKEN_LANG_EN;
+		}
+		
+		if(langCurrent.equals(LANG_ES))
+			return TOKEN_LANG_ES;
+		
+		if(langCurrent.equals(LANG_FR))
+			return TOKEN_LANG_FR;
+		
+		if(langCurrent.equals(LANG_EN_US))
+			return TOKEN_LANG_EN_US;
+		
+		if(langCurrent.equals(LANG_DE))
+			return TOKEN_LANG_DE;
+		
+		if(langCurrent.equals(LANG_IT))
+			return TOKEN_LANG_IT;
+		
+		if(langCurrent.equals(LANG_PL))
+			return TOKEN_LANG_PL;
+		 
+		return TOKEN_LANG_EN;
+	}
+	
+	
+	
+	/**
+	 * @return the current language.
+	 */
+	public static String getlangCurrent()
+	{
+		return langCurrent;
+	}
+
+	
+	
+	/**
+	 * @param lang the language to set.
+	 */
+	public static void setlangCurrent(String lang)
+	{
+		if(lang!=null && (lang.equals(LANG_DE) || 
+			lang.equals(LANG_EN) || lang.equals(LANG_EN_US) ||
+			lang.equals(LANG_ES) || lang.equals(LANG_FR) || 
+			lang.equals(LANG_IT) || lang.equals(LANG_PL)))
+			langCurrent = lang;
+	}
+}
diff --git a/current/latexDraw/parsers/CodeParser.java b/current/latexDraw/parsers/CodeParser.java
new file mode 100644
index 0000000..ccb291f
--- /dev/null
+++ b/current/latexDraw/parsers/CodeParser.java
@@ -0,0 +1,330 @@
+package latexDraw.parsers;
+
+import java.text.ParseException;
+
+/**
+ * Defines an abstract parser that parses code.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/21/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.2<br>
+ */
+public abstract class CodeParser extends Parser
+{
+	/** The token for the end of the code. */
+	public static final int EOC = -1;
+	
+	/**
+	 * Defines a core level of the code parser that can be share with others
+	 * code parser. 
+	 * @author Arnaud Blouin
+	 */
+	private class Code 
+	{
+		/** The code to parser. */
+		protected String code;
+		
+		/** The current position of the character to read. */
+		protected int position;
+		
+		/** The current line number. */
+		protected int linePosition;
+		
+		/**
+		 * Creates and initialises a core code.
+		 * @param c The code to parse.
+		 * @throws IllegalArgumentException If the given code is null.
+		 */
+		public Code(String c) 
+		{
+			if(c==null)
+				throw new IllegalArgumentException();
+			
+			code 			= c;
+			position 		= 0;
+			linePosition 	= 1;
+		}
+	}
+	
+	
+	/** The core level of the parser that contains the code to parse,...<br>
+	 * It can be shared with others code parsers. */
+	protected Code codeCore;
+	
+	
+	/**
+	 * Creates and initialises the code parser.
+	 * @param code The code to parse.
+	 * @throws IllegalArgumentException If the given code is null.
+	 */
+	public CodeParser(String code)
+	{
+		if(code==null)
+			throw new IllegalArgumentException();
+		
+		codeCore = new Code(code);
+	}
+	
+	
+	
+	/**
+	 * Reinitialises the parser. 
+	 * @since 2.0.2
+	 */
+	public void initialise()
+	{
+		codeCore.position = 0;
+		codeCore.linePosition = 1;
+	}
+	
+	
+	
+	/**
+	 * Parses the code.
+	 * @throws ParseException If an error occurs.
+	 * @since 2.0.2
+	 */
+	public abstract void parse() throws ParseException;
+	
+	
+	
+	
+	/**
+	 * @return the code.
+	 * @since 2.0.2
+	 */
+	public String getCode()
+	{
+		return codeCore.code;
+	}
+
+	
+	
+	/**
+	 * @param code the code to set. It re-initialises the parser.
+	 * @since 2.0.2
+	 */
+	public void setCode(String code)
+	{
+		if(code!=null)
+		{
+			this.codeCore.code = code;
+			initialise();
+		}
+	}
+
+	
+	   
+    /**
+     * Reads the next char and returns it.
+     * @return the next read character or EOC if the end of the path is reached.
+     * @since 2.0.2
+     */
+    public int nextChar()
+    {
+    	codeCore.position++;
+    	
+    	return getChar();
+    }
+    
+    
+    
+    /**
+     * The character at the given position.
+     * @param pos The position of the wanted character.
+     * @return The character or EOC.
+     * @since 2.0.3
+     */
+    public int getCharAt(int pos)
+    {
+    	if(pos>=codeCore.code.length() || pos<0)
+    		return EOC;
+    	
+    	return codeCore.code.charAt(pos);
+    }
+    
+    
+    /**
+     * @return the current character or EOC if the end of the path is reached.
+     * @since 2.0.2
+     */
+    public int getChar()
+    {
+    	if(codeCore.position>=codeCore.code.length())
+    		return EOC;
+    	
+    	return codeCore.code.charAt(codeCore.position);
+    }
+    
+    
+    /**
+     * @return True if the end of the code is reached.
+     * @since 2.0.2
+     */
+    public boolean isEOC()
+    {
+    	return getChar()==EOC;
+    }
+
+
+
+	/**
+	 * @return the position.
+	 * @since 2.0.2
+	 */
+	public int getPosition()
+	{
+		return codeCore.position;
+	}
+
+
+
+	/**
+	 * @return the line position.
+	 * @since 2.0.2
+	 */
+	public int getLinePosition()
+	{
+		return codeCore.linePosition;
+	}
+	
+	
+	
+	/**
+	 * Skips the comment.
+	 * @return The read comment.
+	 * @since 2.0.2
+	 */
+	public abstract String skipComment();
+	
+	
+	
+	/**
+	 * Skips the useless characters.
+	 * @since 2.0.2
+	 */
+	public abstract void skipWSP();
+	
+	
+	
+	/**
+	 * Skips both comments and ignorable characters.
+	 * @since 2.0.2
+	 */
+	public void skipWSPComments()
+	{
+		int pos;
+
+		do
+		{
+			pos = codeCore.position;
+			skipWSP();
+			skipComment();
+		}
+		while(pos!=codeCore.position && !isEOC());
+	}
+	
+	
+	
+	/**
+	 * @return True if the current position points to a comment token.
+	 * @since 2.0.3
+	 */
+	public abstract boolean isComment();
+	
+	
+	
+	/**
+	 * @return True if the current character is a whitespace/ignorable character.
+	 * @since 2.0.2
+	 */
+	public abstract boolean isWSP();
+	
+	
+	/**
+	 * @return True if the current character is EOL. 
+	 * For the EOL CR+LF, the next character (LF) is read.
+	 * @since 2.0.2
+	 */
+	public boolean isEOL()
+	{
+		int c = getChar();
+		boolean eol = false;
+		
+		if(c=='\r')
+		{
+			eol = true;
+			
+			if(nextChar()!='\n')
+				codeCore.position--;
+		}
+		else
+			eol = c=='\n';
+		
+		return eol;
+	}
+
+
+
+	/**
+	 * @param position the position to set.
+	 * @since 2.0.2
+	 */
+	public void setPosition(int position)
+	{
+		if(position>=0)
+			codeCore.position = position;
+	}
+
+
+	
+	public void incLinePosition()
+	{
+		codeCore.linePosition++;
+	}
+	
+
+	/**
+	 * @param linePosition the line position to set. Must be greater than 0.
+	 * @since 2.0.2
+	 */
+	public void setLinePosition(int linePosition)
+	{
+		if(linePosition>=1)
+			codeCore.linePosition = linePosition;
+	}
+
+
+
+	/**
+	 * @return the code core.
+	 * @since 2.0.2
+	 */
+	public Code getCodeCore()
+	{
+		return codeCore;
+	}
+
+
+
+	/**
+	 * @param codeCore the code core to set.
+	 * @since 2.0.2
+	 */
+	public void setCodeCore(Code codeCore)
+	{
+		this.codeCore = codeCore;
+	}
+}
diff --git a/current/latexDraw/parsers/FatalErrorParsingException.java b/current/latexDraw/parsers/FatalErrorParsingException.java
new file mode 100644
index 0000000..ea9da57
--- /dev/null
+++ b/current/latexDraw/parsers/FatalErrorParsingException.java
@@ -0,0 +1,62 @@
+package latexDraw.parsers;
+
+import java.text.ParseException;
+
+import latexDraw.lang.LaTeXDrawLang;
+
+
+/** 
+ * A fatal error parsing exception occurs during the parsing
+ * of a file and when the end of the file is reached whereas it is unexpected.
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/30/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class FatalErrorParsingException extends ParseException
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** The message of the exception */
+	protected String msg;
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public FatalErrorParsingException()
+	{
+		this(""); //$NON-NLS-1$
+	}
+	
+	
+	/**
+	 * The constructor using a message
+	 * @param message The message of the exception to display
+	 */
+	public FatalErrorParsingException(String message)
+	{
+		super(message, -1);
+		msg = message==null ? "" : message;//$NON-NLS-1$
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		return "<html>"+msg+LaTeXDrawLang.getString1_6("FatalErrorParsingException.0");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/current/latexDraw/parsers/IgnoreCommandException.java b/current/latexDraw/parsers/IgnoreCommandException.java
new file mode 100644
index 0000000..ce9089c
--- /dev/null
+++ b/current/latexDraw/parsers/IgnoreCommandException.java
@@ -0,0 +1,84 @@
+package latexDraw.parsers;
+
+/** 
+ * This kind of exception occurs when you want to ignore a command.
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/01/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class IgnoreCommandException extends Exception
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The ignored command. */
+	String command;
+	
+	/** The number of the line where the command is. */
+	int nLine;
+	
+	
+	/**
+	 * The constructor using the number of the line of the ignored command.
+	 * @param nl The number of line of the ignored command.
+	 */
+	public IgnoreCommandException(int nl)
+	{ 
+		command = "";//$NON-NLS-1$
+		nLine = nl;
+	}
+	
+	
+	/**
+	 * The constructor using the name of the ignored command.
+	 * @param cmd The name of the ignored command.
+	 * @param nl The number of line of the ignored command.
+	 */
+	public IgnoreCommandException(String cmd, int nl)
+	{ 
+		command = cmd;
+		nLine = nl;
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		if(command==null || command.length()==0)
+			return "Line "+ nLine + " : a command has been ignored!"; //$NON-NLS-1$ //$NON-NLS-2$
+		return "Line "+ nLine + " : the command "+command+" has been ignored!";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+	
+	
+	
+	/**
+	 * @return the command
+	 */
+	public String getCommand()
+	{
+		return command;
+	}
+
+
+
+	/**
+	 * @return the nLine
+	 */
+	public int getNLine()
+	{
+		return nLine;
+	}
+}
diff --git a/current/latexDraw/parsers/InvalidFormatCommandException.java b/current/latexDraw/parsers/InvalidFormatCommandException.java
new file mode 100644
index 0000000..7e15728
--- /dev/null
+++ b/current/latexDraw/parsers/InvalidFormatCommandException.java
@@ -0,0 +1,57 @@
+package latexDraw.parsers;
+
+/** 
+ * This kind of exception occurs when the format of a command is incorrect.
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/15/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class InvalidFormatCommandException extends UnknownCommandException
+{
+	private static final long serialVersionUID = 1L;
+
+	
+	/**
+	 * The constructor using the number of the line of the ignored command.
+	 * @param nl The number of line of the ignored command.
+	 */
+	public InvalidFormatCommandException(int nl)
+	{ 
+		this("", nl);//$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * The constructor using the name of the ignored command.
+	 * @param ms The name of the ignored command.
+	 * @param nl The number of line of the ignored command.
+	 */
+	public InvalidFormatCommandException(String ms, int nl)
+	{ 
+		super(ms, nl);
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		if(command==null || command.length()==0)
+			return "Line "+ nLine + " : the format of the command is invalid!";//$NON-NLS-1$//$NON-NLS-2$
+		return "Line "+ nLine + " : the command "+command+" is invalid!";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+	}
+}
diff --git a/current/latexDraw/parsers/NotFullyManagedException.java b/current/latexDraw/parsers/NotFullyManagedException.java
new file mode 100644
index 0000000..2d85c7e
--- /dev/null
+++ b/current/latexDraw/parsers/NotFullyManagedException.java
@@ -0,0 +1,38 @@
+package latexDraw.parsers;
+
+/** 
+ *  This class allows the management of exceptions : a command
+ *  not fully managed can generate an <code>NotFullyManagedException</code>.
+ *  
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 10/21/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class NotFullyManagedException extends NotYetManagedException
+{
+	private static final long serialVersionUID = 1L;
+
+	
+	public NotFullyManagedException(String cmd, int nl)
+	{
+		super(cmd, nl);
+	}
+	
+	@Override
+	public String toString()
+	{
+		return "Line "+ nLine + " : the command "+command+" is not yet fully managed!";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+	}
+}
diff --git a/current/latexDraw/parsers/NotYetManagedException.java b/current/latexDraw/parsers/NotYetManagedException.java
new file mode 100644
index 0000000..d4b025f
--- /dev/null
+++ b/current/latexDraw/parsers/NotYetManagedException.java
@@ -0,0 +1,70 @@
+package latexDraw.parsers;
+
+/** 
+ *  This class allows the management of exceptions : a command
+ *  "not yet managed" can generate an NotYetManagedException<br>
+ *  
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/24/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class NotYetManagedException extends Exception
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** The command which is not managed */
+	String command;
+	
+	/** The number of the line that command was in the file */
+	int nLine;
+	
+	
+	/**
+	 * The constructor using the name of the not managed command.
+	 */
+	public NotYetManagedException(String cmd, int nl)
+	{ 
+		command = cmd;
+		nLine = nl;
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		if(command==null || command.length()==0)
+		return "Line "+ nLine + " : a command is unknown!";//$NON-NLS-1$//$NON-NLS-2$
+		return "Line "+ nLine + " : the command "+command+" is not yet managed!";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+	}
+
+
+	/**
+	 * @return the command
+	 */
+	public String getCommand()
+	{
+		return command;
+	}
+
+
+	/**
+	 * @return the nLine
+	 */
+	public int getNLine()
+	{
+		return nLine;
+	}
+}
diff --git a/current/latexDraw/parsers/Parser.java b/current/latexDraw/parsers/Parser.java
new file mode 100644
index 0000000..441a697
--- /dev/null
+++ b/current/latexDraw/parsers/Parser.java
@@ -0,0 +1,38 @@
+/*
+ * Parser.java
+ */
+package latexDraw.parsers;
+
+/** 
+ * This class defines the general structure of a parser.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 
+ * 09/09/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class Parser
+{
+	/** The value corresponding to a bad parsing. */
+ 	public static final short ERROR_PARSING = -1;
+	
+	/** The value corresponding to a good parsing. */
+	public static final short OK_PARSING = 1;
+	
+	/** The value corresponding to a cancelled parsing. */
+	public static final short CANCEL_PARSING = 0;
+}
+
+
diff --git a/current/latexDraw/parsers/ParserCmdMessage.java b/current/latexDraw/parsers/ParserCmdMessage.java
new file mode 100644
index 0000000..32244be
--- /dev/null
+++ b/current/latexDraw/parsers/ParserCmdMessage.java
@@ -0,0 +1,105 @@
+package latexDraw.parsers;
+
+import latexDraw.lang.LaTeXDrawLang;
+
+
+/** 
+ * This class define a kind of message which will be displayed in the
+ * ParserMessagesFrame.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/02/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParserCmdMessage
+{
+	/** The line in the PSTricks code at the origin of the message. */
+	private int nLine;
+	
+	/** The exception that occurred. */
+	private Exception exception;
+	
+	/** The name of command which has launched the exception. */
+	private String command;
+	
+	/** The number of column of the message. */
+	public static final short NB_COL = 3;
+	
+	
+	/**
+	 * The constructor.
+	 * @param nl The line.
+	 * @param ex The exception.
+	 * @param cmd The command.
+	 */
+	public ParserCmdMessage(int nl, Exception ex, String cmd)
+	{
+		nLine = nl;
+		exception = ex;
+		command = cmd;
+	}
+
+
+	
+	/**
+	 * @return the command
+	 */
+	public String getCommand()
+	{
+		return command;
+	}
+
+
+	
+	
+	/**
+	 * @return the exception
+	 */
+	public Exception getException()
+	{
+		return exception;
+	}
+
+
+	
+	
+	/**
+	 * @return the nLine
+	 */
+	public int getNLine()
+	{
+		return nLine;
+	}
+	
+	
+
+	@Override
+	public String toString()
+	{
+		StringBuffer msg = new StringBuffer();
+		
+		msg.append(LaTeXDrawLang.getString1_6("ParserCmdMessage.0")); //$NON-NLS-1$
+		msg.append(String.valueOf(nLine));
+		msg.append("; "); //$NON-NLS-1$
+		
+		if(command!=null && command.length()!=0)
+			msg.append(LaTeXDrawLang.getString1_6("ParserCmdMessage.1")).append(command).append("; "); //$NON-NLS-1$//$NON-NLS-2$
+		
+		if(exception!=null)
+			msg.append(LaTeXDrawLang.getString1_6("ParserCmdMessage.2")).append(exception.toString()); //$NON-NLS-1$
+		
+		return msg.toString();
+	}
+}
diff --git a/current/latexDraw/parsers/ParserMessagesFrame.java b/current/latexDraw/parsers/ParserMessagesFrame.java
new file mode 100644
index 0000000..df0734e
--- /dev/null
+++ b/current/latexDraw/parsers/ParserMessagesFrame.java
@@ -0,0 +1,207 @@
+package latexDraw.parsers;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.Vector;
+
+import javax.swing.*;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.TableColumnModel;
+import javax.swing.table.TableModel;
+
+import latexDraw.lang.LaTeXDrawLang;
+
+
+/** 
+ * This class define a frame which can contains the messages that appeared during 
+ * the parsing.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 
+ * 02/02/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParserMessagesFrame extends JDialog implements ActionListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The label of the button "ok" */
+	public static final String LABEL_OK  = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.4"); //$NON-NLS-1$
+
+	/** If true the messages must by displayed in a frame, else in
+	 * the console. */
+	private boolean displayInFrame;
+	
+	/** The table to display */
+	private JTable table;
+
+	/** The messages of the parser */
+	private Vector<ParserCmdMessage> messages;
+	
+	
+	
+	
+	
+	/**
+	 * The constructor by default.
+	 * @param displayInF True : the messages will be displayed in a frame, else in the console.
+	 * @param msg The messages.
+	 */
+	public ParserMessagesFrame(JFrame parent, boolean displayInF, Vector<ParserCmdMessage> msg)
+	{
+		super(parent, true);
+		
+		try
+		{
+			displayInFrame 	= displayInF ;
+			messages 		= msg;
+
+	 		int i, size = msg.size();
+	 		final String[] titles = {LaTeXDrawLang.getString1_6("ParserMessagesFrame.0"), LaTeXDrawLang.getString1_6("ParserMessagesFrame.1"), LaTeXDrawLang.getString1_6("ParserMessagesFrame.2")}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	 		final Object[][] data = new String[size][ParserCmdMessage.NB_COL];
+	 		
+	 		for(i=0; i<size; i++)
+	 		{
+	 			ParserCmdMessage m = messages.elementAt(i);
+	 			data[i][0] = m.getCommand();
+	 			data[i][1] = String.valueOf(m.getNLine());
+	 			data[i][2] = m.getException().toString();
+	 		}
+	 		
+	        TableModel dataModel = new AbstractTableModel() 
+	        { 
+				private static final long serialVersionUID = 1L;
+				public int getColumnCount() { return titles.length; } 
+	            public int getRowCount() { return data.length;} 
+	            public Object getValueAt(int row, int col) {return data[row][col];} 
+	            
+	            @Override
+				public String getColumnName(int column) {return titles[column];} 
+	            
+	            @Override
+				public Class<? extends Object> getColumnClass(int c) {return getValueAt(0, c).getClass();} 
+	            
+			    @Override
+				public boolean isCellEditable(int row, int col) {return false;} 
+			    
+	            @Override
+				public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; } 
+	         }; 
+
+			table = new JTable(dataModel);
+	 		table.getTableHeader().setReorderingAllowed(false);
+	 		TableColumnModel colmodel = table.getColumnModel();
+
+	 		colmodel.getColumn(0).setPreferredWidth(120);
+	 		colmodel.getColumn(1).setPreferredWidth(15);
+	 		colmodel.getColumn(2).setPreferredWidth(205);
+	 		JScrollPane scrollPane = new JScrollPane();
+	 		JViewport vp = scrollPane.getViewport(); 
+		 	vp.add(table); 
+
+		 	JPanel topPanel = new JPanel();
+		 	topPanel.add(new JLabel(LaTeXDrawLang.getString1_6("ParserMessagesFrame.3"))); //$NON-NLS-1$
+		 	JPanel bPanel = new JPanel(new GridLayout(1, 1));
+			JButton okB = new JButton(LABEL_OK);
+			okB.setActionCommand(LABEL_OK);
+			okB.addActionListener(this);
+			bPanel.add(okB);
+			
+			setTitle(LaTeXDrawLang.getString1_6("ParserMessagesFrame.4")); //$NON-NLS-1$
+			getContentPane().setLayout(new BorderLayout());
+			getContentPane().add(topPanel,BorderLayout.NORTH);
+			getContentPane().add(scrollPane, BorderLayout.CENTER);
+			getContentPane().add(bPanel, BorderLayout.SOUTH);
+			
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			
+			if(displayInFrame)
+				JOptionPane.showMessageDialog( 
+			 		    this, 
+			 		    LaTeXDrawLang.getDialogFrameString("ExceptionFrameDialog.4") + //$NON-NLS-1$
+			 		    ex.toString(), 
+			 		   LaTeXDrawLang.getDialogFrameString("ExceptionFrameDialog.5"),  //$NON-NLS-1$
+			 		    JOptionPane.WARNING_MESSAGE 
+			 		);
+		}
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible)
+	{		
+		if(visible)
+		{
+			Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();		
+			setLocation(dim.width/2-300, dim.height/2-200);
+			setSize(600, 400);
+		}
+		super.setVisible(visible);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to display a frame which contains the messages which appeared during to 
+	 * parsing.
+	 * @param msg All the messages
+	 * @param displayInFrame If true, the messages are printed in a frame ; else they are
+	 * printed in the console.
+	 */
+	public static void showParserMessagesFrame(JFrame parent, boolean displayInFrame, Vector<ParserCmdMessage> msg)
+	{
+		ParserMessagesFrame f = new ParserMessagesFrame(parent, displayInFrame, msg);
+		
+		if(displayInFrame)
+			f.setVisible(true);
+		else
+			if(msg!=null)
+				for(ParserCmdMessage pcm : msg)
+					System.out.println(pcm);
+	}
+		
+	
+	
+	
+	/**
+	 * The actions to do bound to the buttons.
+	 */
+	public void actionPerformed(ActionEvent e)
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JButton)
+		{
+			String msg = ((JButton)o).getActionCommand();
+			
+			if(msg.equals(LABEL_OK))
+			{
+				setVisible(false);
+				return ;
+			}
+		}
+	}
+}
diff --git a/current/latexDraw/parsers/TooManyBracketsException.java b/current/latexDraw/parsers/TooManyBracketsException.java
new file mode 100644
index 0000000..8955b3d
--- /dev/null
+++ b/current/latexDraw/parsers/TooManyBracketsException.java
@@ -0,0 +1,45 @@
+package latexDraw.parsers;
+
+/** 
+ * This kind of exception occurred when there is too many brackets at a
+ * given time.<br>
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 02/01/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class TooManyBracketsException extends FatalErrorParsingException
+{
+	private static final long serialVersionUID = 1L;
+
+	private int nLine;
+	
+	
+	public TooManyBracketsException(int nl)
+	{
+		nLine = nl;
+		msg = "At the line "+nLine+", the closing bracket is of excess.";//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	
+	
+	/**
+	 * @return the nLine
+	 */
+	public int getNLine()
+	{
+		return nLine;
+	}
+}
diff --git a/current/latexDraw/parsers/UnclosedBracketsException.java b/current/latexDraw/parsers/UnclosedBracketsException.java
new file mode 100644
index 0000000..edbc67b
--- /dev/null
+++ b/current/latexDraw/parsers/UnclosedBracketsException.java
@@ -0,0 +1,31 @@
+package latexDraw.parsers;
+
+/** 
+ * The kind of exception occurred when too many brackets are not closed.
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/01/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class UnclosedBracketsException extends FatalErrorParsingException
+{
+	private static final long serialVersionUID = 1L;
+	
+	
+	public UnclosedBracketsException()
+	{
+		msg = "A closing bracket was expected.";//$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/parsers/UnexceptedEndOfFileException.java b/current/latexDraw/parsers/UnexceptedEndOfFileException.java
new file mode 100644
index 0000000..2583f68
--- /dev/null
+++ b/current/latexDraw/parsers/UnexceptedEndOfFileException.java
@@ -0,0 +1,32 @@
+package latexDraw.parsers;
+
+/** 
+ * The kind of exception occurred when you reach the end of the file
+ * during the parsing of a command.
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/01/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class UnexceptedEndOfFileException extends FatalErrorParsingException
+{
+	private static final long serialVersionUID = 1L;
+
+	
+	public UnexceptedEndOfFileException()
+	{
+		msg = "The unexpected end of the file was reached!";//$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/parsers/UnknownCommandException.java b/current/latexDraw/parsers/UnknownCommandException.java
new file mode 100644
index 0000000..67d4102
--- /dev/null
+++ b/current/latexDraw/parsers/UnknownCommandException.java
@@ -0,0 +1,93 @@
+package latexDraw.parsers;
+
+/** 
+ * The kind of exception occurred when you reach a unknown command.
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/01/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class UnknownCommandException extends Exception
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The unknown command. */
+	String command;
+	
+	/** The number of the line where the command is. */
+	int nLine;
+	
+	
+	
+	/**
+	 * The constructor using the number of the line of the unknown command.
+	 * @param nl The number of line of the unknown command.
+	 */
+	public UnknownCommandException(int nl)
+	{ 
+		command = "";//$NON-NLS-1$
+		nLine = nl;
+	}
+	
+
+	
+	/**
+	 * The constructor using the name of the unknown command.
+	 * @param cmd The name of the ignored command.
+	 * @param nl The number of line of the unknown command.
+	 */
+	public UnknownCommandException(String cmd, int nl)
+	{ 
+		command = cmd;
+		nLine = nl;
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		if(command==null || command.length()==0)
+			return "Line "+ nLine + " : a command is unknown!";//$NON-NLS-1$//$NON-NLS-2$
+		return "Line "+ nLine + " : the command "+command+" is unknown!";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+	}
+	
+	
+	/**
+	 * @return the command
+	 */
+	public String getCommand()
+	{
+		return command;
+	}
+
+
+	/**
+	 * @return the nLine
+	 */
+	public int getNLine()
+	{
+		return nLine;
+	}
+
+
+	/**
+	 * @param command the command to set
+	 */
+	public void setCommand(String command)
+	{
+		this.command = command;
+	}
+}
diff --git a/current/latexDraw/parsers/WillNeverBeManagedException.java b/current/latexDraw/parsers/WillNeverBeManagedException.java
new file mode 100644
index 0000000..310a6b8
--- /dev/null
+++ b/current/latexDraw/parsers/WillNeverBeManagedException.java
@@ -0,0 +1,73 @@
+package latexDraw.parsers;
+
+
+/** 
+ * A WillNeverBeManagedException exception occurred when the parser
+ * reach a command that will never be managed because it is obsolete
+ * or something else.<br>
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/02/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class WillNeverBeManagedException extends Exception
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The command which is not managed */
+	String command;
+	
+	/** The number of the line that command was in the file */
+	int nLine;
+	
+	
+	
+	/**
+	 * The constructor using the name of the non managed command
+	 * @param cmd The name of the ignored command
+	 * @param nl The number of line of the non managed command
+	 */
+	public WillNeverBeManagedException(String cmd, int nl)
+	{ 
+		command = cmd;
+		nLine = nl;
+	}
+	
+	
+	@Override
+	public String toString()
+	{
+		return "Line "+ nLine + " : the command "+command+" is will never be managed!";//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+	}
+	
+	
+	
+	/**
+	 * @return the command
+	 */
+	public String getCommand()
+	{
+		return command;
+	}
+
+
+	/**
+	 * @return the nLine
+	 */
+	public int getNLine()
+	{
+		return nLine;
+	}
+}
diff --git a/current/latexDraw/parsers/css/AbstractCSSParser.java b/current/latexDraw/parsers/css/AbstractCSSParser.java
new file mode 100644
index 0000000..3e309e3
--- /dev/null
+++ b/current/latexDraw/parsers/css/AbstractCSSParser.java
@@ -0,0 +1,93 @@
+package latexDraw.parsers.css;
+
+import latexDraw.parsers.CodeParser;
+
+/** 
+ * Defines an abstract CSS parser that contains functions to help the CSS parsing.
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 12/05/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.3<br>
+ * @since 2.0.3
+ */
+public abstract class AbstractCSSParser extends CodeParser
+{
+	/**
+	 * Creates and initialises the CSS parser. 
+	 * @param code The code to parse.
+	 * @throws IllegalArgumentException If the given code is null.
+	 * @since 2.0.3
+	 */
+	public AbstractCSSParser(String code)
+	{
+		super(code);
+	}
+	
+	
+	
+	
+	@Override
+	public boolean isComment()
+	{
+		return getChar()=='/' && getCharAt(getPosition()+1)=='*';
+	}
+	
+	
+	
+	@Override
+	public String skipComment()
+	{
+		if(!isComment())
+			return null;
+		
+		StringBuffer comment = new StringBuffer();
+		boolean again        = true;
+		
+		nextChar();
+		nextChar();
+			
+		while(again && !isEOC()) 
+		{
+			if(getChar()=='*' && getCharAt(getPosition()+1)=='/') {
+				again = false;
+				nextChar();
+			}
+			else
+				comment.append((char)getChar());
+			
+			nextChar();
+		}
+		
+		return comment.toString();
+	}
+	
+	
+	
+	@Override
+	public boolean isWSP()
+	{
+		int c = getChar();
+		return c=='\t' || c==' ' || c=='\r' || c=='\n' || c=='\f';
+	}
+
+
+
+	@Override
+	public void skipWSP()
+	{
+		while(isWSP() && !isEOC())
+			nextChar();
+	}
+}
diff --git a/current/latexDraw/parsers/latexdraw/LPSTParser.java b/current/latexDraw/parsers/latexdraw/LPSTParser.java
new file mode 100644
index 0000000..3741980
--- /dev/null
+++ b/current/latexDraw/parsers/latexdraw/LPSTParser.java
@@ -0,0 +1,798 @@
+package latexDraw.parsers.latexdraw;
+
+import java.awt.geom.Point2D;
+import java.util.Stack;
+import java.util.Vector;
+
+import latexDraw.figures.AkinPoints;
+import latexDraw.figures.Figure;
+import latexDraw.figures.FramedBox;
+import latexDraw.figures.Text;
+import latexDraw.parsers.*;
+import latexDraw.parsers.pst.PSTParameters;
+import latexDraw.parsers.pst.PSTParser;
+import latexDraw.parsers.pst.PSTParameters.PositionParameters;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * Defines an PSTricks parser specific to latexdraw.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/21/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.2<br>
+ */
+public class LPSTParser extends PSTParser
+{
+	/** The parsed shapes. */
+	protected Vector<Figure> shapes;
+	
+	/** The figures contained in the pscustom command. Cleared at the end of each <code>pscustom</code> command.*/
+	public Vector<Figure> psCustFigures;
+	
+	
+	/**
+	 * Creates and initialises the pstricks parser.
+	 * @param code The code to parse.
+	 * @throws IllegalArgumentException If the given code is null.
+	 */
+	public LPSTParser(String code)
+	{
+		super(code);
+		
+		shapes 		  = new Vector<Figure>();
+		psCustFigures = new Vector<Figure>();
+	}
+
+	
+	
+	/**
+	 * Parses only the framed boxes of the code. Used to save and read text shape
+	 * saved into SVG documents.
+	 * @throws TooManyBracketsException If there is a problem of brackets
+	 * @throws InvalidFormatCommandException If the format of a command is not respected.
+	 * @throws UnclosedBracketsException If a bracket is not closed.
+	 * @since 2.0.2
+	 */
+	public void parseFramedBox() throws TooManyBracketsException, InvalidFormatCommandException, UnclosedBracketsException
+	{
+		boolean isFramedBox = false;
+		Stack<Boolean> ignorableBracket = new Stack<Boolean>();
+		
+		initialise();
+		started = true;
+		params.add(new PSTParameters());
+		
+		while(!isEOC())
+			try
+			{
+				switch(getChar())
+				{
+					case '\\':
+						int pos 			= getPosition();
+						boolean ok 			= true;
+						PSTParameters tp 	= params.lastElement();
+						
+						switch(nextChar())
+						{
+							case 'p':
+								switch(nextChar())
+								{
+									case 's':// \ps
+										switch(nextChar())
+										{
+											case 'f': // \psf
+												if(nextChar()=='r' && nextChar()=='a' && nextChar()=='m' && nextChar()=='e' && 
+												   nextChar()=='b' && nextChar()=='o' && nextChar()=='x' && !Character.isLetter(nextChar()))
+												{// \psframebox
+													if(tp.psBox.isEmpty())
+														tp.psBoxText.setText("");//$NON-NLS-1$
+													
+													actionsOnFramedBox(0);
+													isFramedBox = true;
+												}
+												else
+													ok = false;
+												
+												break;
+												
+											case 'd': // \psd
+												switch(nextChar())
+												{
+													case 'i': // \psdi
+														if(nextChar()=='a' && nextChar()=='b' && nextChar()=='o' && 
+														   nextChar()=='x' && !Character.isLetter(nextChar()))
+														{// \psdiabox
+															actionsOnFramedBox(3);
+															isFramedBox = true;
+														}
+														else
+															ok = false;
+														
+														break;
+														
+													case 'b': // \psdb
+														if(nextChar()=='l' && nextChar()=='f' && nextChar()=='r' && 
+														   nextChar()=='a' && nextChar()=='m' && nextChar()=='e' && 
+														   nextChar()=='b' && nextChar()=='o' && nextChar()=='x' && 
+														   !Character.isLetter(nextChar())) 
+														{// \psdblframebox
+															actionsOnFramedBox(5);
+															isFramedBox = true;
+														}
+														else
+															ok = false;
+														break;
+														
+													default:
+														ok = false;
+														break;
+												}
+												break;
+												
+											case 'c': // \psc
+												if(nextChar()=='i' && nextChar()=='r' && nextChar()=='c' && 
+												   nextChar()=='l' && nextChar()=='e' && nextChar()=='b' && 
+												   nextChar()=='o' && nextChar()=='x' && !Character.isLetter(nextChar())) 
+												{// \pscirclebox
+													actionsOnFramedBox(1);
+													isFramedBox = true;
+												}
+												else
+													ok = false;
+												
+												break;
+												
+											case 't': // \pst
+												if(nextChar()=='r' && nextChar()=='i' && nextChar()=='b' && 
+												   nextChar()=='o' && nextChar()=='x' && !Character.isLetter(nextChar())) 
+												{// \pstribox
+													actionsOnFramedBox(2);
+													isFramedBox = true;
+												}
+												else
+													ok = false;
+												
+												break;
+												
+											case 'o': // \pso
+												if(nextChar()=='v' && nextChar()=='a' && nextChar()=='l' &&
+												   nextChar()=='b' && nextChar()=='o' && nextChar()=='x' && !Character.isLetter(nextChar())) 
+												{// \psovalbox
+													actionsOnFramedBox(4);
+													isFramedBox = true;
+												}
+												else
+													ok = false;
+			
+												break;
+												
+											case 's': // \pss
+												if(nextChar()=='h' && nextChar()=='a' && nextChar()=='d' &&
+												   nextChar()=='o' && nextChar()=='w' && nextChar()=='b' && 
+												   nextChar()=='o' && nextChar()=='x' && !Character.isLetter(nextChar())) 
+												{// \psshadowbox
+													actionsOnFramedBox(6);
+													isFramedBox = true;
+												}
+												else
+													ok = false;
+			
+												break;
+										}
+										break;
+										
+									case 'u': // \pu
+										if(nextChar()=='t' && !Character.isLetter(nextChar())) // \put
+										{
+											skipWSPComments();
+											parse_put();
+											skipWSPComments();
+											
+											if(getChar()!='{') throw new InvalidFormatCommandException(getLinePosition());
+											ignorableBracket.add(false);
+											nextChar();
+										}
+										else ok = false;
+										break;
+										
+									default:
+									ok = false;
+								}
+								break;
+								
+							case 'd':// \d
+								if(nextChar()=='e' && nextChar()=='f' && nextChar()=='i' && nextChar()=='n' && 
+									nextChar()=='e' && nextChar()=='c' && nextChar()=='o' && nextChar()=='l' && 
+									nextChar()=='o' && nextChar()=='r' && !Character.isLetter(nextChar()))
+								{// \definecolor
+									parse_definecolor();
+								}
+								else ok = false;
+								break;
+								
+								
+							case 'c': // \c
+								if(nextChar()=='o' && nextChar()=='l' && nextChar()=='o' && nextChar()=='r' && 
+								   !Character.isLetter(nextChar()))
+								{// \color
+									parse_color();
+								}
+								else ok = false;
+								break;
+								
+							case '{' : // \{
+							case '}' : // \}
+							case '$' : // \$
+							case '&' : // \&
+							case '#' : // \#
+							case '%' : // \%
+							case '\\': // \\
+								setPosition(getPosition()-1);
+								addParsedText();
+								nextChar();
+								addParsedText();
+								nextChar();
+								break;
+								
+							default:
+								ok = false;
+							break;
+						}
+						
+						if(!ok) {
+							setPosition(pos);
+							addParsedText();
+							nextChar();
+						}
+						
+						break;
+					
+					case '{' :
+						if(isFramedBox) {
+							params.add(new PSTParameters(params.lastElement()));
+							params.lastElement().fromFramedBox = true;
+							isFramedBox = false;
+							ignorableBracket.add(false);
+						}
+						else {
+							addParsedText();
+							ignorableBracket.add(true);
+						}
+						
+						nextChar();
+						break;
+						
+					case '}':
+						if(params.size()<1) throw new TooManyBracketsException(getLinePosition());
+							
+						if(!ignorableBracket.isEmpty() && ignorableBracket.lastElement())
+							addParsedText();
+						else
+						{
+							PSTParameters tp1 = params.lastElement();
+							
+							if(tp1.fromFramedBox)
+							{
+								PSTParameters pp = null;
+								int k = params.size()-1;
+								
+								while(pp==null && k>=0)
+									if(params.elementAt(k).getPosition()==null)
+										k--;
+									else
+										pp = params.elementAt(k);
+								
+								if(pp==null)
+									pp = params.firstElement();
+								
+								pp.psBox.lastElement().setEnd(pp.textForFrame.length());
+								pp.psBox.add(0, pp.psBox.remove(pp.psBox.size()-1));
+							}
+							else
+								if(tp1.getPosition()!=null && !tp1.psBox.isEmpty())
+								{
+									Vector<FramedBox> fbs = new Vector<FramedBox>();
+									while(!tp1.psBox.isEmpty())
+										fbs.add(tp1.psBox.remove(tp1.psBox.size()-1));
+									tp1.psBox = fbs;
+										
+									tp1.psBoxText.setText(tp1.textForFrame);
+									actionsOnTerminatedFramedBoxes();
+								}
+								else
+									try {actionsOnText();}
+									catch(InvalidFormatCommandException e) { /* Nothing to do.*/ }
+									
+							params.removeElementAt(params.size()-1);
+						}
+						
+						if(!ignorableBracket.isEmpty()) ignorableBracket.remove(ignorableBracket.size()-1);
+						nextChar();
+						break;
+						
+					case '$':
+						parseMathText();
+						break;
+						
+					default:
+						if(isEOL())
+							incLinePosition();
+					
+						addParsedText();
+						
+						if(isWSP())
+						{
+							nextChar();
+							skipWSP();// Only a piece of blank must be took in account.
+						}
+						else
+							nextChar();
+						
+						break;
+				}//switch
+			}//while
+		catch(UnexceptedEndOfFileException ex) { ex.printStackTrace(); }
+		
+		if(params.size()>1) throw new UnclosedBracketsException();
+	}
+	
+	
+	
+
+	@Override
+	public void actionsOnterminatedPsCustom() throws NotFullyManagedException
+	{
+		Figure f;
+		int i=0;
+		
+		while(!psCustFigures.isEmpty())
+		{
+			f = psCustFigures.remove(0);
+			
+			if(!(f instanceof AkinPoints) || ((AkinPoints)f).getNbPoints()>1)
+			{
+				if(f instanceof AkinPoints && ((AkinPoints)f).getType()==AkinPoints.TYPE_CURVES)
+				{// We must transform the read points.
+					AkinPoints ak = (AkinPoints)f;
+					int j, size = ak.getNbPoints();
+					LaTeXDrawPoint2D prev, curr = ak.getPoint(0);
+					
+					for(j=1; j<size; j++)
+					{
+						prev = curr;
+						curr = ak.getPoint(j);
+						curr.setLocation(2*curr.x-prev.x, 2*curr.y-prev.y);
+					}
+					
+					((AkinPoints)f).updateBorders();
+				}
+				
+				shapes.add(f);
+				i++;
+			}
+		}
+	}
+
+	
+	
+	@Override
+	public void initialise()
+	{
+		super.initialise();
+		
+		setPosition(0);
+		started  = false;
+		shapes.clear();
+		PSTParameters.reinitialize();
+	}
+	
+	
+	
+	/**
+	 * @return the parsed shapes.
+	 * @since 2.0.2
+	 */
+	public Vector<Figure> getShapes()
+	{
+		return shapes;
+	}
+
+
+
+
+	@Override
+	public void actionsOnFramedBox(int type) throws UnclosedBracketsException
+	{
+		boolean hasStar;
+		int i = params.size()-1;
+		PSTParameters pp = null;
+		
+		while(pp==null && i>=0)
+			if(params.elementAt(i).getPosition()!=null)
+				pp = params.elementAt(i);
+			else 
+				i--;
+			
+		if(pp==null)
+			pp = params.firstElement();
+		
+		FramedBox fb = new FramedBox(pp.psBoxText);
+		
+		fb.setStart(pp.textForFrame.length());
+		pp.psBox.add(fb);
+		PSTParameters newP = new PSTParameters(params.lastElement());
+		
+		if(getChar()=='*') {
+			hasStar = true;
+			nextChar();
+		}
+		else hasStar = false;
+		
+		paramParser.setParam(newP);
+		paramParser.parse();
+		paramParser.setParam(null);
+		
+		skipWSPComments();
+		
+		switch(type)
+		{
+			case 0:
+				fb.setBoxType(FramedBox.BOX_RECTANGLE); 
+				break;
+			case 1: 
+				fb.setBoxType(FramedBox.BOX_CIRCLE); 
+				break;
+			case 2: 
+				fb.setBoxType(FramedBox.BOX_TRIANGLE); 
+				break;
+			case 3: 
+				fb.setBoxType(FramedBox.BOX_DIAMOND); 
+				break;
+			case 4: 
+				fb.setBoxType(FramedBox.BOX_ELLIPSE);
+				break;
+			case 5: 
+				fb.setBoxType(FramedBox.BOX_RECTANGLE); 
+				break;
+			case 6: 
+				fb.setBoxType(FramedBox.BOX_RECTANGLE); 
+				break;
+		}
+		
+		if(getChar()!='{')//psframebox3, psframebox[framesep=0.3]3 for instance.
+		{
+			PSTParameters p;
+			boolean again = true;
+			int k = params.size()-1;
+			
+			while(again && k>=0)
+			{
+				p = params.elementAt(k);
+				p.textForFrame+=(char)getChar();
+				
+				if(p.getPosition()==null)
+					k--;
+				else
+					again = false;
+			}
+			
+			k = params.size()-1;
+			p=null;
+			
+			while(p==null && k>=0)
+				if(params.elementAt(k).getPosition()==null)
+					k--;
+				else
+					p = params.elementAt(k);
+			
+			if(p==null)
+				p = params.firstElement();
+			
+			p.psBox.lastElement().setEnd(p.textForFrame.length());
+			p.psBox.add(0, p.psBox.remove(p.psBox.size()-1));
+		}
+		
+		fb.setFrameSep(newP.frameSep*Figure.PPC);
+		fb.setBoxSep(newP.boxSep);
+		
+		setFigureParameters(newP, fb.getBox(), hasStar);
+		
+		if(hasStar)
+		{
+			fb.getBox().setIsFilled(true);
+			fb.getBox().setInteriorColor(newP.fillColor);
+			fb.getBox().setLinesColor(newP.fillColor);
+		}
+		
+		switch(type)
+		{
+			case 5: 
+				fb.getBox().setHasDoubleBoundary(true);
+				break;
+			case 6: 
+				fb.getBox().setHasShadow(true);
+				break;
+		}
+	}
+	
+	
+	
+	@Override
+	public void actionsOnTerminatedFramedBoxes() throws InvalidFormatCommandException
+	{
+		PSTParameters pp = params.lastElement();
+		String str 		 = pp.psBoxText.getText();
+		
+		if(str.length()==0)
+			str = " ";//$NON-NLS-1$
+		
+		pp.textParsed = pp.textForFrame;
+		actionsOnText();
+		
+		if(pp.psBox.isEmpty())
+			return;
+		
+		if(shapes.isEmpty())
+			return;
+		
+		Text txt = (Text)shapes.remove(shapes.size()-1);
+		boolean simpleBox = pp.psBox.size()==1 && pp.psBox.firstElement().getBoxedText().equals(txt.getText());
+		
+		if(simpleBox)
+		{
+			FramedBox fb = pp.psBox.firstElement();
+			fb.setText(txt);
+			fb.setStart(-1);
+			fb.setEnd(-1);
+			fb.getBox().setBordersPosition(PSTricksConstants.BORDERS_OUTSIDE);
+			txt.setSimpleBox(fb);
+		}
+		else
+			for(FramedBox fb : pp.psBox)
+			{
+				fb.setText(txt);
+				txt.addBox(fb);
+				fb.getBox().setBordersPosition(PSTricksConstants.BORDERS_OUTSIDE);
+			}
+		
+		txt.setHasFramedBox(!pp.psBox.isEmpty());
+		txt.setHasSimpleFramedBox(simpleBox);
+		txt.updateFramedBoxes();
+		txt.updateFontsBorders();
+		
+		if(!pp.psCustomP.fromPsCustom)
+			shapes.add(txt);
+		
+		if(simpleBox)
+		{
+			if(txt.getSimpleBox().getBoxType()==FramedBox.BOX_TRIANGLE)
+			{
+				double height = (txt.getSimpleBox().getBox().getTheSEBoundPoint().y-
+						txt.getSimpleBox().getBox().getTheNWBoundPoint().y)/4.;
+				LaTeXDrawPoint2D pos = txt.getPosition();
+				txt.setPosition(new LaTeXDrawPoint2D(pos.x, pos.y+height));
+				txt.getSimpleBox().getBox().updateShape();
+			}
+		}
+		else
+		{
+			FramedBox fb, max=null;
+			double xMin=Double.MAX_VALUE;
+			int i=0, size = txt.getMultipleBox().size();
+			
+			while(i<size)
+			{
+				fb = txt.getMultipleBox().elementAt(i);
+
+				if(fb.isBoxSep() && fb.getBoxType()==FramedBox.BOX_TRIANGLE &&
+					fb.getBox().getTheNWBoundPoint().x<xMin)
+				{
+					xMin = fb.getBox().getTheNWBoundPoint().x;
+					max = fb;
+				}
+				else i++;
+			}
+
+			if(max!=null)
+			{
+				double height = (max.getBox().getTheSEBoundPoint().y-max.getBox().getTheNWBoundPoint().y)/4.;
+									
+				LaTeXDrawPoint2D pos = txt.getPosition();
+				txt.setPosition(new LaTeXDrawPoint2D(pos.x, pos.y+height));
+				max.getBox().updateShape();
+			}
+			
+		}
+		
+		txt.updateFramedBoxes();
+		txt.updateFontsBorders();
+	}
+	
+	
+	
+	/**
+	 * Sets the parameters of a figure <code>f</code>.
+	 * @param p The set of pstricks parameters to use to set the shape.
+	 * @param f The shape to set.
+	 * @param hasStar True if the command of the pstricks shape is followed by a star
+	 * (for instance: psframe*[...](..)(..)).
+	 */
+	public void setFigureParameters(PSTParameters p, Figure f, boolean hasStar)
+	{
+		if(f==null || p==null)
+			return ;
+		
+		if(f.canHaveShadow())
+		{
+			f.setHasShadow(p.isShadow);
+			f.setShadowAngle(Math.toRadians(p.shadowAngle));
+			f.setShadowSize(Math.abs(p.shadowSize)*Figure.PPC);
+			f.setShadowColor(p.shadowCol);
+		}
+		
+		if(f.canBeHatched())
+		{
+			f.setHatchingSep(p.hatchSep*Figure.PPC);
+			f.setGradientAngle(Math.toRadians(p.gradAngle));
+			f.setGradientEndColor(p.gradEnd);
+			f.setGradientMidPoint(p.gradMidPoint);
+			f.setGradientStartColor(p.gradBegin);
+		}
+	
+		f.setLinesColor(p.lineColor);
+		f.setBordersPosition(p.borderPos);
+		f.setDoubleColor(p.dbleColor);
+		f.setDoubleSep(Math.abs(p.dbleSep*Figure.PPC));
+		f.setHasDoubleBoundary(p.dbleLine);
+		f.setHatchingColor(p.hatchCol);
+		if(p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_SOLID))
+			 f.setHatchingStyle(PSTricksConstants.TOKEN_FILL_NONE);
+		else f.setHatchingStyle(
+				p.fillStyle.endsWith("*") ? p.fillStyle.substring(0, p.fillStyle.length()-1) : p.fillStyle);//$NON-NLS-1$
+		f.setHatchingWidth((float)Math.abs(p.hatchWidth*Figure.PPC));
+		f.setDotSep((float)  p.dotStep*Figure.PPC);
+		f.setHatchingAngle(Math.toRadians(p.hatchAngle));
+		f.setBlackDashLength((float)p.dashBlack*Figure.PPC);
+		f.setWhiteDashLength((float)p.dashWhite*Figure.PPC);
+		f.setInteriorColor(p.fillColor);
+		f.setIsFilled(p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_SOLID) ||
+				p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH_F) ||
+				p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_HLINES_F) ||
+				p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_VLINES_F));
+		f.setLineStyle(p.lineStyle);
+		f.setThickness((float)(Math.abs(p.lineWidth*Figure.PPC)));
+		
+		if(hasStar)
+		{
+			f.setIsFilled(true);
+			f.setInteriorColor(f.getLinesColor());
+			f.setHasDoubleBoundary(false);	
+			f.setLineStyle(PSTricksConstants.LINE_NONE_STYLE);
+			f.setHatchingStyle(PSTricksConstants.TOKEN_FILL_NONE);
+			f.setBordersPosition(PSTricksConstants.BORDERS_INSIDE);
+		}
+	}
+
+
+
+
+	@Override
+	public void actionsOnText() throws InvalidFormatCommandException
+	{
+		if(params.isEmpty()) return;
+		
+		if(params.lastElement().textParsed.length()!=0)
+		{
+			PSTParameters last = params.lastElement();
+			PositionParameters pp = null;
+			int i = params.size()-1;
+			
+			while(pp==null && i>=0)
+			{
+				pp = params.elementAt(i).getPosition();
+				i--;
+			}
+			
+			if(pp==null)
+				pp = new PositionParameters();
+			
+			Text t = new Text(true);
+			Point2D.Double posit = moveCoordinate(new Point2D.Double(0,0));
+			double angle = Math.toRadians(PSTParameters.getWholeRotationAngle(params));
+			
+			if(posit==null) throw new InvalidFormatCommandException("text", -1); //$NON-NLS-1$
+			
+			if(last.textSize!=null && last.textSize.length()!=0)
+				t.setSizeByCommand(last.textSize);
+			
+			if((last.textSeries!=null && last.textSeries.equals("b")) || last.textBold) //$NON-NLS-1$
+				 t.setIsBold(true);
+			else t.setIsBold(false);
+			
+			if((last.textShape!=null && (last.textShape.equals("sl") || //$NON-NLS-1$
+			   last.textShape.equals("it")) || last.textItalic)) //$NON-NLS-1$
+				 t.setIsItalic(true);
+			else t.setIsItalic(false);
+			
+			t.setRotationAngle(-angle);
+			t.setText(last.textParsed);
+			t.setLinesColor(last.textColor);
+			
+			if(last.textFamily!=null && last.textFamily.length()!=0)
+				t.setTextFontByFamily(last.textFamily);
+			
+			t.updateFontsBorders();
+			
+			LaTeXDrawPoint2D pos = new LaTeXDrawPoint2D(posit.x*Figure.PPC-t.getWidth()/2., 
+					(posit.y*Figure.PPC-t.getFontMetrics().getHeight()/4.)*-1);
+			
+			if(pp.refPoint!=PositionParameters.REF_POINT_DEFAULT_CENTER)
+			{
+				double addX=0, addY=0;
+				Point2D.Double gc = new Point2D.Double((pos.x+t.getWidth())/2.,(pos.y+t.getHeight())/2.);
+				
+				if(pp.refPoint==PositionParameters.REF_POINT_BASE)
+					addY=-t.getFontMetrics().getDescent();
+				else if(pp.refPoint==PositionParameters.REF_POINT_TOP)
+					addY=t.getFontMetrics().getAscent()/2.;
+				else if(pp.refPoint==PositionParameters.REF_POINT_BOTTOM)
+					addY=-t.getFontMetrics().getDescent()*2;
+				else if(pp.refPoint==PositionParameters.REF_POINT_LEFT)
+					addX=t.getWidth()/2.;
+				else if(pp.refPoint==PositionParameters.REF_POINT_RIGHT)
+					addX=-t.getWidth()/2.;
+				else if(pp.refPoint==PositionParameters.REF_POINT_RIGHT+PositionParameters.REF_POINT_BASE)
+				{
+					addY=-t.getFontMetrics().getDescent();
+					addX=-t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_RIGHT+PositionParameters.REF_POINT_BOTTOM)
+				{
+					addY=-t.getFontMetrics().getDescent()*2;
+					addX=-t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_RIGHT+PositionParameters.REF_POINT_TOP)
+				{
+					addY=t.getFontMetrics().getAscent()/2.;
+					addX=-t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_LEFT+PositionParameters.REF_POINT_BASE)
+				{
+					addY=-t.getFontMetrics().getDescent();
+					addX=t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_LEFT+PositionParameters.REF_POINT_BOTTOM)
+				{
+					addY=-t.getFontMetrics().getDescent()*2;
+					addX=t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_LEFT+PositionParameters.REF_POINT_TOP)
+				{
+					addY=t.getFontMetrics().getAscent()/2.;
+					addX=t.getWidth()/2.;
+				}
+				
+				addX+=pp.labelSep*Figure.PPC;
+				
+				Point2D.Double pt = rotatePoint(new Point2D.Double(gc.x+addX, gc.y-addY), gc, angle);
+				pos.setLocation(pos.x+(pt.x-gc.x), pos.y-(pt.y-gc.y));
+			}
+			
+			t.setPosition(pos);
+			t.updateFontsBorders();
+			
+			if(last.psCustomP.fromPsCustom)
+				psCustFigures.add(t);
+			else
+				shapes.add(t);
+		}
+	}
+}
diff --git a/current/latexDraw/parsers/pst/PSTParameters.java b/current/latexDraw/parsers/pst/PSTParameters.java
new file mode 100644
index 0000000..418962b
--- /dev/null
+++ b/current/latexDraw/parsers/pst/PSTParameters.java
@@ -0,0 +1,621 @@
+package latexDraw.parsers.pst;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+import java.awt.geom.Point2D.Double;
+import java.util.Vector;
+
+import latexDraw.figures.FramedBox;
+import latexDraw.figures.Text;
+import latexDraw.psTricks.PSTricksConstants;
+
+
+/** 
+ * This class defines a set of PSTricks parameters.
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/01/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.5<br>
+ */
+public class PSTParameters
+{
+	/**
+	 * Defines the parameters of the pscustom parameters.
+	 * @author Arnaud BLOUIN<br>
+	 * @version 0.3<br>
+	 */
+	public class PsCustomParameters implements Cloneable
+	{
+		/** Defines if the command pscustom has a star. */
+		public boolean hasStar;
+		
+		/** Defines if the current <code>PSTParameters</code> comes from a pscustom command. */
+		public boolean fromPsCustom;
+		
+		/** The last position (cf. <code>\moveto</code> pstricks command). */
+		public Point2D.Double lastPosition;
+		
+		
+		
+		public PsCustomParameters()
+		{
+			hasStar 		= false;
+			fromPsCustom	= false;
+			lastPosition	= new Point2D.Double();
+		}
+		
+		
+		
+		@Override
+		public Object clone() throws CloneNotSupportedException
+		{
+			PsCustomParameters pscp = (PsCustomParameters)super.clone();
+			
+			pscp.fromPsCustom	= fromPsCustom;
+			pscp.hasStar		= hasStar;
+			pscp.lastPosition	= (Double)lastPosition.clone();
+			
+			return pscp;
+		}
+	}
+	
+	
+	
+	/** 
+	 * This class defines the position managed with the rput and uput commands of the figures.<br>
+	 * This file is part of LaTeXDraw<br>
+	 * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+	 *<br>
+	 *  LaTeXDraw is free software; you can redistribute it and/or modify
+	 *  it under the terms of the GNU General Public License as published by
+	 *  the Free Software Foundation; either version 2 of the License, or
+	 *  (at your option) any later version.<br>
+	 *<br>
+	 *  LaTeXDraw is distributed without any warranty; without even the 
+	 *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+	 *  PURPOSE.  See the GNU General Public License for more details.<br>
+	 * <br>
+	 * 
+	 * 03/16/06<br>
+	 * @author Arnaud BLOUIN<br>
+	 * @version 0.5<br>
+	 */
+	public static class PositionParameters implements Cloneable
+	{
+		public static final short REF_POINT_DEFAULT_CENTER= 0;
+		
+		public static final short REF_POINT_LEFT  		= 10;
+		public static final short REF_POINT_RIGHT 		= 20;
+		
+		public static final short REF_POINT_TOP   		= 1;
+		public static final short REF_POINT_BOTTOM 		= 2;
+		public static final short REF_POINT_BASE 		= 3;
+		
+		/** True if the current {...} allows to sum all the rotations :<br>
+		 * rput{30}(0,0){ rput{*40}{...} ... } -> false<br>
+		 * rput{30}(0,0){ rput{40} {...} ... } -> true<br>
+		 */
+		public boolean isSumRotation;
+		
+		/** The x gap */
+		public double dx;
+		
+		/** The y gap */
+		public double dy;
+		
+		/** The rput angle in degrees */
+		public double angleRput;
+		
+		/** The uput angle in degrees. */
+		public double angleUput;
+		
+		/** The gap of the label */
+		public double labelSep;
+		
+		/** The point of reference (for rput). */
+		public int refPoint;
+		
+		/** The angle of reference (for uput in degrees). */
+		public double refAngle;
+		
+		
+		
+		/**
+		 * The constructor by default.
+		 */
+		public PositionParameters()
+		{
+			this(true, 0, 0, 0, 0, 0, REF_POINT_DEFAULT_CENTER, REF_POINT_RIGHT);
+		}
+		
+		
+		/**
+		 * The main constructor.
+		 * @param isSumRot True if allows to sum all the rotations
+		 * @param x The x gap
+		 * @param y The y gap
+		 * @param rputA The rput angle
+		 * @param uputA The uput angle
+		 * @param labSep The gap of the label (for uput).
+		 * @param refPt The point of reference (for rput).
+		 * @param refA The angle of reference (for uput).
+		 */
+		public PositionParameters(boolean isSumRot, double x, double y, double rputA, 
+							double uputA, double labSep, int refPt, double refA)
+		{
+			isSumRotation = isSumRot;
+			dx = x;
+			dy = y;
+			angleRput = rputA;
+			angleUput = uputA;
+			labelSep  = labSep;
+			
+			if(refPt==REF_POINT_LEFT || refPt==REF_POINT_BOTTOM || refPt== REF_POINT_BOTTOM+REF_POINT_LEFT ||
+				refPt==REF_POINT_BOTTOM+REF_POINT_RIGHT || refPt==REF_POINT_DEFAULT_CENTER || refPt==REF_POINT_RIGHT || 
+				refPt==REF_POINT_TOP || refPt==REF_POINT_TOP+REF_POINT_LEFT || refPt==REF_POINT_TOP+REF_POINT_RIGHT || 
+				refPt==REF_POINT_BASE || refPt==REF_POINT_BASE+REF_POINT_LEFT || refPt==REF_POINT_BASE+REF_POINT_RIGHT)
+				refPoint = refPt;
+			else
+				refPoint = REF_POINT_DEFAULT_CENTER;
+			
+			if(refA==REF_POINT_LEFT || refA==REF_POINT_BOTTOM || refA== REF_POINT_BOTTOM+REF_POINT_LEFT ||
+				refA==REF_POINT_BOTTOM+REF_POINT_RIGHT || refA==REF_POINT_DEFAULT_CENTER || refA==REF_POINT_RIGHT || 
+				refA==REF_POINT_TOP || refA==REF_POINT_TOP+REF_POINT_LEFT || refA==REF_POINT_TOP+REF_POINT_RIGHT || 
+				refA==REF_POINT_BASE || refA==REF_POINT_BASE+REF_POINT_LEFT || refA==REF_POINT_BASE+REF_POINT_RIGHT)
+				refAngle = refA;
+			else
+				refAngle = REF_POINT_RIGHT;
+		}
+		
+		
+		
+		@Override
+		public String toString()
+		{
+			return "PositionParameters : <isSum="+ //$NON-NLS-1$
+			isSumRotation +", dx="+dx+", dy="+dy+", angleRput="+angleRput+", labelSep="+//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+			labelSep+", refPoint="+refPoint+">";//$NON-NLS-1$//$NON-NLS-2$
+		}
+		
+		
+		
+		@Override
+		public Object clone() throws CloneNotSupportedException
+		{
+			return super.clone();
+		}
+	}
+	
+	
+	
+	
+	public static boolean isCentered = false;
+	public static Point2D.Double pictureSWPt=null;
+	public static Point2D.Double pictureNEPt=null;
+	public static String tokenPosition = "";//$NON-NLS-1$
+	
+	private PositionParameters position;
+	
+	public String axesStyle;
+	public String[] arrowStyle;
+	public double arrowSizeD;
+	public double arrowSizeN;
+	public double arrowLgth;
+	public double arrowInset;
+	public double arrowTBarSD;
+	public double arrowTBarSN;
+	public double arrowBrLgth;
+	public double arrowrBrLgth;
+	public double arrowDotSD;
+	public double arrowDotSN;
+	public double arrowScale1;
+	public double arrowScale2;
+	public double arcSep;
+	public double arcSepA;
+	public double arcSepB;
+	public boolean boxSep;
+	public Color borderColor;
+	public String borderPos;
+	public double border;
+	public double curvature1;
+	public double curvature2;
+	public double curvature3;
+	public double dxIncrement;
+	public double dyIncrement;
+	public double dxLabelDist;
+	public double dyLabelDist;
+	public String dotStyle;
+	public double dotScale1;
+	public double dotScale2;
+	public double dotAngle;
+	public double dotStep;
+	public double dashBlack;
+	public double dashWhite;
+	public boolean dbleLine;
+	public double dbleSep;
+	public Color dbleColor;
+	public double degrees;
+	public double frameSep;
+	public double frameArc;
+	public String fillStyle;
+	public Color fillColor;
+	public double gridWidth;
+	public double gridLabel;
+	public int gridDots;
+	public double gradAngle;
+	public Color gridColor;
+	public double gradMidPoint;
+	public Color gradBegin;
+	public Color gradEnd;
+	public int gradLines;
+	public double gangle;
+	public double hatchWidth;
+	public double hatchSep;
+	public Color hatchCol;
+	public double hatchAngle;
+	public boolean isCornerRel;
+	public boolean isShadow;
+	public double lineWidth;
+	public Color lineColor;
+	public Color labelsGridCol;
+	public String labels;
+	public double lineArc;
+	public String lineStyle;
+	public double ox;
+	public double oy;
+	public boolean onRadians;
+	public Point2D.Double origin;
+	public boolean specialCoor;
+	public boolean showPoints;
+	public boolean showOrigin;
+	public double subGridWidth;
+	public boolean swapAxes;
+	public Color shadowCol;
+	public Color subGridCol;
+	public double shadowAngle;
+	public double shadowSize;
+	public int subGridDots;
+	public int subGridDiv;
+	public String ticks;
+	public String ticksStyle;
+	public double ticksSize;
+	public boolean textItalic;
+	public boolean textBold;
+	public String textEnc;
+	public String textShape;
+	public String textSeries;
+	public String textFamily;
+	public Color textColor;
+	public String textSize; 
+	public String textParsed;
+	public double unit;
+	public double xUnit;
+	public double yUnit;
+	
+	public Vector<FramedBox> psBox = new Vector<FramedBox>();
+	public Text psBoxText;
+	public boolean fromFramedBox;
+	
+	/** The parsed text which is transfered by psframe commands to the rput PSTParameters. */
+	public String textForFrame;
+	
+	public PsCustomParameters psCustomP;
+	
+	
+	/**
+	 * The constructor by default.
+	 */
+	public PSTParameters()
+	{
+		psCustomP 		= new PsCustomParameters();
+		textForFrame 	= "";//$NON-NLS-1$
+		fromFramedBox 	= false;
+		textParsed 		= "";//$NON-NLS-1$
+		position 	= null;
+		textBold 	= false;
+		textItalic 	= false;
+		boxSep		= PSTricksConstants.DEFAULT_BOX_SEP;
+		frameSep	= PSTricksConstants.DEFAULT_FRAME_SEP;
+		gradAngle	= PSTricksConstants.DEFAULT_GRADIENT_ANGLE;
+		gradMidPoint = PSTricksConstants.DEFAULT_GRADIENT_MID_POINT;
+		gradLines	= PSTricksConstants.DEFAULT_GRADIENT_LINES;
+		gradBegin	= PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+		gradEnd		= PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+		gangle		= PSTricksConstants.DEFAULT_GANGLE;
+		specialCoor = PSTricksConstants.DEFAULT_SPECIAL_COOR;
+		onRadians	= PSTricksConstants.DEFAULT_ON_RADIANS;
+		degrees		= PSTricksConstants.DEFAULT_DEGREES;
+		unit		= PSTricksConstants.DEFAULT_UNIT;
+		xUnit		= PSTricksConstants.DEFAULT_UNIT;
+		yUnit		= PSTricksConstants.DEFAULT_UNIT;
+		lineWidth 	= PSTricksConstants.DEFAULT_LINE_WIDTH;
+		lineColor 	= PSTricksConstants.DEFAULT_LINE_COLOR;
+		showPoints 	= PSTricksConstants.DEFAULT_SHOW_POINTS;
+		lineArc 	= PSTricksConstants.DEFAULT_LINE_ARC;
+		frameArc 	= PSTricksConstants.DEFAULT_FRAME_ARC;
+		isCornerRel = PSTricksConstants.DEFAULT_CORNER_SIZE_RELATIVE;
+		arcSep		= PSTricksConstants.DEFAULT_ARC_SEP;
+		arcSepA 	= PSTricksConstants.DEFAULT_ARC_SEP_A;
+		arcSepB 	= PSTricksConstants.DEFAULT_ARC_SEP_B;
+		curvature1	= PSTricksConstants.DEFAULT_CURVATURE_NUM1;
+		curvature2	= PSTricksConstants.DEFAULT_CRUVATURE_NUM2;
+		curvature3	= PSTricksConstants.DEFAULT_CRUVATURE_NUM3;
+		dotStyle	= PSTricksConstants.DEFAULT_DOT_STYLE;
+		dotScale1	= PSTricksConstants.DEFAULT_DOT_SCALE1;
+		dotScale2	= PSTricksConstants.DEFAULT_DOT_SCALE2;
+		dotAngle	= PSTricksConstants.DEFAULT_DOT_ANGLE;
+		gridWidth	= PSTricksConstants.DEFAULT_GRID_WIDTH;
+		gridLabel	= PSTricksConstants.DEFAULT_GRID_LABEL/PSTricksConstants.CM_VAL_PT;
+		subGridWidth= PSTricksConstants.DEFAULT_SUB_GRID_WIDTH;
+		subGridCol	= PSTricksConstants.DEFAULT_SUB_GRID_COLOR;
+		gridColor	= PSTricksConstants.DEFAULT_GRIDCOLOR;
+		labelsGridCol	= PSTricksConstants.DEFAULT_LABELGRIDCOLOR;
+		subGridDiv		= PSTricksConstants.DEFAULT_SUBGRIDDIV;
+		gridDots		= PSTricksConstants.DEFAULT_GRIDDOTS;
+		subGridDots		= PSTricksConstants.DEFAULT_SUBGRIDDOTS;
+		swapAxes	= PSTricksConstants.DEFAULT_SWAP_AXES;
+		origin 		= (Point2D.Double)PSTricksConstants.DEFAULT_ORIGIN.clone();
+		lineStyle	= PSTricksConstants.DEFAULT_LINE_STYLE;
+		dotStep		= PSTricksConstants.DEFAULT_DOT_STEP;
+		dashBlack	= PSTricksConstants.DEFAULT_DASH_BLACK;
+		dashWhite	= PSTricksConstants.DEFAULT_DASH_WHITE;
+		borderColor	= PSTricksConstants.DEFAULT_BORDER_COLOR;
+		border		= PSTricksConstants.DEFAULT_BORDER;
+		dbleLine	= PSTricksConstants.DEFAULT_DOUBLE_LINE;
+		dbleSep		= PSTricksConstants.DEFAULT_DOUBLE_SEP;
+		dbleColor	= PSTricksConstants.DEFAULT_DOUBLE_COLOR;
+		shadowCol	= PSTricksConstants.DEFAULT_SHADOW_COLOR;
+		isShadow	= PSTricksConstants.DEFAULT_SHADOW;
+		shadowAngle	= PSTricksConstants.DEFAULT_SHADOW_ANGLE;
+		shadowSize	= PSTricksConstants.DEFAULT_SHADOW_SIZE;
+		borderPos	= PSTricksConstants.DEFAULT_BORDERS_POS;
+		fillStyle	= PSTricksConstants.DEFAULT_FILL_STYLE;
+		fillColor	= PSTricksConstants.DEFAULT_FILL_COLOR;
+		hatchWidth	= PSTricksConstants.DEFAULT_HATCH_WIDTH;
+		hatchSep	= PSTricksConstants.DEFAULT_HATCH_SEP;
+		hatchCol	= PSTricksConstants.DEFAULT_HATCHING_COLOR;
+		hatchAngle	= PSTricksConstants.DEFAULT_HATCH_ANGLE;
+		arrowStyle	= new String[2];
+		arrowStyle[0] = PSTricksConstants.DEFAULT_ARROW_STYLE;
+		arrowStyle[1] = PSTricksConstants.DEFAULT_ARROW_STYLE;
+		arrowSizeD	= PSTricksConstants.DEFAULT_ARROW_SIZE_DIM;
+		arrowSizeN	= PSTricksConstants.DEFAULT_ARROW_SIZE_NUM;
+		arrowLgth	= PSTricksConstants.DEFAULT_ARROW_LENGTH;
+		arrowInset	= PSTricksConstants.DEFAULT_ARROW_INSET;
+		arrowTBarSD	= PSTricksConstants.DEFAULT_ARROW_TBARSIZE_DIM;
+		arrowTBarSN	= PSTricksConstants.DEFAULT_ARROW_TBARSIZE_NUM;
+		arrowBrLgth	= PSTricksConstants.DEFAULT_ARROW_BRACKET_LGTH;
+		arrowrBrLgth= PSTricksConstants.DEFAULT_ARROW_RBRACKET_LGTH;
+		arrowDotSD	= PSTricksConstants.DEFAULT_ARROW_DOTSIZE_DIM;
+		arrowDotSN	= PSTricksConstants.DEFAULT_ARROW_DOTSIZE_NUM;
+		arrowScale1	= PSTricksConstants.DEFAULT_ARROW_SCALE1;
+		arrowScale2	= PSTricksConstants.DEFAULT_ARROW_SCALE2;
+		textEnc		= null;
+		textShape	= null;
+		textSeries	= null;
+		textFamily	= null;
+		textColor	= Color.BLACK;
+		textSize 	= PSTricksConstants.COMMAND_TEXT_NORMAL;
+		psBoxText = new Text(null, false);
+		psBox = new Vector<FramedBox>();
+		showOrigin 	= PSTricksConstants.DEFAULT_SHOW_ORIGIN;
+		axesStyle	= PSTricksConstants.DEFAULT_AXES_STYLE;
+		ticks		= PSTricksConstants.DEFAULT_TICKS_DISPLAYED;
+		ticksSize	= PSTricksConstants.DEFAULT_TICKS_SIZE;
+		ticksStyle	= PSTricksConstants.DEFAULT_TICKS_STYLE;
+		labels		= PSTricksConstants.DEFAULT_LABELS_DISPLAYED;
+		ox			= PSTricksConstants.DEFAULT_OX;
+		oy			= PSTricksConstants.DEFAULT_OY;
+		dxIncrement	= PSTricksConstants.DEFAULT_DX;
+		dyIncrement = PSTricksConstants.DEFAULT_DY;
+		dxLabelDist	= PSTricksConstants.DEFAULT_DIST_X_LABEL;
+		dyLabelDist	= PSTricksConstants.DEFAULT_DIST_Y_LABEL;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * The constructor that copies a PSTParameters from another.
+	 */
+	public PSTParameters(PSTParameters toCopy)
+	{
+		try
+		{
+			psCustomP 	= (PsCustomParameters)toCopy.psCustomP.clone();
+		} catch(CloneNotSupportedException e)
+		{
+			psCustomP = new PsCustomParameters();
+		}
+		textForFrame 	= "";//$NON-NLS-1$
+		boxSep 			= toCopy.boxSep;
+		frameSep 		= toCopy.frameSep;
+		fromFramedBox 	= toCopy.fromFramedBox;
+		textParsed  = "";//$NON-NLS-1$
+		position    = null;
+		gradAngle 	= toCopy.gradAngle;
+		gradBegin	= toCopy.gradBegin;
+		gradEnd		= toCopy.gradEnd;
+		gradLines	= toCopy.gradLines;
+		gradMidPoint = toCopy.gradMidPoint;
+		textBold 	= toCopy.textBold;
+		textItalic 	= toCopy.textItalic;
+		gangle		= toCopy.gangle;
+		specialCoor = toCopy.specialCoor;
+		onRadians	= toCopy.onRadians;
+		degrees		= toCopy.degrees;
+		xUnit		= toCopy.xUnit;
+		yUnit		= toCopy.yUnit;
+		unit		= toCopy.unit;
+		lineWidth 	= toCopy.lineWidth;
+		lineColor 	= toCopy.lineColor;
+		showPoints 	= toCopy.showPoints;
+		lineArc 	= toCopy.lineArc;
+		frameArc 	= toCopy.frameArc;
+		isCornerRel = toCopy.isCornerRel;
+		arcSep		= toCopy.arcSep;
+		arcSepA 	= toCopy.arcSepA;
+		arcSepB 	= toCopy.arcSepB;
+		curvature1	= toCopy.curvature1;
+		curvature2	= toCopy.curvature2;
+		curvature3	= toCopy.curvature3;
+		dotStyle	= toCopy.dotStyle;
+		dotScale1	= toCopy.dotScale1;
+		dotScale2	= toCopy.dotScale2;
+		dotAngle	= toCopy.dotAngle;
+		gridWidth	= toCopy.gridWidth;
+		gridLabel	= toCopy.gridLabel;
+		subGridWidth= toCopy.subGridWidth;
+		subGridCol	= toCopy.subGridCol;
+		gridColor	= toCopy.gridColor;
+		labelsGridCol	= toCopy.labelsGridCol;
+		subGridDiv		= toCopy.subGridDiv;
+		gridDots		= toCopy.gridDots;
+		subGridDots		= toCopy.subGridDots;
+		swapAxes	= toCopy.swapAxes;
+		origin 		= new Point2D.Double(toCopy.origin.x, toCopy.origin.y);
+		lineStyle	= toCopy.lineStyle;
+		dotStep		= toCopy.dotStep;
+		dashBlack	= toCopy.dashBlack;
+		dashWhite	= toCopy.dashWhite;
+		borderColor	= toCopy.borderColor;
+		border		= toCopy.border;
+		dbleLine	= toCopy.dbleLine;
+		dbleSep		= toCopy.dbleSep;
+		dbleColor	= toCopy.dbleColor;
+		shadowCol	= toCopy.shadowCol;
+		isShadow	= toCopy.isShadow;
+		shadowAngle	= toCopy.shadowAngle;
+		shadowSize	= toCopy.shadowSize;
+		borderPos	= toCopy.borderPos;
+		fillStyle	= toCopy.fillStyle;
+		fillColor	= toCopy.fillColor;
+		hatchWidth	= toCopy.hatchWidth;
+		hatchSep	= toCopy.hatchSep;
+		hatchCol	= toCopy.hatchCol;
+		hatchAngle	= toCopy.hatchAngle;
+		arrowStyle	= new String[2];
+		arrowStyle[0] = toCopy.arrowStyle[0];
+		arrowStyle[1] = toCopy.arrowStyle[1];
+		arrowSizeD	= toCopy.arrowSizeD;
+		arrowSizeN	= toCopy.arrowSizeN;
+		arrowLgth	= toCopy.arrowLgth;
+		arrowInset	= toCopy.arrowInset;
+		arrowTBarSD	= toCopy.arrowTBarSD;
+		arrowTBarSN	= toCopy.arrowTBarSN;
+		arrowBrLgth	= toCopy.arrowBrLgth;
+		arrowrBrLgth= toCopy.arrowrBrLgth;
+		arrowDotSD	= toCopy.arrowDotSD;
+		arrowDotSN	= toCopy.arrowDotSN;
+		arrowScale1	= toCopy.arrowScale1;
+		arrowScale2	= toCopy.arrowScale2;
+		textEnc		= toCopy.textEnc;
+		textShape	= toCopy.textShape;
+		textSeries	= toCopy.textSeries;
+		textFamily	= toCopy.textFamily;
+		textColor	= toCopy.textColor;
+		textSize 	= toCopy.textSize;
+		psBoxText = new Text(null, false);
+		psBox = new Vector<FramedBox>();
+		showOrigin 	= toCopy.showOrigin;
+		axesStyle	= toCopy.axesStyle;
+		ticks		= toCopy.ticks;
+		ticksSize	= toCopy.ticksSize;
+		ticksStyle	= toCopy.ticksStyle;
+		labels		= toCopy.labels;
+		ox			= toCopy.ox;
+		oy			= toCopy.oy;
+		dxIncrement	= toCopy.dxIncrement;
+		dyIncrement = toCopy.dyIncrement;
+		dxLabelDist	= toCopy.dxLabelDist;
+		dyLabelDist	= toCopy.dyLabelDist;
+	}
+
+
+
+
+
+	/**
+	 * @return the position.
+	 */
+	public PositionParameters getPosition()
+	{
+		return position;
+	}
+
+
+
+
+
+	/**
+	 * Sets a new position.
+	 */
+	public void setPosition(double dx, double dy, boolean isSumRot, double rputA, double uputA, 
+							int refPt, double labelSep, double refAngle)
+	{
+		position = new PositionParameters(isSumRot, dx, dy, rputA, uputA, labelSep, refPt, refAngle);
+	}
+	
+	
+	
+	
+	/**
+	 * @return The whole rotation angle (in degrees).
+	 */
+	public static double getWholeRotationAngle(Vector<PSTParameters> params)
+	{
+		int i=0, size = params.size();
+		double sum=0;
+		
+		if(size>0)
+		{
+			PositionParameters pos = params.elementAt(i).getPosition();
+			if(pos!=null)
+			{
+				if(pos.isSumRotation)
+					sum+=pos.angleRput;
+				else sum = pos.angleRput;
+			}
+		}
+		
+		for(i=1; i<size; i++)
+		{
+			PositionParameters pos = params.elementAt(i).getPosition();
+			if(pos!=null)
+			{
+				if(pos.isSumRotation)
+					sum+=((360/params.elementAt(i-1).degrees)*pos.angleRput);
+				else sum = ((360/params.elementAt(i-1).degrees)*pos.angleRput);
+			}
+		}
+		return sum;
+	}
+
+
+
+	
+	/**
+	 * Reinitialises the general parameters.
+	 * @since 1.9
+	 */
+	public static void reinitialize()
+	{
+		isCentered 	= false;
+		pictureNEPt = null;
+		pictureSWPt = null;
+		tokenPosition = "";//$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/parsers/pst/PSTParametersParser.java b/current/latexDraw/parsers/pst/PSTParametersParser.java
new file mode 100644
index 0000000..f313980
--- /dev/null
+++ b/current/latexDraw/parsers/pst/PSTParametersParser.java
@@ -0,0 +1,1813 @@
+package latexDraw.parsers.pst;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+
+import latexDraw.parsers.CodeParser;
+import latexDraw.parsers.IgnoreCommandException;
+import latexDraw.parsers.InvalidFormatCommandException;
+import latexDraw.parsers.UnclosedBracketsException;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+
+/**
+ * Defines a parser that parses pstricks parameters ([...]) and related pstricks stuffs like
+ * real numbers, strings, and so on. To be efficient, the code core of a pstricks parser should
+ * be shared with the pstricks parameters parser.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/21/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.2<br>
+ */
+public class PSTParametersParser extends CodeParser
+{
+	/** The current pstricks parameters. */
+	protected PSTParameters param;
+	
+	
+	/**
+	 * Creates and initialises a pstricks parameters parser.
+	 * @param code The code to parse.
+	 * @param params The current pstricks parameters that will be filled
+	 * during the parsing. Can be null.
+	 * @throws IllegalArgumentException If the given code is null.
+	 */
+	public PSTParametersParser(String code, PSTParameters params)
+	{
+		super(code);
+		
+		this.param = params;
+	}
+	
+
+	
+	/**
+	 * Skips the useless characters and a possible comma.
+	 * @since 2.0.2
+	 */
+    public void skipWSPComma()
+	{
+    	skipWSP();
+    	
+    	if(getChar()==',')
+    	{
+    		nextChar();
+    		skipWSP();
+    	}
+	}
+    
+    
+    
+    
+    private void parse_s() throws IgnoreCommandException
+    {
+		switch(nextChar())
+		{
+			case 'h' : //sh
+				switch(nextChar())
+				{
+					case 'a' : // sha
+						if(nextChar()=='d' && nextChar()=='o' && nextChar()=='w') // shadow
+							switch(nextChar())
+							{
+								case 's' : // shadowsize = Real unit
+									if(nextChar()=='i' && nextChar()=='z' && nextChar()=='e' && (nextChar()=='=' || isWSPComment()))
+									{
+										double val = readEqualRealUnit();
+										if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+										param.shadowSize = val;
+									}
+									else 
+										throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'a' : // shadowangle = Real
+									if(nextChar()=='n' && nextChar()=='g' && nextChar()=='l' && nextChar()=='e' && 
+										(nextChar()=='=' || isWSPComment()))
+									{
+										double val = readEqualReal();
+										if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+										param.shadowAngle = val;
+									}
+									else 
+										throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'c' : // shadowcolor = String
+									if(nextChar()=='o' && nextChar()=='l' && nextChar()=='o' && nextChar()=='r' && 
+										(nextChar()=='=' || isWSPComment()))
+									{
+										String s2 = readEqualString(true);
+										Color c   = DviPsColors.getColour(s2); // We search the colour
+										if(c==null) throw new IgnoreCommandException(-1);
+										param.shadowCol = c;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+								
+								default :
+									skipWSPComments();
+								
+									if((getChar()=='=' || isWSPComment()))
+									{// shadow
+										String s = readEqualString(false);
+										if("true".equals(s)) 	   param.isShadow = true;//$NON-NLS-1$
+										else if("false".equals(s)) param.isShadow = false;//$NON-NLS-1$
+										else throw new IgnoreCommandException(-1);
+									}
+									else
+										throw new IgnoreCommandException(-1);
+							}
+						else throw new IgnoreCommandException(-1);
+						break;
+						
+					case 'o' : // sho
+						if(nextChar()=='w')//show
+							switch(nextChar())
+							{
+								case 'p'://showp
+									if(nextChar()=='o' && nextChar()=='i' && nextChar()=='n' && nextChar()=='t' && 
+										nextChar()=='s' && (nextChar()=='=' || isWSPComment()))
+									{//showpoints = true|false
+										String s = readEqualString(false);
+										if("true".equals(s)) 	   param.showPoints = true;//$NON-NLS-1$
+										else if("false".equals(s)) param.showPoints = false;//$NON-NLS-1$
+										else throw new IgnoreCommandException(-1);
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'o'://showo
+									if(nextChar()=='r' && nextChar()=='i' && nextChar()=='g' && nextChar()=='i' && 
+										nextChar()=='n' && (nextChar()=='=' || isWSPComment()))
+									{//showorigin = true|false
+										String s = readEqualString(false);
+										if("true".equals(s))       param.showOrigin = true;//$NON-NLS-1$
+										else if("false".equals(s)) param.showOrigin = false;//$NON-NLS-1$
+										else throw new IgnoreCommandException(-1);
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								default: throw new IgnoreCommandException(-1);
+							}
+						else throw new IgnoreCommandException(-1);
+						break;
+						
+					default : throw new IgnoreCommandException(-1);
+				}
+				break;
+				
+			case 'u' : // su
+				if(nextChar()=='b' && nextChar()=='g' && nextChar()=='r' && nextChar()=='i' && nextChar()=='d') // subgrid
+				{
+					switch(nextChar())
+					{
+						case 'd' : // subgridd
+							switch(nextChar())
+							{
+								case 'o' : // subgriddots = Integer
+									if(nextChar()=='t' && nextChar()=='s' && (nextChar()=='=' || isWSPComment()))
+									{
+										int val = readEqualInteger();
+										if(val==Integer.MAX_VALUE) throw new IgnoreCommandException(-1);
+										param.subGridDots = val;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'i' : // subgriddiv = Integer
+									if(nextChar()=='v' && (nextChar()=='=' || isWSPComment()))
+									{
+										int val = readEqualInteger();
+										if(val==Integer.MAX_VALUE) throw new IgnoreCommandException(-1);
+										param.subGridDiv = val;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+								
+								default : throw new IgnoreCommandException(-1);
+							}
+							break;
+							
+						case 'w' : // subgridwidth = Real unit
+							if(nextChar()=='i' && nextChar()=='d' && nextChar()=='t' && nextChar()=='h' && 
+								(nextChar()=='=' || isWSPComment()))
+							{
+								double val = readEqualRealUnit();
+								if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+								param.subGridWidth = val;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+							
+						case 'c': // subgridcolor = String
+							if(nextChar()=='o' && nextChar()=='l' && nextChar()=='o' && nextChar()=='r' && 
+								(nextChar()=='=' || isWSPComment()))
+							{
+								String s2 = readEqualString(true);
+								Color c   = DviPsColors.getColour(s2); // We search the colour
+								if(c==null)	throw new IgnoreCommandException(-1);
+								param.subGridCol = c;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+							
+						default : throw new IgnoreCommandException(-1);
+					}
+				}else throw new IgnoreCommandException(-1);
+				break;
+				
+			case 'w' : // swapaxes = true|false
+				if(nextChar()=='a' && nextChar()=='p' && nextChar()=='a' && nextChar()=='x' && 
+					nextChar()=='e' && nextChar()=='s' && (nextChar()=='=' || isWSPComment()))
+				{
+					String s = readEqualString(false);
+					if("true".equals(s)) 	   param.swapAxes = true;//$NON-NLS-1$
+					else if("false".equals(s)) param.swapAxes = false;//$NON-NLS-1$
+					else throw new IgnoreCommandException(-1);
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+		
+			default : throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+    
+    private void parse_d() throws IgnoreCommandException
+    {
+		switch(nextChar())
+		{
+			case 'o' : // do
+				switch(nextChar())
+				{
+					case 't' : // dot
+						switch(nextChar())
+						{
+							case 's' : // dots
+								switch(nextChar())
+								{
+									case 'i' : //dotsize = Real unit Real
+										if(nextChar()=='z' && nextChar()=='e' && (nextChar()=='=' || isWSPComment()))
+										{
+											double val = readEqualRealUnit();
+											if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+											param.arrowDotSD = val;
+											
+											skipWSPComments();
+	
+											if(Character.isDigit(getChar()) || getChar()=='.')
+											{
+												val = readReal();// If there is the x, we read it
+												if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+												param.arrowDotSN = val;
+											}
+											else param.arrowDotSN = 0.;
+										}
+										else throw new IgnoreCommandException(-1);
+										break;
+										
+									case 't' : // dotstyle = String
+										if(nextChar()=='y' && nextChar()=='l' && nextChar()=='e' && 
+											(nextChar()=='=' || isWSPComment()))
+										{
+											skipWSPComments();
+											
+											if(getChar()!='=')
+												throw new IgnoreCommandException(-1);
+											
+											nextChar();
+											skipWSPComments();
+											
+											String s;
+											
+											if(getChar()=='|' || getChar()=='+')
+											{
+												 s = String.valueOf((char)getChar());
+												 nextChar();
+											}
+											else
+											{
+												s = readString(false);
+												if(getChar()=='*')
+												{
+													s+=String.valueOf((char)getChar());
+													nextChar();
+												}
+											}
+											
+											if(!PSTricksConstants.isValidDotStyle(s))
+												throw new IgnoreCommandException(-1);
+											
+											param.dotStyle = s;
+										}
+										else throw new IgnoreCommandException(-1);
+										break;
+										
+									case 'c' : // dotscale = Real Real
+										if(nextChar()=='a' && nextChar()=='l' && nextChar()=='e' && 
+											(nextChar()=='=' || isWSPComment()))
+										{
+											double val = readEqualReal(); // We read the first parameter
+											if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+											param.dotScale1 = val;
+											
+											if(Character.isDigit(getChar()) || getChar()=='.')
+											{
+												val = readReal();// If there is the x, we read it
+												if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+												param.dotScale2 = val;
+											}
+											else param.dotScale2 = 1.;
+										}
+										else throw new IgnoreCommandException(-1);
+										break;
+										
+									case 'e' : // dotsep = Real unit
+										if(nextChar()=='p' && (nextChar()=='=' || isWSPComment()))
+										{
+											double val = readEqualRealUnit();
+											if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+											param.dotStep = val;
+										}
+										else throw new IgnoreCommandException(-1);
+										break;
+								
+									default : throw new IgnoreCommandException(-1);
+								}
+								break;
+								
+							case 'a' : // dotangle = Real
+								if(nextChar()=='n' && nextChar()=='g' && nextChar()=='l' && nextChar()=='e' &&
+									(nextChar()=='=' || isWSPComment()))
+								{
+									double val = readEqualReal();
+									
+									if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+									param.dotAngle = val;
+								}
+								else throw new IgnoreCommandException(-1);
+								break;
+						
+							default : throw new IgnoreCommandException(-1);
+						}
+						break;
+						
+					case 'u' : // dou
+						if(nextChar()=='b' && nextChar()=='l' && nextChar()=='e') // double
+							switch(nextChar())
+							{
+								case 'l' : // doubleline = true/false
+									if(nextChar()=='i' && nextChar()=='n' && nextChar()=='e' && 
+										(nextChar()=='=' || isWSPComment()))
+									{
+										String s = readEqualString(false);
+										if(s==null) throw new IgnoreCommandException(-1);
+										if(s.equals("true")) 	   param.dbleLine = true;//$NON-NLS-1$
+										else if(s.equals("false")) param.dbleLine = false;//$NON-NLS-1$
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 's' : // doublesep = Real unit
+									if(nextChar()=='e' && nextChar()=='p' && (nextChar()=='=' || isWSPComment()))
+									{
+										double val = readEqualRealUnit();
+										if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+										param.dbleSep = val;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'c' : // doubleColor = String
+									if(nextChar()=='o' && nextChar()=='l' && nextChar()=='o' && nextChar()=='r' &&
+										(nextChar()=='=' || isWSPComment()))
+									{
+										String s2 = readEqualString(true);
+										Color c = DviPsColors.getColour(s2); // We search the colour
+										if(c==null) throw new IgnoreCommandException(-1);
+										param.dbleColor = c;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+								
+								default : throw new IgnoreCommandException(-1);
+							}
+						else throw new IgnoreCommandException(-1);
+						break;
+					
+					default : throw new IgnoreCommandException(-1);
+				}
+				break;
+				
+			case 'i' : // dimen = outer|inner|middle
+				if(nextChar()=='m' && nextChar()=='e' && nextChar()=='n' && (nextChar()=='=' || isWSPComment()))
+				{
+					String s = readEqualString(false);
+					
+					if(PSTricksConstants.BORDERS_INSIDE.equals(s) || PSTricksConstants.BORDERS_MIDDLE.equals(s) ||
+						PSTricksConstants.BORDERS_OUTSIDE.equals(s))
+						param.borderPos = s;
+					else throw new IgnoreCommandException(-1);
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			case 'a' : // dash = Real unit Real unit
+				if(nextChar()=='s' && nextChar()=='h' && (nextChar()=='=' || isWSPComment()))
+				{
+					double r1 = readEqualRealUnit();
+					if(Double.isNaN(r1)) throw new IgnoreCommandException(-1);
+					double r2 = readRealUnit(); // We read the second parameter
+					if(Double.isNaN(r2)) throw new IgnoreCommandException(-1);
+					
+					param.dashBlack = r1;
+					param.dashWhite = r2;
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			case 'x'://dx = real unit
+				if((nextChar()=='=' || isWSPComment()))
+				{
+					double val = readEqualRealUnit();
+					if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+					param.dxLabelDist = val;
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			case 'y'://dy = real unit
+				if((nextChar()=='=' || isWSPComment()))
+				{
+					double val = readEqualRealUnit();
+					if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+					param.dyLabelDist = val;
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+		
+			default : throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+    
+    private void parse_a() throws IgnoreCommandException
+    {
+		switch(getChar())
+		{
+			case 'r':
+				switch(nextChar())
+				{
+					case 'c' : //arc
+						if(nextChar()=='s' && nextChar()=='e' && nextChar()=='p') // arcsep
+							switch(nextChar())
+							{
+								case 'A' : // arcsepA = Real unit
+									double val = readEqualRealUnit();
+									if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+									param.arcSepA = val;
+									break;
+										
+								case 'B' : // arcSepB = Real unit
+									val = readEqualRealUnit();
+									if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+									param.arcSepB = val;
+									break;
+							
+								default : 
+									if(nextChar()=='=' || isWSPComment())
+									{ // arcsep = Real
+										val = readEqualReal();
+										if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+										param.arcSep = val;
+									}
+									else throw new IgnoreCommandException(-1);
+							}
+						else throw new IgnoreCommandException(-1);
+						break;
+						
+					case 'r' : //arr
+						if(nextChar()=='o' && nextChar()=='w') // arrow
+							switch(nextChar())
+							{
+								case 's' : // arrows
+									switch(nextChar())
+									{
+										case 'i' : // arrowsize= Real unit Real
+												if(nextChar()=='z' && nextChar()=='e' && (nextChar()=='=' || isWSPComment()))
+												{
+													double val = readEqualRealUnit();
+													if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+													param.arrowSizeD = val;
+													skipWSPComments();
+													
+													if((getChar()>='0' && getChar()<='9') || getChar()=='.')
+													{
+														val = readReal();
+														if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+														param.arrowSizeN = val;// If there is the x, we read it
+													}
+												}
+												else throw new IgnoreCommandException(-1);
+												break;
+											
+										case '=':
+												nextChar();
+												skipWSPComments();
+												
+												if(getChar()!='-')
+												{
+													param.arrowStyle[0] = String.valueOf((char)getChar());
+													nextChar();
+													skipWSPComments();
+													
+													if(getChar()!='-')
+														throw new IgnoreCommandException(-1);
+												}
+												
+												nextChar();
+												skipWSPComments();
+												
+												if(getChar()!=',' || getChar()!=']')
+													param.arrowStyle[1] = String.valueOf((char)getChar());
+												
+												nextChar();
+												break;
+												
+										default: throw new IgnoreCommandException(-1);
+									}
+									break;
+									
+								case 'l' : // arrowlength = Real
+									if(nextChar()=='e' && nextChar()=='n' && nextChar()=='g' && nextChar()=='t' && 
+										nextChar()=='h' && (nextChar()=='=' || isWSPComment()))
+									{
+										double val = readEqualReal();
+										if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+										param.arrowLgth = val;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'i' : // arrowinset = Real
+									if(nextChar()=='n' && nextChar()=='s' && nextChar()=='e' && nextChar()=='t' && 
+										(nextChar()=='=' || isWSPComment()))
+									{
+										double val = readEqualReal();
+										if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+										param.arrowInset = val;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+								
+								default : throw new IgnoreCommandException(-1);
+							} // switch(params.charAt(id[0]))
+						else throw new IgnoreCommandException(-1);
+						break;
+						
+					default : throw new IgnoreCommandException(-1);
+				} // switch(params.charAt(id[0]))
+				break;
+				
+			case 'x': // ax
+				if(nextChar()=='e' && nextChar()=='s' && nextChar()=='s' &&
+					nextChar()=='t' && nextChar()=='y' && nextChar()=='l' && nextChar()=='e' && 
+					(nextChar()=='=' || isWSPComment()))
+				{// axestyle
+					String val = readEqualString(true);
+					if(val==null) throw new IgnoreCommandException(-1);
+					param.axesStyle = val;
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			default : throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+    
+    
+    private void parse_g() throws IgnoreCommandException
+    {
+		switch(nextChar())
+		{
+			case 'r' : //gr
+				switch(nextChar())
+				{
+					case 'i':
+						if(nextChar()=='d')// grid
+							switch(nextChar())
+							{
+								case 'l' ://gridl
+									if(nextChar()=='a' && nextChar()=='b' && nextChar()=='e' && nextChar()=='l')// gridlabel
+										switch(nextChar())
+										{
+											case 's' : // gridlabels = Real unit
+												double val = readEqualRealUnit();
+												if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+												param.gridLabel = val;
+												break;
+												
+											case 'c' : // gridlabelcolor = string
+												Color c = DviPsColors.getColour(readEqualString(true));
+												if(c==null) throw new IgnoreCommandException(-1);
+												param.labelsGridCol = c;
+												break;
+											
+											default : throw new IgnoreCommandException(-1);
+										}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'w' : //gridwidth = Real unit
+									if(nextChar()=='i' && nextChar()=='d' && nextChar()=='t' && nextChar()=='h' && 
+										(nextChar()=='=' || isWSPComment()))
+									{
+										double val = readEqualRealUnit();
+										if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+										param.gridWidth = val;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'c' : // gridcolor = string
+									if(nextChar()=='o' && nextChar()=='l' && nextChar()=='o' && nextChar()=='r' && 
+										(nextChar()=='=' || isWSPComment()))
+									{
+										String s = readEqualString(true);
+										Color c = DviPsColors.getColour(s); // We search the colour
+										if(c==null) throw new IgnoreCommandException(-1);
+										param.gridColor = c;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'd' : // griddots = Integer
+									if(nextChar()=='o' && nextChar()=='t' && nextChar()=='s' &&
+										(nextChar()=='=' || isWSPComment()))
+									{
+										int val = readEqualInteger();
+										if(val==Integer.MAX_VALUE) throw new IgnoreCommandException(-1);
+										param.gridDots = val;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								default : throw new IgnoreCommandException(-1);
+							}
+						else throw new IgnoreCommandException(-1);
+						break;
+					
+					case 'a'://gra
+						if(nextChar()=='d')// grad
+							switch(nextChar())
+							{
+								case 'b' : //gradbegin
+									if(nextChar()=='e' && nextChar()=='g' && nextChar()=='i' && nextChar()=='n' && 
+									  (nextChar()=='=' || isWSPComment()))
+									{
+										Color c = DviPsColors.getColour(readEqualString(true)); // We search the colour
+										if(c==null) throw new IgnoreCommandException(-1);
+										param.gradBegin = c;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+								
+								case 'e' : //gradend
+									if(nextChar()=='n' && nextChar()=='d' && (nextChar()=='=' || isWSPComment()))
+									{
+										Color c = DviPsColors.getColour(readEqualString(true)); // We search the colour
+										if(c==null) throw new IgnoreCommandException(-1);
+										param.gradEnd = c;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'l' : //gradlines
+									if(nextChar()=='i' && nextChar()=='n' && nextChar()=='e' && nextChar()=='s' && 
+										(nextChar()=='=' || isWSPComment()))
+									{
+										int val = readEqualInteger();
+										if(val==Integer.MAX_VALUE) throw new IgnoreCommandException(-1);
+										param.gradLines = val;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'm' : //gradmidpoint
+									if(nextChar()=='i' && nextChar()=='d' && nextChar()=='p' && nextChar()=='o' && 
+										nextChar()=='i' && nextChar()=='n' && nextChar()=='t' &&
+										(nextChar()=='=' || isWSPComment()))
+									{
+										double midPt = readEqualReal();
+										if(midPt>=0 && midPt<=1)
+											param.gradMidPoint = midPt;
+										else throw new IgnoreCommandException(-1);
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'a' : //gradangle
+									if(nextChar()=='n' && nextChar()=='g' && nextChar()=='l' && nextChar()=='e' && 
+										(nextChar()=='=' || isWSPComment()))
+									{
+										double val = readEqualReal();
+										if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+										param.gradAngle = val;
+									}
+									else throw new IgnoreCommandException(-1);
+									break;
+							
+								default : throw new IgnoreCommandException(-1);
+							}
+						else throw new IgnoreCommandException(-1);
+						break;
+						
+					default : throw new IgnoreCommandException(-1);
+				}
+				break;	
+				
+			case 'a' : //gangle
+				if(nextChar()=='n' && nextChar()=='g' && nextChar()=='l' && nextChar()=='e' && 
+					(nextChar()=='=' || isWSPComment()))
+				{
+					double val = readEqualReal();
+					if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+					param.gangle = val;
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+					
+			default : throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+    
+    
+    private void parse_l() throws IgnoreCommandException
+    {
+    	switch(nextChar())
+		{
+			case 'i':// li
+				if(nextChar()=='n' && nextChar()=='e')// line
+					switch(nextChar())
+					{
+						case 'w' : // linewidth = Real unit
+							if(nextChar()=='i' && nextChar()=='d' && nextChar()=='t' && nextChar()=='h' &&
+								(nextChar()=='=' || isWSPComment()))
+							{
+								double val = readEqualRealUnit();
+								if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+								param.lineWidth = val;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+							
+						case 'c' : // lineColor = string
+							if(nextChar()=='o' && nextChar()=='l' && nextChar()=='o' && nextChar()=='r' &&
+								(nextChar()=='=' || isWSPComment()))
+							{
+								Color c = DviPsColors.getColour(readEqualString(true)); // We search the colour
+								if(c==null) throw new IgnoreCommandException(-1);
+								param.lineColor = c;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+							
+						case 'a' : // linearc = Real unit
+							if(nextChar()=='r' && nextChar()=='c' && (nextChar()=='=' || isWSPComment()))
+							{
+								double val = readEqualRealUnit();
+								if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+								param.lineArc = val;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+							
+						case 's' : //lines
+							if(nextChar()=='t' && nextChar()=='y' && nextChar()=='l' && nextChar()=='e' && 
+								(nextChar()=='=' || isWSPComment()))// linestyle = string
+							{
+								String val = readEqualString(false);
+								if(val==null || val.length()==0) throw new IgnoreCommandException(-1);
+								param.lineStyle = val;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+					
+						default : throw new IgnoreCommandException(-1);
+					}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			case 'a':// la
+				if(nextChar()=='b' && nextChar()=='e' && nextChar()=='l' && nextChar()=='s'&& 
+					(nextChar()=='=' || isWSPComment()))//labels
+				{ 
+					String val = readEqualString(false);
+					if(val==null) throw new IgnoreCommandException(-1);
+					param.labels = val;
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			default : throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+    
+    private void parse_f() throws IgnoreCommandException
+    {
+		switch(nextChar())
+		{
+			case 'i': //fi
+				if(nextChar()=='l' && nextChar()=='l')//fill
+				{
+					if(nextChar()=='c')//fillc
+					{
+						if(nextChar()=='o' && nextChar()=='l' && nextChar()=='o' && nextChar()=='r' && 
+							(nextChar()=='=' || isWSPComment()))
+						{ // fillColor = string
+							Color c = DviPsColors.getColour(readEqualString(true)); // We search the colour
+							if(c==null) throw new IgnoreCommandException(-1);
+							param.fillColor = c;
+						}
+						else throw new IgnoreCommandException(-1);
+					}else
+					if(getChar()=='s')//fills
+					{
+						if(nextChar()=='t' && nextChar()=='y' && nextChar()=='l' && nextChar()=='e' && 
+							(nextChar()=='=' || isWSPComment()))
+						{ // fillstyle = string
+							String r = readEqualString(false);
+							if(r==null || r.length()==0) throw new IgnoreCommandException(-1);
+							
+							if(getChar()=='*') // We add the '*' the fillstyle
+							{
+								r+=String.valueOf((char)getChar());
+								nextChar();
+							}
+							
+							param.fillStyle = r;
+						}else throw new IgnoreCommandException(-1);
+					}else throw new IgnoreCommandException(-1);
+				}else throw new IgnoreCommandException(-1);
+				break;
+				
+			case 'r': //fr 
+				if(nextChar()=='a' && nextChar()=='m' && nextChar()=='e')//frame
+					switch(nextChar())
+					{
+						case 'a' : // framearc = real
+							if(nextChar()=='r' && nextChar()=='c' && (nextChar()=='=' || isWSPComment()))
+							{
+								double val = readEqualReal();
+								if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+								param.frameArc = val;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+							
+						case 's' : // framesep = real unit
+							if(nextChar()=='e' && nextChar()=='p' && (nextChar()=='=' || isWSPComment()))
+							{
+								double val = readEqualRealUnit();
+								if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+								param.frameSep = val;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+							
+						default :
+							throw new IgnoreCommandException(-1);
+					}
+				else throw new IgnoreCommandException(-1);
+					
+				break;
+				
+			default : throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+    
+    
+    private void parse_b() throws IgnoreCommandException
+    {
+		switch(nextChar())
+		{
+			case 'o' ://bo
+				switch(nextChar())
+				{
+					case 'r'://bor
+						if(nextChar()=='d' && nextChar()=='e' && nextChar()=='r')//border
+							if(nextChar()=='c')//borderc
+							{
+								if(nextChar()=='o' && nextChar()=='l' && nextChar()=='o' &&
+									nextChar()=='r' && (nextChar()=='=' || isWSPComment()))
+								{ // bordercolor = string
+									Color c = DviPsColors.getColour(readEqualString(true)); // We search the colour
+									if(c==null) throw new IgnoreCommandException(-1);
+									param.borderColor = c;
+								}
+								else throw new IgnoreCommandException(-1);
+							}else
+								if(nextChar()=='=' || isWSPComment())
+								{// border = Real unit
+									double val = readEqualRealUnit();
+									if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+									param.border = val;
+								}
+								else throw new IgnoreCommandException(-1);
+						else throw new IgnoreCommandException(-1);
+						break;
+						
+					case 'x' :
+						if(nextChar()=='s' && nextChar()=='e' && nextChar()=='p' && (nextChar()=='=' || isWSPComment()))
+						{//boxsep = true|false
+							String s = readEqualString(false);
+							if(s==null) throw new IgnoreCommandException(-1);
+							if(s.equals("true")) 		 param.boxSep = true;//$NON-NLS-1$
+							else if(s.equals("false")) param.boxSep = false;//$NON-NLS-1$
+						}
+						else throw new IgnoreCommandException(-1);
+						break;
+						
+					default :
+						throw new IgnoreCommandException(-1);
+				}
+				break;
+				
+				
+			case 'r' :
+				if(nextChar()=='a' && nextChar()=='c' && nextChar()=='k' &&
+					nextChar()=='e' && nextChar()=='t' && nextChar()=='l' && 
+					nextChar()=='e' && nextChar()=='n' && nextChar()=='g' && 
+					nextChar()=='t' && nextChar()=='h' && (nextChar()=='=' || isWSPComment()))
+					{
+						double val = readEqualReal();
+						if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+						param.arrowBrLgth = val;
+					}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			default : throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+    
+    
+    private void parse_c() throws IgnoreCommandException
+    {
+		switch(nextChar())
+		{
+			case 'o' : // cornersize = absolute/relative
+				if(nextChar()=='r' && nextChar()=='n' && nextChar()=='e' &&
+					nextChar()=='r' && nextChar()=='s' && nextChar()=='i' &&
+					nextChar()=='z' && nextChar()=='e' &&(nextChar()=='=' || isWSPComment()))
+				{
+					String r = readString(false); // We read the parameter
+					if(r==null) throw new IgnoreCommandException(-1);
+					r = r.toLowerCase();
+					if(r.equals(PSTricksConstants.TOKEN_ABSOLUTE))
+						param.isCornerRel = false;
+					else if(r.equals(PSTricksConstants.TOKEN_RELATIVE))
+						param.isCornerRel = true;
+					else throw new IgnoreCommandException(-1);
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			case 'u' : // curvate = Real Real Real
+				if(nextChar()=='r' && nextChar()=='v' && nextChar()=='a' &&
+					nextChar()=='t' && nextChar()=='e' && (nextChar()=='=' || isWSPComment()))
+				{
+					double val1 = readEqualReal();
+					if(Double.isNaN(val1)) throw new IgnoreCommandException(-1);
+					double val2 = readReal();
+					if(Double.isNaN(val2)) throw new IgnoreCommandException(-1);
+					double val3 = readReal();
+					if(Double.isNaN(val3)) throw new IgnoreCommandException(-1);
+					param.curvature1 = val1;
+					param.curvature2 = val2;
+					param.curvature3 = val3;
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			default : throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+    
+    private void parse_o() throws IgnoreCommandException
+    {
+    	if(nextChar()=='r' && nextChar()=='i' && nextChar()=='g' &&
+			nextChar()=='i' && nextChar()=='n' && (nextChar()=='=' || isWSPComment()))
+		{// origin
+    		skipWSPComments();
+    		if(getChar()!='=') throw new IgnoreCommandException(-1);
+    		nextChar();
+    		skipWSPComments();
+    		
+			double x=Double.NaN, y=Double.NaN;
+			int c = getChar();
+			
+			if((c>='0' && c<='9') || c=='.' || c=='-')
+			{
+				x = readRealUnit();// If there is the x, we read it
+				if(Double.isNaN(x)) throw new IgnoreCommandException(-1);
+			}
+			
+			skipWSPComments();
+			if(getChar()!=',') throw new IgnoreCommandException(-1);
+			nextChar();
+    		skipWSPComments();
+    		c = getChar();
+    		
+			if((c>='0' && c<='9') || c=='.' || c=='-')
+			{
+				y = readRealUnit();// If there is the y, we read it
+				if(Double.isNaN(y)) throw new IgnoreCommandException(-1);
+			}
+			
+			skipWSPComments();
+			if(getChar()!='}') throw new IgnoreCommandException(-1);
+			nextChar();
+    		skipWSPComments();
+			
+			if(!Double.isNaN(x)) param.origin.x = x;
+			if(!Double.isNaN(y)) param.origin.y = y;
+		}
+    	else throw new IgnoreCommandException(-1);
+    }
+    
+    
+    
+    
+    private void parse_h() throws IgnoreCommandException
+    {
+    	if(nextChar()=='a' && nextChar()=='t' && nextChar()=='c' && nextChar()=='h')
+			switch(nextChar())
+			{
+				case 'a' : // hatchangle = Real
+					if(nextChar()=='n' && nextChar()=='g' && nextChar()=='l' && nextChar()=='e' &&
+						(nextChar()=='=' || isWSPComment()))
+					{
+						double val = readEqualReal();
+						if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+						param.hatchAngle = val;
+					}
+					else throw new IgnoreCommandException(-1);
+					break;
+				
+				case 'w' : // hatchwidth = Real unit
+					if(nextChar()=='i' && nextChar()=='d' && nextChar()=='t' && nextChar()=='h' &&
+						(nextChar()=='=' || isWSPComment()))
+					{
+						double val = readEqualRealUnit();
+						if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+						param.hatchWidth = val;
+					}
+					else throw new IgnoreCommandException(-1);
+					break;	
+					
+				case 's' : // hatchsep = Real unit
+					if(nextChar()=='e' && nextChar()=='p' && (nextChar()=='=' || isWSPComment()))
+					{
+						double val = readEqualRealUnit();
+						if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+						param.hatchSep = val;
+					}
+					else throw new IgnoreCommandException(-1);
+					break;
+					
+				case 'c' : // hatchcolor = colour
+					if(nextChar()=='o' && nextChar()=='l' && nextChar()=='o' && nextChar()=='r' &&
+						(nextChar()=='=' || isWSPComment()))
+					{
+						Color c = DviPsColors.getColour(readEqualString(true)); // We search the colour
+						if(c==null) throw new IgnoreCommandException(-1);
+						param.hatchCol = c;
+					}
+					else throw new IgnoreCommandException(-1);
+					break;	
+					
+				default : throw new IgnoreCommandException(-1);
+			}
+		else throw new IgnoreCommandException(-1);
+    }
+    
+    
+    
+    private void parse_r() throws IgnoreCommandException
+    {
+    	if(nextChar()=='b' && nextChar()=='r' && nextChar()=='a' &&
+			nextChar()=='c' && nextChar()=='k' && nextChar()=='e' &&
+			nextChar()=='t' && nextChar()=='l' && nextChar()=='e' &&
+			nextChar()=='n' && nextChar()=='g' && nextChar()=='t' &&
+			nextChar()=='h' && (nextChar()=='=' || isWSPComment()))
+		{ // bracketlength = real
+			double val = readEqualReal();
+			if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+			param.arrowrBrLgth = val;
+		}
+    	else throw new IgnoreCommandException(-1);
+    }
+    
+    
+    
+    private void parse_t() throws IgnoreCommandException
+    {
+    	switch(nextChar())
+		{
+			case 'b': //tb
+				if(nextChar()=='a' && nextChar()=='r' && nextChar()=='s' && nextChar()=='i' && 
+					nextChar()=='z' && nextChar()=='e' && (nextChar()=='=' || isWSPComment()))
+				{ // tbarsize = Real unit Real
+					double val = readEqualRealUnit();
+					if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+					param.arrowTBarSD = val;
+					skipWSPComments();
+					
+					if((getChar()>='0' && getChar()<='9') || getChar()=='.') 
+					{
+						val = readReal();
+						if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+						param.arrowTBarSN = val;
+					}
+				}
+				else throw new IgnoreCommandException(-1);
+				break;
+				
+			case 'i': //ti
+				if(nextChar()=='c' && nextChar()=='k' && nextChar()=='s')// ticks
+					switch(nextChar())
+					{
+						case 't'://tickst
+							if(nextChar()=='y' && nextChar()=='l' && nextChar()=='e' && 
+								(nextChar()=='=' || isWSPComment()))
+							{//tickstyle = string
+								String val = readString(false);
+								if(val==null) throw new IgnoreCommandException(-1);
+								param.ticksStyle = val;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+							
+						case 'i'://ticksi
+							if(nextChar()=='z' && nextChar()=='e' && (nextChar()=='=' || isWSPComment()))
+							{//ticksize = real unit
+								double val = readEqualRealUnit();
+								if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+								param.ticksSize = val;
+							}
+							else throw new IgnoreCommandException(-1);
+							break;
+							
+						default :
+							if(getChar()=='=' || isWSPComment())//ticks = string
+							{
+								String val = readString(false);
+								if(val==null) throw new IgnoreCommandException(-1);
+								param.ticks = val;
+							}
+							else throw new IgnoreCommandException(-1);
+					}
+				break;
+		}
+    }
+    
+    
+    
+    
+    private void parse_u() throws IgnoreCommandException
+    {
+    	if(nextChar()=='n' && nextChar()=='i' && nextChar()=='t' && (nextChar()=='=' || isWSPComment()))
+		{ // unit = real
+    		double r = readEqualReal();
+			if(Double.isNaN(r)) throw new IgnoreCommandException(-1);
+			skipWSPComments();
+			int c = getChar();
+			
+			if((c>='0' && c<='9') && c!=',') 
+			{
+				r = convertInCm(r, readString(false));
+				if(Double.isNaN(r)) throw new IgnoreCommandException(-1);
+				param.unit = r;
+			}
+			else
+				param.unit *= r;
+		}
+    	else throw new IgnoreCommandException(-1);
+    }
+    
+    
+    
+    
+    private void parse_x() throws IgnoreCommandException
+    {
+    	if(nextChar()=='u' && nextChar()=='n' && nextChar()=='i' && 
+			nextChar()=='t' && (nextChar()=='=' || isWSPComment()))
+		{ // xunit = real
+			double r = readEqualReal();
+			if(Double.isNaN(r)) throw new IgnoreCommandException(-1);
+			skipWSPComments();
+			int c = getChar();
+			
+			if((c>='0' && c<='9') && c!=',') 
+			{
+				r = convertInCm(r, readString(false));
+				if(Double.isNaN(r)) throw new IgnoreCommandException(-1);
+			 	param.xUnit = r;
+			}
+			else param.xUnit *= r;
+		}
+    	else throw new IgnoreCommandException(-1);
+    }
+    
+    
+    
+    
+    private void parse_y() throws IgnoreCommandException
+    {
+    	if(nextChar()=='u' && nextChar()=='n' && nextChar()=='i' && 
+			nextChar()=='t' && (nextChar()=='=' || isWSPComment()))
+		{// yunit = real
+			double r = readEqualReal(); // We read the parameter
+			if(Double.isNaN(r)) throw new IgnoreCommandException(-1);
+			skipWSPComments();
+			int c = getChar();
+			
+			if((c>='0' && c<='9') && c!=',') 
+			{
+				r = convertInCm(r, readString(false));
+				if(Double.isNaN(r)) throw new IgnoreCommandException(-1);
+			 	param.yUnit = r;
+			}
+			else param.yUnit *= r;
+		}
+    	else throw new IgnoreCommandException(-1);
+    }
+    
+    
+    
+    
+    private void parse_O() throws IgnoreCommandException
+    {
+    	switch(nextChar())
+		{
+			case 'x': // Ox
+				double val = readEqualReal(); // We read the parameter
+				if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+				param.ox = val;
+				break;
+				
+			case 'y': // Oy
+				val = readEqualReal(); // We read the parameter
+				if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+				param.oy = val;
+				break;
+				
+			default: throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+    
+    private void parse_D() throws IgnoreCommandException
+    {
+    	switch(nextChar())
+		{
+			case 'x': // Dx
+				double val = readEqualReal(); // We read the parameter
+				if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+				param.dxIncrement = val;
+				break;
+				
+			case 'y': // Dy
+				val = readEqualReal(); // We read the parameter
+				if(Double.isNaN(val)) throw new IgnoreCommandException(-1);
+				param.dyIncrement = val;
+				break;
+				
+			default: throw new IgnoreCommandException(-1);
+		}
+    }
+    
+    
+
+	@Override
+	public void parse() throws UnclosedBracketsException
+	{
+		skipWSPComments();
+		
+		if(getChar()!='[')
+			return ;
+		
+		nextChar();
+		skipWSPComments();
+
+		while(!isEOC() && getChar()!=']')
+			try
+			{
+				switch(getChar())
+				{
+					case 's' :
+						parse_s();
+						break;
+						
+					case 'd' : 
+						parse_d();
+						break;
+						
+					case 'a' : 
+						parse_a();
+						break;
+						
+					case 'g' :
+						parse_g();
+						break;
+						
+					case 'l' :
+						parse_l();
+						break;
+						
+					case 'f' :
+						parse_f();
+						break;
+						
+					case 'b' :
+						parse_b();
+						break;
+						
+					case 'c' :
+						parse_c();
+						break;
+						
+					case 'o' : // origin = {Real unit, Real unit}
+						parse_o();
+						break;
+						
+					case 'h' : 
+						parse_h();
+						break;
+				
+					case 'r' :// rbracketlength = Real
+						parse_r();
+						break;
+						
+					case 't' :
+						parse_t();
+						break;
+				
+					case 'u' : // unit = Real unit
+						parse_u();
+						break;
+						
+					case 'x' : // xunit = Real unit
+						parse_x();
+						break;
+						
+					case 'y' : // yunit = Real unit
+						parse_y();
+						break;
+						
+					case 'O': 
+						parse_O();
+						break;
+						
+					case 'D':
+						parse_D();
+						break;
+					
+					case 9 : // '\t'
+					case ',' :
+					case ' ' :
+						nextChar();
+						skipWSPComments();
+						break;
+						
+					default :
+						if(isWSPComment())
+						{
+							if(isEOL()) incLinePosition();
+							skipWSPComments();
+						}
+						else throw new IgnoreCommandException(-1);
+				}//switch
+			}
+			catch(IgnoreCommandException e) // We jump to the next parameter
+			{//TODO add something to collect the errors.
+				int cptPar = 0;
+				int cptBrack = 0;
+				int c = getChar();
+				
+				while((c!=',' || cptPar!=0 || cptBrack!=0) && !isEOC() && c!=']')
+				{
+					if(c=='{') cptBrack++;
+					else if(c=='(') cptPar++;
+					else if(c=='}') cptBrack--;
+					else if(c==')') cptPar--;
+					
+					c = nextChar();
+				}
+				
+				if(c!=']')
+					nextChar();
+			}
+		
+		if(getChar()!=']')
+			throw new UnclosedBracketsException();
+			
+		nextChar();
+	}
+
+	
+	
+	@Override
+	public boolean isComment()
+	{
+		return getChar()=='%';
+	}
+	
+
+	@Override
+	public String skipComment()
+	{
+		String comment;
+		
+		if(isComment())
+		{
+			comment = "";
+			char c;
+			
+			while(!isEOL() && !isEOC())
+			{
+				c = (char)nextChar();
+				
+				if(!isEOL() && !isEOC())
+					comment += c;
+			}
+			
+			nextChar();
+			incLinePosition();
+			skipWSP();
+		}
+		else comment = null;
+		
+		return comment;
+	}
+
+
+
+	@Override
+	public void skipWSP()
+	{
+		while(getChar()==' ' || isEOL() || getChar()=='\t')
+		{
+			if(isEOL())
+				incLinePosition();
+			
+			nextChar();
+		}
+	}
+	
+	
+	@Override
+	public boolean isWSP()
+	{
+		int c = getChar();
+		
+		return c==' ' || c=='\n' || c=='\r';
+	}
+	
+	
+	
+	/**
+	 * @return True if the current token is a WPS or a comment token.
+	 * @since 2.0.2
+	 */
+	public boolean isWSPComment()
+	{
+		return isWSP() || getChar()=='%' || getChar()=='\t';
+	}
+	
+	
+	
+	/**
+	 * Reads '= Real'.
+	 * @return The read value.
+	 */
+	public double readEqualReal()
+	{
+		skipWSPComments();
+		
+		if(getChar()!='=')
+			return Double.NaN;
+		
+		nextChar();
+		
+		return readReal();
+	}
+	
+	
+	
+
+	/**
+	 * Reads the next real.
+	 * @return The real.
+	 */
+	public double readReal()
+	{
+		StringBuffer sb = new StringBuffer();
+		int c;
+		int i = 0;
+		int lgth;
+		double v;
+		boolean positive = true;
+		boolean again    = true;
+		
+		skipWSPComments();
+		c = getChar();
+		
+		while(c=='-'||c=='+'||c=='.' || (c>='0' && c<='9')) {
+			sb.append((char)c);
+			c = nextChar();
+		}
+		
+		lgth = sb.length();
+		
+		while(i<lgth && again)
+			switch(sb.charAt(i)) {
+				case '-':
+					positive = !positive;
+					i++;
+					break;
+					
+				case '+':
+					i++;
+					break;
+					
+				default:
+					again = false;
+					break;
+			}
+		
+		if(!again && i>0)
+			sb.delete(0, i);
+		
+		try { v = Double.valueOf(sb.toString()); }
+		catch(Exception e) { v = Double.NaN; }
+		
+		v = positive ? v : -1*v;
+		
+		return v;
+	}
+
+	
+	
+	
+	/**
+	 * Reads '= Real unit' 
+	 * @return The read value in cm or NaN.
+	 */
+	public double readEqualRealUnit()
+	{
+		double v = readEqualReal();
+		String lgth;
+		
+		skipWSPComments();
+		lgth = readString(false);
+		
+		return convertInCm(v, lgth);
+	}
+	
+	
+	
+	/**
+	 * Reads the next string.
+	 * @return The string
+	 */
+	public String readString(boolean withNumber) 
+	{
+		StringBuffer sb = new StringBuffer();
+		int c;
+		
+		skipWSPComments();
+		c = getChar();
+		
+		if(withNumber)
+			while((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9'))
+			{
+				sb.append((char)c);
+				c = nextChar();
+			}
+		else
+			while((c>='a' && c<='z') ||	(c>='A' && c<='Z'))
+			{
+				sb.append((char)c);
+				c = nextChar();
+			}
+		
+		return sb.toString();
+	}
+	
+	
+	
+	/**
+	 * Converts a value with a given unit of length (cm, pt, mm, in, or nothing) to centimetre
+	 * @param value The value to convert.
+	 * @param lgth The unit of length of value.
+	 * @return The value in centimetre (may be NaN).
+	 */
+	public static double convertInCm(double value, String lgth)
+	{
+		if(lgth==null || lgth.length()==0)
+			return value;
+		
+		lgth = lgth.toLowerCase();
+		
+		if(lgth.equals(PSTricksConstants.TOKEN_PS_PT))
+			value/= PSTricksConstants.CM_VAL_PT; //by default the unit is postscript point
+		else if(lgth.equals(PSTricksConstants.TOKEN_INCH))
+			value*=PSTricksConstants.INCH_VAL_CM;
+		else if(lgth.equals(PSTricksConstants.TOKEN_MM))
+			value/=10.;
+		else if(!lgth.equals(PSTricksConstants.TOKEN_CM))
+			value = Double.NaN;
+		
+		return value;
+	}
+	
+	
+	/**
+	 * Reads '= string' 
+	 * @param withNumber If true The string can contains number like 'color0'
+	 * @return The read string or null.
+	 */
+	public String readEqualString(boolean withNumber)
+	{
+		skipWSPComments();
+		
+		if(getChar()!='=')
+			return null;
+
+		nextChar();
+		
+		return readString(withNumber); 
+	}
+	
+	
+	
+	/**
+	 * Reads '= Integer' 
+	 * @return The read value or MAX_VALUE.
+	 */
+	public int readEqualInteger()
+	{
+		skipWSPComments();
+		
+		if(getChar()!='=')
+			return Integer.MAX_VALUE;
+		
+		nextChar();
+		
+		return readInteger();
+	}
+	
+	
+	
+	/**
+	 * Reads the next integer.
+	 * @return The integer or MAX_VALUE.
+	 */
+	public int readInteger()
+	{
+		StringBuffer sb = new StringBuffer();
+		int c;
+		int value;
+		
+		skipWSPComments();
+		c = getChar();
+		
+		while(c=='+' || (c>='0' && c<='9')) {
+			sb.append((char)c);
+			c = nextChar();
+		}
+			
+		try { value = Integer.valueOf(sb.toString()); }
+		catch(Exception e) { value = Integer.MAX_VALUE; }
+		
+		return value;
+	}
+	
+	
+	/**
+	 * Reads 'Real unit' converted in cm.
+	 * @return The read value or NaN.
+	 */
+	public double readRealUnit()
+	{
+		double r 	= readReal(); 		 // We read the parameter
+		String lgth = readString(false); // If there is a unit of length, we read it
+		r 			= convertInCm(r, lgth);
+		
+		return r;
+	}
+	
+	
+
+	/**
+	 * Reads one coordinate: (x,y). Beware, for missing coordinates like (5,)
+	 * this function will return (5,NaN) instead of (5,1); because in several cases, 
+	 * the missing coordinate is very important.
+	 * @return The read coordinate or null.
+	 * @throws InvalidFormatCommandException If the format of the command is not respected.
+	 */
+	public Point2D.Double readOneCoordinate(boolean withUnit) throws InvalidFormatCommandException
+	{
+		skipWSPComments();
+		
+		if(getChar()!='(')
+			throw new InvalidFormatCommandException(getLinePosition());
+		
+		double x;
+		double y;
+		int c;
+		
+		nextChar();
+		skipWSPComments();
+		c = getChar();
+		
+		if((c>='0' && c<='9') || c=='.' || c=='-' || c=='+')
+			 x = withUnit ? readRealUnit() : readReal();
+		else x = Double.NaN;
+		
+		skipWSPComments();
+		
+		if(getChar()!=',')
+			throw new InvalidFormatCommandException(getLinePosition());
+		
+		nextChar();
+		skipWSPComments();
+		c = getChar();
+		
+		if((c>='0' && c<='9') || c=='.' || c=='-' || c=='+')
+			 y = withUnit ? readRealUnit() : readReal();
+		else y = Double.NaN;
+			
+		skipWSPComments();
+		
+		if(getChar()!=')')
+			throw new InvalidFormatCommandException(getLinePosition());
+		
+		nextChar();
+			
+		return new Point2D.Double(x, y);
+	}
+
+
+
+	/**
+	 * @return the current pstricks parameters.
+	 * @since 2.0.2
+	 */
+	public PSTParameters getParam()
+	{
+		return param;
+	}
+
+
+
+	/**
+	 * @param p the current pstricks parameters to set.
+	 * @since 2.0.2
+	 */
+	public void setParam(PSTParameters p)
+	{
+		this.param = p;
+	}
+}
diff --git a/current/latexDraw/parsers/pst/PSTParser.java b/current/latexDraw/parsers/pst/PSTParser.java
new file mode 100644
index 0000000..b3aaa00
--- /dev/null
+++ b/current/latexDraw/parsers/pst/PSTParser.java
@@ -0,0 +1,555 @@
+package latexDraw.parsers.pst;
+
+import static java.lang.Math.cos;
+import static java.lang.Math.sin;
+import static java.lang.Math.toRadians;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.parsers.*;
+import latexDraw.parsers.pst.PSTParameters.PositionParameters;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+
+/**
+ * Defines an abstract PSTricks parser that parses PSTricks code.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/21/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.2<br>
+ */
+public abstract class PSTParser extends CodeParser
+{
+	/** The PSTricks parameters that are created, removed and set
+	 * during the parsing of the pstricks code. */
+	protected Vector<PSTParameters> params;
+	
+	/** Defines if the parsing of pstricks shapes has began. It
+	 * begins when a tag pspicture or begin{pspicture} is parsed. */
+	protected boolean started;
+	
+	/** The parser that parses pstricks parameters. */
+	protected PSTParametersParser paramParser;
+	
+	
+	
+	/**
+	 * Creates and initialises an abstract pstricks parser.
+	 * @param code The pstricks code to parse.
+	 * @throws IllegalArgumentException If the given code is null.
+	 */
+	public PSTParser(String code)
+	{
+		super(code);
+
+		params = new Vector<PSTParameters>();
+		paramParser = new PSTParametersParser(code, null);
+		paramParser.setCodeCore(codeCore);
+	}
+	
+	
+	
+	@Override
+	public boolean isComment()
+	{
+		return getChar()=='%';
+	}
+	
+	
+	@Override
+	public String skipComment()
+	{
+		String comment;
+		
+		if(isComment())
+		{
+			comment = "";
+			char c;
+			
+			while(!isEOL() && !isEOC())
+			{
+				c = (char)nextChar();
+				
+				if(!isEOL() && !isEOC())
+					comment += c;
+			}
+			
+			nextChar();
+			incLinePosition();
+			skipWSP();
+		}
+		else comment = null;
+		
+		return comment;
+	}
+
+
+
+	@Override
+	public void skipWSP()
+	{
+		while(getChar()==' ' || isEOL() || getChar()=='\t')
+		{
+			if(isEOL())
+				incLinePosition();
+			
+			nextChar();
+		}
+	}
+	
+	
+//	protected void parse_ps()
+//	{
+//		switch(getChar())
+//		{
+//			case 'p':  // "\psp"
+//				nextChar();
+////				parseps();
+//				break;
+//				
+//			default:
+//				break;
+//		}
+//	}
+//	
+//	
+//	
+//	protected void parse_p()
+//	{
+//		switch(getChar())
+//		{
+//			case 's':  // "\ps"
+//				nextChar();
+//				parse_ps();
+//				break;
+//				
+//			default:
+//				break;
+//		}
+//	}
+//	
+//	
+//	
+//	protected void parseCommand()
+//	{
+//		switch(getChar())
+//		{
+//			case '\\': // "\\"
+//				break;
+//				
+//			case 'p':  // "\p"
+//				nextChar();
+//				parse_p();
+//				break;
+//				
+//			default:
+//				break;
+//		}
+//	}
+	
+	
+	/**
+	 * Adds the current character to the parsed text attribute of a pstricks parameters set.
+	 * @since 2.0.2
+	 */
+	protected void addParsedText()
+	{
+		PSTParameters p = params.lastElement();
+		String str      = String.valueOf((char)getChar());
+		
+		p.textForFrame+=str;
+		p.textParsed+=str;
+		
+		if(p.fromFramedBox)
+		{
+			boolean again = true;
+			int k = params.size()-2;
+			while(again && k>=0)
+			{
+				p = params.elementAt(k);
+				p.textForFrame+=str;
+				
+				if(p.getPosition()!=null)
+					again = false;
+				else 
+					k--;
+			}
+		}
+	}
+	
+	
+	/**
+	 * Parses a math expression ($ ... $). The first letter read by this function must be '$'.
+	 */
+	protected void parseMathText() throws UnexceptedEndOfFileException
+	{
+		if(started)
+		{
+			addParsedText();
+			
+			while(nextChar()!='$' && !isEOC())
+				addParsedText();
+			
+			addParsedText();
+		}
+		else
+		{
+			nextChar();
+			
+			while(getChar()!='$' && !isEOC())
+				nextChar();
+		}
+
+		if(isEOC()) 
+			throw new UnexceptedEndOfFileException();
+		
+		nextChar();
+	}
+	
+	
+	
+	@Override
+	public void parse()
+	{//TODO do not forget to take account of the number of parsed lines when parsing parameters.
+		initialise();
+//		
+//		while(!isEOC())
+//			try
+//			{
+//				switch(getChar())
+//				{
+//					case '\\':
+//						nextChar();
+//						parseCommand();
+//						break;
+//						
+//					case '$':
+//						nextChar();
+//						parseMathText();
+//						break;
+//						
+//					default:
+//						break;
+//				}
+//			}
+//		catch(UnexceptedEndOfFileException ex) { ex.printStackTrace(); }
+	}
+	
+
+	
+	@Override
+	public void initialise()
+	{
+		super.initialise();
+		
+		setPosition(0);
+		started  = false;
+		PSTParameters.reinitialize();
+	}
+	
+	
+
+	@Override
+	public boolean isWSP()
+	{
+		int c = getChar();
+		
+		return c==' ' || c=='\n' || c=='\r';
+	}
+	
+	
+	
+	/**
+	 * Actions to do when some text is parsed.
+	 * @throws InvalidFormatCommandException If the command is not valid.
+	 */
+	public abstract void actionsOnText() throws InvalidFormatCommandException;
+	
+	
+	
+	/**
+	 * Actions to do when a framed box is parsed.
+	 * @since 2.0.2
+	 * @param type The kind of the framed box:<br>
+	 * 0: rectangle<br>
+	 * 1: circle<br>
+	 * 2: triangle<br>
+	 * 3: diamond<br>
+	 * 4: ellipse<br>
+	 * 5: double rectangle<br>
+	 * 6: rectangle with shadow<br>
+	 * @throws UnclosedBracketsException If a bracket is not closed.
+	 */
+	public abstract void actionsOnFramedBox(int type) throws UnclosedBracketsException;
+	
+	
+	
+	/**
+	 * Actions to do when one or several framed boxes are parsed.
+	 * @throws InvalidFormatCommandException If the parsed command is not valid.
+	 * @since 1.7
+	 */
+	public abstract void actionsOnTerminatedFramedBoxes() throws InvalidFormatCommandException;
+	
+	
+	/**
+	 * Actions to do when a <code>pscustom</code> command is finished.
+	 * @since 0.3
+	 */
+	public abstract void actionsOnterminatedPsCustom() throws NotFullyManagedException;
+
+	
+	
+	
+	/**
+	 * Moves a point according to the PSTricks parameters (Useful for dots, texts).<br>
+	 */
+	protected Point2D.Double moveCoordinate(Point2D.Double pt)
+	{
+		if(pt==null)
+			return null;
+		
+		int i, size = params.size();
+		double lastAngle=0;
+		Point2D.Double newPt = new Point2D.Double(0, 0);
+		PSTParameters p;
+		PositionParameters pos;
+		Vector<Point2D.Double> gcs = new Vector<Point2D.Double>();
+		boolean began = false;
+		
+		if(size==0) return new Point2D.Double(0,0);
+		gcs.add(new Point2D.Double(0,0));
+		
+		for(i=1; i<size; i++)
+		{
+			p = params.elementAt(i);
+			pos = p.getPosition();
+			
+			if(pos!=null)
+			{
+				newPt.x+=pos.dx * (p.unit==PSTricksConstants.DEFAULT_UNIT?  p.xUnit : p.unit);
+				newPt.y+=pos.dy * (p.unit==PSTricksConstants.DEFAULT_UNIT? p.yUnit : p.unit);
+
+				if(pos.angleRput!=0 || !pos.isSumRotation)
+				{
+					if(began)	
+						newPt = rotatePoint(newPt, gcs.lastElement(), toRadians(lastAngle));
+					
+					gcs.add((Point2D.Double)newPt.clone());
+					
+					if(pos.isSumRotation)
+						 lastAngle += (360/params.elementAt(i-1).degrees)*pos.angleRput;
+					else lastAngle =  (360/params.elementAt(i-1).degrees)*pos.angleRput;
+					
+					began = true;
+				}
+			}
+		}
+		
+		if(!gcs.isEmpty() && began)
+			newPt = rotatePoint(new Point2D.Double(newPt.x+pt.x, newPt.y+pt.y), gcs.lastElement(), toRadians(lastAngle));
+			
+		if(!began)
+			newPt.setLocation(newPt.x+pt.x, newPt.y+pt.y);
+		
+		gcs.removeAllElements();
+		
+		return newPt;
+	}
+
+	
+	
+	
+	/**
+	 * Rotates a point with as reference an other point.
+	 * @param p The point to rotate.
+	 * @param gravityC The point of reference.
+	 * @param theta The angle of rotation (in radian).
+	 * @return The rotated point or null.
+	 */
+	public static Point2D.Double rotatePoint(Point2D.Double p, Point2D.Double gravityC, double theta)
+	{
+		if(p==null || gravityC==null)
+			return null;
+		
+		if(theta==0) 
+			return (Point2D.Double)p.clone();
+		
+		Point2D.Double pt = new Point2D.Double();
+
+		pt.x = cos(theta) * (p.x - gravityC.x) - sin(theta)* (p.y - gravityC.y) + gravityC.x;
+		pt.y = sin(theta) * (p.x - gravityC.x) + cos(theta)* (p.y - gravityC.y) + gravityC.y;
+
+		return pt;
+	}
+	
+	
+	
+	/**
+	 * Parses a color command.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 2.0.2
+	 */
+	public void parse_color() throws InvalidFormatCommandException
+	{
+		String name;
+		Color c;
+		
+		skipWSPComments(); // Reading the name of the colour.
+		
+		if(getChar()!='{') throw new InvalidFormatCommandException(getLinePosition());
+		
+		nextChar();
+		name = paramParser.readString(true);
+		
+		if(name==null || name.length()==0) throw new InvalidFormatCommandException(getLinePosition());
+		
+		skipWSPComments();
+		
+		if(getChar()!='}') throw new InvalidFormatCommandException(getLinePosition());
+		
+		nextChar();
+		c = DviPsColors.getColour(name); // We search the colour
+		
+		if(c!=null && !params.isEmpty()) 
+			params.lastElement().textColor = c;
+	}
+	
+	
+	
+	/**
+	 * Parses a definecolor command.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 2.0.2
+	 */
+	public void parse_definecolor() throws InvalidFormatCommandException
+	{
+		String name;
+		String type;
+
+		skipWSPComments(); // Reading the name of the colour.
+		if(getChar()!='{') throw new InvalidFormatCommandException(getLinePosition());
+		nextChar();
+		name = paramParser.readString(true);
+		if(name==null || name.length()==0) throw new InvalidFormatCommandException(getLinePosition());
+		skipWSPComments();
+		if(getChar()!='}') throw new InvalidFormatCommandException(getLinePosition());
+		nextChar();
+		
+		skipWSPComments(); // Reading the type of the colour.
+		if(getChar()!='{') throw new InvalidFormatCommandException(getLinePosition());
+		nextChar();
+		type = paramParser.readString(true);
+		if(type==null || type.length()==0) throw new InvalidFormatCommandException(getLinePosition());
+		skipWSPComments();
+		if(getChar()!='}') throw new InvalidFormatCommandException(getLinePosition());
+		nextChar();
+		
+		skipWSPComments(); // Reading the colour.
+		if(getChar()!='{') throw new InvalidFormatCommandException(getLinePosition());
+		nextChar();
+		
+		if(type.equals(PSTricksConstants.TOKEN_COLOR_TYPE_NAMED))
+		{ // definecolor{alias}{named}{colorName}
+			Color c = DviPsColors.getColour(paramParser.readString(true));
+			
+			if(c==null) throw new InvalidFormatCommandException(getLinePosition());
+			DviPsColors.addUserColour(c, name);
+		}
+		else
+		{
+			double val1 = paramParser.readReal();
+			if(val1<0 || val1>1) throw new InvalidFormatCommandException(getLinePosition());
+			
+			if(type.equals(PSTricksConstants.TOKEN_COLOR_TYPE_GRAY)) // definecolor{name}{gray}{val}
+				DviPsColors.addUserColour(new Color((float)val1, (float)val1, (float)val1), name);	
+			else
+			{
+				skipWSPComments();
+				if(getChar()!=',') throw new InvalidFormatCommandException(getLinePosition());
+				nextChar();
+				double val2 = paramParser.readReal();
+				
+				skipWSPComments();
+				if(getChar()!=',') throw new InvalidFormatCommandException(getLinePosition());
+				nextChar();
+				double val3 = paramParser.readReal();
+				
+				if(val2<0 || val2>1 || val3<0 || val3>1) 
+					throw new InvalidFormatCommandException(getLinePosition());
+				
+				if(type.equals(PSTricksConstants.TOKEN_COLOR_TYPE_RGB))// definecolor{name}{rgb}{r g b}
+					DviPsColors.addUserColour(new Color((float)val1, (float)val2, (float)val3), name);
+				else 
+					if(type.equals(PSTricksConstants.TOKEN_COLOR_TYPE_HSB))
+						DviPsColors.addUserColour(Color.getHSBColor((float)val1, (float)val2, (float)val3), name);
+					else
+						if(type.compareTo(PSTricksConstants.TOKEN_COLOR_TYPE_CMYK)==0)
+                        {
+							skipWSPComments();
+							if(getChar()!=',') throw new InvalidFormatCommandException(getLinePosition());
+							nextChar();
+							double val4 = paramParser.readReal();
+							
+                            if(val4<0 || val4>1)
+                                throw new InvalidFormatCommandException(getLinePosition());
+                          
+                            DviPsColors.addUserColour(DviPsColors.CMYK2RGB(val1, val2, val3, val4), name);
+                         }
+                         else
+                        	 throw new InvalidFormatCommandException(getLinePosition());
+			}//else
+		}//else
+		
+		skipWSPComments();
+		if(getChar()!='}') throw new InvalidFormatCommandException(getLinePosition());
+		nextChar();
+	}
+	
+	
+	
+	/**
+	 * Parses a 'put' command.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 2.0.2
+	 */
+	public void parse_put() throws InvalidFormatCommandException
+	{
+		skipWSPComments();
+		
+		if(getChar()=='(')
+		{
+			Point2D.Double coord = paramParser.readOneCoordinate(true);
+			PSTParameters      p = new PSTParameters(params.lastElement());
+			
+			if(coord==null) throw new InvalidFormatCommandException("put", -1);//$NON-NLS-1$
+			
+			skipWSPComments();
+			
+			p.setPosition(coord.x, coord.y, true, 0, 0, PositionParameters.REF_POINT_LEFT+PositionParameters.REF_POINT_BASE,
+					0, PositionParameters.REF_POINT_DEFAULT_CENTER);
+
+			if(params.size()>0)
+			{
+				PSTParameters p2 = params.lastElement();
+				p.origin.setLocation(p2.origin.x, p2.origin.y);
+			}
+			
+			params.add(p);
+		}
+	}
+}
diff --git a/current/latexDraw/parsers/pstricks/LaTeXDrawPSTricksParserActions.java b/current/latexDraw/parsers/pstricks/LaTeXDrawPSTricksParserActions.java
new file mode 100644
index 0000000..d57b928
--- /dev/null
+++ b/current/latexDraw/parsers/pstricks/LaTeXDrawPSTricksParserActions.java
@@ -0,0 +1,1668 @@
+/*
+ * LaTeXDrawPSTricksParserActions.java
+ */
+package latexDraw.parsers.pstricks;
+
+import java.awt.geom.Arc2D;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.*;
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.parsers.InvalidFormatCommandException;
+import latexDraw.parsers.NotFullyManagedException;
+import latexDraw.parsers.pstricks.PSTricksParameters.PositionParameters;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines actions to do on a given command for the LaTeXDraw project.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 
+ * 09/06/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.5<br>
+ */
+public class LaTeXDrawPSTricksParserActions extends PSTricksParserActionsManager
+{
+	/** The parsed figures. */
+	protected Vector<Figure> figures;
+	
+	/** The figures contained in the pscustom command. Cleared at the end of each <code>pscustom</code> command.*/
+	public Vector<Figure> psCustFigures;
+	
+
+	
+	/**
+	 * The constructor by default.
+	 */
+	public LaTeXDrawPSTricksParserActions()
+	{
+		super();
+		psCustFigures 	= new Vector<Figure>();
+		figures 		= new Vector<Figure>();
+	}
+	
+	
+	
+
+	@Override
+	public void actionsOnText(Vector<PSTricksParameters> params) throws InvalidFormatCommandException
+	{
+		if(params.isEmpty()) return;
+		
+		if(params.lastElement().textParsed.length()!=0)
+		{
+			PSTricksParameters last = params.lastElement();
+			
+			PositionParameters pp = null;
+			int i = params.size()-1;
+			
+			while(pp==null && i>=0)
+			{
+				pp = params.elementAt(i).getPosition();
+				i--;
+			}
+			
+			if(pp==null)
+				pp = new PositionParameters();
+			
+			Text t = new Text(true);
+			Point2D.Double position = moveCoordinate(params, new Point2D.Double(0,0));
+			double angle = Math.toRadians(PSTricksParameters.getWholeRotationAngle(params));
+			
+			if(position==null) throw new InvalidFormatCommandException("text", -1); //$NON-NLS-1$
+			
+			if(last.textSize!=null && last.textSize.length()!=0)
+				t.setSizeByCommand(last.textSize);
+			
+			if((last.textSeries!=null && last.textSeries.equals("b")) || last.textBold) //$NON-NLS-1$
+				 t.setIsBold(true);
+			else t.setIsBold(false);
+			
+			if((last.textShape!=null && (last.textShape.equals("sl") || //$NON-NLS-1$
+			   last.textShape.equals("it")) || last.textItalic)) //$NON-NLS-1$
+				 t.setIsItalic(true);
+			else t.setIsItalic(false);
+			
+			t.setRotationAngle(-angle);
+			t.setText(last.textParsed);
+			t.setLinesColor(last.textColor);
+			
+			if(last.textFamily!=null && last.textFamily.length()!=0)
+				t.setTextFontByFamily(last.textFamily);
+			
+			t.updateFontsBorders();
+			
+			LaTeXDrawPoint2D pos = new LaTeXDrawPoint2D(position.x*Figure.PPC-t.getWidth()/2., 
+					(position.y*Figure.PPC-t.getFontMetrics().getHeight()/4.)*-1);
+			
+			if(pp.refPoint!=PositionParameters.REF_POINT_DEFAULT_CENTER)
+			{
+				double addX=0, addY=0;
+				Point2D.Double gc = new Point2D.Double((pos.x+t.getWidth())/2.,(pos.y+t.getHeight())/2.);
+				
+				if(pp.refPoint==PositionParameters.REF_POINT_BASE)
+					addY=-t.getFontMetrics().getDescent();
+				else if(pp.refPoint==PositionParameters.REF_POINT_TOP)
+					addY=t.getFontMetrics().getAscent()/2.;
+				else if(pp.refPoint==PositionParameters.REF_POINT_BOTTOM)
+					addY=-t.getFontMetrics().getDescent()*2;
+				else if(pp.refPoint==PositionParameters.REF_POINT_LEFT)
+					addX=t.getWidth()/2.;
+				else if(pp.refPoint==PositionParameters.REF_POINT_RIGHT)
+					addX=-t.getWidth()/2.;
+				else if(pp.refPoint==PositionParameters.REF_POINT_RIGHT+PositionParameters.REF_POINT_BASE)
+				{
+					addY=-t.getFontMetrics().getDescent();
+					addX=-t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_RIGHT+PositionParameters.REF_POINT_BOTTOM)
+				{
+					addY=-t.getFontMetrics().getDescent()*2;
+					addX=-t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_RIGHT+PositionParameters.REF_POINT_TOP)
+				{
+					addY=t.getFontMetrics().getAscent()/2.;
+					addX=-t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_LEFT+PositionParameters.REF_POINT_BASE)
+				{
+					addY=-t.getFontMetrics().getDescent();
+					addX=t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_LEFT+PositionParameters.REF_POINT_BOTTOM)
+				{
+					addY=-t.getFontMetrics().getDescent()*2;
+					addX=t.getWidth()/2.;
+				}else if(pp.refPoint==PositionParameters.REF_POINT_LEFT+PositionParameters.REF_POINT_TOP)
+				{
+					addY=t.getFontMetrics().getAscent()/2.;
+					addX=t.getWidth()/2.;
+				}
+				
+				addX+=pp.labelSep*Figure.PPC;
+				
+				Point2D.Double pt = rotatePoint(new Point2D.Double(gc.x+addX, gc.y-addY), gc, angle);
+				pos.setLocation(pos.x+(pt.x-gc.x), pos.y-(pt.y-gc.y));
+			}
+			
+			t.setPosition(pos);
+			t.updateFontsBorders();
+			
+			if(last.psCustomP.fromPsCustom)
+				psCustFigures.add(t);
+			else
+				figures.add(t);
+		}
+	}
+
+
+
+
+	/**
+	 * @return the figures
+	 */
+	public Vector<Figure> getFigures()
+	{
+		return figures;
+	}
+
+
+	
+	/**
+	 * Allows to set the parameters of a figure <code>f</code>.
+	 */
+	public void setFigureParameters(PSTricksParameters p, Figure f, boolean hasStar)
+	{
+		if(f==null) return ;
+		
+		if(f.canHaveShadow())
+		{
+			f.setHasShadow(p.isShadow);
+			f.setShadowAngle(Math.toRadians(p.shadowAngle));
+			f.setShadowSize(Math.abs(p.shadowSize)*Figure.PPC);
+			f.setShadowColor(p.shadowCol);
+		}
+		
+		if(f.canBeHatched())
+		{
+			f.setHatchingSep(p.hatchSep*Figure.PPC);
+			f.setGradientAngle(Math.toRadians(p.gradAngle));
+			f.setGradientEndColor(p.gradEnd);
+			f.setGradientMidPoint(p.gradMidPoint);
+			f.setGradientStartColor(p.gradBegin);
+		}
+	
+		f.setLinesColor(p.lineColor);
+		f.setBordersPosition(p.borderPos);
+		f.setDoubleColor(p.dbleColor);
+		f.setDoubleSep(Math.abs(p.dbleSep*Figure.PPC));
+		f.setHasDoubleBoundary(p.dbleLine);
+		f.setHatchingColor(p.hatchCol);
+		if(p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_SOLID))
+			 f.setHatchingStyle(PSTricksConstants.TOKEN_FILL_NONE);
+		else f.setHatchingStyle(
+				p.fillStyle.endsWith("*") ? p.fillStyle.substring(0, p.fillStyle.length()-1) : p.fillStyle);//$NON-NLS-1$
+		f.setHatchingWidth((float)Math.abs(p.hatchWidth*Figure.PPC));
+		f.setDotSep((float)  p.dotStep*Figure.PPC);
+		f.setHatchingAngle(Math.toRadians(p.hatchAngle));
+		f.setBlackDashLength((float)p.dashBlack*Figure.PPC);
+		f.setWhiteDashLength((float)p.dashWhite*Figure.PPC);
+		f.setInteriorColor(p.fillColor);
+		f.setIsFilled(p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_SOLID) ||
+				p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH_F) ||
+				p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_HLINES_F) ||
+				p.fillStyle.equals(PSTricksConstants.TOKEN_FILL_VLINES_F));
+		f.setLineStyle(p.lineStyle);
+		f.setThickness((float)(Math.abs(p.lineWidth*Figure.PPC)));
+		
+		if(hasStar)
+		{
+			f.setIsFilled(true);
+			f.setInteriorColor(f.getLinesColor());
+			f.setHasDoubleBoundary(false);	
+			f.setLineStyle(PSTricksConstants.LINE_NONE_STYLE);
+			f.setHatchingStyle(PSTricksConstants.TOKEN_FILL_NONE);
+			f.setBordersPosition(PSTricksConstants.BORDERS_INSIDE);
+		}
+	}
+	
+	
+
+
+	
+	
+	@Override
+	public int actionsOnFrameEllipse(int line, boolean hasStar, Vector<PSTricksParameters> ps, String params, 
+				boolean isFrame) throws InvalidFormatCommandException
+	{
+		try
+		{
+			if(ps.isEmpty()) return ERR_END_CMD_INDEX;
+			
+			Point2D.Double p3;
+			PSTricksParameters p = ps.lastElement();
+			Point2D.Double p1 = new Point2D.Double(p.origin.x, p.origin.y);
+			Point2D.Double p2 = new Point2D.Double();
+			PSTricksParameters newP = new PSTricksParameters(p);
+			double angle = Math.toRadians(-PSTricksParameters.getWholeRotationAngle(ps));
+			int end = parseParametersFrameEllipse(line, params, p1, p2, newP);
+			double xunit = newP.unit==PSTricksConstants.DEFAULT_UNIT?  newP.xUnit : newP.unit;
+			double yunit = newP.unit==PSTricksConstants.DEFAULT_UNIT? newP.yUnit : newP.unit ;
+			Figure f;
+			p1.setLocation(p1.x+p.origin.x, p1.y+p.origin.y);
+			
+			if(isFrame)
+			{
+				p2.setLocation(p2.x+p.origin.x, p2.y+p.origin.y);
+				if(ps.size()>1)
+				{
+					p1 = moveCoordinate(ps, p1);
+					p2 = moveCoordinate(ps, p2);
+					p3 = new Point2D.Double((p1.x+p2.x)/2.,(p1.y+p2.y)/2.);
+					p1 = rotatePoint(p1, p3, angle);
+					p2 = rotatePoint(p2, p3, angle);
+				}
+				
+				p1.setLocation(p1.x*Figure.PPC*xunit, p1.y*Figure.PPC*-1*yunit);
+				p2.setLocation(p2.x*Figure.PPC*xunit, p2.y*Figure.PPC*-1*yunit);
+				
+				LaTeXDrawPoint2D pt1 = new LaTeXDrawPoint2D(p1.x, p2.y);
+				LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D(p2.x, p2.y);
+				LaTeXDrawPoint2D pt3 = new LaTeXDrawPoint2D(p1.x, p1.y);
+				LaTeXDrawPoint2D pt4 = new LaTeXDrawPoint2D(p2.x, p1.y);
+				
+				f = new LaTeXDrawRectangle(pt1, pt2, pt3, pt4, true);
+				((LaTeXDrawRectangle)f).setIsRound(newP.frameArc>0);
+				if(newP.frameArc>0) ((LaTeXDrawRectangle)f).setFrameArc(newP.frameArc);
+			}
+			else 
+			{
+				p1 = moveCoordinate(ps, p1);
+				p1.setLocation(p1.x*Figure.PPC*xunit, p1.y*Figure.PPC*-1*yunit);
+				p2.setLocation(p2.x*Figure.PPC*xunit, p2.y*Figure.PPC*-1*yunit);
+				
+				LaTeXDrawPoint2D pt1 = new LaTeXDrawPoint2D(p1.x-p2.x, p1.y+p2.y);
+				LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D(p1.x+p2.x, p1.y+p2.y);
+				LaTeXDrawPoint2D pt3 = new LaTeXDrawPoint2D(p1.x-p2.x, p1.y-p2.y);
+				LaTeXDrawPoint2D pt4 = new LaTeXDrawPoint2D(p1.x+p2.x, p1.y-p2.y);
+				
+				f = new Ellipse(pt1, pt2, pt3, pt4, true);
+			}
+			
+			setFigureParameters(newP, f, hasStar);
+			f.setRotationAngle(angle);
+			
+			if(p.psCustomP.fromPsCustom)
+				psCustFigures.add(f);
+			else
+				figures.add(f);
+			
+			return end;
+			
+		}catch(Exception e) 
+		{ 
+			if(isFrame)
+				throw new InvalidFormatCommandException("psframe", line);  //$NON-NLS-1$
+			throw new InvalidFormatCommandException("psellipse", line);  //$NON-NLS-1$
+		}
+	}
+
+
+
+
+	@Override
+	public int actionsOnCircle(int line, boolean hasStar, Vector<PSTricksParameters> ps, String params) 
+				throws InvalidFormatCommandException
+	{
+		try
+		{
+			PSTricksParameters p = ps.lastElement();
+			Point2D.Double center = new Point2D.Double(p.origin.x, p.origin.y);
+			double[] radius = {1};
+			PSTricksParameters newP = new PSTricksParameters(p);
+			Figure c;
+			double angle = Math.toRadians(-PSTricksParameters.getWholeRotationAngle(ps));
+			int end = parseParametersCircle(line, params, center, radius, newP);
+			LaTeXDrawPoint2D pt1, pt2, pt3, pt4;
+			center = moveCoordinate(ps, center);
+			
+			pt1 = new LaTeXDrawPoint2D((p.origin.x+center.x-radius[0])*Figure.PPC*newP.unit, 
+										(p.origin.y+center.y+radius[0])*Figure.PPC*-1*newP.unit);
+			pt2 = new LaTeXDrawPoint2D((p.origin.x+center.x+radius[0])*Figure.PPC*newP.unit, 
+										(p.origin.y+center.y+radius[0])*Figure.PPC*-1*newP.unit);
+			pt3 = new LaTeXDrawPoint2D((p.origin.x+center.x-radius[0])*Figure.PPC*newP.unit, 
+										(p.origin.y+center.y-radius[0])*Figure.PPC*-1*newP.unit);
+			pt4 = new LaTeXDrawPoint2D((p.origin.x+center.x+radius[0])*Figure.PPC*newP.unit, 
+										(p.origin.y+center.y-radius[0])*Figure.PPC*-1*newP.unit);
+			
+			c = new Circle(pt1, pt2, pt3, pt4, true);
+			setFigureParameters(newP, c, hasStar);
+			c.setRotationAngle(angle);
+			
+			if(p.psCustomP.fromPsCustom)
+				psCustFigures.add(c);
+			else
+				figures.add(c);
+			
+			return end;
+			
+		}catch(Exception e) { throw new InvalidFormatCommandException("pscircle", line); } //$NON-NLS-1$
+	}
+
+
+
+	
+	
+
+	@Override
+	public int actionsOnDot(int line, Vector<PSTricksParameters> ps, String params,
+			boolean noCoordinatePossible) throws InvalidFormatCommandException
+	{
+		try
+		{
+			if(ps==null || ps.isEmpty()) return ERR_END_CMD_INDEX;
+			// It can have several points defined
+			Vector<Point2D.Double> center = new Vector<Point2D.Double>();
+			PSTricksParameters last = ps.lastElement();
+			PSTricksParameters newP = new PSTricksParameters(last);
+			double angle = Math.toRadians(-PSTricksParameters.getWholeRotationAngle(ps));
+			int end = parseParametersDot(line, params, center, newP, noCoordinatePossible);
+			double xunit = newP.unit==PSTricksConstants.DEFAULT_UNIT?  newP.xUnit : newP.unit;
+			double yunit = newP.unit==PSTricksConstants.DEFAULT_UNIT? newP.yUnit : newP.unit ;
+			newP.arrowDotSD = newP.arrowDotSD+newP.arrowDotSN<0 ? Math.abs(newP.arrowDotSD) : newP.arrowDotSD;
+			newP.arrowDotSN = newP.arrowDotSD+newP.arrowDotSN<0 ? Math.abs(newP.arrowDotSN) : newP.arrowDotSN;
+			newP.dotScale1 = Math.abs(newP.dotScale1);
+				
+			for(Point2D.Double pt: center)
+			{
+				pt = moveCoordinate(ps, pt);
+				Dot d = new Dot(new LaTeXDrawPoint2D(pt.x*Figure.PPC*xunit, pt.y*Figure.PPC*-1*yunit), 
+									true);
+				setFigureParameters(newP, d, false);
+				
+				d.setCurrentStyle(newP.dotStyle);
+				d.setWidth((float)((newP.arrowDotSD+newP.arrowDotSN*newP.lineWidth)*newP.dotScale1)*Figure.PPC);
+				d.setRotationAngle(Math.toRadians(-newP.dotAngle)+angle);
+				d.setInteriorColor(newP.fillColor);
+				
+				if(!last.psCustomP.fromPsCustom)
+					figures.add(d);
+			}
+			
+			return end;
+			
+		}catch(Exception e) { throw new InvalidFormatCommandException("psdot", line); }//$NON-NLS-1$
+	}
+
+
+	
+	
+
+
+	@Override
+	public int actionsOnLine(int line, boolean hasStar, Vector<PSTricksParameters> ps, 
+			String params) throws InvalidFormatCommandException
+	{
+		try
+		{
+			if(ps==null || ps.isEmpty()) return ERR_END_CMD_INDEX;
+			
+			Vector<Point2D.Double> pts = new Vector<Point2D.Double>();
+			PSTricksParameters last = ps.lastElement();
+			PSTricksParameters newP = new PSTricksParameters(last);
+			Figure f;
+			int end = parseParametersLine(line, params, pts, newP);
+			double xunit = newP.unit==PSTricksConstants.DEFAULT_UNIT?  newP.xUnit : newP.unit;
+			double yunit = newP.unit==PSTricksConstants.DEFAULT_UNIT? newP.yUnit : newP.unit ;
+			
+			if(pts.isEmpty()) return end;
+			
+			if(ps.size()>1)
+				for(Point2D.Double pt : pts)
+					pt.setLocation(moveCoordinate(ps, pt));
+			
+			if(pts.size()>2)//joined lines
+				f = new JoinedLines(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), true);
+			else
+				f = new Line(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), true);
+				
+			
+			Point2D.Double ptOld= null;
+			
+			for(Point2D.Double pt : pts)
+				if(!pt.equals(ptOld))
+				{
+					((LaTeXDrawPolygon)f).addPoint(new LaTeXDrawPoint2D(pt.x*Figure.PPC*xunit,
+													pt.y*Figure.PPC*-1*yunit));
+					ptOld = pt;
+				}
+
+			if(pts.size()>2)//joined lines
+			{
+				((JoinedLines)f).removePointAt(0);
+				((JoinedLines)f).removePointAt(0);
+				((JoinedLines)f).setArrow2Style(ArrowHead.invertArrowStyle(newP.arrowStyle[1]));
+				
+				if(((JoinedLines)f).getNbPoints()<2)
+					return end;
+			}
+			else
+			{
+				((Line)f).removePointAt(0);
+				((Line)f).removePointAt(0);
+				((Line)f).setArrow2Style(newP.arrowStyle[1]);
+			}
+			
+			((Arrowable)f).setArrow1Style(newP.arrowStyle[0]);
+			setArrowParameters(((Arrowable)f).getArrowHead1(), newP);
+			setArrowParameters(((Arrowable)f).getArrowHead2(), newP);
+			setFigureParameters(newP, f, hasStar);
+			
+			if(last.psCustomP.fromPsCustom)
+				psCustFigures.add(f);
+			else
+				figures.add(f);
+			
+			return end;
+			
+		}catch(Exception e) { e.printStackTrace(); throw  new InvalidFormatCommandException("psline", line); }//$NON-NLS-1$
+	}
+
+	
+	
+	
+	/**
+	 * Sets the parameters of an arrowhead.
+	 * @param ah The arrowhead.
+	 * @param param The parameters.
+	 * @since 0.2.1
+	 */
+	protected void setArrowParameters(ArrowHead ah, PSTricksParameters param)
+	{
+		ah.setArrowInset(param.arrowInset);
+		ah.setArrowLength(param.arrowLgth);
+		ah.setArrowSizeDim(param.arrowSizeD*Figure.PPC);
+		ah.setArrowSizeNum(param.arrowSizeN);
+		ah.setBracketNum(param.arrowBrLgth);
+		ah.setDotSizeDim((param.arrowDotSD+param.arrowDotSN<0 ? Math.abs(param.arrowDotSD) : param.arrowDotSD)*Figure.PPC);
+		ah.setDotSizeNum(param.arrowDotSD+param.arrowDotSN<0 ? Math.abs(param.arrowDotSN) : param.arrowDotSN);
+		ah.setRBracketNum(param.arrowrBrLgth);
+		ah.setTBarSizeDim(param.arrowTBarSD+param.arrowTBarSD<0 ? Math.abs(param.arrowTBarSD) : param.arrowTBarSD*Figure.PPC);
+		ah.setTBarSizeNum(param.arrowTBarSD+param.arrowTBarSD<0 ? Math.abs(param.arrowTBarSN) : param.arrowTBarSN);
+
+	}
+
+
+
+	@Override
+	public int actionsOnPolygon(int line, boolean hasStar, Vector<PSTricksParameters> ps, 
+			String params) throws InvalidFormatCommandException
+	{
+		try
+		{
+			if(ps==null || ps.isEmpty()) return ERR_END_CMD_INDEX;
+			
+			Vector<Point2D.Double> pts = new Vector<Point2D.Double>();
+			PSTricksParameters last = ps.lastElement();
+			PSTricksParameters newP = new PSTricksParameters(last);
+			int end = parseParametersPolygon(line, params, pts, newP);
+			double xunit = newP.unit!=PSTricksConstants.DEFAULT_UNIT? newP.unit : newP.xUnit;
+			double yunit = newP.unit!=PSTricksConstants.DEFAULT_UNIT? newP.unit : newP.yUnit;
+
+			if(pts.size()<2) return end;
+			
+			LaTeXDrawPolygon pol = new LaTeXDrawPolygon(new LaTeXDrawPoint2D(), new LaTeXDrawPoint2D(), true);
+			Point2D.Double ptOld= null;
+			
+			if(pts.size()==2)
+				pts.add(new Point2D.Double(newP.origin.x, newP.origin.y));
+			
+			for(Point2D.Double pt : pts)
+			{
+				pt.setLocation(moveCoordinate(ps, pt));
+				if(!pt.equals(ptOld))
+				{
+					pol.addPoint(new LaTeXDrawPoint2D(pt.x*Figure.PPC*xunit, pt.y*Figure.PPC*-1*yunit));
+					ptOld = pt;
+				}
+			}
+			
+			pol.removePointAt(0);
+			pol.removePointAt(0);
+			
+			if(pol.getNbPoints()<3)
+				return end;
+			
+			setFigureParameters(newP, pol, hasStar);
+			
+			pol.updateBorders();
+			pol.updateGravityCenter();
+			
+			if(last.psCustomP.fromPsCustom)
+				psCustFigures.add(pol);
+			else
+				figures.add(pol);
+			
+			return end;
+			
+		}catch(Exception e) { throw new InvalidFormatCommandException("pspolygon", line); }//$NON-NLS-1$
+	}
+
+
+
+
+	
+	
+	
+	@Override
+	public int actionsOnDiamondTriangle(int line, boolean hasStar, Vector<PSTricksParameters> ps,
+			String params, boolean isDiamondNotTriangle) throws InvalidFormatCommandException
+	{
+		try
+		{
+			if(ps==null || ps.isEmpty()) return ERR_END_CMD_INDEX;
+			
+			PSTricksParameters p = ps.lastElement();
+			Point2D.Double p1 = new Point2D.Double(p.origin.x, p.origin.y);
+			Point2D.Double p2 = new Point2D.Double();
+			PSTricksParameters newP = new PSTricksParameters(p);
+			Figure f;
+			double angle = Math.toRadians(-PSTricksParameters.getWholeRotationAngle(ps));
+			int end = parseParametersFrameEllipse(line, params, p1, p2, newP);
+			double xunit = newP.unit!=PSTricksConstants.DEFAULT_UNIT? newP.unit : newP.xUnit;
+			double yunit = newP.unit!=PSTricksConstants.DEFAULT_UNIT? newP.unit : newP.yUnit;
+			p1.setLocation(p1.x+p.origin.x, p1.y+p.origin.y);
+			double moduloA;
+			if(ps.size()>1) moduloA = ps.elementAt(ps.size()-2).degrees;
+			else moduloA = 360;
+
+			if(isDiamondNotTriangle)
+			{
+				if(ps.size()>1)
+					p1 = moveCoordinate(ps, p1);
+				
+				LaTeXDrawPoint2D pt1 = new LaTeXDrawPoint2D((p1.x-p2.x)*Figure.PPC*xunit, 
+															(p1.y-p2.y)*Figure.PPC*-1*yunit);
+				LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D((p1.x+p2.x)*Figure.PPC*xunit, 
+															(p1.y-p2.y)*Figure.PPC*-1*yunit);
+				LaTeXDrawPoint2D pt3 = new LaTeXDrawPoint2D((p1.x-p2.x)*Figure.PPC*xunit, 
+															(p1.y+p2.y)*Figure.PPC*-1*yunit);
+				LaTeXDrawPoint2D pt4 = new LaTeXDrawPoint2D((p1.x+p2.x)*Figure.PPC*xunit, 
+															(p1.y+p2.y)*Figure.PPC*-1*yunit);
+				
+				f = new Rhombus(pt1, pt2, pt3, pt4, true);
+			}
+			else 
+			{
+				Point2D.Double p3 = new Point2D.Double();
+				if(ps.size()>1)
+				{
+					p1 = moveCoordinate(ps, p1);
+					p3 = new Point2D.Double(p1.x,p1.y-p2.y/2.);
+					p1 = rotatePoint(p1, p3, -angle);
+				}
+			
+				LaTeXDrawPoint2D pt1 = new LaTeXDrawPoint2D((p1.x-p2.x/2.)*Figure.PPC*xunit, 
+															(p1.y+p2.y)*Figure.PPC*-1*yunit);
+				LaTeXDrawPoint2D pt2 = new LaTeXDrawPoint2D((p1.x+p2.x/2.)*Figure.PPC*xunit, 
+															(p1.y+p2.y)*Figure.PPC*-1*yunit);
+				LaTeXDrawPoint2D pt3 = new LaTeXDrawPoint2D((p1.x-p2.x/2.)*Figure.PPC*xunit, 
+															(p1.y)*Figure.PPC*-1*yunit);
+				LaTeXDrawPoint2D pt4 = new LaTeXDrawPoint2D((p1.x+p2.x/2.)*Figure.PPC*xunit, 
+															(p1.y)*Figure.PPC*-1*yunit);
+			
+				f = new Triangle(pt1, pt2, pt3, pt4, true);
+				
+				if((newP.gangle%moduloA)!=0)
+				{
+					LaTeXDrawPoint2D gc = f.getGravityCenter();
+					LaTeXDrawPoint2D base = new LaTeXDrawPoint2D((pt1.x+pt2.x)/2., pt3.y);
+					LaTeXDrawPoint2D newGc = Figure.rotatePoint(gc, base, Math.toRadians(-(360/moduloA)*newP.gangle));
+					f.shift(gc, newGc);
+				}
+			}
+			
+			setFigureParameters(newP, f, hasStar);
+			
+			if(isDiamondNotTriangle)
+			{
+				Rhombus r = ((Rhombus)f);
+				r.setShadowAngle(r.getShadowAngle()-Math.toRadians(newP.gangle%moduloA));
+				r.setHatchingAngle(r.getHatchingAngle()-Math.toRadians(newP.gangle%moduloA));
+				r.setGradientAngle(r.getGradientAngle()-Math.toRadians(newP.gangle%moduloA));
+				
+				if((newP.gangle%moduloA)!=0)
+					r.setRotationAngle(Math.toRadians(-(360/moduloA)*newP.gangle)+angle);
+				else r.setRotationAngle(angle);
+			}
+			else
+			{
+				Triangle t = ((Triangle)f);
+				boolean reverse = t.getPoint(0).y>t.getPoint(2).y;
+				
+				t.setRotationAngle(angle); // fixes #1556340
+				if(reverse)
+				{
+					t.setShadowAngle(t.getShadowAngle()+Math.PI);
+					t.setGradientAngle(t.getGradientAngle()+Math.PI);
+				}
+			}
+			
+			if(p.psCustomP.fromPsCustom)
+				psCustFigures.add(f);
+			else
+				figures.add(f);
+			
+			return end;
+			
+		}catch(Exception e) 
+		{ 
+			if(isDiamondNotTriangle)
+				throw new InvalidFormatCommandException("psdiamond", line); //$NON-NLS-1$
+			throw new InvalidFormatCommandException("triangle", line); //$NON-NLS-1$
+		}
+	}
+
+	
+	
+	
+	
+	 @Override
+	public int actionsOnBezierCurve(int line, boolean hasStar, Vector<PSTricksParameters> ps, 
+			String params) throws InvalidFormatCommandException
+		{
+			try
+			{
+				if(ps==null || ps.isEmpty()) return ERR_END_CMD_INDEX;
+				
+				Vector<Point2D.Double> pts = new Vector<Point2D.Double>();
+				PSTricksParameters last = ps.lastElement();
+				PSTricksParameters newP = new PSTricksParameters(last);
+				LaTeXDrawPoint2D p1;
+				int ended = parseParametersBezierCurve(line, params, pts, newP), i, size, j;
+				double xunit = newP.unit!=PSTricksConstants.DEFAULT_UNIT? newP.unit : newP.xUnit;
+				double yunit = newP.unit!=PSTricksConstants.DEFAULT_UNIT? newP.unit : newP.yUnit;
+			
+				if(pts.size()<3) return ended;
+				
+				for(Point2D.Double pt : pts)
+					pt.setLocation(moveCoordinate(ps, pt));
+				
+				if(pts.size()%3==0) 
+					p1 = new LaTeXDrawPoint2D(newP.origin.x*Figure.PPC*xunit, newP.origin.y*-1*Figure.PPC*yunit);
+				else 
+				{
+					p1 = new LaTeXDrawPoint2D(pts.firstElement().x*Figure.PPC*xunit, pts.firstElement().y*-1*Figure.PPC*yunit);
+					pts.removeElementAt(0);
+				}
+			
+				Point2D.Double pt2;
+				BezierCurve f = new BezierCurve(p1, 
+												new LaTeXDrawPoint2D(pts.elementAt(2).x*Figure.PPC*xunit, 
+																	 pts.elementAt(2).y*-1*Figure.PPC*yunit), true);
+				
+				f.setXCoordFirstCtrl(pts.firstElement().x*Figure.PPC*xunit, 0);
+				f.setYCoordFirstCtrl(pts.firstElement().y*-1*Figure.PPC*yunit, 0);
+				f.setXCoordFirstCtrl(pts.elementAt(1).x*Figure.PPC*xunit, 1);
+				f.setYCoordFirstCtrl(pts.elementAt(1).y*-1*Figure.PPC*yunit, 1);
+				
+				i = 4;
+				j = 2;
+				size = pts.size();
+		
+				while(i<size)
+				{
+					pt2 = pts.elementAt(i);
+					++i;
+					
+					f.addPoint(new LaTeXDrawPoint2D(pts.elementAt(i).x*Figure.PPC*xunit, 
+													pts.elementAt(i).y*-1*Figure.PPC*yunit));
+					
+					f.setXCoordFirstCtrl(pt2.x*Figure.PPC*xunit, j);
+					f.setYCoordFirstCtrl(pt2.y*-1*Figure.PPC*yunit, j);
+					j++;
+					i+=2;
+				}
+				
+				setFigureParameters(newP, f, hasStar);
+				
+				f.updateSecondControlPoints();
+				f.updateShape();
+				f.updateBorders();
+				f.setShowPoints(newP.showPoints);
+				f.setOpen(true);
+				f.replaceLastPointByClosing();
+				
+				((Arrowable)f).setArrow1Style(newP.arrowStyle[0]);
+				((Arrowable)f).setArrow2Style(ArrowHead.invertArrowStyle(newP.arrowStyle[1]));
+				setArrowParameters(((Arrowable)f).getArrowHead1(), newP);
+				setArrowParameters(((Arrowable)f).getArrowHead2(), newP);
+				
+				if(f.getNbPoints()>1)
+					if(last.psCustomP.fromPsCustom)
+						psCustFigures.add(f);
+					else
+						figures.add(f);
+				
+				return ended;
+				
+			}catch(Exception e) { throw new InvalidFormatCommandException("psbezier", line); } //$NON-NLS-1$
+		}
+
+
+
+	 
+
+	@Override
+	public int actionsOnArcWedge(int line, boolean hasStar, Vector<PSTricksParameters> ps, String params, 
+			boolean isArc) throws InvalidFormatCommandException
+	{
+		try
+		{
+			PSTricksParameters p = ps.lastElement();
+			Point2D.Double center = (Point2D.Double)p.origin.clone();
+			PSTricksParameters newP = new PSTricksParameters(p);
+			double[] angle1 = {0}, angle2 = {0}, radius = {0};
+			double angle = Math.toRadians(-PSTricksParameters.getWholeRotationAngle(ps));
+			
+			int end = parseParametersArcWedge(line, params, radius, center, angle1, angle2, newP, isArc);
+		
+			center = moveCoordinate(ps, center);
+			
+			Arc f = new Arc(new LaTeXDrawPoint2D((center.x-radius[0])*Figure.PPC*newP.xUnit, 
+					(center.y+radius[0])*Figure.PPC*-1*newP.xUnit), 
+					new LaTeXDrawPoint2D((center.x+radius[0])*Figure.PPC*newP.xUnit, 
+					(center.y-radius[0])*Figure.PPC*-1*newP.xUnit), isArc ? Arc2D.OPEN : Arc2D.PIE, true);
+			
+			f.setStartAngle(Math.toRadians(angle1[0]));
+			f.setEndAngle(Math.toRadians(angle2[0]));
+			f.setShowPoints(newP.showPoints);
+			f.setArrow1Style(newP.arrowStyle[0]);
+			
+			String currentArrowRStyle = newP.arrowStyle[1];
+			if(currentArrowRStyle.equals(PSTricksConstants.DLARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.DRARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.DRARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.DLARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.RARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.LARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.LARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.RARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.DLARROW_STYLE))
+				currentArrowRStyle = PSTricksConstants.DRARROW_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.LRBRACKET_STYLE))
+				currentArrowRStyle = PSTricksConstants.RRBRACKET_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.RRBRACKET_STYLE))
+				currentArrowRStyle = PSTricksConstants.LRBRACKET_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.RSBRACKET_STYLE))
+				currentArrowRStyle = PSTricksConstants.LSBRACKET_STYLE;
+			else if(currentArrowRStyle.equals(PSTricksConstants.LSBRACKET_STYLE))
+				currentArrowRStyle = PSTricksConstants.RSBRACKET_STYLE;
+			
+			f.setArrow2Style(currentArrowRStyle);
+			
+			setArrowParameters(f.getArrowHead1(), newP);
+			setArrowParameters(f.getArrowHead2(), newP);
+			setFigureParameters(newP, f, hasStar);
+			f.setRotationAngle(angle);
+			
+			if(p.psCustomP.fromPsCustom)
+				psCustFigures.add(f);
+			else
+				figures.add(f);
+			
+			return end;
+			
+		}catch(Exception e) 
+		{ 
+			if(isArc)
+				throw new InvalidFormatCommandException("psarc", line);  //$NON-NLS-1$
+			throw new InvalidFormatCommandException("pswedge", line);  //$NON-NLS-1$
+		}
+	}
+
+
+
+	
+	@Override
+	public int actionsOnGridAxes(int line, Vector<PSTricksParameters> ps, Point2D.Double pictureSWPt, 
+			Point2D.Double pictureNEPt, String params, boolean isGrid) throws InvalidFormatCommandException
+		{
+			try
+			{
+				if(ps==null || ps.isEmpty()) return ERR_END_CMD_INDEX;
+				
+				Vector<Point2D.Double> pts = new Vector<Point2D.Double>();
+				PSTricksParameters last = ps.lastElement();
+				PSTricksParameters newP = new PSTricksParameters(last);
+				int gridEndX, gridEndY, gridStartX, gridStartY, originX, originY;
+				double angle = Math.toRadians(-PSTricksParameters.getWholeRotationAngle(ps));
+				int end = parseParametersGridAxes(line, params, pts, newP);
+				double xunit = newP.unit!=PSTricksConstants.DEFAULT_UNIT? newP.unit : newP.xUnit;
+				double yunit = newP.unit!=PSTricksConstants.DEFAULT_UNIT? newP.unit : newP.yUnit;
+				newP.origin.setLocation(moveCoordinate(ps, newP.origin));
+				boolean isGridXLabelReverse = false;
+				boolean isGridYLabelReverse = false;
+				
+				if(pts.isEmpty())
+				{
+					if(pictureNEPt.x>=0)
+						 gridEndX = (pictureNEPt.x-((int)pictureNEPt.x))>0.5 ? (int)pictureNEPt.x+1 : (int)pictureNEPt.x;
+					else gridEndX = (((int)pictureNEPt.x)-pictureNEPt.x)>0.5 ? (int)pictureNEPt.x-1 : (int)pictureNEPt.x;
+					if(pictureNEPt.y>=0)
+						 gridEndY = (pictureNEPt.y-((int)pictureNEPt.y))>0.5 ? (int)pictureNEPt.y+1 : (int)pictureNEPt.y;
+					else gridEndY = (((int)pictureNEPt.y)-pictureNEPt.y)>0.5 ? (int)pictureNEPt.y-1 : (int)pictureNEPt.y;
+				
+					if(pictureSWPt.x>=0)
+						 gridStartX = originX = (pictureSWPt.x-((int)pictureSWPt.x))>0.5 ? (int)pictureSWPt.x+1 : (int)pictureSWPt.x;
+					else gridStartX = originX = (((int)pictureSWPt.x)-pictureSWPt.x)>0.5 ? (int)pictureSWPt.x-1 : (int)pictureSWPt.x;
+					
+					if(pictureSWPt.y>=0)
+						 gridStartY = originY = (pictureSWPt.y-((int)pictureSWPt.y))>0.5 ? (int)pictureSWPt.y+1 : (int)pictureSWPt.y;
+					else gridStartY = originY = (((int)pictureSWPt.y)-pictureSWPt.y)>0.5 ? (int)pictureSWPt.y-1 : (int)pictureSWPt.y;
+				}
+				else
+					if(pts.size()==1)
+					{
+						gridStartX = gridStartY = originX = originY = 0;
+						gridEndX = (int)pts.firstElement().x;
+						gridEndY = (int)pts.firstElement().y;
+					}
+					else
+						if(pts.size()==2)
+						{
+							originX = gridStartX = (int)pts.firstElement().x;
+							originY = gridStartY = (int)pts.firstElement().y;
+							gridEndX = (int)pts.elementAt(1).x;
+							gridEndY = (int)pts.elementAt(1).y;
+						}
+						else
+						{
+							originX = (int)pts.firstElement().x;
+							originY = (int)pts.firstElement().y;
+							gridStartX = (int)pts.elementAt(1).x;
+							gridStartY = (int)pts.elementAt(1).y;
+							gridEndX = (int)pts.elementAt(2).x;
+							gridEndY = (int)pts.elementAt(2).y;
+						}
+				
+				if(gridStartX>=gridEndX)
+				{
+					int tmp = gridEndX;
+					gridEndX = gridStartX;
+					gridStartX = tmp;
+					isGridXLabelReverse = true;
+				}
+				
+				if(gridStartY>=gridEndY)
+				{
+					int tmp = gridEndY;
+					gridEndY = gridStartY;
+					gridStartY = tmp;
+					isGridYLabelReverse = true;
+				}
+				
+				LaTeXDrawPoint2D position = new LaTeXDrawPoint2D(newP.origin.x*Figure.PPC,newP.origin.y*Figure.PPC*-1);
+				GridShape f=null;
+				
+				if(angle!=0)
+				{
+					Point2D.Double tmp1 = new Point2D.Double(
+							position.x+((gridEndX+gridStartX)/2.)*Figure.PPC*xunit, 
+							position.y-((gridEndY+gridStartY)/2.)*Figure.PPC*yunit);
+					Point2D.Double tmp = rotatePoint(tmp1, position, angle);
+					position.setLocation(position.x+(tmp.x-tmp1.x), position.y+(tmp.y-tmp1.y));
+				}
+				
+				if(isGrid)
+				{
+					f = new Grid(position, true);
+					Grid g = (Grid)f;
+					g.setUnit(xunit);
+					g.setGridDots(newP.gridDots);
+					g.setGridLabelsColor(newP.labelsGridCol);
+					g.setGridLabelsSize((int)((newP.gridLabel*PSTricksConstants.CM_VAL_PT)/0.6));
+					g.setGridWidth((float)Math.abs(newP.gridWidth*Figure.PPC));
+					g.setSubGridColor(newP.subGridCol);
+					g.setSubGridDiv(newP.subGridDiv);
+					g.setSubGridDots(newP.subGridDots);
+					g.setSubGridWidth((float)Math.abs(newP.subGridWidth*Figure.PPC));
+					g.setOriginX(originX);
+					g.setOriginY(originY);
+					g.setLinesColor(newP.gridColor);
+				}
+				else
+				{
+					f = new Axe(position, true);
+					Axe a = (Axe)f;
+					a.setOriginX((int)newP.ox);
+					a.setOriginY((int)newP.oy);
+					a.setLabelsDisplayedToken(newP.labels);
+					a.setTicksDisplayedToken(newP.ticks);
+					a.setTicksStyleToken(newP.ticksStyle);
+					a.setTicksSize(newP.ticksSize*Figure.PPC);
+					a.setIncrementX(newP.dxIncrement);
+					a.setIncrementY(newP.dyIncrement);
+					a.setDistLabelsX(newP.dxLabelDist);
+					a.setDistLabelsY(newP.dyLabelDist);
+					a.setShowOrigin(newP.showOrigin);
+					a.setAxesStyleToken(newP.axesStyle);
+					setFigureParameters(newP, a, false);
+					
+					String arrowHead2Style = newP.arrowStyle[1];
+					
+					if(arrowHead2Style.equals(PSTricksConstants.DLARROW_STYLE))
+						arrowHead2Style = PSTricksConstants.DRARROW_STYLE;
+					else if(arrowHead2Style.equals(PSTricksConstants.DRARROW_STYLE))
+						arrowHead2Style = PSTricksConstants.DLARROW_STYLE;
+					else if(arrowHead2Style.equals(PSTricksConstants.RARROW_STYLE))
+						arrowHead2Style = PSTricksConstants.LARROW_STYLE;
+					else if(arrowHead2Style.equals(PSTricksConstants.LARROW_STYLE))
+						arrowHead2Style = PSTricksConstants.RARROW_STYLE;
+					else if(arrowHead2Style.equals(PSTricksConstants.DLARROW_STYLE))
+						arrowHead2Style = PSTricksConstants.DRARROW_STYLE;
+					else if(arrowHead2Style.equals(PSTricksConstants.LRBRACKET_STYLE))
+						arrowHead2Style = PSTricksConstants.RRBRACKET_STYLE;
+					else if(arrowHead2Style.equals(PSTricksConstants.RRBRACKET_STYLE))
+						arrowHead2Style = PSTricksConstants.LRBRACKET_STYLE;
+					else if(arrowHead2Style.equals(PSTricksConstants.RSBRACKET_STYLE))
+						arrowHead2Style = PSTricksConstants.LSBRACKET_STYLE;
+					else if(arrowHead2Style.equals(PSTricksConstants.LSBRACKET_STYLE))
+						arrowHead2Style = PSTricksConstants.RSBRACKET_STYLE;
+					
+					((Arrowable)a).setArrow1Style(newP.arrowStyle[0]);
+					((Arrowable)a).setArrow2Style(arrowHead2Style);
+					setArrowParameters(((Arrowable)a).getArrowHead1(), newP);
+					setArrowParameters(((Arrowable)a).getArrowHead2(), newP);
+				}
+				
+				f.setGridEndX(gridEndX);
+				f.setGridEndY(gridEndY);
+				f.setGridStartX(gridStartX);
+				f.setGridStartY(gridStartY);
+				f.updateFonts();
+				f.updateBorders(null);
+				f.updateBorders();
+				f.setRotationAngle(angle);
+				f.setXLabelSouth(!isGridYLabelReverse);
+				f.setYLabelWest(!isGridXLabelReverse);
+				
+				if(!last.psCustomP.fromPsCustom)
+					figures.add(f);
+			
+				return end;
+				
+			}catch(Exception e) { throw new InvalidFormatCommandException("psgrid or psaxes", line); } //$NON-NLS-1$
+		}
+
+
+
+
+	@Override
+	public int actionsOnPicture(int line, Vector<PSTricksParameters> ps, 
+								String params) throws InvalidFormatCommandException
+	{
+		try
+		{
+			String[] path = {""};//$NON-NLS-1$
+			int end = parseParametersPicture(line, params, path);
+//			LaTeXDrawPoint2D position = new LaTeXDrawPoint2D();
+//			BatchConvertFrame bcf = new BatchConvertFrame();
+//			Image image = bcf.getImage(new File(path[0]));
+//			BufferedImage bufferedI = new BufferedImage(image.getWidth(null), 
+//											image.getHeight(null), BufferedImage.TYPE_INT_RGB );
+//			Graphics g = bufferedI.createGraphics();
+//			g.drawImage(image,0,0,null);
+//			g.dispose();
+//			
+//			Picture p = new Picture(true, position, bufferedI, path[0]);
+//			
+//			figures.add(p);
+			
+			return end;
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			throw new InvalidFormatCommandException("includegraphics", line); //$NON-NLS-1$
+		}
+	}
+
+
+
+
+	@Override
+	public int actionsOnFramedBox(int nLine, boolean hasStar, Vector<PSTricksParameters> ps, 
+			String cmd, String params, int type) throws InvalidFormatCommandException
+	{
+		int i = ps.size()-1;
+		PSTricksParameters pp = null;
+		
+		while(pp==null && i>=0)
+			if(ps.elementAt(i).getPosition()!=null)
+				pp = ps.elementAt(i);
+			else i--;
+			
+		if(pp==null)
+			pp = ps.firstElement();
+		
+		FramedBox fb = new FramedBox(pp.psBoxText);
+		fb.setStart(pp.textForFrame.length());
+		pp.psBox.add(fb);
+		PSTricksParameters newP = new PSTricksParameters(ps.lastElement());
+		int end = -1;
+		int[] j = {0};
+		try 
+		{ 
+			goToNextChar(params, j); 
+			if(params.charAt(j[0])=='*')
+			{
+				j[0]++;
+				goToNextChar(params, j); 
+			}
+		} 
+		catch(Exception e1) { throw new InvalidFormatCommandException(nLine); }
+		
+		if(params.charAt(j[0])=='[')
+		{
+			switch(type)
+			{
+				case 0: 
+					fb.setBoxType(FramedBox.BOX_RECTANGLE); 
+					end = parseParametersFrameEllipse(nLine, params, null, null, newP);
+					if(newP.frameArc>0) 
+					{
+						((LaTeXDrawRectangle)fb.getBox()).setFrameArc(newP.frameArc);
+						((LaTeXDrawRectangle)fb.getBox()).setIsRound(true);
+					}
+					break;
+				case 1: 
+					fb.setBoxType(FramedBox.BOX_CIRCLE); 
+					end = parseParametersCircle(nLine, params, null, null, newP);
+					break;
+				case 2: 
+					fb.setBoxType(FramedBox.BOX_TRIANGLE); 
+					end = parseParametersPolygon(nLine, params, null, newP);
+					break;
+				case 3: 
+					fb.setBoxType(FramedBox.BOX_DIAMOND); 
+					end = parseParametersPolygon(nLine, params, null, newP);
+					break;
+				case 4: 
+					fb.setBoxType(FramedBox.BOX_ELLIPSE);
+					end = parseParametersFrameEllipse(nLine, params, null, null, newP);
+					break;
+				case 5: 
+					fb.setBoxType(FramedBox.BOX_RECTANGLE); 
+					end = parseParametersFrameEllipse(nLine, params, null, null, newP);
+					if(newP.frameArc>0) 
+					{
+						((LaTeXDrawRectangle)fb.getBox()).setFrameArc(newP.frameArc);
+						((LaTeXDrawRectangle)fb.getBox()).setIsRound(true);
+					}
+					break;
+				case 6: 
+					fb.setBoxType(FramedBox.BOX_RECTANGLE); 
+					end = parseParametersFrameEllipse(nLine, params, null, null, newP);
+					if(newP.frameArc>0) 
+					{
+						((LaTeXDrawRectangle)fb.getBox()).setFrameArc(newP.frameArc);
+						((LaTeXDrawRectangle)fb.getBox()).setIsRound(true);
+					}
+					break;
+			}
+			j[0] = end;
+		}
+		
+		try
+		{
+			goToNextChar(params, j);
+		} catch(Exception e1) { throw new InvalidFormatCommandException(nLine); }
+		
+		switch(type)
+		{
+			case 0: 
+				fb.setBoxType(FramedBox.BOX_RECTANGLE); 
+				break;
+			case 1: 
+				fb.setBoxType(FramedBox.BOX_CIRCLE); 
+				break;
+			case 2: 
+				fb.setBoxType(FramedBox.BOX_TRIANGLE); 
+				break;
+			case 3: 
+				fb.setBoxType(FramedBox.BOX_DIAMOND); 
+				break;
+			case 4: 
+				fb.setBoxType(FramedBox.BOX_ELLIPSE);
+				break;
+			case 5: 
+				fb.setBoxType(FramedBox.BOX_RECTANGLE); 
+				break;
+			case 6: 
+				fb.setBoxType(FramedBox.BOX_RECTANGLE); 
+				break;
+		}
+
+		
+		if(params.charAt(j[0])!='{')//psframebox3, psframebox[framesep=0.3]3 for instance.
+		{
+			PSTricksParameters p;
+			boolean again = true;
+			int k = ps.size()-1;
+			
+			while(again && k>=0)
+			{
+				p = ps.elementAt(k);
+				if(p.getPosition()!=null)
+				{
+					again = false;
+					p.textForFrame+=params.charAt(j[0]);
+				}
+				else 
+				{
+					p.textForFrame+=params.charAt(j[0]);
+					k--;
+				}
+			}
+			
+			k = ps.size()-1;
+			p=null;
+			
+			while(p==null && k>=0)
+				if(ps.elementAt(k).getPosition()!=null)
+					p = ps.elementAt(k);
+				else k--;
+			
+			if(p==null)
+				p = ps.firstElement();
+			
+			p.psBox.lastElement().setEnd(p.textForFrame.length());
+			p.psBox.add(0, p.psBox.remove(p.psBox.size()-1));
+			
+			end=j[0]+1;
+		}
+		
+		fb.setFrameSep(newP.frameSep*Figure.PPC);
+		fb.setBoxSep(newP.boxSep);
+		
+		setFigureParameters(newP, fb.getBox(), hasStar);
+		
+		if(hasStar)
+		{
+			fb.getBox().setIsFilled(true);
+			fb.getBox().setInteriorColor(newP.fillColor);
+			fb.getBox().setLinesColor(newP.fillColor);
+		}
+		
+		switch(type)
+		{
+			case 5: 
+				fb.getBox().setHasDoubleBoundary(true);
+				break;
+			case 6: 
+				fb.getBox().setHasShadow(true);
+				break;
+		}
+		
+		if(end==-1)
+			end = j[0];
+		
+		return end;
+	}
+
+
+
+
+	
+	@Override
+	public void actionsOnTerminatedFramedBoxes(Vector<PSTricksParameters> params) throws InvalidFormatCommandException
+	{
+		PSTricksParameters pp = params.lastElement();
+		
+		String str = pp.psBoxText.getText();
+		
+		if(str.length()==0)
+			str = " ";//$NON-NLS-1$
+		
+		pp.textParsed = pp.textForFrame;
+		actionsOnText(params);
+		
+		if(pp.psBox.isEmpty())
+			return;
+		
+		Text txt = (Text)figures.remove(figures.size()-1);
+		boolean simpleBox = pp.psBox.size()==1 && pp.psBox.firstElement().getBoxedText().equals(txt.getText());
+		
+		if(simpleBox)
+		{
+			FramedBox fb = pp.psBox.firstElement();
+			fb.setText(txt);
+			fb.setStart(-1);
+			fb.setEnd(-1);
+			fb.getBox().setBordersPosition(PSTricksConstants.BORDERS_OUTSIDE);
+			txt.setSimpleBox(fb);
+		}
+		else
+			for(FramedBox fb : pp.psBox)
+			{
+				fb.setText(txt);
+				txt.addBox(fb);
+				fb.getBox().setBordersPosition(PSTricksConstants.BORDERS_OUTSIDE);
+			}
+		
+		txt.setHasFramedBox(!pp.psBox.isEmpty());
+		txt.setHasSimpleFramedBox(simpleBox);
+		txt.updateFramedBoxes();
+		txt.updateFontsBorders();
+		
+		if(!pp.psCustomP.fromPsCustom)
+			figures.add(txt);
+		
+		if(simpleBox)
+		{
+			if(txt.getSimpleBox().getBoxType()==FramedBox.BOX_TRIANGLE)
+			{
+				double height = (txt.getSimpleBox().getBox().getTheSEBoundPoint().y-
+						txt.getSimpleBox().getBox().getTheNWBoundPoint().y)/4.;
+				LaTeXDrawPoint2D pos = txt.getPosition();
+				txt.setPosition(new LaTeXDrawPoint2D(pos.x, pos.y+height));
+				txt.getSimpleBox().getBox().updateShape();
+			}
+		}
+		else
+		{
+			FramedBox fb, max=null;
+			double xMin=Double.MAX_VALUE;
+			int i=0, size = txt.getMultipleBox().size();
+			
+			while(i<size)
+			{
+				fb = txt.getMultipleBox().elementAt(i);
+
+				if(fb.isBoxSep() && fb.getBoxType()==FramedBox.BOX_TRIANGLE &&
+					fb.getBox().getTheNWBoundPoint().x<xMin)
+				{
+					xMin = fb.getBox().getTheNWBoundPoint().x;
+					max = fb;
+				}
+				else i++;
+			}
+
+			if(max!=null)
+			{
+				double height = (max.getBox().getTheSEBoundPoint().y-max.getBox().getTheNWBoundPoint().y)/4.;
+									
+				LaTeXDrawPoint2D pos = txt.getPosition();
+				txt.setPosition(new LaTeXDrawPoint2D(pos.x, pos.y+height));
+				max.getBox().updateShape();
+			}
+			
+		}
+		
+		txt.updateFramedBoxes();
+		txt.updateFontsBorders();
+	}
+
+
+	
+	
+	
+	/**
+	 * Optimises the figures; for instance, frame are transformed in square.
+	 * @param vFigures The figures to optimise.
+	 * @since 1.9
+	 */
+	public static void optimizeCode(Vector<Figure> vFigures)
+	{
+		Vector<Arc> vArcs 	= new Vector<Arc>();
+		Vector<Line> vLines = new Vector<Line>();
+		Vector<BezierCurve> vCurves = new Vector<BezierCurve>();
+		int sizevl, i, size, j;
+		
+		for(Figure f : vFigures)
+			if(f instanceof Line)
+				vLines.add((Line)f);
+			else
+				if(f instanceof Arc)
+					vArcs.add((Arc)f);
+				else
+					if(f instanceof BezierCurve)
+						vCurves.add((BezierCurve)f);
+
+		sizevl = vLines.size();
+		
+		for(Arc a : vArcs)// We check if we can convert arc+line in chord.
+			if(a.getType()==Arc2D.OPEN)
+			{
+				boolean again = true;
+				i=0;
+				LaTeXDrawPoint2D startP, endP, p1, p2;
+				Line l=null;
+				
+				while(again && i<sizevl)
+				{
+					l		= vLines.elementAt(i);
+					startP 	= a.getStartPoint(true);
+					endP	= a.getEndPoint(true);
+					p1		= l.getPt1();
+					p2		= l.getPt2();
+					startP.y*=-1;
+					endP.y*=-1;
+					
+					if((startP.equals(p1, 1) && endP.equals(p2, 1)) || 
+						(startP.equals(p2, 1) && endP.equals(p1, 1)))
+						again = false;
+					else 
+						i++;
+				}
+				
+				if(!again && a.isParametersEquals(l, false, true))
+				{
+					vFigures.remove(l);
+					a.setType(Arc2D.CHORD);
+				}
+			}
+		
+		if(vCurves.size()>1)// We try to concat the Bézier curves.
+		{
+			if(vCurves.size()<200)// We must set a limit otherwise it may have a freeze.
+			{
+				BezierCurve b1, b2;
+			
+				for(j=0; j<vCurves.size(); j++)
+				{
+					i = j+1;
+					b1 = vCurves.elementAt(j);
+					
+					while(i<vCurves.size())
+					{
+						b2 = vCurves.elementAt(i);
+					
+						if(b1.isJoined(b2)==1 && b1.isParametersEquals(b2, true, true))
+						{
+							vCurves.remove(b2);
+							vFigures.remove(b2);
+							b1.join(b2);
+							i=j+1;
+						}
+						else
+							i++;
+					}
+				} //for
+			}
+			
+			for(BezierCurve bc : vCurves)
+				bc.replaceLastPointByClosing();
+		}//if
+		
+		i = 0;
+		while(i<vCurves.size()) // We check if the it is possible to close a curve.
+		{
+			BezierCurve bc = vCurves.elementAt(i);
+			bc.replaceLastPointByClosing();
+			
+			if(bc.isOpen())
+			{
+				boolean again = true;
+				size = vLines.size();
+
+				for(int k=0; k<size && again; k++)//We try to close it with a line.
+					if(bc.isLineClosingCurve(vLines.elementAt(k)) && 
+						bc.isParametersEquals(vLines.elementAt(k), true, false))
+					{
+						bc.setOpen(false);
+						bc.setCloseType(BezierCurve.CLOSE_TYPE_LINE);
+						again = false;
+						vFigures.remove(vLines.elementAt(k));
+					}
+				
+				if(again)//We try to close it with a two-points curve.
+				{
+					j = 0;
+					
+					while(j<i && again)
+					{
+						BezierCurve bc2 = vCurves.elementAt(j);
+						
+						if(bc2.getNbPoints()==2 && bc.isOpen() && bc2.isCurveClosingCurve(bc)==1 && 
+							bc.isParametersEquals(bc2, true, false))
+						{
+							bc.setOpen(false);
+							bc.setCloseType(BezierCurve.CLOSE_TYPE_CURVE);
+							again = false;
+							vCurves.remove(j);
+							vFigures.remove(bc2);
+							i--;
+						}
+						else j++;
+					}
+					
+					j = i+1;
+					while(j<vCurves.size() && again)
+					{
+						BezierCurve bc2 = vCurves.elementAt(j);
+						
+						if(bc2.getNbPoints()==2 && bc.isOpen() && bc.isCurveClosingCurve(bc2)==1 && 
+							bc.isParametersEquals(bc2, true, false))
+						{
+							bc.setOpen(false);
+							bc.setCloseType(BezierCurve.CLOSE_TYPE_CURVE);
+							again = false;
+							vCurves.remove(j);
+							vFigures.remove(bc2);
+						}
+						else j++;
+					}
+				}
+			}//if(bc.isOpen())
+			i++;
+		}
+		
+		i=0;
+		size = vFigures.size();
+		while(i<size)
+		{
+			Figure f = vFigures.elementAt(i);
+			
+			if(f instanceof LaTeXDrawRectangle && !(f instanceof Square))
+			{// We check if we can convert frame in square.
+				LaTeXDrawRectangle frame = (LaTeXDrawRectangle)f;
+				
+				if(frame.getHeight()==frame.getWidth())
+				{
+					Square square = new Square(frame,true);
+					vFigures.remove(i);
+					vFigures.add(i, square);
+				}
+			}
+			i++;
+		}
+	}
+
+
+
+
+	@Override
+	public void actionsOnterminatedPsCustom(PSTricksParameters param) throws NotFullyManagedException
+	{
+		Figure f;
+		int i=0;
+		
+		while(!psCustFigures.isEmpty())
+		{
+			f = psCustFigures.remove(0);
+			
+			if(!(f instanceof AkinPoints) || ((AkinPoints)f).getNbPoints()>1)
+			{
+				if(f instanceof AkinPoints && ((AkinPoints)f).getType()==AkinPoints.TYPE_CURVES)
+				{// We must transform the read points.
+					AkinPoints ak = (AkinPoints)f;
+					int j, size = ak.getNbPoints();
+					LaTeXDrawPoint2D prev, curr = ak.getPoint(0);
+					
+					for(j=1; j<size; j++)
+					{
+						prev = curr;
+						curr = ak.getPoint(j);
+						curr.setLocation(2*curr.x-prev.x, 2*curr.y-prev.y);
+					}
+					
+					((AkinPoints)f).updateBorders();
+				}
+				
+				figures.add(f);
+				i++;
+			}
+		}
+	}
+
+
+
+
+	@Override
+	public void actionsOnNewPath(int line)
+	{
+		psCustFigures.clear();
+	}
+
+
+
+
+	@Override
+	public int parseOpenShadowCommand(PSTricksParameters param, int line, String txt) throws InvalidFormatCommandException
+	{
+		PSTricksParameters pstp = new PSTricksParameters(param);
+		int end =  super.parseOpenShadowCommand(pstp, line, txt);
+		
+		for(Figure f : psCustFigures)
+		{
+			f.setHasShadow(true);
+			f.setShadowAngle(Math.toRadians(pstp.shadowAngle));
+			f.setShadowColor(pstp.shadowCol);
+			f.setShadowSize(Math.abs(pstp.shadowSize)*Figure.PPC);
+		}
+		
+		if(psCustFigures.size()>0 && psCustFigures.lastElement() instanceof AkinPoints)
+		{
+			double xunit = param.unit!=PSTricksConstants.DEFAULT_UNIT? param.unit : param.xUnit;
+			double yunit = param.unit!=PSTricksConstants.DEFAULT_UNIT? param.unit : param.yUnit;
+			
+			AkinPoints ak = new AkinPoints(new LaTeXDrawPoint2D(
+					param.psCustomP.lastPosition.x*Figure.PPC*xunit, 
+					param.psCustomP.lastPosition.y*Figure.PPC*yunit*-1), true);
+			ak.setInterval(1);
+			ak.setType(AkinPoints.TYPE_LINES);
+			psCustFigures.add(ak);
+		}
+		
+		return end;
+	}
+
+
+
+
+	@Override
+	public int actionsOnCurveTo(int line, Vector<PSTricksParameters> params, String txt)
+								throws InvalidFormatCommandException
+	{
+		Point2D.Double p1 = new Point2D.Double();
+		Point2D.Double p2 = new Point2D.Double();
+		Point2D.Double p3 = new Point2D.Double();
+		int end = parseParametersCurveTo(line, txt, p1, p2, p3);
+		PSTricksParameters last = params.lastElement();
+		AkinPoints ak ;
+		double xunit = last.unit!=PSTricksConstants.DEFAULT_UNIT? last.unit : last.xUnit;
+		double yunit = last.unit!=PSTricksConstants.DEFAULT_UNIT? last.unit : last.yUnit;
+		
+		if(psCustFigures.isEmpty() || !(psCustFigures.lastElement() instanceof AkinPoints))
+		{
+			ak = new AkinPoints(new LaTeXDrawPoint2D(last.psCustomP.lastPosition.x*Figure.PPC*xunit, 
+					last.psCustomP.lastPosition.y*Figure.PPC*-1*yunit), true);
+			setFigureParameters(params.lastElement(), ak, false);
+			ak.setInterval(1);
+			psCustFigures.add(ak);
+		}
+		else ak = (AkinPoints)psCustFigures.lastElement();
+		
+		ak.setType(AkinPoints.TYPE_CURVES);
+		ak.addPoint(new LaTeXDrawPoint2D(p3.x*Figure.PPC*xunit, p3.y*Figure.PPC*-1*yunit));
+		last.psCustomP.lastPosition.setLocation(p3);
+
+		return end;
+	}
+
+
+
+
+	@Override
+	public int actionsOnLineTo(int line, Vector<PSTricksParameters> params, String txt) throws InvalidFormatCommandException
+	{
+		Point2D.Double p1 = new Point2D.Double();
+		int end = parseParametersLineMoveTo(line, txt, p1);
+		PSTricksParameters last = params.lastElement();
+		AkinPoints ak ;
+		double xunit = last.unit!=PSTricksConstants.DEFAULT_UNIT? last.unit : last.xUnit;
+		double yunit = last.unit!=PSTricksConstants.DEFAULT_UNIT? last.unit : last.yUnit;
+		
+		if(psCustFigures.isEmpty() || !(psCustFigures.lastElement() instanceof AkinPoints))
+		{
+			ak = new AkinPoints(new LaTeXDrawPoint2D(last.psCustomP.lastPosition.x*Figure.PPC*xunit, 
+								last.psCustomP.lastPosition.y*Figure.PPC*-1*yunit), true);
+			setFigureParameters(params.lastElement(), ak, false);
+			ak.setInterval(1);
+			ak.setType(AkinPoints.TYPE_LINES);
+			psCustFigures.add(ak);
+		}
+		else ak = (AkinPoints)psCustFigures.lastElement();
+		
+		ak.addPoint(new LaTeXDrawPoint2D(p1.x*Figure.PPC*xunit, p1.y*Figure.PPC*-1*yunit));
+		last.psCustomP.lastPosition.setLocation(p1);
+		
+		return end;
+	}
+
+
+
+
+	@Override
+	public int actionsOnMoveTo(int line, Vector<PSTricksParameters> params, String txt) throws InvalidFormatCommandException
+	{
+		Point2D.Double p1 = new Point2D.Double();
+		int end = parseParametersLineMoveTo(line, txt, p1);
+		PSTricksParameters last = params.lastElement();
+		last.psCustomP.lastPosition.setLocation(p1);
+		
+		return end;
+	}
+
+
+
+
+	@Override
+	public void actionsOnClosePathCommand(int line)
+	{
+		if(!psCustFigures.isEmpty())
+		{
+			Figure f = psCustFigures.lastElement();
+			
+			if(f instanceof AkinPoints)
+				((AkinPoints)f).setOpen(false);
+		}
+	}
+	
+}
+
+
diff --git a/current/latexDraw/parsers/pstricks/PSTricksParameters.java b/current/latexDraw/parsers/pstricks/PSTricksParameters.java
new file mode 100644
index 0000000..9f6e29f
--- /dev/null
+++ b/current/latexDraw/parsers/pstricks/PSTricksParameters.java
@@ -0,0 +1,631 @@
+/**
+ * PSTricksParameters.java
+ */
+package latexDraw.parsers.pstricks;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+import java.awt.geom.Point2D.Double;
+import java.util.Vector;
+
+import latexDraw.figures.FramedBox;
+import latexDraw.figures.Text;
+import latexDraw.psTricks.PSTricksConstants;
+
+
+/** 
+ * This class defines the PSTricks parameters. We must create a class with these parameters because
+ * at each new '{' we must create new parameters and at the '}' the former parameters will replace the current parameters.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 
+ * 09/01/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.5<br>
+ */
+public class PSTricksParameters
+{
+	/**
+	 * Defines the parameters of the pscustom parameters.
+	 * @author Arnaud BLOUIN<br>
+	 * @version 0.3<br>
+	 */
+	public class PsCustomParameters implements Cloneable
+	{
+		/** Defines if the command pscustom has a star. */
+		public boolean hasStar;
+		
+		/** Defines if the current <code>PSTricksParameters</code> comes from a pscustom command. */
+		public boolean fromPsCustom;
+		
+		/** The last position (cf. <code>\moveto</code> pstricks command). */
+		public Point2D.Double lastPosition;
+		
+		
+		
+		public PsCustomParameters()
+		{
+			hasStar 		= false;
+			fromPsCustom	= false;
+			lastPosition	= new Point2D.Double();
+		}
+		
+		
+		
+		@Override
+		public Object clone() throws CloneNotSupportedException
+		{
+			PsCustomParameters pscp = (PsCustomParameters)super.clone();
+			
+			pscp.fromPsCustom	= fromPsCustom;
+			pscp.hasStar		= hasStar;
+			pscp.lastPosition	= (Double)lastPosition.clone();
+			
+			return pscp;
+		}
+	}
+	
+	
+	
+	/** 
+	 * This class defines the position managed with the rput and uput commands of the figures.<br>
+	 * This file is part of LaTeXDraw<br>
+	 * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+	 *<br>
+	 *  LaTeXDraw is free software; you can redistribute it and/or modify
+	 *  it under the terms of the GNU General Public License as published by
+	 *  the Free Software Foundation; either version 2 of the License, or
+	 *  (at your option) any later version.<br>
+	 *<br>
+	 *  LaTeXDraw is distributed without any warranty; without even the 
+	 *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+	 *  PURPOSE.  See the GNU General Public License for more details.<br>
+	 * <br>
+	 * 
+	 * 03/16/06<br>
+	 * @author Arnaud BLOUIN<br>
+	 * @version 0.5<br>
+	 */
+	public static class PositionParameters implements Cloneable
+	{
+		public static final short REF_POINT_DEFAULT_CENTER= 0;
+		
+		public static final short REF_POINT_LEFT  		= 10;
+		public static final short REF_POINT_RIGHT 		= 20;
+		
+		public static final short REF_POINT_TOP   		= 1;
+		public static final short REF_POINT_BOTTOM 		= 2;
+		public static final short REF_POINT_BASE 		= 3;
+		
+		/** True if the current {...} allows to sum all the rotations :<br>
+		 * rput{30}(0,0){ rput{*40}{...} ... } -> false<br>
+		 * rput{30}(0,0){ rput{40} {...} ... } -> true<br>
+		 */
+		public boolean isSumRotation;
+		
+		/** The x gap */
+		public double dx;
+		
+		/** The y gap */
+		public double dy;
+		
+		/** The rput angle in degrees */
+		public double angleRput;
+		
+		/** The uput angle in degrees. */
+		public double angleUput;
+		
+		/** The gap of the label */
+		public double labelSep;
+		
+		/** The point of reference (for rput). */
+		public int refPoint;
+		
+		/** The angle of reference (for uput in degrees). */
+		public double refAngle;
+		
+		
+		
+		/**
+		 * The constructor by default.
+		 */
+		public PositionParameters()
+		{
+			this(true, 0, 0, 0, 0, 0, REF_POINT_DEFAULT_CENTER, REF_POINT_RIGHT);
+		}
+		
+		
+		/**
+		 * The main constructor.
+		 * @param isSumRot True if allows to sum all the rotations
+		 * @param x The x gap
+		 * @param y The y gap
+		 * @param rputA The rput angle
+		 * @param uputA The uput angle
+		 * @param labSep The gap of the label (for uput).
+		 * @param refPt The point of reference (for rput).
+		 * @param refA The angle of reference (for uput).
+		 */
+		public PositionParameters(boolean isSumRot, double x, double y, double rputA, 
+							double uputA, double labSep, int refPt, double refA)
+		{
+			isSumRotation = isSumRot;
+			dx = x;
+			dy = y;
+			angleRput = rputA;
+			angleUput = uputA;
+			labelSep  = labSep;
+			
+			if(refPt==REF_POINT_LEFT || refPt==REF_POINT_BOTTOM || refPt== REF_POINT_BOTTOM+REF_POINT_LEFT ||
+				refPt==REF_POINT_BOTTOM+REF_POINT_RIGHT || refPt==REF_POINT_DEFAULT_CENTER || refPt==REF_POINT_RIGHT || 
+				refPt==REF_POINT_TOP || refPt==REF_POINT_TOP+REF_POINT_LEFT || refPt==REF_POINT_TOP+REF_POINT_RIGHT || 
+				refPt==REF_POINT_BASE || refPt==REF_POINT_BASE+REF_POINT_LEFT || refPt==REF_POINT_BASE+REF_POINT_RIGHT)
+				refPoint = refPt;
+			else
+				refPoint = REF_POINT_DEFAULT_CENTER;
+			
+			if(refA==REF_POINT_LEFT || refA==REF_POINT_BOTTOM || refA== REF_POINT_BOTTOM+REF_POINT_LEFT ||
+				refA==REF_POINT_BOTTOM+REF_POINT_RIGHT || refA==REF_POINT_DEFAULT_CENTER || refA==REF_POINT_RIGHT || 
+				refA==REF_POINT_TOP || refA==REF_POINT_TOP+REF_POINT_LEFT || refA==REF_POINT_TOP+REF_POINT_RIGHT || 
+				refA==REF_POINT_BASE || refA==REF_POINT_BASE+REF_POINT_LEFT || refA==REF_POINT_BASE+REF_POINT_RIGHT)
+				refAngle = refA;
+			else
+				refAngle = REF_POINT_RIGHT;
+		}
+		
+		
+		
+		@Override
+		public String toString()
+		{
+			return "PositionParameters : <isSum="+ //$NON-NLS-1$
+			isSumRotation +", dx="+dx+", dy="+dy+", angleRput="+angleRput+", labelSep="+//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+			labelSep+", refPoint="+refPoint+">";//$NON-NLS-1$//$NON-NLS-2$
+		}
+		
+		
+		
+		@Override
+		public Object clone() throws CloneNotSupportedException
+		{
+			return super.clone();
+		}
+	}
+	
+	
+	
+	
+	public static boolean isCentered = false;
+	public static Point2D.Double pictureSWPt=null;
+	public static Point2D.Double pictureNEPt=null;
+	public static String tokenPosition = "";//$NON-NLS-1$
+	
+	private PositionParameters position;
+	
+	public String axesStyle;
+	public String[] arrowStyle;
+	public double arrowSizeD;
+	public double arrowSizeN;
+	public double arrowLgth;
+	public double arrowInset;
+	public double arrowTBarSD;
+	public double arrowTBarSN;
+	public double arrowBrLgth;
+	public double arrowrBrLgth;
+	public double arrowDotSD;
+	public double arrowDotSN;
+	public double arrowScale1;
+	public double arrowScale2;
+	public double arcSep;
+	public double arcSepA;
+	public double arcSepB;
+	public boolean boxSep;
+	public Color borderColor;
+	public String borderPos;
+	public double border;
+	public double curvature1;
+	public double curvature2;
+	public double curvature3;
+	public double dxIncrement;
+	public double dyIncrement;
+	public double dxLabelDist;
+	public double dyLabelDist;
+	public String dotStyle;
+	public double dotScale1;
+	public double dotScale2;
+	public double dotAngle;
+	public double dotStep;
+	public double dashBlack;
+	public double dashWhite;
+	public boolean dbleLine;
+	public double dbleSep;
+	public Color dbleColor;
+	public double degrees;
+	public double frameSep;
+	public double frameArc;
+	public String fillStyle;
+	public Color fillColor;
+	public double gridWidth;
+	public double gridLabel;
+	public int gridDots;
+	public double gradAngle;
+	public Color gridColor;
+	public double gradMidPoint;
+	public Color gradBegin;
+	public Color gradEnd;
+	public int gradLines;
+	public double gangle;
+	public double hatchWidth;
+	public double hatchSep;
+	public Color hatchCol;
+	public double hatchAngle;
+	public boolean isCornerRel;
+	public boolean isShadow;
+	public double lineWidth;
+	public Color lineColor;
+	public Color labelsGridCol;
+	public String labels;
+	public double lineArc;
+	public String lineStyle;
+	public double ox;
+	public double oy;
+	public boolean onRadians;
+	public Point2D.Double origin;
+	public boolean specialCoor;
+	public boolean showPoints;
+	public boolean showOrigin;
+	public double subGridWidth;
+	public boolean swapAxes;
+	public Color shadowCol;
+	public Color subGridCol;
+	public double shadowAngle;
+	public double shadowSize;
+	public int subGridDots;
+	public int subGridDiv;
+	public String ticks;
+	public String ticksStyle;
+	public double ticksSize;
+	public boolean textItalic;
+	public boolean textBold;
+	public String textEnc;
+	public String textShape;
+	public String textSeries;
+	public String textFamily;
+	public Color textColor;
+	public String textSize; 
+	public String textParsed;
+	public double unit;
+	public double xUnit;
+	public double yUnit;
+	
+	public Vector<FramedBox> psBox = new Vector<FramedBox>();
+	public Text psBoxText;
+	public boolean fromFramedBox;
+	
+	/** The parsed text which is transfered by psframe commands to the rput PSTricksParameters. */
+	public String textForFrame;
+	
+	public PsCustomParameters psCustomP;
+	
+	
+	/**
+	 * The constructor by default.
+	 */
+	public PSTricksParameters()
+	{
+		psCustomP 		= new PsCustomParameters();
+		textForFrame 	= "";//$NON-NLS-1$
+		fromFramedBox 	= false;
+		textParsed 		= "";//$NON-NLS-1$
+		position 	= null;
+		textBold 	= false;
+		textItalic 	= false;
+		boxSep		= PSTricksConstants.DEFAULT_BOX_SEP;
+		frameSep	= PSTricksConstants.DEFAULT_FRAME_SEP;
+		gradAngle	= PSTricksConstants.DEFAULT_GRADIENT_ANGLE;
+		gradMidPoint = PSTricksConstants.DEFAULT_GRADIENT_MID_POINT;
+		gradLines	= PSTricksConstants.DEFAULT_GRADIENT_LINES;
+		gradBegin	= PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+		gradEnd		= PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+		gangle		= PSTricksConstants.DEFAULT_GANGLE;
+		specialCoor = PSTricksConstants.DEFAULT_SPECIAL_COOR;
+		onRadians	= PSTricksConstants.DEFAULT_ON_RADIANS;
+		degrees		= PSTricksConstants.DEFAULT_DEGREES;
+		unit		= PSTricksConstants.DEFAULT_UNIT;
+		xUnit		= PSTricksConstants.DEFAULT_UNIT;
+		yUnit		= PSTricksConstants.DEFAULT_UNIT;
+		lineWidth 	= PSTricksConstants.DEFAULT_LINE_WIDTH;
+		lineColor 	= PSTricksConstants.DEFAULT_LINE_COLOR;
+		showPoints 	= PSTricksConstants.DEFAULT_SHOW_POINTS;
+		lineArc 	= PSTricksConstants.DEFAULT_LINE_ARC;
+		frameArc 	= PSTricksConstants.DEFAULT_FRAME_ARC;
+		isCornerRel = PSTricksConstants.DEFAULT_CORNER_SIZE_RELATIVE;
+		arcSep		= PSTricksConstants.DEFAULT_ARC_SEP;
+		arcSepA 	= PSTricksConstants.DEFAULT_ARC_SEP_A;
+		arcSepB 	= PSTricksConstants.DEFAULT_ARC_SEP_B;
+		curvature1	= PSTricksConstants.DEFAULT_CURVATURE_NUM1;
+		curvature2	= PSTricksConstants.DEFAULT_CRUVATURE_NUM2;
+		curvature3	= PSTricksConstants.DEFAULT_CRUVATURE_NUM3;
+		dotStyle	= PSTricksConstants.DEFAULT_DOT_STYLE;
+		dotScale1	= PSTricksConstants.DEFAULT_DOT_SCALE1;
+		dotScale2	= PSTricksConstants.DEFAULT_DOT_SCALE2;
+		dotAngle	= PSTricksConstants.DEFAULT_DOT_ANGLE;
+		gridWidth	= PSTricksConstants.DEFAULT_GRID_WIDTH;
+		gridLabel	= PSTricksConstants.DEFAULT_GRID_LABEL/PSTricksConstants.CM_VAL_PT;
+		subGridWidth= PSTricksConstants.DEFAULT_SUB_GRID_WIDTH;
+		subGridCol	= PSTricksConstants.DEFAULT_SUB_GRID_COLOR;
+		gridColor	= PSTricksConstants.DEFAULT_GRIDCOLOR;
+		labelsGridCol	= PSTricksConstants.DEFAULT_LABELGRIDCOLOR;
+		subGridDiv		= PSTricksConstants.DEFAULT_SUBGRIDDIV;
+		gridDots		= PSTricksConstants.DEFAULT_GRIDDOTS;
+		subGridDots		= PSTricksConstants.DEFAULT_SUBGRIDDOTS;
+		swapAxes	= PSTricksConstants.DEFAULT_SWAP_AXES;
+		origin 		= (Point2D.Double)PSTricksConstants.DEFAULT_ORIGIN.clone();
+		lineStyle	= PSTricksConstants.DEFAULT_LINE_STYLE;
+		dotStep		= PSTricksConstants.DEFAULT_DOT_STEP;
+		dashBlack	= PSTricksConstants.DEFAULT_DASH_BLACK;
+		dashWhite	= PSTricksConstants.DEFAULT_DASH_WHITE;
+		borderColor	= PSTricksConstants.DEFAULT_BORDER_COLOR;
+		border		= PSTricksConstants.DEFAULT_BORDER;
+		dbleLine	= PSTricksConstants.DEFAULT_DOUBLE_LINE;
+		dbleSep		= PSTricksConstants.DEFAULT_DOUBLE_SEP;
+		dbleColor	= PSTricksConstants.DEFAULT_DOUBLE_COLOR;
+		shadowCol	= PSTricksConstants.DEFAULT_SHADOW_COLOR;
+		isShadow	= PSTricksConstants.DEFAULT_SHADOW;
+		shadowAngle	= PSTricksConstants.DEFAULT_SHADOW_ANGLE;
+		shadowSize	= PSTricksConstants.DEFAULT_SHADOW_SIZE;
+		borderPos	= PSTricksConstants.DEFAULT_BORDERS_POS;
+		fillStyle	= PSTricksConstants.DEFAULT_FILL_STYLE;
+		fillColor	= PSTricksConstants.DEFAULT_FILL_COLOR;
+		hatchWidth	= PSTricksConstants.DEFAULT_HATCH_WIDTH;
+		hatchSep	= PSTricksConstants.DEFAULT_HATCH_SEP;
+		hatchCol	= PSTricksConstants.DEFAULT_HATCHING_COLOR;
+		hatchAngle	= PSTricksConstants.DEFAULT_HATCH_ANGLE;
+		arrowStyle	= new String[2];
+		arrowStyle[0] = PSTricksConstants.DEFAULT_ARROW_STYLE;
+		arrowStyle[1] = PSTricksConstants.DEFAULT_ARROW_STYLE;
+		arrowSizeD	= PSTricksConstants.DEFAULT_ARROW_SIZE_DIM;
+		arrowSizeN	= PSTricksConstants.DEFAULT_ARROW_SIZE_NUM;
+		arrowLgth	= PSTricksConstants.DEFAULT_ARROW_LENGTH;
+		arrowInset	= PSTricksConstants.DEFAULT_ARROW_INSET;
+		arrowTBarSD	= PSTricksConstants.DEFAULT_ARROW_TBARSIZE_DIM;
+		arrowTBarSN	= PSTricksConstants.DEFAULT_ARROW_TBARSIZE_NUM;
+		arrowBrLgth	= PSTricksConstants.DEFAULT_ARROW_BRACKET_LGTH;
+		arrowrBrLgth= PSTricksConstants.DEFAULT_ARROW_RBRACKET_LGTH;
+		arrowDotSD	= PSTricksConstants.DEFAULT_ARROW_DOTSIZE_DIM;
+		arrowDotSN	= PSTricksConstants.DEFAULT_ARROW_DOTSIZE_NUM;
+		arrowScale1	= PSTricksConstants.DEFAULT_ARROW_SCALE1;
+		arrowScale2	= PSTricksConstants.DEFAULT_ARROW_SCALE2;
+		textEnc		= null;
+		textShape	= null;
+		textSeries	= null;
+		textFamily	= null;
+		textColor	= Color.BLACK;
+		textSize 	= PSTricksConstants.COMMAND_TEXT_NORMAL;
+		psBoxText = new Text(null, false);
+		psBox = new Vector<FramedBox>();
+		showOrigin 	= PSTricksConstants.DEFAULT_SHOW_ORIGIN;
+		axesStyle	= PSTricksConstants.DEFAULT_AXES_STYLE;
+		ticks		= PSTricksConstants.DEFAULT_TICKS_DISPLAYED;
+		ticksSize	= PSTricksConstants.DEFAULT_TICKS_SIZE;
+		ticksStyle	= PSTricksConstants.DEFAULT_TICKS_STYLE;
+		labels		= PSTricksConstants.DEFAULT_LABELS_DISPLAYED;
+		ox			= PSTricksConstants.DEFAULT_OX;
+		oy			= PSTricksConstants.DEFAULT_OY;
+		dxIncrement	= PSTricksConstants.DEFAULT_DX;
+		dyIncrement = PSTricksConstants.DEFAULT_DY;
+		dxLabelDist	= PSTricksConstants.DEFAULT_DIST_X_LABEL;
+		dyLabelDist	= PSTricksConstants.DEFAULT_DIST_Y_LABEL;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * The constructor copying another PSTricksParameters
+	 */
+	public PSTricksParameters(PSTricksParameters toCopy)
+	{
+		try
+		{
+			psCustomP 	= (PsCustomParameters)toCopy.psCustomP.clone();
+		} catch(CloneNotSupportedException e)
+		{
+			psCustomP = new PsCustomParameters();
+		}
+		textForFrame 	= "";//$NON-NLS-1$
+		boxSep 			= toCopy.boxSep;
+		frameSep 		= toCopy.frameSep;
+		fromFramedBox 	= toCopy.fromFramedBox;
+		textParsed  = "";//$NON-NLS-1$
+		position    = null;
+		gradAngle 	= toCopy.gradAngle;
+		gradBegin	= toCopy.gradBegin;
+		gradEnd		= toCopy.gradEnd;
+		gradLines	= toCopy.gradLines;
+		gradMidPoint = toCopy.gradMidPoint;
+		textBold 	= toCopy.textBold;
+		textItalic 	= toCopy.textItalic;
+		gangle		= toCopy.gangle;
+		specialCoor = toCopy.specialCoor;
+		onRadians	= toCopy.onRadians;
+		degrees		= toCopy.degrees;
+		xUnit		= toCopy.xUnit;
+		yUnit		= toCopy.yUnit;
+		unit		= toCopy.unit;
+		lineWidth 	= toCopy.lineWidth;
+		lineColor 	= toCopy.lineColor;
+		showPoints 	= toCopy.showPoints;
+		lineArc 	= toCopy.lineArc;
+		frameArc 	= toCopy.frameArc;
+		isCornerRel = toCopy.isCornerRel;
+		arcSep		= toCopy.arcSep;
+		arcSepA 	= toCopy.arcSepA;
+		arcSepB 	= toCopy.arcSepB;
+		curvature1	= toCopy.curvature1;
+		curvature2	= toCopy.curvature2;
+		curvature3	= toCopy.curvature3;
+		dotStyle	= toCopy.dotStyle;
+		dotScale1	= toCopy.dotScale1;
+		dotScale2	= toCopy.dotScale2;
+		dotAngle	= toCopy.dotAngle;
+		gridWidth	= toCopy.gridWidth;
+		gridLabel	= toCopy.gridLabel;
+		subGridWidth= toCopy.subGridWidth;
+		subGridCol	= toCopy.subGridCol;
+		gridColor	= toCopy.gridColor;
+		labelsGridCol	= toCopy.labelsGridCol;
+		subGridDiv		= toCopy.subGridDiv;
+		gridDots		= toCopy.gridDots;
+		subGridDots		= toCopy.subGridDots;
+		swapAxes	= toCopy.swapAxes;
+		origin 		= new Point2D.Double(toCopy.origin.x, toCopy.origin.y);
+		lineStyle	= toCopy.lineStyle;
+		dotStep		= toCopy.dotStep;
+		dashBlack	= toCopy.dashBlack;
+		dashWhite	= toCopy.dashWhite;
+		borderColor	= toCopy.borderColor;
+		border		= toCopy.border;
+		dbleLine	= toCopy.dbleLine;
+		dbleSep		= toCopy.dbleSep;
+		dbleColor	= toCopy.dbleColor;
+		shadowCol	= toCopy.shadowCol;
+		isShadow	= toCopy.isShadow;
+		shadowAngle	= toCopy.shadowAngle;
+		shadowSize	= toCopy.shadowSize;
+		borderPos	= toCopy.borderPos;
+		fillStyle	= toCopy.fillStyle;
+		fillColor	= toCopy.fillColor;
+		hatchWidth	= toCopy.hatchWidth;
+		hatchSep	= toCopy.hatchSep;
+		hatchCol	= toCopy.hatchCol;
+		hatchAngle	= toCopy.hatchAngle;
+		arrowStyle	= new String[2];
+		arrowStyle[0] = toCopy.arrowStyle[0];
+		arrowStyle[1] = toCopy.arrowStyle[1];
+		arrowSizeD	= toCopy.arrowSizeD;
+		arrowSizeN	= toCopy.arrowSizeN;
+		arrowLgth	= toCopy.arrowLgth;
+		arrowInset	= toCopy.arrowInset;
+		arrowTBarSD	= toCopy.arrowTBarSD;
+		arrowTBarSN	= toCopy.arrowTBarSN;
+		arrowBrLgth	= toCopy.arrowBrLgth;
+		arrowrBrLgth= toCopy.arrowrBrLgth;
+		arrowDotSD	= toCopy.arrowDotSD;
+		arrowDotSN	= toCopy.arrowDotSN;
+		arrowScale1	= toCopy.arrowScale1;
+		arrowScale2	= toCopy.arrowScale2;
+		textEnc		= toCopy.textEnc;
+		textShape	= toCopy.textShape;
+		textSeries	= toCopy.textSeries;
+		textFamily	= toCopy.textFamily;
+		textColor	= toCopy.textColor;
+		textSize 	= toCopy.textSize;
+		psBoxText = new Text(null, false);
+		psBox = new Vector<FramedBox>();
+		showOrigin 	= toCopy.showOrigin;
+		axesStyle	= toCopy.axesStyle;
+		ticks		= toCopy.ticks;
+		ticksSize	= toCopy.ticksSize;
+		ticksStyle	= toCopy.ticksStyle;
+		labels		= toCopy.labels;
+		ox			= toCopy.ox;
+		oy			= toCopy.oy;
+		dxIncrement	= toCopy.dxIncrement;
+		dyIncrement = toCopy.dyIncrement;
+		dxLabelDist	= toCopy.dxLabelDist;
+		dyLabelDist	= toCopy.dyLabelDist;
+	}
+
+
+
+
+
+	/**
+	 * @return the position
+	 */
+	public PositionParameters getPosition()
+	{
+		return position;
+	}
+
+
+
+
+
+	/**
+	 * Sets a new position
+	 */
+	public void setPosition(double dx, double dy, boolean isSumRot, double rputA, double uputA, 
+							int refPt, double labelSep, double refAngle)
+	{
+		position = new PositionParameters(isSumRot, dx, dy, rputA, uputA, labelSep, refPt, refAngle);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the whole rotation angle
+	 * @return The rotation angle (in degrees)
+	 */
+	public static double getWholeRotationAngle(Vector<PSTricksParameters> params)
+	{
+		int i=0, size = params.size();
+		double sum=0;
+		
+		if(size>0)
+		{
+			PositionParameters pos = params.elementAt(i).getPosition();
+			if(pos!=null)
+			{
+				if(pos.isSumRotation)
+					sum+=pos.angleRput;
+				else sum = pos.angleRput;
+			}
+		}
+		
+		for(i=1; i<size; i++)
+		{
+			PositionParameters pos = params.elementAt(i).getPosition();
+			if(pos!=null)
+			{
+				if(pos.isSumRotation)
+					sum+=((360/params.elementAt(i-1).degrees)*pos.angleRput);
+				else sum = ((360/params.elementAt(i-1).degrees)*pos.angleRput);
+			}
+		}
+		return sum;
+	}
+
+
+
+	
+	/**
+	 * Reinitialises the general parameters.
+	 * @since 1.9
+	 */
+	public static void reinitialize()
+	{
+		isCentered 	= false;
+		pictureNEPt = null;
+		pictureSWPt = null;
+		tokenPosition = "";//$NON-NLS-1$
+	}
+}
+
+
+
+
diff --git a/current/latexDraw/parsers/pstricks/PSTricksParser.java b/current/latexDraw/parsers/pstricks/PSTricksParser.java
new file mode 100644
index 0000000..28d8fb9
--- /dev/null
+++ b/current/latexDraw/parsers/pstricks/PSTricksParser.java
@@ -0,0 +1,3766 @@
+package latexDraw.parsers.pstricks;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.swing.JFrame;
+import javax.swing.JOptionPane;
+import javax.swing.JProgressBar;
+import javax.swing.SwingUtilities;
+
+import latexDraw.figures.FramedBox;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.parsers.*;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+
+
+/** 
+ * This class defines a PSTricks parser.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 
+ * 09/06/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.5<br>
+ */
+public class PSTricksParser extends Parser
+{
+	/** Manages the actions to do when a command is parsed. */
+	PSTricksParserActionsManager texParserActions;
+	
+	/** The progress bar */
+	private JProgressBar progressB;
+	
+	/** Allows to stop the thread (if there is a one) */
+	private boolean stopThread;
+	
+	private static final Hashtable<String, String> latexCommandsWithBrackets;
+	
+	private static final Hashtable<String, String> latexCommandsWithoutBrack;
+	
+	static
+	{
+		latexCommandsWithBrackets = new Hashtable<String, String>();
+		
+		latexCommandsWithBrackets.put("textit", "textit");//$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("textbf", "textbf");//$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("address", "address");//$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("acute", "acute");//$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("\"", "\"");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("’", "’");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put(".", ".");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("=", "="); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("b", "b");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("‘", "‘");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("newtie", "newtie");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("^", "^"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("c", "c");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("d", "d");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("G", "G");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("H", "H"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("U", "U");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("t", "t");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("r", "r");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("k", "k"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("u", "u");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("v", "v");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("~", "~");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("vdots", "vdots"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("author", "author");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("arabic", "arabic");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("alph", "alph"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("overbrace", "overbrace"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("widetilde", "widetilde");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("overline", "overline");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("overleftarrow", "overleftarrow");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("underbrace", "underbrace"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("widehat", "widehat");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("underline", "underline");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("overriglatexCommandsWithBracketsarrow", "overriglatexCommandsWithBracketsarrow");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("bigcap", "bigcap"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("bigcup", "bigcup"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("bigodot", "bigodot");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("bigoplus", "vdash"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("bigotimes", "bigotimes");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("coprod", "coprod"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("bigwedge", "bigwedge"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("bigsqcup", "bigsqcup");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("biguplus", "biguplus");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("bigvee", "bigvee");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("int", "int"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithBrackets.put("prod", "prod");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithBrackets.put("sum", "sum"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		latexCommandsWithoutBrack = new Hashtable<String, String>();
+		
+		latexCommandsWithoutBrack.put("ldots", "ldots");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("ldotp", "ldotp");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("vdash", "vdash");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("vdots", "vdots"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("aa", "aa");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("accent", "accent");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("ae", "ae");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("aleph", "aleph");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("alpha", "alpha");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("angle", "angle"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("approx", "approx");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("arccos", "arccos");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("arcsin", "arcsin"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("arctan", "arctan");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("arg", "arg"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("arrowvert", "arrowvert");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("asymp", "asymp");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("atop", "atop");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("atopwithdelims", "atopwithdelims"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("AA", "AA");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("AE", "AE"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("DH", "DH");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("l", "l");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("L", "L");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("dj", "dj"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("DJ", "DJ");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("dh", "dh"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("NG", "NG");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("ng", "ng");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("o", "o");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("O", "O"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("OE", "OE"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("gamma", "gamma");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("beta", "beta"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("delta", "delta");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("epsilon", "epsilon");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Gamma", "Gamma");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Delta", "Delta"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Lambda", "Lambda");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Theta", "Theta"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("vartheta", "vartheta");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("theta", "theta");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("eta", "eta");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("zeta", "zeta"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("varepsilon", "varepsilon"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("iota", "iota");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("kappa", "kappa"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("lambda", "lambda");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("mu", "mu");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("nu", "nu");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Xi", "Xi"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Pi", "Pi");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Upsilon", "Upsilon"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Sigma", "Sigma");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("rho", "rho");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("varpi", "varpi");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("pio", "pio"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("xi", "xi"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("varrho", "varrho");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("sigma", "sigma");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("varsigma", "varsigma"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("tau", "tau");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("upsilon", "upsilon"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Phi", "Phi");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Psi", "Psi");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Omega", "Omega");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("omega", "omega"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("psi", "psi"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("chi", "chi");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("varphi", "varphi"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("phi", "phi"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("bowtie", "bowtie");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("cong", "cong");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("dashv", "dashv");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("doteq", "doteq"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("equiv", "equiv");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("frown", "frown"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("models", "models");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("mid", "mid");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("ll", "ll");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("leq", "leq"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Join", "Join"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("in", "in");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("gg", "gg");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("geq", "geq"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("neq", "neq");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("ni", "ni"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("parallel", "parallel");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("perp", "perp");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("prec", "prec");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("preceq", "preceq"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("propto", "propto"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("sim", "sim");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("subseteq", "subseteq"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("subset", "subset"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("smile", "smile");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("simeq", "simeq");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("succ", "succ");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("succeq", "succeq"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("supset", "supset"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("supseteq", "supseteq");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("vdash", "vdash"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("rmoustache", "rmoustache");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("lmoustache", "lmoustache"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("rgroup", "rgroup"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("lgroup", "lgroup");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("arrowvert", "arrowvert");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("bracevert", "bracevert");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Arrowvert", "Arrowvert"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("bot", "bot"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("top", "top"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("forall", "forall");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("exists", "exists"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Im", "Im"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("nabla", "nabla");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Re", "simeq");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("infty", "infty");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("ell", "ell"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("neg", "neg"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("prime", "prime");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("wp", "wp"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("hbar", "hbar");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("backslash", "backslash"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("cos", "cos"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("cosh", "cosh");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("cot", "cot");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("inf", "inf");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("hom", "hom"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("gcd", "gcd");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("exp", "exp"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("dim", "dim");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("det", "det"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("deg", "deg"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("csc", "csc");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("coth", "coth");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("ker", "ker");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("lg", "lg"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("lim", "lim"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("liminf", "liminf");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("limsup", "limsup"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("ln", "ln"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("log", "csc");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("max", "max");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("min", "min");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("Pr", "Pr"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("sec", "sec"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("sin", "sin"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("sinh", "sinh");  //$NON-NLS-1$//$NON-NLS-2$
+		latexCommandsWithoutBrack.put("sup", "sup"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("tan", "tan"); //$NON-NLS-1$ //$NON-NLS-2$
+		latexCommandsWithoutBrack.put("tanh", "tanh");  //$NON-NLS-1$//$NON-NLS-2$
+	}
+	
+	
+	
+	/**
+	 * The constructor.
+	 * @param texParserAc The actions manager.
+	 */
+	public PSTricksParser(PSTricksParserActionsManager texParserAc)
+	{
+		texParserActions = texParserAc;
+		stopThread = true;
+	}
+	
+	
+
+	public synchronized void setStopThread(boolean state)
+	{
+		stopThread = state;
+	}
+	
+	
+	
+	/**
+	 * Allows to parse a TeX file.
+	 * @param f The TeX file to parse.
+	 * @param parent The main frame: Useful to display message dialog (can be equal to null: no message).
+	 */
+	public int parse(File f, JFrame parent, JProgressBar pg)
+	{
+		if(f==null)
+			throw new IllegalArgumentException();
+		
+		try
+		{
+			setStopThread(false);
+			
+			if(!f.exists() || !f.isFile() || !f.canRead() || !f.exists())
+				throw new IOException();
+			
+			FileReader fr 	  = new FileReader(f);
+			BufferedReader br = new BufferedReader(fr);
+			String eol = System.getProperty("line.separator");//$NON-NLS-1$
+			String s = "";//$NON-NLS-1$
+			String line;
+
+			while( (line=br.readLine())!=null)
+				s+=line+eol;
+
+			br.close();
+			fr.close();
+
+			return parse(s, parent, pg);
+			
+		}catch(IOException e)
+		{
+			String msg = LaTeXDrawLang.getString1_6("PSTricksParser.0"); //$NON-NLS-1$
+			
+			if(parent==null)
+				System.out.println(msg);
+			else
+				JOptionPane.showMessageDialog(parent, msg, LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.86"),  //$NON-NLS-1$
+		 		    JOptionPane.ERROR_MESSAGE); 
+			
+			return ERROR_PARSING;
+		}
+	}
+	
+	
+	/**
+	 * Allows to update the progress bar.
+	 * @param newValue its new value.
+	 */
+	public synchronized void updateBar(int newValue) 
+	{
+		if(progressB!=null)
+			progressB.setValue(newValue);
+	}
+	
+	
+	/**
+	 * Allows to parse a TeX file.
+	 * @param file The TeX code to parse.
+	 * @param parent The main frame: useful to display message dialog (can be equal to null: no message).
+	 * @param progressBar The progress bar of the parser. If null, it will not be used.
+	 */
+	public int parse(String file, JFrame parent, JProgressBar progressBar)
+	{
+		try
+		{
+			PSTricksParameters.reinitialize();
+			stopThread = false;
+			progressB = progressBar;
+			
+			/* *********************************************************************** */
+			/* We remove big spaces and comments */
+			
+			char eol = System.getProperty("line.separator").charAt(0);//$NON-NLS-1$
+			char[] f2 = new char[file.length()];
+			
+			int i=0, lgth = file.length(), cpt=0;
+			boolean zero = false;
+			while(i<lgth)
+			{
+				if(i<lgth && (file.charAt(i)==' ' || file.charAt(i)==9)) //9 = '\t'
+				{
+					if(!zero) 
+					{
+						f2[cpt++] = ' ';
+						zero=true;
+					}
+				}
+				else
+				{
+					if(file.charAt(i)=='%') 
+					{
+						if(i>0)
+							if(file.charAt(i-1)=='\\')
+							{
+								f2[cpt++] = file.charAt(i);
+								zero = false;
+							}
+							else
+							{
+								while(i<lgth && eol!=file.charAt(i))
+									i++;
+								
+								if(i<lgth) f2[cpt++] = file.charAt(i);// We copy the eol
+							}
+					}
+					else 
+					{
+						f2[cpt++] = file.charAt(i);
+						zero = false;
+					}
+				}
+				i++;
+			} // while(i<lgth)
+			
+			
+			String f = String.valueOf(f2, 0, cpt) + ' ';//We terminate the code by a space
+			
+			if(progressBar!=null)
+			{
+				progressB.setMinimum(0);
+				progressB.setMaximum(f.length());
+			}
+			
+			/* ********************************************************************/
+			Vector<PSTricksParameters> params = new Vector<PSTricksParameters>();
+			boolean started = false;
+			i = 0;
+			int i2;
+			lgth = f.length();
+			int nLine = 1;
+			Vector<ParserCmdMessage> parserMsgs = new Vector<ParserCmdMessage>();
+			boolean parsingFinished = false;
+			boolean lastTokenIsEOL = false, isFramedBox = false;
+			int iOld = i;
+			boolean startedWithBeginPs = true;
+			
+			while(i<lgth && !parsingFinished)
+			{
+				if(progressBar!=null) 
+				{
+					final int cpti = progressB.getValue()+i-iOld;
+					SwingUtilities.invokeAndWait(
+					new Runnable() { public void run() {updateBar(cpti);} });
+				}
+				
+				try {testEndThread(); }
+				catch(Exception e) { return CANCEL_PARSING;}
+				
+				iOld = i;
+				try
+				{
+				try
+				{
+					if(f.charAt(i)!=eol) lastTokenIsEOL = false;
+					
+					switch(f.charAt(i))
+					{
+						case '$':
+							i++;
+							
+							if(started)
+							{
+								PSTricksParameters p = params.lastElement();
+								p.textParsed += '$';
+								
+								while(i<lgth && f.charAt(i)!='$')
+								{
+									p.textParsed += f.charAt(i);
+									i++;
+								}
+								
+								p.textParsed += '$';
+							}
+							else
+								while(i<lgth && f.charAt(i)!='$')
+									i++;
+
+							if(i>=lgth) throw new UnexceptedEndOfFileException();
+							
+							i++;
+							break;
+							
+						case '\\' :
+							// ********************** //
+							/* Parsing of the command */
+							
+							i++;
+							if(i>=lgth)  throw new UnexceptedEndOfFileException();
+							
+							switch(f.charAt(i))
+							{
+								case 'p' : 
+									i2 = i;
+									if(i+1>=lgth) 
+									{
+										if(started)  throw new UnexceptedEndOfFileException();
+										throw new IgnoreCommandException(nLine);
+									}
+									i++;
+									
+									switch(f.charAt(i))
+									{
+										case 's' ://ps
+											
+											if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+											i++;
+											switch(f.charAt(i))
+											{
+												case 'c' : // psc
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+													i++;
+													
+													switch(f.charAt(i))
+													{
+														case 'o' :// pscoil
+															if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='i' && f.charAt(++i)=='l' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																	throw new NotYetManagedException("pscoil", nLine);//$NON-NLS-1$
+															i=i2;
+															throw new UnknownCommandException(nLine);
+															
+														case 'i' : // psci 
+															if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+															
+															if(f.charAt(++i)=='r' && f.charAt(++i)=='c' && f.charAt(++i)=='l' &&
+																f.charAt(++i)=='e') // pscircle
+															{
+																if(++i>=lgth) throw new UnexceptedEndOfFileException();
+																
+																if((f.charAt(i)<'a' || f.charAt(i)>'z') && 
+																(f.charAt(i)<'A' || f.charAt(i)>'Z'))//pscircle 
+																{
+																	int end = texParserActions.actionsOnCircle(nLine, f.charAt(i)=='*', 
+																			params, f.substring(i, f.length()));
+																	if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																}
+																else
+																{
+																	if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+																	if(f.charAt(i)=='b' && f.charAt(++i)=='o' && 
+																		f.charAt(++i)=='x' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+																		(f.charAt(i)<'A' || f.charAt(i)>'Z')) // pscriclebox
+																	{
+																		PSTricksParameters tp = params.lastElement();
+																		
+																		if(tp.psBox.isEmpty())
+																			tp.psBoxText.setText("");//$NON-NLS-1$
+																		int end = texParserActions.actionsOnFramedBox(nLine, f.charAt(i)=='*',
+																				params, f.substring(i, f.length()), 
+																				f.substring(i, f.length()), 1);
+																		if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																		isFramedBox = true;
+																	}
+																	else
+																	{
+																		i=i2;
+																		throw new UnknownCommandException(nLine);
+																	}
+																}
+															}
+															else
+															{
+																i=i2;
+																throw new UnexceptedEndOfFileException();
+															}
+															break;
+															
+														case 'c' : // psccurve
+															if(i+10>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='c' && f.charAt(++i)=='u' && f.charAt(++i)=='r' && 
+																f.charAt(++i)=='v' && f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																	throw new NotYetManagedException("psccurve", nLine);//$NON-NLS-1$
+															i=i2;
+															throw new UnknownCommandException(nLine);
+															
+														case 'u' : // pscu
+															if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+															
+															switch(f.charAt(++i))
+															{
+																case 's'://pscus
+																	if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+																	if(f.charAt(++i)=='t' && f.charAt(++i)=='o' && f.charAt(++i)=='m' && 
+																		(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+																		f.charAt(i)>'Z'))//pscustom
+																	{
+																		int end = texParserActions.parsePsCustomCommand(
+																				nLine, f.charAt(i)=='*', params, 
+																				f.substring((f.charAt(i)=='*'?i+1:i), f.length()));
+																		if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																		
+																	}
+																	else
+																	{
+																		i=i2;
+																		throw new UnknownCommandException(nLine);
+																	}
+																	break;
+																	
+																case 'r'://pscur
+																	if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+																	if(f.charAt(++i)=='v' &&f.charAt(++i)=='e' &&
+																		(f.charAt(++i)<'a' || f.charAt(i)>'z') &&
+																		(f.charAt(i)<'A' || f.charAt(i)>'Z'))// pscurve
+																		throw new NotYetManagedException("pscurve", nLine);//$NON-NLS-1$
+																	
+																	i=i2;
+																	throw new UnknownCommandException(nLine);
+																	
+																default:
+																	i=i2;
+																	throw new UnknownCommandException(nLine);
+															}
+															break;
+													}
+													break;
+													
+												case 'a' : // psa
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+1>=lgth)throw new UnexceptedEndOfFileException();
+													i++;
+													switch(f.charAt(i))
+													{
+														case 'x' :// psaxes
+															if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='e' && f.charAt(++i)=='s' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{
+																if(f.charAt(i)=='*')
+																	i++;
+																int end = texParserActions.actionsOnGridAxes(nLine, params, 
+																		PSTricksParameters.pictureSWPt, PSTricksParameters.pictureNEPt, 
+																		f.substring(i, f.length()), false);
+																if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+															
+														case 'd' : // psaddtolength
+															if(i+10>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='d' && f.charAt(++i)=='t' && f.charAt(++i)=='o' && 
+																f.charAt(++i)=='l' && f.charAt(++i)=='e' && f.charAt(++i)=='n' &&
+																f.charAt(++i)=='g' && f.charAt(++i)=='t' && f.charAt(++i)=='t' &&
+																(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+																f.charAt(i)>'Z'))
+																	throw new NotYetManagedException("psaddtolength", nLine);//$NON-NLS-1$
+															i=i2;
+															throw new UnknownCommandException(nLine);
+															
+														case 'r' : // psar
+															if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='c')
+															{
+																if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+																if((f.charAt(++i)<'a' || f.charAt(i)>'z') &&
+																		(f.charAt(i)<'A' || f.charAt(i)>'Z'))//psarc
+																{
+																	int end = texParserActions.actionsOnArcWedge(nLine, 
+																			f.charAt(i)=='*', params, f.substring(i, f.length()),true);
+																	if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																}
+																else
+																{
+																	if(f.charAt(i)=='n' && (f.charAt(++i)<'a' || f.charAt(i)>'z') &&
+																		(f.charAt(i)<'A' || f.charAt(i)>'Z'))// psarcn
+																		throw new NotYetManagedException("psarcn", nLine);//$NON-NLS-1$
+																}
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+														
+														default :
+															i=i2;
+															throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'p' : // psp
+													if(i+1>=lgth)
+													{
+														if(started)	throw new UnexceptedEndOfFileException();
+														throw new IgnoreCommandException(nLine);
+													}
+													i++;
+													
+													switch(f.charAt(i))
+													{
+														case 'o' :// pspolygon
+															if(!started)  throw new IgnoreCommandException(nLine);
+															if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='l' && f.charAt(++i)=='y' && f.charAt(++i)=='g' && 
+																f.charAt(++i)=='o' && f.charAt(++i)=='n' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{
+																int end = texParserActions.actionsOnPolygon(nLine, f.charAt(i)=='*', 
+																		params, f.substring(i, f.length()));
+																if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+																
+														case 'i' : // pspicture
+															if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='c' && f.charAt(++i)=='t' && f.charAt(++i)=='u' && 
+																f.charAt(++i)=='r' && f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{
+																if(started)
+																	throw new FatalErrorParsingException(
+																	LaTeXDrawLang.getString1_6("PSTricksParser.1")+ //$NON-NLS-1$
+																	LaTeXDrawLang.getString1_6("PSTricksParser.2")); //$NON-NLS-1$
+																started = true;
+																startedWithBeginPs = false;
+																Point2D.Double pt1, pt2;
+																String sub = f.substring(i);
+																try 
+																{
+																	pt1 = PSTricksParserActionsManager.readOneCoordinate(sub, 0, nLine, true);
+																	i += sub.indexOf(")", 0);//$NON-NLS-1$
+																}catch(Exception e)
+																{ 
+																	throw new FatalErrorParsingException("Invalid command \\begin{pspicture}");//$NON-NLS-1$
+																}
+																
+																int j, k = ++i;
+																try 
+																{ // optional
+																	while(k<lgth && (PSTricksParserActionsManager.isCharToIgnore(f.charAt(k)) ||
+																			f.charAt(k)=='\\'))
+																		k++;
+																
+																	if(f.charAt(k)!='(') throw new IgnoreCommandException(-1);
+																	j = f.indexOf(')', k);
+																	sub = f.substring(k, j+1);
+																	pt2 = PSTricksParserActionsManager.readOneCoordinate(sub, 0, nLine, true);
+																	i = j;
+																}catch(IgnoreCommandException e)
+																{
+																	pt2 = pt1;
+																	pt1 = new Point2D.Double(0,0);
+																}
+																catch(Exception e)
+																{
+																	throw new FatalErrorParsingException("Invalid command \\begin{pspicture}");//$NON-NLS-1$
+																}
+																
+																PSTricksParameters.pictureNEPt = pt2;
+																PSTricksParameters.pictureSWPt = pt1;
+																params.add(new PSTricksParameters());
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+															
+														case 'a' : // psparabola
+															if(!started)  throw new IgnoreCommandException(nLine);
+															if(i+7>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='r' && f.charAt(++i)=='a' && f.charAt(++i)=='b' && 
+																f.charAt(++i)=='o' && f.charAt(++i)=='l' && f.charAt(++i)=='a' &&
+																(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+																f.charAt(i)>'Z'))
+																	throw new NotYetManagedException("psparabola", nLine);//$NON-NLS-1$
+															i=i2;
+															throw new UnknownCommandException(nLine);
+														
+														default :
+															i=i2;
+															throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 's' : // pss
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+1>=lgth)throw new UnexceptedEndOfFileException();
+													i++;
+													switch(f.charAt(i))
+													{
+														case 'e' :// psset
+															if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='t')
+															{
+																if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+																if((f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+																	(f.charAt(i)<'A' || f.charAt(i)>'Z'))//psset
+																{
+																	int j = i;
+																	int cptBrack=0;
+																	
+																	while(j<lgth && f.charAt(j)!='{')
+																		j++;
+																	j++;
+																	
+																	while(j<lgth && (f.charAt(j)!='}' || cptBrack>0))
+																	{
+																		if(f.charAt(j)=='{') 
+																			cptBrack++;
+																		else if(f.charAt(j)=='}' && cptBrack>0)
+																			cptBrack--;
+																		j++; // We search the '}'
+																	}
+																	if(j>=lgth) throw new UnexceptedEndOfFileException();
+																	j++;
+																	String str = f.substring(i, j);
+																	PSTricksParserActionsManager.parsepssetCommand(str, params.lastElement());
+																	i = j;
+																}
+																else
+																{
+																	if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+																	if(f.charAt(i)=='b' && f.charAt(++i)=='o' && f.charAt(++i)=='x' && 
+																		(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+																		f.charAt(i)>'Z'))//pssetbox
+																			throw new NotYetManagedException("pssetbox", nLine);//$NON-NLS-1$
+																}
+															} // if(f.charAt(++i)=='t')
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+											
+														case 'h' : // psshadowbox
+															if(i+8>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='a' && f.charAt(++i)=='d' && f.charAt(++i)=='o' && 
+																f.charAt(++i)=='w' && f.charAt(++i)=='b' && f.charAt(++i)=='o' && 
+																f.charAt(++i)=='x' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{
+																PSTricksParameters tp = params.lastElement();
+																
+																if(tp.psBox.isEmpty())
+																	tp.psBoxText.setText("");//$NON-NLS-1$
+																int end = texParserActions.actionsOnFramedBox(nLine, f.charAt(i)=='*',
+																		params, f.substring(i, f.length()), 
+																		f.substring(i, f.length()), 6);
+																if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																isFramedBox = true;
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+															
+														default :
+															i=i2;
+															throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'f' : // psf
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='r' && f.charAt(++i)=='a' && f.charAt(++i)=='m' &&
+														f.charAt(++i)=='e')//psframe
+													{
+														if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+														i++;
+														if((f.charAt(i)<'a' || f.charAt(i)>'z') && 
+															(f.charAt(i)<'A' || f.charAt(i)>'Z'))//psframe
+														{
+															int end = texParserActions.actionsOnFrameEllipse(nLine, 
+																	f.charAt(i)=='*', params, f.substring(i, f.length()), true);
+															if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+														}
+														else
+														{
+															if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(i)=='b' && f.charAt(++i)=='o' && f.charAt(++i)=='x' && 
+																(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' ||
+																f.charAt(i)>'Z'))//psframebox
+															{
+																PSTricksParameters tp = params.lastElement();
+																
+																if(tp.psBox.isEmpty())
+																	tp.psBoxText.setText("");//$NON-NLS-1$
+																int end = texParserActions.actionsOnFramedBox(nLine, f.charAt(i)=='*',
+																		params, f.substring(i, f.length()), 
+																		f.substring(i, f.length()), 0);
+																if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) 
+																{
+																	i+=end;
+																	isFramedBox = true;
+																}
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+														}
+													}
+													else
+													{
+														i=i2;
+														throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'l' : // psl
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+													i++;
+													switch(f.charAt(i))
+													{
+														case 'i' :// psline
+															if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='n' && f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{
+																int end = texParserActions.actionsOnLine(nLine, f.charAt(i)=='*', 
+																		params, f.substring(i, f.length()));
+																if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+															
+														case 'o' : // pslongbox
+															if(i+10>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='n' && f.charAt(++i)=='g' && f.charAt(++i)=='b' && 
+																f.charAt(++i)=='o' && f.charAt(++i)=='x' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																	throw new NotYetManagedException("pslongbox", nLine);//$NON-NLS-1$
+															i=i2;
+															throw new UnknownCommandException(nLine);
+														
+														default :
+															i=i2;
+															throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'd' : //psd
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+													i++;
+													switch(f.charAt(i))
+													{
+														case 'o' :// psdots
+															if(++i>=lgth) throw new UnexceptedEndOfFileException();
+															
+															if(f.charAt(i)=='t') // psdot
+															{
+																if(++i>=lgth) throw new UnexceptedEndOfFileException();
+																if((f.charAt(i)<'a' || f.charAt(i)>'z') && 
+																   (f.charAt(i)<'A' || f.charAt(i)>'Z')) //psdot command
+															   {
+																	int end = texParserActions.actionsOnDot(nLine, params, f.substring(i, f.length()),true);
+																	if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+															   }else
+															   {
+																   if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+																   if(f.charAt(i)=='s' && (f.charAt(++i)<'a' || 
+																	  f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																	{ // psdots
+																		int end = texParserActions.actionsOnDot(nLine, params, f.substring(i, f.length()),false);
+																		if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																	}else
+																	{
+																		i=i2;
+																		throw new UnknownCommandException(nLine);
+																	}
+															   }
+															}else 
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+															
+														case 'b' : // psdblframebox
+															if(i+10>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='l' && f.charAt(++i)=='f' && f.charAt(++i)=='r' &&
+																f.charAt(++i)=='a' && f.charAt(++i)=='m' && f.charAt(++i)=='e' &&
+																f.charAt(++i)=='b' && f.charAt(++i)=='o' && f.charAt(++i)=='x' &&
+																(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{
+																PSTricksParameters tp = params.lastElement();
+																
+																if(tp.psBox.isEmpty())
+																	tp.psBoxText.setText("");//$NON-NLS-1$
+																int end = texParserActions.actionsOnFramedBox(nLine, f.charAt(i)=='*',
+																		params, f.substring(i, f.length()), 
+																		f.substring(i, f.length()), 5);
+																if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																isFramedBox = true;
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+														break;
+															
+														case 'i' : // psdi
+															if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+															
+															if(f.charAt(++i)=='a')//psdia
+															{
+																if(i+5>=lgth) throw new UnexceptedEndOfFileException();
+																if(f.charAt(++i)=='m' && f.charAt(++i)=='o' &&
+																   f.charAt(++i)=='n' && f.charAt(++i)=='d' && (f.charAt(++i)<'a' || 
+																   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																{// psdiamond
+																	int end = texParserActions.actionsOnDiamondTriangle(nLine, 
+																			f.charAt(i)=='*', params, f.substring(i, f.length()), true);
+																	if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																}
+																else
+																{
+																	if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+																	if(f.charAt(i)=='b' && f.charAt(++i)=='o' &&
+																	   f.charAt(++i)=='x' && (f.charAt(++i)<'a' || 
+																	   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																	{//psdiabox
+																		PSTricksParameters tp = params.lastElement();
+																		
+																		if(tp.psBox.isEmpty())
+																			tp.psBoxText.setText("");//$NON-NLS-1$
+																		int end = texParserActions.actionsOnFramedBox(nLine, f.charAt(i)=='*',
+																				params, f.substring(i, f.length()), 
+																				f.substring(i, f.length()), 3);
+																		if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																		isFramedBox = true;
+																	}
+																	else
+																	{
+																		i=i2;
+																		throw new UnknownCommandException(nLine);
+																	}
+																}
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+															
+														default :
+															i=i2;
+															throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'e' : // pse
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+													i++;
+													switch(f.charAt(i))
+													{
+														case 'l' :// psellipse
+															if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='l' && f.charAt(++i)=='i' && f.charAt(++i)=='p' &&
+																f.charAt(++i)=='s' && f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{
+																int end = texParserActions.actionsOnFrameEllipse(nLine, f.charAt(i)=='*', 
+																		params, f.substring(i, f.length()), false);
+																if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+															
+														case 'c' : // psecurve
+															if(i+5>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='u' && f.charAt(++i)=='r' && f.charAt(++i)=='v' &&
+																f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+																f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																	throw new NotYetManagedException("psecurve", nLine);//$NON-NLS-1$
+															i=i2;
+															throw new UnknownCommandException(nLine);
+														
+														default :
+															i=i2;
+															throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 't' : // pst
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+2>=lgth) throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='r' && f.charAt(++i)=='i')
+													{//pstri
+														if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+														if(f.charAt(++i)=='a' && f.charAt(++i)=='n' && f.charAt(++i)=='g' && 
+															f.charAt(++i)=='l' && f.charAt(++i)=='e' &&
+															(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+														{//pstriangle
+															int end = texParserActions.actionsOnDiamondTriangle(nLine, f.charAt(i)=='*', 
+																						params, f.substring(i, f.length()), false);
+															if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+														}
+														else
+														{
+															if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(i)=='b' && f.charAt(++i)=='o' && f.charAt(++i)=='x' &&
+																(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{//pstribox
+																PSTricksParameters tp = params.lastElement();
+																
+																if(tp.psBox.isEmpty())
+																	tp.psBoxText.setText("");//$NON-NLS-1$
+																int end = texParserActions.actionsOnFramedBox(nLine, f.charAt(i)=='*',
+																		params, f.substring(i, f.length()), 
+																		f.substring(i, f.length()), 2);
+																if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+																isFramedBox = true;
+															}
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+														}
+													}
+													else
+													{
+														i=i2;
+														throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'C' ://psCoil
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='o' && f.charAt(++i)=='i' && f.charAt(++i)=='l' &&
+														(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															throw new NotYetManagedException("psCoil", nLine);//$NON-NLS-1$
+													i=i2;
+													throw new UnknownCommandException(nLine);
+													
+												case 'b' : // psbezier
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='e' && f.charAt(++i)=='z' && f.charAt(++i)=='i' &&
+														f.charAt(++i)=='e' && f.charAt(++i)=='r' && (f.charAt(++i)<'a' || 
+														f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+													{
+														int end = texParserActions.actionsOnBezierCurve(nLine, f.charAt(i)=='*', 
+																params, f.substring(i, f.length()));
+														if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+													}
+													else
+													{
+														i=i2;
+														throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'w' : // pswedge
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+5>=lgth) throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='e' && f.charAt(++i)=='d' && f.charAt(++i)=='g' &&
+														f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+														f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+													{
+														int end = texParserActions.actionsOnArcWedge(nLine, f.charAt(i)=='*', 
+																params, f.substring(i, f.length()),false);
+														if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+													}
+													else
+													{
+														i=i2;
+														throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'g' : // psgrid
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='r' && f.charAt(++i)=='i' && f.charAt(++i)=='d' &&
+														(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+													{
+														int end = texParserActions.actionsOnGridAxes(nLine, params, 
+																PSTricksParameters.pictureSWPt, PSTricksParameters.pictureNEPt, 
+																f.substring(i, f.length()), true);
+														if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+													}
+													else
+													{
+														i=i2;
+														throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'o' : // psovalbox
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+7>=lgth) throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='v' && f.charAt(++i)=='a' && f.charAt(++i)=='l' &&
+														f.charAt(++i)=='b' && f.charAt(++i)=='o' && f.charAt(++i)=='x' &&
+														(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' ||
+														f.charAt(i)>'Z'))
+													{
+														PSTricksParameters tp = params.lastElement();
+														
+														if(tp.psBox.isEmpty())
+															tp.psBoxText.setText("");//$NON-NLS-1$
+														int end = texParserActions.actionsOnFramedBox(nLine, f.charAt(i)=='*',
+																params, f.substring(i, f.length()), 
+																f.substring(i, f.length()), 4);
+														if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+														isFramedBox = true;
+													}
+													else
+													{
+														i=i2;
+														throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'z' : // pszigzag
+													if(!started)  throw new IgnoreCommandException(nLine);
+													if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='i' && f.charAt(++i)=='g' && f.charAt(++i)=='z' &&
+														f.charAt(++i)=='a' && f.charAt(++i)=='g' && (f.charAt(++i)<'a' || 
+														f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															throw new NotYetManagedException("pszigzag", nLine);//$NON-NLS-1$
+													i=i2;
+													throw new UnknownCommandException(nLine);
+													
+												default :
+													i=i2;
+													throw new UnknownCommandException(nLine);
+											} // switch(f.charAt(i))
+											break;
+											
+										case 'u':// pu
+											if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+											if(f.charAt(++i)=='t' && //put
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{
+												int j = i;
+												
+												while(j<lgth && f.charAt(j)!='{') // We extract the command the string : put(...){...}
+													j++; 
+												
+												if(++j>=lgth) throw new UnexceptedEndOfFileException();
+												
+												String putS = f.substring(i, j);
+												try{PSTricksParserActionsManager.parseputCommand(putS, params);}
+												catch(Exception e){ e.printStackTrace(); throw new InvalidFormatCommandException("put", nLine); }//$NON-NLS-1$
+												i = j;
+											}
+											else
+											{
+												i=i2;
+												throw new UnknownCommandException(nLine);
+											}
+											
+											break;
+											
+										case 'o' : //polar
+											if(i+4>=lgth)throw new UnexceptedEndOfFileException();
+											if(f.charAt(++i)=='l' && f.charAt(++i)=='a' && f.charAt(++i)=='r' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' ||
+												f.charAt(i)>'Z'))
+												throw new WillNeverBeManagedException("polar", nLine);//$NON-NLS-1$
+										break;
+										
+										default :
+											i=i2;
+											throw new UnknownCommandException(nLine);
+									} // switch(f.charAt(i))
+									break;
+									
+									
+								case 'n' :
+									i2 = i;
+									if(i+1>=lgth)
+									{
+										if(!started) throw new IgnoreCommandException(nLine);
+										throw new UnexceptedEndOfFileException();
+									}
+									i++;
+									
+									switch(f.charAt(i))
+									{
+										case 'e' ://ne
+											if(i+1>=lgth)
+											{
+												i=i2;
+												if(!started) throw new IgnoreCommandException(nLine);
+												throw new UnexceptedEndOfFileException();
+											}
+											i++;
+											if(f.charAt(i)=='w')//new
+											{
+												if(i+1>=lgth)
+												{
+													i=i2;
+													if(!started) throw new IgnoreCommandException(nLine);
+													throw new UnexceptedEndOfFileException();
+												}
+												i++;
+												
+												switch(f.charAt(i))
+												{
+													case 'p' : //newp
+														if(i+1>=lgth)
+														{
+															i=i2;
+															if(!started) throw new IgnoreCommandException(nLine);
+															throw new UnexceptedEndOfFileException();
+														}
+														i++;
+														switch(f.charAt(i))
+														{
+															case 's'://newps
+																if(i+1>=lgth)
+																{
+																	i=i2;
+																	if(!started) throw new IgnoreCommandException(nLine);
+																	throw new UnexceptedEndOfFileException();
+																}
+																i++;
+																switch(f.charAt(i))
+																{
+																	case 's' ://newpsstyle
+																		if(i+5>=lgth)
+																		{
+																			if(!started) throw new IgnoreCommandException(nLine);
+																			throw new UnexceptedEndOfFileException();
+																		}
+																		if(f.charAt(++i)=='t' && f.charAt(++i)=='y' && f.charAt(++i)=='l' &&
+																			f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+																			f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																			throw new NotYetManagedException("newpsstyle", nLine);//$NON-NLS-1$
+																		i=i2;
+																		if(started) throw new UnknownCommandException(nLine);
+																		throw new IgnoreCommandException(nLine);
+																	
+																	case 'o' : //newpsobject
+																		if(i+1>=lgth)
+																		{
+																			if(!started) throw new IgnoreCommandException(nLine);
+																			throw new UnexceptedEndOfFileException();
+																		}
+																		i++;
+																		if(f.charAt(++i)=='b' && f.charAt(++i)=='j' && f.charAt(++i)=='e' &&
+																			f.charAt(++i)=='c' && f.charAt(++i)=='t' &&	(f.charAt(++i)<'a' || 
+																			f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																			throw new NotYetManagedException("newpsobject", nLine);//$NON-NLS-1$
+																		i=i2;
+																		if(started) throw new UnknownCommandException(nLine);
+																		throw new IgnoreCommandException(nLine);
+																	
+																	default :
+																		i=i2;
+																		if(started) throw new UnknownCommandException(nLine);
+																		throw new IgnoreCommandException(nLine);
+																} // switch(f.charAt(i))
+														
+															case 'a'://newpa
+																if(!started) throw new IgnoreCommandException(nLine);
+																if(i+3>=lgth)
+																	throw new UnexceptedEndOfFileException();
+																
+																if(f.charAt(++i)=='t' && f.charAt(++i)=='h'&& (f.charAt(++i)<'a' || 
+																	f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																{//newpath
+																	texParserActions.actionsOnNewPath(nLine);
+																}
+																else
+																{
+																	i=i2;
+																	throw new UnknownCommandException(nLine);
+																}
+																break;
+																
+															default:
+																i=i2;
+																if(started) throw new UnknownCommandException(nLine);
+																throw new IgnoreCommandException(nLine);
+														}
+														break;
+														
+													case 'c':// newcmykcolor
+														if(i + 8 >= lgth)
+														{
+															if(!started)
+																throw new IgnoreCommandException(nLine);
+															throw new UnexceptedEndOfFileException();
+														}
+														
+														if(f.charAt(++i) == 'm' && f.charAt(++i) == 'y' && f.charAt(++i) == 'k' && 
+															f.charAt(++i) == 'c' && f.charAt(++i) == 'o' && f.charAt(++i) == 'l' && 
+															f.charAt(++i) == 'o' && f.charAt(++i) == 'r' && (f.charAt(++i) < 'a' || 
+																	f.charAt(i) > 'z') && (f.charAt(i) < 'A' || f.charAt(i) > 'Z'))
+														{
+															int j = i, cptBracket = 0;
+
+															while(cptBracket < 2 && j < f.length())
+															{
+																if(f.charAt(j) == '}')
+																	cptBracket++;
+																j++;
+															}
+
+															if(cptBracket < 2)
+																throw new InvalidFormatCommandException("newcmykcolor", nLine);//$NON-NLS-1$
+															
+															String p = f.substring(i, j);
+															
+															try { PSTricksParserActionsManager.parseNewcmykcolorParameters(p); }
+															catch(Exception e)
+															{
+																e.printStackTrace();
+																throw new InvalidFormatCommandException("newcmykcolor", nLine);//$NON-NLS-1$
+															}
+															
+															i = j;
+														}
+														else
+														{
+															i = i2;
+															if(started)
+																throw new UnknownCommandException(nLine);
+															throw new IgnoreCommandException(nLine);
+														}
+														break; 
+													
+													case 'h':// newhsbcolor
+														if(i + 8 >= lgth)
+														{
+															if(!started)
+																throw new IgnoreCommandException(nLine);
+															throw new UnexceptedEndOfFileException();
+														}
+														
+														if(f.charAt(++i) == 's' && f.charAt(++i) == 'b' && f.charAt(++i) == 'c' && 
+															f.charAt(++i) == 'o' && f.charAt(++i) == 'l' && f.charAt(++i) == 'o' && 
+															f.charAt(++i) == 'r' && (f.charAt(++i) < 'a' || f.charAt(i) > 'z') && 
+															(f.charAt(i) < 'A' || f.charAt(i) > 'Z'))
+														{
+															int j = i, cptBracket = 0;
+
+															while(cptBracket < 2 && j < f.length())
+															{
+																if(f.charAt(j) == '}')
+																	cptBracket++;
+																j++;
+															}
+
+															if(cptBracket < 2)
+																throw new InvalidFormatCommandException("newhsbcolor", nLine);//$NON-NLS-1$
+															
+															String p = f.substring(i, j);
+															
+															try { PSTricksParserActionsManager.parseNewhsbcolorParameters(p); }
+															catch(Exception e)
+															{
+																e.printStackTrace();
+																throw new InvalidFormatCommandException("newhsbcolor", nLine);//$NON-NLS-1$
+															}
+															
+															i = j;
+														}
+														else
+														{
+															i = i2;
+															if(started)
+																throw new UnknownCommandException(nLine);
+															throw new IgnoreCommandException(nLine);
+														}
+														break; 
+														
+													  case 'r':// newrgbcolor
+															if(i + 8 >= lgth)
+															{
+																if(!started)
+																	throw new IgnoreCommandException(nLine);
+																throw new UnexceptedEndOfFileException();
+															}
+															
+															if(f.charAt(++i) == 'g' && f.charAt(++i) == 'b' && f.charAt(++i) == 'c' && 
+																f.charAt(++i) == 'o' && f.charAt(++i) == 'l' && f.charAt(++i) == 'o' && 
+																f.charAt(++i) == 'r' && (f.charAt(++i) < 'a' || f.charAt(i) > 'z') && 
+																(f.charAt(i) < 'A' || f.charAt(i) > 'Z'))
+															{
+																int j = i, cptBracket = 0;
+
+																while(cptBracket < 2 && j < f.length())
+																{
+																	if(f.charAt(j) == '}')
+																		cptBracket++;
+																	j++;
+																}
+
+																if(cptBracket < 2)
+																	throw new InvalidFormatCommandException("newrgbcolor", nLine);//$NON-NLS-1$
+																
+																String p = f.substring(i, j);
+																
+																try { PSTricksParserActionsManager.parseNewrgbcolorParameters(p); }
+																catch(Exception e)
+																{
+																	e.printStackTrace();
+																	throw new InvalidFormatCommandException("newrgbcolor", nLine);//$NON-NLS-1$
+																}
+																
+																i = j;
+															}
+															else
+															{
+																i = i2;
+																if(started)
+																	throw new UnknownCommandException(nLine);
+																throw new IgnoreCommandException(nLine);
+															}
+															break; 
+														
+													  case 'g':// newgray
+															if(i + 4 >= lgth)
+															{
+																if(!started)
+																	throw new IgnoreCommandException(nLine);
+																throw new UnexceptedEndOfFileException();
+															}
+															
+															if(f.charAt(++i) == 'r' && f.charAt(++i) == 'a' && f.charAt(++i) == 'y' && 
+																(f.charAt(++i) < 'a' || f.charAt(i) > 'z') && (f.charAt(i) < 'A' || 
+																f.charAt(i) > 'Z'))
+															{
+																int j = i, cptBracket = 0;
+
+																while(cptBracket < 2 && j < f.length())
+																{
+																	if(f.charAt(j) == '}')
+																		cptBracket++;
+																	j++;
+																}
+
+																if(cptBracket < 2)
+																	throw new InvalidFormatCommandException("newgray", nLine);//$NON-NLS-1$
+																
+																String p = f.substring(i, j);
+																
+																try { PSTricksParserActionsManager.parseNewgrayParameters(p); }
+																catch(Exception e)
+																{
+																	e.printStackTrace();
+																	throw new InvalidFormatCommandException("newgray", nLine);//$NON-NLS-1$
+																}
+																
+																i = j;
+															}
+															else
+															{
+																i = i2;
+																if(started)
+																	throw new UnknownCommandException(nLine);
+																throw new IgnoreCommandException(nLine);
+															}
+															break;
+												
+													default :
+														i=i2;
+														if(started) throw new UnknownCommandException(nLine);
+														throw new IgnoreCommandException(nLine);
+												} // switch(f.charAt(i))
+											}// if(f.charAt(i)=='w')
+											else
+											{
+												i=i2;
+												if(started) throw new UnknownCommandException(nLine);
+												throw new IgnoreCommandException(nLine);
+											}
+											break;
+											
+										case 'o' :// no
+											if(!started)   throw new IgnoreCommandException(nLine);
+											if(i+9>=lgth) throw new UnexceptedEndOfFileException();
+
+											PSTricksParameters tp = params.lastElement();
+											if(f.charAt(++i)=='r' && f.charAt(++i)=='m' && f.charAt(++i)=='a' && f.charAt(++i)=='l')
+											{// normal
+												if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+												++i;
+												
+												switch(f.charAt(i))
+												{
+													case 'c': // normalcolor
+														if(i+5>=lgth) throw new UnexceptedEndOfFileException();
+														
+														if(f.charAt(++i)=='o' && f.charAt(++i)=='l' && f.charAt(++i)=='o' && 
+															f.charAt(++i)=='r' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+															(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																tp.textColor = Color.BLACK;
+															else
+															{
+																i=i2;
+																throw new UnknownCommandException(nLine);
+															}
+															break;
+														
+													case 's':// normalsize
+														if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+														
+														if(f.charAt(++i)=='i' && f.charAt(++i)=='z' && 
+															f.charAt(++i)=='e' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+															(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+																tp.textSize = PSTricksConstants.COMMAND_TEXT_NORMAL;
+														else
+														{
+															i=i2;
+															throw new UnknownCommandException(nLine);
+														}
+														break;
+														
+													default :
+														i=i2;
+														throw new UnknownCommandException(nLine);
+												}
+											}
+											else
+											{
+												i=i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										default :
+											i=i2;
+											if(started) throw new UnknownCommandException(nLine);
+											throw new IgnoreCommandException(nLine);
+									}
+									break;
+								
+									
+								case 'r' : 
+									i2 = i;
+									i++;
+									if(!started) { i=i2; throw new IgnoreCommandException(nLine); }
+									if(i>=lgth) throw new UnexceptedEndOfFileException();
+									
+									switch(f.charAt(i))
+									{
+										case 'o' : //ro
+											if(i+4>=lgth)throw new UnexceptedEndOfFileException();
+											
+											if(f.charAt(++i)=='t' && f.charAt(++i)=='a' && f.charAt(++i)=='t' &&
+												f.charAt(++i)=='e')//rotate
+											{
+												i++;
+												if(i>=lgth)throw new UnexceptedEndOfFileException();
+												switch(f.charAt(i))
+												{
+													case 'b' : //rotatebox
+														if(i+3>=lgth)throw new UnexceptedEndOfFileException();
+														if(f.charAt(++i)=='o' && f.charAt(++i)=='x' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+														  (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+														{
+															int nb=0, j = i;
+															
+															while(j < lgth && nb<2)
+															{
+																if(f.charAt(j)=='{')
+																	nb++;
+																j++;
+															}
+
+															if(j >= lgth)
+															{
+																j = i2;
+																throw new InvalidFormatCommandException("rotatebox", nLine);//$NON-NLS-1$
+															}
+															
+															PSTricksParserActionsManager.parseRotateBoxCommand(f.substring(i, j), params);
+
+															i = j+1;
+														}
+														else
+														{
+															i=i2;
+															throw new UnknownCommandException(nLine);
+														}
+														break;
+														
+													case 'l': // rotateleft
+														if(i + 4 >= lgth)
+															throw new UnexceptedEndOfFileException();
+														if(f.charAt(++i) == 'e' && f.charAt(++i) == 'f' && f.charAt(++i) == 't' && 
+															(f.charAt(++i) < 'a' || f.charAt(i) > 'z') && (f.charAt(i) < 'A' || f.charAt(i) > 'Z'))
+														{
+															params.add(new PSTricksParameters(params.lastElement()));
+
+															while(i < lgth && PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+																i++;
+
+															if(i >= lgth || f.charAt(i) != '{')
+															{
+																i = i2;
+																throw new InvalidFormatCommandException("rotateleft", nLine);//$NON-NLS-1$
+															}
+
+															i++;
+															params.lastElement().setPosition(0, 0, true, 90, 0, 0, 0., 0.);
+														}
+														else
+														{
+															i = i2;
+															throw new UnknownCommandException(nLine);
+														}
+														break; 
+													
+													case 'r' : // rotateright
+														if(i+5>=lgth)throw new UnexceptedEndOfFileException();
+														if(f.charAt(++i)=='i' && f.charAt(++i)=='g' && f.charAt(++i)=='h' && f.charAt(++i)=='t' &&
+													      (f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+														{
+															params.add(new PSTricksParameters(params.lastElement()));
+
+															while(i < lgth && PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+																i++;
+
+															if(i >= lgth || f.charAt(i) != '{')
+															{
+																i = i2;
+																throw new InvalidFormatCommandException("rotateright", nLine);//$NON-NLS-1$
+															}
+
+															i++;
+															params.lastElement().setPosition(0, 0, true, -90, 0, 0, 0., 0.);
+														}
+														else
+														{
+															i = i2;
+															throw new UnknownCommandException(nLine);
+														}
+														break; 	
+															
+													case 'd' : // rotatedown
+														if(i+4>=lgth)throw new UnexceptedEndOfFileException();
+														if(f.charAt(++i)=='o' && f.charAt(++i)=='w' && f.charAt(++i)=='n' &&
+													      (f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+														{
+															params.add(new PSTricksParameters(params.lastElement()));
+
+															while(i < lgth && PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+																i++;
+
+															if(i >= lgth || f.charAt(i) != '{')
+															{
+																i = i2;
+																throw new InvalidFormatCommandException("rotatedown", nLine);//$NON-NLS-1$
+															}
+
+															i++;
+															params.lastElement().setPosition(0, 0, true, 180, 0, 0, 0., 0.);
+														}
+														else
+														{
+															i = i2;
+															throw new UnknownCommandException(nLine);
+														}
+														break;	
+													
+													default :
+														i=i2;
+														throw new UnknownCommandException(nLine);	
+												} // switch(f.charAt(i))
+											} // if(f.charAt(++i)=='t' && f.
+											else
+											{
+												i=i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+										
+										case 'e' : // re
+											i++;
+											if(i>=lgth)
+											{
+												i=i2;
+												throw new IgnoreCommandException(nLine);
+											}
+											
+											switch(f.charAt(i))
+											{
+												case 'd' : // red
+													if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+
+													PSTricksParameters tp = params.lastElement();
+													if((f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+														(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+														tp.textColor = Color.RED;
+													else
+													{
+														i=i2;
+														throw new IgnoreCommandException(nLine);
+													}
+													break;
+													
+												case 's' : // resizebox
+													if(i+7>=lgth)throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='i' && f.charAt(++i)=='z' && f.charAt(++i)=='e' &&
+														f.charAt(++i)=='b' && f.charAt(++i)=='o' && f.charAt(++i)=='x' &&
+														(f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+														(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+														throw new NotYetManagedException("resizebox", nLine);//$NON-NLS-1$
+													
+													i=i2;
+													throw new UnknownCommandException(nLine);
+													
+												default :
+													i=i2;
+													throw new IgnoreCommandException(nLine);
+											}
+											break;
+											
+										
+										case 'a' : // radians
+											if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+											PSTricksParameters tp = params.lastElement();
+											if(f.charAt(++i)=='d' && f.charAt(++i)=='i' && f.charAt(++i)=='a' &&
+												f.charAt(++i)=='n' && f.charAt(++i)=='s' && (f.charAt(++i)<'a' || 
+												f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{
+												tp.onRadians = true;
+												params.lastElement().degrees=Math.PI*2;
+											}
+											else
+											{
+												i=i2;
+												throw new IgnoreCommandException(nLine);
+											}
+											break;
+											
+										case 'p' : // rput
+											if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+											if(f.charAt(++i)=='u' && f.charAt(++i)=='t' && (f.charAt(++i)<'a' || 
+												f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{
+												int j = i;
+												boolean end = false, hasStar = f.charAt(i)=='*';
+												
+												while(j<lgth && ((f.charAt(j)!='{' || !end))) 
+												{ // We extract the command the string : rput*{..}(..){...
+													if(f.charAt(j)=='(') end = true;
+													else if(f.charAt(j)=='{') end = true;
+													j++; 
+												}
+												if(++j>=lgth) throw new UnexceptedEndOfFileException();
+												
+												String rputS = f.substring(i, j);
+												try{PSTricksParserActionsManager.parserputCommand(rputS, hasStar, params);}
+												catch(Exception e){ e.printStackTrace(); throw new InvalidFormatCommandException("rput", nLine); }//$NON-NLS-1$
+												i = j;
+											}else
+											{
+												i=i2;
+												throw new IgnoreCommandException(nLine);
+											}
+											break;
+											
+										default : 
+											i=i2;
+											throw new IgnoreCommandException(nLine);
+									}
+									break;
+									
+									
+									
+								case 's' :
+								if(!started) throw new IgnoreCommandException(nLine);
+								i2 = i;	
+								i++;
+								if(i>=lgth) throw new UnexceptedEndOfFileException();
+								
+								switch(f.charAt(i))
+								{
+									case 'c' : //sc
+										if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+										i++;
+										switch(f.charAt(i))
+										{
+											case 'a' : //sca
+												if(i+5>=lgth) throw new UnexceptedEndOfFileException();
+												if(f.charAt(++i)=='l' && f.charAt(++i)=='e' && f.charAt(++i)=='b' &&
+													f.charAt(++i)=='o' && f.charAt(++i)=='x')
+												{
+													if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+													if((f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+														(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+														throw new NotYetManagedException("scalebox", nLine);//$NON-NLS-1$
+													
+													if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+													if(f.charAt(++i)=='t' && f.charAt(++i)=='o' &&  
+														(f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+														(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															throw new NotYetManagedException("scaleboxto", nLine);//$NON-NLS-1$
+												}
+												i=i2;
+												throw new UnknownCommandException(nLine);
+											
+											case 'r' : // scriptsize
+												if(i+8>=lgth) throw new UnexceptedEndOfFileException();
+												PSTricksParameters tp = params.lastElement();
+												if(f.charAt(++i)=='i' && f.charAt(++i)=='p' && f.charAt(++i)=='t' &&
+													f.charAt(++i)=='s' && f.charAt(++i)=='i' && f.charAt(++i)=='z' && 
+													f.charAt(++i)=='e' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+													(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+													tp.textSize = PSTricksConstants.COMMAND_TEXT_SCRIPT;
+												else
+												{
+													i=i2;
+													throw new UnknownCommandException(nLine);
+												}
+												break;
+												
+											default :
+												i=i2;
+												throw new UnknownCommandException(nLine);
+										}
+										break;
+									
+									case 'l' : // sl
+										if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+
+										PSTricksParameters tp = params.lastElement();
+										if((f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+											(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											tp.textItalic = true;
+										else
+										{
+											i = i2;
+											throw new UnknownCommandException(nLine);
+										}
+										break;
+										
+									case 'm' : // small
+										if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+
+										tp = params.lastElement();
+										if(f.charAt(++i)=='a' && f.charAt(++i)=='l' && f.charAt(++i)=='l' &&
+											(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+										   f.charAt(i)>'Z'))
+											tp.textSize = PSTricksConstants.COMMAND_TEXT_SMALL;
+										else
+										{
+											i = i2;
+											throw new UnknownCommandException(nLine);
+										}
+										break;
+									
+									case 't' : // st
+										if(i+2>=lgth) throw new UnexceptedEndOfFileException();
+										
+										if(f.charAt(++i)=='r') // str
+										{
+											i++;
+											if(f.charAt(i)=='o') // stro
+											{
+												if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+												if(f.charAt(++i)=='k' && f.charAt(++i)=='e' && 
+													(f.charAt(++i)<'a' || f.charAt(i)>'z') &&
+													(f.charAt(i)<'A' || f.charAt(i)>'Z')) // stroke
+													throw new NotYetManagedException("stroke", nLine);//$NON-NLS-1$
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											else if(f.charAt(i)=='i') // stri
+											{
+												if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+												if(f.charAt(++i)=='n' && f.charAt(++i)=='g' && 
+													(f.charAt(++i)<'a' || f.charAt(i)>'z') &&
+													(f.charAt(i)<'A' || f.charAt(i)>'Z')) // string
+												{
+													// nothing to do
+												}else
+												{
+													i = i2;
+													throw new UnknownCommandException(nLine);
+												}
+											}
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+										}
+										else
+										{
+											i = i2;
+											throw new UnknownCommandException(nLine);
+										}
+										break;
+									
+									case 'w' : // swapaxes
+										if(i+7>=lgth) throw new UnexceptedEndOfFileException();
+										if(f.charAt(++i)=='a' && f.charAt(++i)=='p' && f.charAt(++i)=='a' &&
+											f.charAt(++i)=='x' && f.charAt(++i)=='e' && f.charAt(++i)=='s' &&
+											(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+										   f.charAt(i)>'Z'))
+											throw new NotYetManagedException("swapaxes", nLine);//$NON-NLS-1$
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									
+									default :
+										i=i2;
+										throw new UnknownCommandException(nLine);
+								}								
+								break ;
+								
+								
+									
+								case 'b' :
+									i2 = i;
+									i++;
+									if(i>=lgth)
+									{
+										if(!started) throw new IgnoreCommandException(nLine);
+										throw new UnexceptedEndOfFileException();
+									}
+									
+									switch(f.charAt(i))
+									{
+										case 'l' : //bl
+											if(!started) { i=i2; throw new IgnoreCommandException(nLine);}
+											i++;
+											if(i>=lgth) throw new UnexceptedEndOfFileException();
+											
+											switch(f.charAt(i))
+											{
+												case 'a' : // black
+													if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+
+													PSTricksParameters tp = params.lastElement();
+													if(f.charAt(++i)=='c' && f.charAt(++i)=='k' && (f.charAt(++i)<'a' || 
+														f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+														tp.textColor = Color.BLACK;
+													else
+													{
+														i = i2;
+														throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												case 'u' : // blue
+													if(i+2>=lgth) throw new UnexceptedEndOfFileException();
+
+													tp = params.lastElement();
+													if(f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+														f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+														tp.textColor = Color.BLUE;
+													else
+													{
+														i = i2;
+														throw new UnknownCommandException(nLine);
+													}
+													break;
+													
+												default :
+													i=i2;
+													if(started)throw new UnknownCommandException(nLine);
+											}
+											break;
+										
+
+										case 'e' : //be
+											if(i+4>=lgth) 
+											{
+												if(!started) throw new IgnoreCommandException(nLine);
+												throw new UnexceptedEndOfFileException();
+											}
+											if(f.charAt(++i)=='g' && f.charAt(++i)=='i' && f.charAt(++i)=='n' && 
+											   (f.charAt(++i)<'a'  || f.charAt(i)>'z')&& (f.charAt(i)<'A' || 
+											   f.charAt(i)>'Z'))
+											{//begin
+												while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+												{
+													if(f.charAt(i)==eol) nLine++;
+													i++;
+													if(i>=lgth) throw new UnexceptedEndOfFileException();
+												}
+												if(f.charAt(i)=='{')
+												{//begin{
+													i++;
+													if(i>=lgth) throw new UnexceptedEndOfFileException();
+													while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+													{
+														if(f.charAt(i)==eol) nLine++;
+														i++;
+														if(i>=lgth) throw new UnexceptedEndOfFileException();
+													}
+													if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+													
+													switch(f.charAt(i))
+													{
+														case 'p'://begin{p
+															if(i+9>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='s' && f.charAt(++i)=='p' &&
+															   f.charAt(++i)=='i' && f.charAt(++i)=='c' && f.charAt(++i)=='t' &&
+															   f.charAt(++i)=='u' && f.charAt(++i)=='r' && f.charAt(++i)=='e' &&
+															   (f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{//begin{pspicture
+																while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+																{
+																	if(f.charAt(i)==eol) nLine++;
+																	i++;
+																	if(i>=lgth) throw new UnexceptedEndOfFileException();
+																}
+																if(f.charAt(i)=='}')
+																{//begin{pspicture}
+																	if(started)
+																		throw new FatalErrorParsingException(
+																		LaTeXDrawLang.getString1_6("PSTricksParser.1")+ //$NON-NLS-1$
+																		LaTeXDrawLang.getString1_6("PSTricksParser.2")); //$NON-NLS-1$
+																	started = true;
+																	startedWithBeginPs = true;
+																	Point2D.Double pt1, pt2;
+																	String sub = f.substring(i);
+																	try 
+																	{
+																		pt1 = PSTricksParserActionsManager.readOneCoordinate(sub, 0, nLine, true);
+																		i += sub.indexOf(")", 0);//$NON-NLS-1$
+																	}catch(Exception e)
+																	{ 
+																		throw new FatalErrorParsingException("Invalid command begin{pspicture}");//$NON-NLS-1$
+																	}
+																	
+																	int j, k = ++i;
+																	try 
+																	{ // optional
+																		while(k<lgth && (PSTricksParserActionsManager.isCharToIgnore(f.charAt(k)) || 
+																				f.charAt(k)=='\\'))
+																			k++;
+																	
+																		if(f.charAt(k)!='(') throw new IgnoreCommandException(-1);
+																		j = f.indexOf(')', k);
+																		sub = f.substring(k, j+1);
+																		pt2 = PSTricksParserActionsManager.readOneCoordinate(sub, 0, nLine, true);
+																		i = j;
+																	}catch(IgnoreCommandException e)
+																	{
+																		pt2 = pt1;
+																		pt1 = new Point2D.Double(0,0);
+																	}
+																	catch(Exception e)
+																	{
+																		throw new FatalErrorParsingException("Invalid command begin{pspicture}");//$NON-NLS-1$
+																	}
+																	
+																	PSTricksParameters.pictureNEPt = pt2;
+																	PSTricksParameters.pictureSWPt = pt1;
+																	params.add(new PSTricksParameters());
+																	
+																}else throw new InvalidFormatCommandException("\\begin{pspicture}", nLine);//$NON-NLS-1$
+															}else
+															{
+																i = i2;
+																if(started) throw new UnknownCommandException(nLine);
+																throw new IgnoreCommandException(nLine);
+															}
+															break;
+															
+														case 'c'://begin{c
+															if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='e' && f.charAt(++i)=='n' &&
+															   f.charAt(++i)=='t' && f.charAt(++i)=='e' && 
+															   f.charAt(++i)=='r' && (f.charAt(++i)<'a' || 
+															   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{//begin{center
+																while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+																{
+																	if(f.charAt(i)==eol) nLine++;
+																	i++;
+																	if(i>=lgth) throw new UnexceptedEndOfFileException();
+																}
+																if(f.charAt(i)=='}') //begin{center}
+																{
+																	if(started && !parsingFinished)
+																		throw new FatalErrorParsingException(LaTeXDrawLang.getString1_9("PSTricksParser.0")); //$NON-NLS-1$
+																	
+																	PSTricksParameters.isCentered = true;
+																}
+																else 
+																	throw new InvalidFormatCommandException("\\begin{center}", nLine);//$NON-NLS-1$
+															}else
+															{
+																i = i2;
+																if(started) throw new UnknownCommandException(nLine);
+																throw new IgnoreCommandException(nLine);
+															}
+															break;
+															
+														case 'f'://begin{f
+															if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='i' && f.charAt(++i)=='g' &&
+															   f.charAt(++i)=='u' && f.charAt(++i)=='r' && 
+															   f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+															   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{//begin{figure
+																while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+																{
+																	if(f.charAt(i)==eol) nLine++;
+																	i++;
+																	if(i>=lgth) throw new UnexceptedEndOfFileException();
+																}
+																if(f.charAt(i)=='}') //begin{figure}
+																	i += PSTricksParserActionsManager.parseBeginFigureCmd(f.substring(++i), nLine);
+																else throw new InvalidFormatCommandException("\\begin{pspicture}", nLine);//$NON-NLS-1$
+																	
+															}else
+															{
+																i = i2;
+																if(started) throw new UnknownCommandException(nLine);
+																throw new IgnoreCommandException(nLine);
+															}
+															break;
+															
+														default :
+															i = i2;
+															if(!started) throw new IgnoreCommandException(nLine);
+															throw new IgnoreCommandException(nLine);
+													}
+												}
+												else
+												{
+													i = i2;
+													if(!started) throw new IgnoreCommandException(nLine);
+													throw new IgnoreCommandException(nLine);
+												}
+											}else
+											{
+												i = i2;
+												if(!started) throw new IgnoreCommandException(nLine);
+												throw new IgnoreCommandException(nLine);
+											}
+											break;
+										
+										
+										case 'f' : // bf
+											if(!started) { i=i2; throw new IgnoreCommandException(nLine);}
+											if(i>=lgth) throw new UnexceptedEndOfFileException();
+											
+											PSTricksParameters tp = params.lastElement();
+											if((f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+											   f.charAt(i)>'Z'))
+												tp.textBold = true;
+											else
+											{
+												i = i2;
+												throw new IgnoreCommandException(nLine);
+											}
+											break;
+											
+										case 'o' : // box
+											if(!started)  { i=i2; throw new IgnoreCommandException(nLine); }
+											if(i+2>=lgth) throw new UnexceptedEndOfFileException();
+											
+											if(f.charAt(++i)=='x' && (f.charAt(++i)<'a' || 
+												f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+												throw new NotYetManagedException("box", nLine);//$NON-NLS-1$
+												
+											i = i2;
+											throw new IgnoreCommandException(nLine);
+										
+										default :
+											i=i2;
+											if(started) throw new UnknownCommandException(nLine);
+											throw new IgnoreCommandException(nLine);
+									}
+									break;
+									
+									
+								case 'l' :
+									if(!started) throw new IgnoreCommandException(nLine);
+									i2 = i;
+									i++;
+									if(i>=lgth) throw new UnexceptedEndOfFileException();
+									
+									switch(f.charAt(i))
+									{
+										case 'a' : // large
+											if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+
+											PSTricksParameters tp = params.lastElement();
+											if(f.charAt(++i)=='r' && f.charAt(++i)=='g' && f.charAt(++i)=='e' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+											   f.charAt(i)>'Z'))
+												tp.textSize = PSTricksConstants.COMMAND_TEXT_LARGE1;
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										case 'd' : // ldots
+											if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+
+											if(f.charAt(++i)=='o' && f.charAt(++i)=='t' && f.charAt(++i)=='s' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+											   f.charAt(i)>'Z'))
+												throw new NotYetManagedException("ldots", nLine);//$NON-NLS-1$
+												
+											i = i2;
+											throw new UnknownCommandException(nLine);
+											
+										case 'i'://li
+											if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+
+											if(f.charAt(++i)=='n' && f.charAt(++i)=='e' && f.charAt(++i)=='t' &&
+												f.charAt(++i)=='o' &&(f.charAt(++i)<'a' || 
+												f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{
+												int end = texParserActions.actionsOnLineTo(nLine, 
+														params, f.substring(i, f.length()));
+												if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+											}
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										default :
+											i=i2;
+											throw new UnknownCommandException(nLine);
+									}
+								break;
+
+								case '%' :
+									if(started)
+									{
+										PSTricksParameters p = params.lastElement();
+										p.textParsed+='%';
+									}
+									i++;
+									break;
+								
+									
+								case 'e' :
+									i2 = i;
+									
+									if(i+3>=lgth) 
+									{
+										if(started) throw new UnexceptedEndOfFileException();
+										throw new IgnoreCommandException(nLine);
+									}
+									
+									if(f.charAt(++i)=='n' && f.charAt(++i)=='d')
+									{//end
+										++i;
+										
+										if(f.charAt(i)=='p')
+										{//endp
+											if(f.charAt(++i)=='s' && f.charAt(++i)=='p' && f.charAt(++i)=='i' && f.charAt(++i)=='c' &&
+												f.charAt(++i)=='t' && f.charAt(++i)=='u' && f.charAt(++i)=='r' && f.charAt(++i)=='e' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{//endpspicture
+												if(!started || (started && startedWithBeginPs))
+													throw new FatalErrorParsingException("\\endpspicture must come after \\pspicture");//$NON-NLS-1$
+												
+												parsingFinished = true;
+												i++;
+											}
+											else
+											{
+												if(started) throw new UnknownCommandException(nLine);
+												throw new IgnoreCommandException(nLine);
+											}
+										}
+										else
+										{
+											 if((f.charAt(i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											 {
+												while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+												{
+													if(f.charAt(i)==eol) nLine++;
+													i++;
+													if(i>=lgth) throw new UnexceptedEndOfFileException();
+												}
+												if(f.charAt(i)=='{')
+												{//end{
+													i++;
+													if(i>=lgth) throw new UnexceptedEndOfFileException();
+													while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+													{
+														if(f.charAt(i)==eol) nLine++;
+														i++;
+														if(i>=lgth) throw new UnexceptedEndOfFileException();
+													}
+													
+													switch(f.charAt(i))
+													{
+														case 'p'://end{p
+															if(i+9>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='s' && f.charAt(++i)=='p' &&
+															   f.charAt(++i)=='i' && f.charAt(++i)=='c' && f.charAt(++i)=='t' &&
+															   f.charAt(++i)=='u' && f.charAt(++i)=='r' && f.charAt(++i)=='e' &&
+															   (f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+															   f.charAt(i)>'Z'))
+															{//end{pspicture
+																while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+																{
+																	if(f.charAt(i)==eol) nLine++;
+																	i++;
+																	if(i>=lgth) throw new UnexceptedEndOfFileException();
+																}
+																if(f.charAt(i)=='}')
+																{//end{pspicture}
+																	if(!started || (started && !startedWithBeginPs))
+																		throw new FatalErrorParsingException("end{pspicture} must come after begin{pspicture}");//$NON-NLS-1$
+																	
+																	parsingFinished = true;
+																	i++;
+																}
+																else 
+																	throw new InvalidFormatCommandException("\\end{pspicture}", nLine);//$NON-NLS-1$
+															} //if(f.charAt(i)=='p' && f.charAt...
+															else
+															{
+																i = i2;
+																throw new UnexceptedEndOfFileException();
+															}
+														break;
+														
+														case 'c'://end{c
+															if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='e' && f.charAt(++i)=='n' &&
+															   f.charAt(++i)=='t' && f.charAt(++i)=='e' && 
+															   f.charAt(++i)=='r' && (f.charAt(++i)<'a' || 
+															   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{//end{center
+																while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+																{
+																	if(f.charAt(i)==eol) nLine++;
+																	i++;
+																	if(i>=lgth) throw new UnexceptedEndOfFileException();
+																}
+																if(f.charAt(i)=='}') //end{center} 
+																{
+																	if(started && !parsingFinished)
+																		throw new FatalErrorParsingException(LaTeXDrawLang.getString1_9("PSTricksParser.1")); //$NON-NLS-1$
+																	
+																	if(started)
+																		parsingFinished = true;
+																	else
+																		PSTricksParameters.isCentered = false;
+																}
+																else 
+																	throw new InvalidFormatCommandException("\\end{center}", nLine);//$NON-NLS-1$
+															}else
+															{
+																i = i2;
+																throw new UnexceptedEndOfFileException();
+															}
+															break;
+															
+														case 'f'://end{f 
+															if(i+9>=lgth) throw new UnexceptedEndOfFileException();
+															if(f.charAt(++i)=='i' && f.charAt(++i)=='g' &&
+															   f.charAt(++i)=='u' && f.charAt(++i)=='r' && 
+															   f.charAt(++i)=='e' && (f.charAt(++i)<'a' || 
+															   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+															{//end{figure
+																while(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+																{
+																	if(f.charAt(i)==eol) nLine++;
+																	i++;
+																	if(i>=lgth) throw new UnexceptedEndOfFileException();
+																}
+																if(f.charAt(i)=='}') //end{figure} 
+																{
+																	if(started && !parsingFinished)
+																		throw new FatalErrorParsingException(LaTeXDrawLang.getString1_9("PSTricksParser.2")); //$NON-NLS-1$
+																	
+																	if(started)
+																		parsingFinished = true;
+																	else
+																		PSTricksParameters.tokenPosition = "";//$NON-NLS-1$
+																}
+																else 
+																	throw new InvalidFormatCommandException("\\end{figure}", nLine);//$NON-NLS-1$
+															}else
+															{
+																i = i2;
+																throw new UnexceptedEndOfFileException();
+															}
+															break;
+													}
+												}
+												else
+												{
+													i = i2;
+													throw new UnknownCommandException(nLine);
+												}
+											}
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+										}// if(f.charAt(++i)=='n' && f.charAt(++i)=...
+									}
+									else
+									{
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+									
+								case 'd' : 
+									if(!started) throw new IgnoreCommandException(nLine);
+									i2 = i;
+									i++;
+									if(i>=lgth) throw new UnexceptedEndOfFileException();
+									if(f.charAt(i)!='e')
+									{
+										i=i2;
+										throw new UnknownCommandException(nLine);
+									}
+									
+									i++;
+									if(i>=lgth) throw new UnexceptedEndOfFileException();
+
+									switch(f.charAt(i))
+									{
+										case 'g' : // degrees
+											if(i+5>=lgth) throw new UnexceptedEndOfFileException();
+
+											if(f.charAt(++i)=='r' && f.charAt(++i)=='e' && f.charAt(++i)=='e' &&
+												f.charAt(++i)=='s' && (f.charAt(++i)<'a' || 
+												f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{
+												int id = texParserActions.parseDegreesCommand(f.substring(i),params.lastElement(), nLine);
+												i += id;
+											}
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										case 'f' : // definecolor
+											if(i+9>=lgth) throw new UnexceptedEndOfFileException();
+
+											if(f.charAt(++i)=='i' && f.charAt(++i)=='n' && f.charAt(++i)=='e' &&
+												f.charAt(++i)=='c' && (f.charAt(++i)=='o' && f.charAt(++i)=='l' &&
+												f.charAt(++i)=='o' && f.charAt(++i)=='r' && f.charAt(++i)<'a' || 
+												f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{
+												int id1 = f.indexOf("{", i);//$NON-NLS-1$
+												int id2 = f.indexOf("}", i);//$NON-NLS-1$
+												
+												if(id1==-1 || id2==-1) 
+												{
+													i=i2;
+													throw new UnknownCommandException(nLine);
+												}
+												
+												int[] tmp = {0};
+												String name = PSTricksParserActionsManager.readString(f.substring(id1, id2), tmp, true);
+												
+												if(name==null || name.length()==0)
+												{
+													i=i2;
+													throw new UnknownCommandException(nLine);
+												}
+												
+												id1 = f.indexOf("{", id2);//$NON-NLS-1$
+												id2 = f.indexOf("}", id2+1);//$NON-NLS-1$
+												
+												if(id1==-1 || id2==-1) 
+												{
+													i=i2;
+													throw new UnknownCommandException(nLine);
+												}
+												tmp[0]=0;
+												String type = PSTricksParserActionsManager.readString(f.substring(id1, id2), tmp, true);
+												
+												if(name.length()==0)
+												{
+													i=i2;
+													throw new UnknownCommandException(nLine);
+												}
+												
+												id1 = f.indexOf("{", id2);//$NON-NLS-1$
+												id2 = f.indexOf("}", id2+1);//$NON-NLS-1$
+												tmp[0] = 0;
+												String subStr = f.substring(id1+1, id2);
+												
+												if(type.equals(PSTricksConstants.TOKEN_COLOR_TYPE_NAMED))
+												{ // definecolor{alias}{named}{colorName}
+													String val1 = PSTricksParserActionsManager.readString(subStr, tmp, true);
+													
+													Color c = DviPsColors.getColour(val1);
+													if(c!=null)
+														DviPsColors.addUserColour(c, name);
+												}
+												else
+												{
+													double val1 = PSTricksParserActionsManager.readReal(subStr, tmp, true);
+													if(val1<0 || val1>1) throw new UnknownCommandException(nLine);
+													
+													if(type.equals(PSTricksConstants.TOKEN_COLOR_TYPE_GRAY)) // definecolor{name}{gray}{val}
+														DviPsColors.addUserColour(new Color((float)val1, (float)val1, (float)val1), name);	
+													else
+													{
+														PSTricksParserActionsManager.readChar(subStr, ',', tmp);
+														double val2 = PSTricksParserActionsManager.readReal(subStr, tmp, true);
+														PSTricksParserActionsManager.readChar(subStr, ',', tmp);
+														double val3 = PSTricksParserActionsManager.readReal(subStr, tmp, true);
+														
+														if(val2<0 || val2>1 || val3<0 || val3>1) 
+															throw new UnknownCommandException(nLine);
+														
+														if(type.equals(PSTricksConstants.TOKEN_COLOR_TYPE_RGB))// definecolor{name}{rgb}{r g b}
+															DviPsColors.addUserColour(new Color((float)val1, (float)val2, (float)val3), name);
+														else 
+															if(type.equals(PSTricksConstants.TOKEN_COLOR_TYPE_HSB))
+																DviPsColors.addUserColour(Color.getHSBColor((float)val1, (float)val2, (float)val3), name);
+															else
+																if(type.compareTo(PSTricksConstants.TOKEN_COLOR_TYPE_CMYK)==0)
+	                                                            {
+																	PSTricksParserActionsManager.readChar(subStr, ',', tmp);
+	                                                                double val4 = PSTricksParserActionsManager.readReal(subStr, tmp, true);
+	                                                              
+	                                                                if(val4<0 || val4>1)
+	                                                                    throw new InvalidFormatCommandException(nLine);
+	                                                              
+	                                                                DviPsColors.addUserColour(DviPsColors.CMYK2RGB(val1, val2, val3, val4), name);
+	                                                             }
+	                                                             else
+	                                                                 throw new UnknownCommandException(nLine); 
+													}
+												}
+												i = id2+2;
+											}
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										default :
+											i-=2;
+											throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+									
+								case 'g' :
+									if(!started) throw new IgnoreCommandException(nLine);
+									i2 = i;
+								
+									i++;
+									if(i>=lgth) throw new UnexceptedEndOfFileException();
+									
+									if(f.charAt(i)!='r') 
+									{
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									}
+									
+									i++;
+									if(i>=lgth) throw new UnexceptedEndOfFileException();
+
+									switch(f.charAt(i))
+									{
+										case 'a' : // gray
+											if(i+2>=lgth) throw new UnexceptedEndOfFileException();
+
+											PSTricksParameters tp = params.lastElement();
+											if(f.charAt(++i)=='y' && (f.charAt(++i)<'a' || 
+												f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+												tp.textColor = Color.GRAY;
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										case 'e' : // green
+											if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+
+											i2 = i;
+											tp = params.lastElement();
+											if(f.charAt(++i)=='e' && f.charAt(++i)=='n' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+											   f.charAt(i)>'Z'))
+												tp.textColor = Color.GREEN;
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										default :
+											i=i2;
+											throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+									
+								case 'L' :
+									if(!started) throw new IgnoreCommandException(nLine);
+								
+									i2 = i;
+									i++;
+									if(i>=lgth) throw new UnexceptedEndOfFileException();
+									
+									switch(f.charAt(i))
+									{
+										case 'A' : // LARGE
+											if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+
+											i2 = i;
+											PSTricksParameters tp = params.lastElement();
+											if(f.charAt(++i)=='R' && f.charAt(++i)=='G' && f.charAt(++i)=='E' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+											   f.charAt(i)>'Z'))
+												tp.textSize = PSTricksConstants.COMMAND_TEXT_LARGE3;
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										case 'a' : // Large
+											if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+											
+											i2 = i;
+											tp = params.lastElement();
+											if(f.charAt(++i)=='r' && f.charAt(++i)=='g' && f.charAt(++i)=='e' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+												f.charAt(i)>'Z'))
+												tp.textSize = PSTricksConstants.COMMAND_TEXT_LARGE2;
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										default :
+											i=i2;
+											throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+								case 'q' :
+								
+									if(!started) throw new IgnoreCommandException(nLine);
+									i2 = i;
+									i++;
+									if(i>=lgth) throw new UnexceptedEndOfFileException();
+									
+									switch(f.charAt(i))
+									{
+										case 'l' : // qline
+											if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+											i2 = i;
+											if(f.charAt(++i)=='i' && f.charAt(++i)=='n' && f.charAt(++i)=='e' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+											   f.charAt(i)>'Z'))
+												throw new NotYetManagedException("qline", nLine);//$NON-NLS-1$
+											i = i2;
+											throw new UnknownCommandException(nLine);
+											
+										case 'd' : // qdisk
+											if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+											i2 = i;
+											if(f.charAt(++i)=='i' && f.charAt(++i)=='s' && f.charAt(++i)=='k' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+											   f.charAt(i)>'Z'))
+												throw new NotYetManagedException("qdisk", nLine);//$NON-NLS-1$
+											i = i2;
+											throw new UnknownCommandException(nLine);
+											
+										default :
+											i = i2;
+											throw new UnknownCommandException(nLine);
+												
+									}
+
+								case 'c' :
+									if(!started) throw new IgnoreCommandException(nLine);
+								
+									i2 = i;
+									i++;
+									if(i>=lgth) throw new IgnoreCommandException(nLine);
+
+									switch(f.charAt(i))
+									{
+										case 'p' : // cput
+											if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+											
+											i2 = i;
+											if(f.charAt(++i)=='u' && f.charAt(++i)=='t' && (f.charAt(++i)=='*' ||
+												f.charAt(i)=='[' || f.charAt(i)=='{'))
+												throw new NotYetManagedException("cput", nLine);//$NON-NLS-1$
+											i = i2;
+											throw new UnknownCommandException(nLine);
+										
+										case 'y' : // cyan
+											if(i+3>=lgth) throw new IgnoreCommandException(nLine);
+
+											i2 = i;
+											PSTricksParameters tp = params.lastElement();
+											if(f.charAt(++i)=='a' && f.charAt(++i)=='n' && 
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+												f.charAt(i)>'Z'))
+												tp.textColor = Color.CYAN;
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										case 'o': // color
+											if(i+4>lgth) throw new UnexceptedEndOfFileException();
+											
+											if(f.charAt(++i)=='l' && f.charAt(++i)=='o' && 
+											   f.charAt(++i)=='r' && (f.charAt(++i)=='{' || PSTricksParserActionsManager.isCharToIgnore(f.charAt(i))))
+											{
+												while(i<lgth && f.charAt(i)!='{') i++; // We search the '{'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+												int[] id = {0};
+												tp = params.lastElement();
+												String tmp = PSTricksParserActionsManager.readString(f.substring(i), id, true);
+												Color c = DviPsColors.getColour(tmp); // We search the color
+												if(c!=null) tp.textColor = c;
+												while(i<lgth && f.charAt(i)!='}') i++; // We search the '{'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+											}
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										case 'u'://cu
+											if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+											
+											i2 = i;
+											if(f.charAt(++i)=='r' && f.charAt(++i)=='v' && f.charAt(++i)=='e' &&
+												f.charAt(++i)=='t' && f.charAt(++i)=='o' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+												   f.charAt(i)>'Z'))//curveto
+											{
+												int end = texParserActions.actionsOnCurveTo(nLine, 
+																params, f.substring(i, f.length()));
+												if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+											}
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										case 'l'://cl
+											if(i+8>=lgth) throw new UnexceptedEndOfFileException();
+											
+											i2 = i;
+											if(f.charAt(++i)=='o' && f.charAt(++i)=='s' && f.charAt(++i)=='e' &&
+												f.charAt(++i)=='p' && f.charAt(++i)=='a' &&
+												f.charAt(++i)=='t' && f.charAt(++i)=='h' &&
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+												   f.charAt(i)>'Z'))//closepath
+												texParserActions.actionsOnClosePathCommand(nLine);
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										default :
+											i = i2;
+											throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+								case 't' :
+									if(!started) throw new IgnoreCommandException(nLine);
+									
+									i2 = i;
+									i++;
+									if(i>=lgth) throw new UnexceptedEndOfFileException();
+
+									switch(f.charAt(i))
+									{
+										case 'r' ://translate
+											if(i+8>=lgth) throw new UnexceptedEndOfFileException();
+											
+											i2 = i;
+											if(f.charAt(++i)=='a' && f.charAt(++i)=='n' && f.charAt(++i)=='s' && 
+											   f.charAt(++i)=='l' && f.charAt(++i)=='a' && f.charAt(++i)=='t' && 
+											   f.charAt(++i)=='e' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+											   (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+												throw new NotYetManagedException("translate", nLine);//$NON-NLS-1$
+											
+											i = i2;
+											throw new UnknownCommandException(nLine);
+											
+											
+										case 'i' : //tiny
+											if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+
+											i2 = i;
+											PSTricksParameters tp = params.lastElement();
+											if(f.charAt(++i)=='n' && f.charAt(++i)=='y' && 
+											  (f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || 
+											   f.charAt(i)>'Z'))
+												tp.textSize = PSTricksConstants.COMMAND_TEXT_TINY;
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										default :
+											i = i2;
+											throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+								case 'u' :
+									if(!started) throw new IgnoreCommandException(nLine);
+									i2 = i;
+									if(++i>=lgth) throw new UnexceptedEndOfFileException();
+									
+									switch(f.charAt(i))
+									{
+										case 'p' : // uput
+											if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+											
+											if(f.charAt(++i)=='u' && f.charAt(++i)=='t' &&
+											   (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+											   (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{
+												int j = i;
+												boolean brack = false, end=false;//, hasStar = f.charAt(i)=='*';
+												
+												while(j<lgth && !end) 
+												{ // We extract the command the string : uput*{..}[..]{..}(..){...
+													if(f.charAt(j)=='(') brack = true;
+													else if(f.charAt(j)=='{' && brack) end = true;
+													j++; 
+												}
+												if(++j>=lgth) throw new UnexceptedEndOfFileException();
+
+											//	String uputS = f.substring(i, j);
+											//	try{AbstractPSTricksParserActions.parseuputCommand(uputS, hasStar, params);}
+											//	catch(Exception e){ e.printStackTrace(); throw new InvalidFormatCommandException("uput", nLine); }
+												i = j-2;
+												throw new NotYetManagedException("uput", nLine);//$NON-NLS-1$
+											}//else
+											//{
+												i=i2;
+												throw new IgnoreCommandException(nLine);
+											//}
+										//	break;
+											
+										case 's' : // usefont{enc}{family}{series}{shape}
+											if(i+6>lgth) { i = i2; throw new UnknownCommandException(nLine); }
+											
+											if(f.charAt(++i)=='e' && f.charAt(++i)=='f' && 
+											   f.charAt(++i)=='o' && f.charAt(++i)=='n' && f.charAt(++i)=='t' && 
+											   (f.charAt(++i)=='{' || PSTricksParserActionsManager.isCharToIgnore(f.charAt(i))))
+											{
+												PSTricksParameters tp = params.lastElement();
+												while(i<lgth && f.charAt(i)!='{') i++; // We search the '{'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+												
+												int[] tmp = {0};
+												tp.textEnc = PSTricksParserActionsManager.readString(f.substring(i), tmp, true);
+												while(i<lgth && f.charAt(i)!='}') i++; // We search the '}'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+												while(i<lgth && f.charAt(i)!='{') i++; // We search the '{'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+												tmp[0] = 0;
+												tp.textFamily = PSTricksParserActionsManager.readString(f.substring(i), tmp, true);
+												while(i<lgth && f.charAt(i)!='}') i++; // We search the '}'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+												while(i<lgth && f.charAt(i)!='{') i++; // We search the '{'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+												tmp[0] = 0;
+												tp.textSeries = PSTricksParserActionsManager.readString(f.substring(i), tmp, true);
+												while(i<lgth && f.charAt(i)!='}') i++; // We search the '}'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+												while(i<lgth && f.charAt(i)!='{') i++; // We search the '{'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+												tmp[0] = 0;
+												tp.textShape = PSTricksParserActionsManager.readString(f.substring(i), tmp, true);
+												while(i<lgth && f.charAt(i)!='}') i++; // We search the '}'
+												if(i>=lgth) throw new UnexceptedEndOfFileException();
+												i++;
+											}else 
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										default :
+											i = i2;
+											throw new UnknownCommandException(nLine);
+									} // switch(f.charAt(i))
+									break;
+									
+								
+								case 'H' :  // Huge
+									if(!started)  throw new IgnoreCommandException(nLine);
+									if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+									
+									i2 = i;
+									PSTricksParameters tp = params.lastElement();
+									if(f.charAt(++i)=='u' && f.charAt(++i)=='g' && f.charAt(++i)=='e' &&
+									  (f.charAt(++i)<'a' ||  f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+										tp.textSize = PSTricksConstants.COMMAND_TEXT_HUGE2;
+									else
+									{
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									}
+									break;
+										
+								case 'N' : //NormalCoor
+									if(!started)   throw new IgnoreCommandException(nLine);
+									if(i+11>=lgth) throw new UnexceptedEndOfFileException();
+									
+									i2 = i;
+									tp = params.lastElement();
+									if(f.charAt(++i)=='o' && f.charAt(++i)=='r' && f.charAt(++i)=='m' && 
+										f.charAt(++i)=='a' && f.charAt(++i)=='l' && 
+										f.charAt(++i)=='C' && f.charAt(++i)=='o' && f.charAt(++i)=='o' && 
+										f.charAt(++i)=='r' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+										(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+										tp.specialCoor = false;
+									else
+									{
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+									
+								case 'S' : //SpecialCoor
+									if(!started)   throw new IgnoreCommandException(nLine);
+									if(i+11>=lgth) throw new UnexceptedEndOfFileException();
+								
+									i2 = i;
+									tp = params.lastElement();
+									if(f.charAt(++i)=='p' && f.charAt(++i)=='e' && f.charAt(++i)=='c' && 
+										f.charAt(++i)=='i' && f.charAt(++i)=='a' && f.charAt(++i)=='l' && 
+										f.charAt(++i)=='C' && f.charAt(++i)=='o' && f.charAt(++i)=='o' && 
+										f.charAt(++i)=='r' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+										(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+										tp.specialCoor = true;
+									else
+									{
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+									
+								case 'f': //f
+									if(!started)   throw new IgnoreCommandException(nLine);
+									if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+									i2 = i;
+									
+									switch(f.charAt(++i))
+									{
+										case 'o'://fo
+											if(i+11>=lgth) throw new UnexceptedEndOfFileException();
+										
+											tp = params.lastElement();
+											if(f.charAt(++i)=='o' && f.charAt(++i)=='t' &&// footnodesize
+												f.charAt(++i)=='n' && f.charAt(++i)=='o' && f.charAt(++i)=='t' &&
+												f.charAt(++i)=='e' && f.charAt(++i)=='s' && f.charAt(++i)=='i' &&
+												f.charAt(++i)=='z' && f.charAt(++i)=='e' &&(f.charAt(++i)<'a' ||  
+												f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+												tp.textSize = PSTricksConstants.COMMAND_TEXT_FOOTNOTE;
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										case 'i'://fi
+											if(i+3>=lgth) throw new UnexceptedEndOfFileException();
+
+											if(f.charAt(++i)=='l' && f.charAt(++i)=='l' && 
+												(f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+												(f.charAt(i)<'A' || f.charAt(i)>'Z'))
+												throw new NotYetManagedException("fill", nLine);//$NON-NLS-1$
+												
+											i = i2;
+											throw new UnknownCommandException(nLine);
+											
+										default:
+											i = i2;
+											throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+								case 'h' :  // huge
+									if(!started)   throw new IgnoreCommandException(nLine);
+									if(i+4>=lgth) throw new UnexceptedEndOfFileException();
+
+									i2 = i;
+									tp = params.lastElement();
+									if(f.charAt(++i)=='u' && f.charAt(++i)=='g' && f.charAt(++i)=='e' &&
+									  (f.charAt(++i)<'a' ||  f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+										tp.textSize = PSTricksConstants.COMMAND_TEXT_HUGE1;
+									else
+									{
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+								case 'm' : // m
+									if(!started)   throw new IgnoreCommandException(nLine);
+									
+									if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+									i2 = i;
+									
+									switch(f.charAt(++i))
+									{
+										case 'a'://ma
+											if(i+5>=lgth) throw new UnexceptedEndOfFileException();
+		
+											tp = params.lastElement();
+											if(f.charAt(++i)=='g' && f.charAt(++i)=='e' &&//magenta
+											   f.charAt(++i)=='n' && f.charAt(++i)=='t' && (f.charAt(++i)<'a' || 
+											   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+												tp.textColor = Color.MAGENTA;
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										case 'o'://mo
+											if(i+5>=lgth) throw new UnexceptedEndOfFileException();
+											
+											tp = params.lastElement();
+											if(f.charAt(++i)=='v' && f.charAt(++i)=='e' &&
+											   f.charAt(++i)=='t' && f.charAt(++i)=='o' && (f.charAt(++i)<'a' || 
+											   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{
+												int end = texParserActions.actionsOnMoveTo(nLine, 
+																params, f.substring(i, f.length()));
+												if(end!=PSTricksParserActionsManager.ERR_END_CMD_INDEX) i+=end;
+											}
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+											
+										default:
+												i = i2;
+												throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+								case 'y' : // yellow
+									if(!started)   throw new IgnoreCommandException(nLine);
+									if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+								
+									i2 = i;
+									tp = params.lastElement();
+									if(f.charAt(++i)=='e' && f.charAt(++i)=='l' && f.charAt(++i)=='l' &&
+									   f.charAt(++i)=='o' && f.charAt(++i)=='w' && (f.charAt(++i)<'a' || 
+									   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+										tp.textColor = Color.YELLOW;
+									else
+									{
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+								case 'i' : 
+									i2 = i;
+									if(!started)   throw new IgnoreCommandException(nLine);
+									if(++i>=lgth) throw new UnexceptedEndOfFileException();
+									
+									switch(f.charAt(i))
+									{
+										case 't' : // it
+											if(i+1>=lgth) throw new UnexceptedEndOfFileException();
+										
+											if((f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+											   (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+											{
+												tp = params.lastElement();
+												tp.textItalic = true;
+											}
+											else
+											{
+												i = i2;
+												throw new UnknownCommandException(nLine);
+											}
+											break;
+										
+										case 'n' : // in
+											if(i+14>=lgth) throw new UnexceptedEndOfFileException();
+											
+											if(f.charAt(++i)=='c' && f.charAt(++i)=='l' && f.charAt(++i)=='u' &&
+												f.charAt(++i)=='d' && f.charAt(++i)=='e' && f.charAt(++i)=='g' &&
+												f.charAt(++i)=='r' && f.charAt(++i)=='a' && f.charAt(++i)=='p' &&
+												f.charAt(++i)=='h' && f.charAt(++i)=='i' && f.charAt(++i)=='c' &&
+												f.charAt(++i)=='s' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+											   (f.charAt(i)<'A' || f.charAt(i)>'Z')) // includegraphics
+											{
+												int z = texParserActions.actionsOnPicture(nLine, params, f.substring(i));
+												if(z>0) i+=z;
+												throw new NotYetManagedException("includegraphics", nLine); //$NON-NLS-1$
+											}
+											i = i2;
+											throw new UnknownCommandException(nLine);
+											
+										default :
+											i = i2;
+											throw new UnknownCommandException(nLine);
+									}
+									
+								break;
+									
+								case 'w' :// white
+									if(!started)   throw new IgnoreCommandException(nLine);
+									if(i+5>=lgth) throw new UnexceptedEndOfFileException();
+
+									i2 = i;
+									tp = params.lastElement();
+									if(f.charAt(++i)=='h' && f.charAt(++i)=='i' && f.charAt(++i)=='t' &&
+									   f.charAt(++i)=='e' && (f.charAt(++i)<'a' || f.charAt(i)>'z') && 
+									   (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+										tp.textColor = Color.WHITE;
+									else
+									{
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+									
+									
+								case 'z' : //z
+									if(!started) throw new IgnoreCommandException(nLine);
+									
+									i2 = i;//zigzag
+									if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+									if(f.charAt(++i)=='i' && f.charAt(++i)=='g' && f.charAt(++i)=='z' &&
+									   f.charAt(++i)=='a' && f.charAt(++i)=='g' && (f.charAt(++i)<'a' || 
+									   f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+										 throw new NotYetManagedException("zigzag", nLine);//$NON-NLS-1$
+									
+									i = i2;
+									throw new UnknownCommandException(nLine);
+									
+								case 'o'://o
+									if(!started) throw new IgnoreCommandException(nLine);
+									
+									i2 = i;
+									if(i+6>=lgth) throw new UnexceptedEndOfFileException();
+									if(f.charAt(++i)=='p' && f.charAt(++i)=='e' && f.charAt(++i)=='n' &&
+									   f.charAt(++i)=='s' && f.charAt(++i)=='h' && f.charAt(++i)=='a' &&
+									   f.charAt(++i)=='d' && f.charAt(++i)=='o' && f.charAt(++i)=='w' &&
+									   (f.charAt(++i)<'a' || f.charAt(i)>'z') && (f.charAt(i)<'A' || f.charAt(i)>'Z'))
+									{
+										int end = texParserActions.parseOpenShadowCommand(params.lastElement(), nLine,
+																	f.substring(i));
+										if(end!=-1)
+											i+=end;
+									}
+									else
+									{
+										i = i2;
+										throw new UnknownCommandException(nLine);
+									}
+									break;
+									
+								default :
+									if(f.charAt(i)==eol)
+									{
+										nLine++;
+										i++;
+									}
+									else 
+									{
+										if(started)// throw new UnknownCommandException(nLine);
+										{
+											if(!PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+											{
+												PSTricksParameters p = params.lastElement();
+												String str = "\\" + String.valueOf(f.charAt(i)); //$NON-NLS-1$
+												
+												p.textForFrame += str;
+												p.textParsed   += str;
+												
+												if(p.fromFramedBox)
+												{
+													boolean again = true;
+													int k = params.size()-2;
+													
+													while(again && k>=0)
+													{
+														p = params.elementAt(k);
+														p.textForFrame += str;
+														
+														if(p.getPosition()!=null)
+															again = false;
+														else 
+															k--;
+													}
+												}
+											}
+											i++;
+										}
+										else throw new IgnoreCommandException(nLine);
+									}
+							} //switch(f.charAt(i))
+							
+							// Any space after a command must not be taken like a text.
+							while(i<lgth && PSTricksParserActionsManager.isCharToIgnore(f.charAt(i))) i++;
+							break;
+						
+							
+						case '{' :
+							if(started)
+								params.add(new PSTricksParameters(params.lastElement()));
+							
+							if(isFramedBox)
+							{
+								params.lastElement().fromFramedBox = true;
+								isFramedBox = false;
+							}
+							i++;
+							break;
+							
+							
+						case '}' :
+							if(started)
+							{
+								if(params.size()<2)
+									throw new TooManyBracketsException(nLine);
+									
+								PSTricksParameters tp = params.lastElement();
+								
+								if(tp.fromFramedBox)
+								{
+									PSTricksParameters pp = null;
+									int k = params.size()-1;
+									
+									while(pp==null && k>=0)
+										if(params.elementAt(k).getPosition()==null)
+											k--;
+										else
+											pp = params.elementAt(k);
+									
+									if(pp==null)
+										pp = params.firstElement();
+									
+									pp.psBox.lastElement().setEnd(pp.textForFrame.length());
+									pp.psBox.add(0, pp.psBox.remove(pp.psBox.size()-1));
+								}
+								else
+									if(tp.getPosition()!=null && !tp.psBox.isEmpty())
+									{
+										Vector<FramedBox> fbs = new Vector<FramedBox>();
+										while(!tp.psBox.isEmpty())
+											fbs.add(tp.psBox.remove(tp.psBox.size()-1));
+										tp.psBox = fbs;
+											
+										tp.psBoxText.setText(tp.textForFrame);
+										texParserActions.actionsOnTerminatedFramedBoxes(params);
+									}
+									else
+										if(tp.psCustomP.fromPsCustom)
+										{
+											try
+											{
+												texParserActions.actionsOnterminatedPsCustom(params.lastElement());
+												i++;
+												if(params.isEmpty())//A enlever quand la commande sera totalement gérée.
+													throw new TooManyBracketsException(nLine);
+												
+											}catch(NotFullyManagedException e)
+											{//A enlever quand la commande sera totalement gérée.
+												i++;
+												if(params.isEmpty())
+													throw new TooManyBracketsException(nLine);
+												
+												params.removeElementAt(params.size()-1);
+												throw new NotFullyManagedException("pscustom", nLine);//$NON-NLS-1$
+											}
+										}
+										else
+											try {texParserActions.actionsOnText(params);}
+											catch(InvalidFormatCommandException e) { /* Nothing to do.*/ }
+								
+								params.removeElementAt(params.size()-1);
+							}
+							i++;
+							break;
+							
+						case ' ' :
+						case 9 ://'\t'
+							if(started)
+							{
+								PSTricksParameters p = params.lastElement();
+								
+								p.textForFrame+=" ";//$NON-NLS-1$
+								p.textParsed+=" ";//$NON-NLS-1$
+								
+								if(p.fromFramedBox)
+								{
+									boolean again=true;
+									int k = params.size()-2;
+									
+									while(again && k>=0)
+									{
+										p = params.elementAt(k);
+										p.textForFrame+=" ";//$NON-NLS-1$
+										
+										if(p.getPosition()==null)
+											k--;
+										else
+											again = false;
+									}
+								}
+							}
+							i++;
+							break;
+							
+							
+						default : 
+							if(PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+							{
+								if(started)
+								{
+									if(!lastTokenIsEOL && f.charAt(i)!=10)
+									{
+										if(params.isEmpty())
+											throw new TooManyBracketsException(nLine);
+										PSTricksParameters p = params.lastElement();
+										p.textForFrame+=" ";//$NON-NLS-1$
+										p.textParsed+=" ";//$NON-NLS-1$
+									
+										if(p.fromFramedBox)
+										{
+											boolean again = true;
+											int k = params.size()-2;
+											while(again && k>=0)
+											{
+												p = params.elementAt(k);
+												p.textForFrame+=" ";//$NON-NLS-1$
+												
+												if(p.getPosition()!=null)
+													again = false;
+												else 
+													k--;
+											}
+										}
+										lastTokenIsEOL = true;
+									}
+								}
+								i++;
+								if(f.charAt(i)!=10) nLine++;
+							}
+							else
+							{
+								if(started)
+								{
+									PSTricksParameters p = params.lastElement();
+									String str = String.valueOf(f.charAt(i));
+									
+									p.textForFrame+=str;
+									p.textParsed+=str;
+									if(p.fromFramedBox)
+									{
+										boolean again = true;
+										int k = params.size()-2;
+										while(again && k>=0)
+										{
+											p = params.elementAt(k);
+											p.textForFrame+=str;
+											
+											if(p.getPosition()!=null)
+												again = false;
+											else 
+												k--;
+										}
+									}
+								}//if
+								i++;
+							}//else
+							break;
+					} // switch(f.charAt(i))
+					
+				}catch(InvalidFormatCommandException e)
+				{	
+					parserMsgs.add(new ParserCmdMessage(e.getNLine(), e, e.getCommand()));
+					
+				}catch(NotYetManagedException e)
+				{
+					parserMsgs.add(new ParserCmdMessage(e.getNLine(), e, e.getCommand()));
+					
+				}catch(UnknownCommandException e)
+				{
+					String cmd = String.valueOf(f.charAt(i));
+					i++;
+					while(i<lgth && (f.charAt(i)>='a' && f.charAt(i)<='z') || (f.charAt(i)>='A' && f.charAt(i)<='Z'))
+						cmd+=f.charAt(i++);
+					
+					if(latexCommandsWithBrackets.containsValue(cmd))
+					{
+						PSTricksParameters p = params.lastElement();
+						
+						p.textParsed+="\\"+cmd; //$NON-NLS-1$
+						
+						while(i<lgth && PSTricksParserActionsManager.isCharToIgnore(f.charAt(i)))
+							i++;
+						
+						if(f.charAt(i)=='{')
+						{
+							boolean despecialize = false;
+							int cptBraces = 1;
+							
+							p.textParsed += f.charAt(i++);
+							
+							while(i<lgth && cptBraces>0)
+							{
+								if(!despecialize)
+								{
+									if(f.charAt(i)=='}')
+										cptBraces--;
+									else if(f.charAt(i)=='{')
+											cptBraces++;
+								}
+								
+								despecialize = f.charAt(i)!='\\' || despecialize ? false : true;
+								p.textParsed += f.charAt(i++);
+							}
+						}
+					}
+					else
+					{
+						if(latexCommandsWithoutBrack.containsValue(cmd))
+							params.lastElement().textParsed+="\\"+cmd; //$NON-NLS-1$
+						else
+						{
+							e.printStackTrace();
+							parserMsgs.add(new ParserCmdMessage(e.getNLine(), e, cmd));
+						}
+					}
+				}
+				}catch(IgnoreCommandException e)
+				{
+					while(i<lgth && (f.charAt(i)>='a' && f.charAt(i)<='z') || (f.charAt(i)>='A' && f.charAt(i)<='Z'))
+						i++;
+				}
+			}//while(i<lgth)
+			
+			if(params.size()>1) throw new UnclosedBracketsException();
+			
+			if(started && !parsingFinished)
+				throw new FatalErrorParsingException(LaTeXDrawLang.getString1_9("PSTricksParser.3")); //$NON-NLS-1$
+			
+			if(progressB!=null)
+				progressB.setValue(progressB.getMaximum());
+			
+			if(!parserMsgs.isEmpty())
+				ParserMessagesFrame.showParserMessagesFrame(parent, true, parserMsgs);
+			
+			return OK_PARSING;
+			
+		}catch(FatalErrorParsingException e)
+		{
+			String title = LaTeXDrawLang.getString1_6("PSTricksParser.3"); //$NON-NLS-1$
+			
+			if(parent!=null)
+				JOptionPane.showMessageDialog(parent, e.toString(), title, JOptionPane.ERROR_MESSAGE); 
+			else 
+				System.out.println(title+" "+e.toString()); //$NON-NLS-1$
+			
+			return ERROR_PARSING;
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+			return ERROR_PARSING;
+		}
+	} //public int parse(String f, JFrame parent)
+	
+	
+	
+	
+	
+	/**
+	 * Allows to know if the code contains the tag : \begin{pspicture} or \pspicture
+	 * @param code The code to analyse
+	 * @return 1, if the code contains the tag \begin{pspicture}<br>
+	 * 2, if the code contains the tag \pspicture<br>
+	 * 0 else.
+	 */
+	public static int containsBeginPSPicture(String code)
+	{
+		char eol = System.getProperty("line.separator").charAt(0);//$NON-NLS-1$
+		char[] f2 = new char[code.length()];
+		int i=0, lgth = code.length(), cpt=0;
+		boolean zero = false;
+		
+		while(i<lgth)
+		{
+			if(i<lgth && (code.charAt(i)==' ' || code.charAt(i)==9))
+			{
+				if(!zero) 
+				{
+					f2[cpt++] = ' ';
+					zero=true;
+				}
+			}
+			else
+			{
+				if(code.charAt(i)=='%') 
+				{
+					if(i>0 && code.charAt(i-1)!='\\')
+					{
+						while(i<lgth && eol!=code.charAt(i))
+							i++;
+						
+						if(i<lgth) f2[cpt++] = code.charAt(i);// We copy the eol
+					}
+					else if(cpt>0)cpt--;
+				}
+				else 
+				{
+					f2[cpt++] = code.charAt(i);
+					zero = false;
+				}
+			}
+			i++;
+		} // while(i<lgth)
+		
+		String code2 = String.valueOf(f2, 0, cpt) + ' ';//We terminate the code by a space
+		
+		if(code2.contains("\\pspicture"))//$NON-NLS-1$
+			return 2;
+		
+		String begin = "\\begin";//$NON-NLS-1$
+		lgth = begin.length();
+		boolean end = false;
+		int start=0;
+		
+		while(!end)
+		{
+			int[] id = {code2.indexOf(begin, start)};
+			
+			if(id[0]==-1) end = true;
+			else
+				try
+				{
+					id[0]+=begin.length();
+					PSTricksParserActionsManager.goToNextChar(code2, id);
+					start = id[0];
+					
+					if(code2.charAt(id[0])!='{')
+						continue;
+		
+					id[0]++;
+					PSTricksParserActionsManager.goToNextChar(code2, id);
+					
+					if(code2.charAt(id[0])!='p' || code2.charAt(++id[0])!='s' || code2.charAt(++id[0])!='p' || 
+						code2.charAt(++id[0])!='i' || code2.charAt(++id[0])!='c' || code2.charAt(++id[0])!='t' || 
+						code2.charAt(++id[0])!='u' || code2.charAt(++id[0])!='r' || code2.charAt(++id[0])!='e')
+						start = id[0]+lgth;
+					else
+					{
+						id[0]++;
+						PSTricksParserActionsManager.goToNextChar(code2, id);
+						
+						if(code2.charAt(id[0])=='}')
+							return 1;
+						return 0;
+					}
+				}catch (IgnoreCommandException e) { return 0; }
+		}
+		return 0;
+	}
+	
+	
+	
+	/**
+	 * Allows to test if the parsing if finished or stopped
+	 * @throws InterruptedException If the parsing is stopped or finished
+	 */
+	public synchronized void testEndThread() throws InterruptedException 
+	{
+        if(stopThread) throw new InterruptedException();
+	} 
+
+	
+	
+	/**
+	 * Allows to stop the parsing
+	 */
+	public synchronized void stop() 
+	{
+        stopThread = true;
+	}
+}
diff --git a/current/latexDraw/parsers/pstricks/PSTricksParserActionsManager.java b/current/latexDraw/parsers/pstricks/PSTricksParserActionsManager.java
new file mode 100644
index 0000000..8937d5e
--- /dev/null
+++ b/current/latexDraw/parsers/pstricks/PSTricksParserActionsManager.java
@@ -0,0 +1,4046 @@
+package latexDraw.parsers.pstricks;
+
+import static java.lang.Math.cos;
+import static java.lang.Math.sin;
+import static java.lang.Math.toRadians;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import latexDraw.figures.ArrowHead;
+import latexDraw.parsers.IgnoreCommandException;
+import latexDraw.parsers.InvalidFormatCommandException;
+import latexDraw.parsers.NotFullyManagedException;
+import latexDraw.parsers.pstricks.PSTricksParameters.PositionParameters;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.psTricks.PSTricksConstants;
+
+/** 
+ * This class defines actions to do on a given command: it is an
+ * abstract class, because the actions to do depend on want the
+ * developer want; so you must create a sub class to implement
+ * actions to do as in the class {@link LaTeXDrawPSTricksParserActions}.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/06/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.5<br>
+ */
+public abstract class PSTricksParserActionsManager
+{
+	/** When the parsing of a command goes bad, this value is returned. */
+	public static final short ERR_END_CMD_INDEX = -1;
+	
+	
+	
+	/**
+	 * Action to do when a text is parsed.
+	 */
+	public abstract void actionsOnText(Vector<PSTricksParameters> p) throws InvalidFormatCommandException;
+	
+	
+	
+	/**
+	 * Action to do when a frame or an ellipse is parsed.
+	 */
+	public abstract int actionsOnFrameEllipse(int line, boolean hasStar, Vector<PSTricksParameters> p, 
+			String params, boolean isFrame) throws InvalidFormatCommandException;
+	
+	
+	
+	/**
+	 * Action to do when a frame is parsed.
+	 */
+	public abstract int actionsOnCircle(int line, boolean hasStar, Vector<PSTricksParameters> ps, 
+			String params) throws InvalidFormatCommandException;
+	
+	
+	
+	/**
+	 * Action to do when a dot is parsed.
+	 */
+	public abstract int actionsOnDot(int line, Vector<PSTricksParameters> ps, String params,
+			boolean noCoordinatePossible) throws InvalidFormatCommandException;
+	
+	
+	
+	/**
+	 * Action to do when a picture is parsed.
+	 */
+	public abstract int actionsOnPicture(int line, Vector<PSTricksParameters> ps, String params) 
+			throws InvalidFormatCommandException;
+	
+	
+
+
+	/**
+	 * Allows to parse the parameters of the commands psdot and psdots
+	 * @param line The number of the line
+	 * @param params The parameters
+	 * @param center Will contains all points read
+	 * @param p The parameters to be set
+	 * @return The position of the end of the parameters in the string params
+	 * @throws InvalidFormatCommandException If the command is invalid
+	 */
+	public int parseParametersDot(int line, String params, Vector<Point2D.Double> center, 
+			PSTricksParameters p, boolean noCoordinatePossible) throws InvalidFormatCommandException
+	{
+		int i=0, j;
+		boolean stop = false;
+	
+		while(i<params.length() && params.charAt(i)!='[' && params.charAt(i)!='(' && !stop)
+		{
+			if(params.charAt(i)=='\\') 
+			{
+				if(noCoordinatePossible)
+					 stop = true;
+				else throw new InvalidFormatCommandException(line);
+			}
+			i++;
+		}
+		
+		if(stop)
+		{
+			center.addElement(new Point2D.Double(p.origin.x, p.origin.y));
+			return 0;
+		}
+		
+		if(i>=params.length()) throw new InvalidFormatCommandException(line);
+		j=i;
+		
+		// We parse the options [..]
+		if(params.charAt(i)=='[') // Analyse of the options
+		{
+			j = params.indexOf("]", j);//$NON-NLS-1$
+			if(j==-1) throw new InvalidFormatCommandException(line);
+			
+			parseOptionsFigure(params.substring(i+1, j), p, !p.psCustomP.fromPsCustom);
+			j++;
+		}
+		
+		if(center==null) return ERR_END_CMD_INDEX;
+		
+		int[] tmp = {j};
+		try
+		{
+			goToNextChar(params, tmp);
+			if(params.charAt(tmp[0])!='(') 
+			{
+				if(noCoordinatePossible)
+				{
+					center.addElement(new Point2D.Double(p.origin.x, p.origin.y));
+					return j;
+				}
+				throw new InvalidFormatCommandException(line);
+			}
+
+			j = params.indexOf(')', tmp[0]);
+			if(j==-1) throw new InvalidFormatCommandException(line);
+			
+			//	The first position must be here
+			Point2D.Double pt = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+			if(pt==null) throw new InvalidFormatCommandException(line);
+			if(Double.isNaN(pt.x)) pt.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			if(Double.isNaN(pt.y)) pt.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			pt.setLocation(pt.x+p.origin.x, pt.y+p.origin.y);
+			center.addElement(pt);
+			tmp[0] = j+1;
+
+		}catch(IgnoreCommandException e1) { throw new InvalidFormatCommandException(line); }
+		
+		stop=false;
+		
+		if(!noCoordinatePossible)
+			while(!stop)
+			{
+				try
+				{
+					goToNextChar(params, tmp);
+					if(params.charAt(tmp[0])!='(')
+						throw new InvalidFormatCommandException(line);
+	
+					j = params.indexOf(')', tmp[0]);
+					if(j==-1) throw new InvalidFormatCommandException(line);
+					
+					Point2D.Double pt = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+					if(pt==null) throw new InvalidFormatCommandException(line);
+					if(Double.isNaN(pt.x)) pt.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+					if(Double.isNaN(pt.y)) pt.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+					pt.setLocation(pt.x+p.origin.x, pt.y+p.origin.y);
+					center.addElement(pt);
+					tmp[0] = j+1;
+					
+				}catch(Exception e){ stop = true; }
+			} // while(!stop)
+		
+		return tmp[0];
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to parse the parameters of a include graphics command.<br>
+	 * All the parameters will be in cm.
+	 */
+	public int parseParametersPicture(int nLine, String params, String[] path) throws InvalidFormatCommandException
+	{
+		try
+		{
+			int[] i={0};
+			
+			while(i[0]<params.length() && params.charAt(i[0])!='{')
+			{
+				if(params.charAt(i[0])=='\\') throw new InvalidFormatCommandException(nLine);
+				i[0]++;
+			}
+			
+			i[0]++;
+			if(i[0]>=params.length()) throw new InvalidFormatCommandException(nLine);
+			
+			goToNextChar(params, i);
+			
+			int j = params.indexOf("}", i[0]), k; //$NON-NLS-1$
+			
+			if(j==-1) throw new InvalidFormatCommandException(nLine);
+			
+			String path2 = params.substring(i[0], j);
+			k = path2.length()-1;
+			boolean stop = false;
+			
+			while(!stop && k>i[0])
+			{
+				if(isCharToIgnore(path2.charAt(k)))
+					k--;
+				else stop = true;
+			}
+			
+			if(k<=i[0]) throw new InvalidFormatCommandException(nLine);
+			path2 = path2.substring(0, k+1);
+			
+			path[0] = path2;
+			
+			return j+1;
+			
+		}catch(Exception e)
+		{ throw new InvalidFormatCommandException("includegraphics", nLine); } //$NON-NLS-1$
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to parse the parameters of a frame or a ellipse command.<br>
+	 * All the parameters will be in cm.
+	 */
+	public int parseParametersFrameEllipse(int nLine, String params, Point2D.Double p1, Point2D.Double p2, 
+			PSTricksParameters p) throws InvalidFormatCommandException
+	{
+			int i=0, j;
+			while(i<params.length() && params.charAt(i)!='[' && params.charAt(i)!='(' && params.charAt(i)!='{')
+			{
+				if(params.charAt(i)=='\\') throw new InvalidFormatCommandException(nLine);
+				i++;
+			}
+			
+			if(i>=params.length()) throw new InvalidFormatCommandException(nLine);
+			j=i;
+			
+			// We parse the options [..]
+			if(params.charAt(i)=='[') // Analyse of the options
+			{
+				while(j<params.length() && params.charAt(j)!=']') j++;
+				
+				if(j>=params.length()) throw new InvalidFormatCommandException(nLine);
+				
+				parseOptionsFigure(params.substring(i+1, j), p, !p.psCustomP.fromPsCustom);
+				j++;
+			}
+			
+			if(p1==null || p2==null || p.origin==null) return j;
+			
+			// We parse the coordinates (..)
+			int[] tmp = {j};
+			Point2D.Double pt1, pt2;
+			
+			try
+			{
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(nLine);
+				j = params.indexOf(')', tmp[0]);
+				if(j==-1) throw new InvalidFormatCommandException(nLine);
+				
+				//	The first position must be here
+				pt1 = readOneCoordinate(params.substring(tmp[0], j+1), 0, nLine, true); 
+				if(pt1==null) throw new InvalidFormatCommandException(nLine);
+				tmp[0] = j+1;
+
+			}catch(IgnoreCommandException e1) { throw new InvalidFormatCommandException(nLine); }
+			
+			try
+			{
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(nLine);
+				j = params.indexOf(')', tmp[0]);
+				if(j==-1) throw new InvalidFormatCommandException(nLine);
+				pt2 = readOneCoordinate(params.substring(tmp[0], j+1), 0, nLine, true); 
+				tmp[0] = j+1;
+			}catch(Exception e){ pt2 = null; }
+
+			if(pt2==null)
+			{
+				p1.setLocation((Point2D.Double)p.origin.clone());
+				p2.setLocation(pt1);
+			}
+			else
+			{
+				p1.setLocation(pt1);
+				p2.setLocation(pt2);
+			}
+			if(Double.isNaN(p1.x)) p1.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			if(Double.isNaN(p1.y)) p1.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			if(Double.isNaN(p2.x)) p2.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			if(Double.isNaN(p2.y)) p2.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			
+			return tmp[0];
+	}
+
+
+
+	
+	
+	
+	
+	/**
+	 * Allows to parse the parameters of a frame or a ellipse command.<br>
+	 * All the parameters will be in cm
+	 * @throws InvalidFormatCommandException If the format of the command is invalid.
+	 */
+	public int parseParametersCircle(int line, String params, Point2D.Double center, double[] radius, 
+			PSTricksParameters p) throws InvalidFormatCommandException
+	{
+		int i=0, j;
+		while(i<params.length() && params.charAt(i)!='[' && params.charAt(i)!='(' && params.charAt(i)!='{')
+		{
+			if(params.charAt(i)=='\\') throw new InvalidFormatCommandException(line);
+			i++;
+		}
+		
+		if(i>=params.length()) throw new InvalidFormatCommandException(line);
+		j=i;
+		
+		// We parse the options [..]
+		if(params.charAt(i)=='[') // Analyse of the options
+		{
+			while(j<params.length() && params.charAt(j)!=']') j++;
+			
+			if(j>=params.length()) throw new InvalidFormatCommandException(line);
+			
+			parseOptionsFigure(params.substring(i+1, j), p, !p.psCustomP.fromPsCustom);
+			j++;
+		}
+		
+		if(center==null || p.origin==null) return j;
+		
+		int[] tmp = {j}, temp = {0};
+		try
+		{//	The centre is optional
+			goToNextChar(params, tmp);
+			if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+			j = params.indexOf(')', tmp[0]);
+			if(j==-1) throw new InvalidFormatCommandException(line);
+
+			center.setLocation(readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true)); 
+			tmp[0] = j+1;
+			
+		}catch(Exception e){ center.setLocation((Point2D.Double)p.origin.clone()); }
+		
+		if(Double.isNaN(center.x)) center.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+		if(Double.isNaN(center.y)) center.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+		
+		try
+		{
+			// We parse the radius {Real}
+			goToNextChar(params, tmp);
+			if(params.charAt(tmp[0])!='{') throw new InvalidFormatCommandException(line);
+			j = params.indexOf('}', tmp[0]);	
+			if(j==-1) throw new InvalidFormatCommandException(line);
+			
+			radius[0] = readReal(params.substring(tmp[0]+1, j), temp, true);
+		}catch(Exception e){throw new InvalidFormatCommandException(line);}
+		
+		return j+1;
+	}
+	
+
+	
+	
+	
+
+	/**
+	 * Allows to parse the parameters of a line command.<br>
+	 * All the parameters will be in cm
+	 * @throws InvalidFormatCommandException If the format of the command is invalid
+	 */
+	public int parseParametersLine(int line, String params, Vector<Point2D.Double> pts, 
+			PSTricksParameters p) throws InvalidFormatCommandException
+	{
+		int i=0, j;
+		while(i<params.length() && params.charAt(i)!='[' && params.charAt(i)!='(' && params.charAt(i)!='{')
+		{
+			if(params.charAt(i)=='\\') throw new InvalidFormatCommandException(line);
+			i++;
+		}
+		
+		if(i>=params.length()) throw new InvalidFormatCommandException(line);
+		j=i;
+		
+		// We parse the options [..]
+		if(params.charAt(i)=='[') // Analyse of the options
+		{
+			while(j<params.length() && params.charAt(j)!=']') j++;
+			
+			if(j>=params.length()) throw new InvalidFormatCommandException(line);
+
+			parseOptionsFigure(params.substring(i+1, j), p, !p.psCustomP.fromPsCustom);
+			j++;
+		}
+		
+		if(pts==null || p.origin==null) return ERR_END_CMD_INDEX;
+		
+		int[] tmp = {j};
+		try
+		{
+			goToNextChar(params, tmp);
+			
+			if(params.charAt(tmp[0])=='{')// We read the arrows
+			{// {arrow1-arrow2}
+				j = params.indexOf("}", tmp[0]);//$NON-NLS-1$
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				
+				String arr = params.substring(tmp[0]+1, j);
+				tmp[0] = j+1;
+				
+				if(arr.length()>0)
+				{
+					int k = arr.indexOf("-");//$NON-NLS-1$
+					
+					if(k==-1)// One arrow
+					{
+						if(PSTricksConstants.isValidArrowStyle(arr))
+							p.arrowStyle[0] = ArrowHead.invertArrowStyle(arr);
+					}
+					else
+					{
+						if(k!=0)
+							if(PSTricksConstants.isValidArrowStyle(arr.substring(0, k)))
+								p.arrowStyle[0] = arr.substring(0, k);
+						
+						if(k!=arr.length())
+							if(PSTricksConstants.isValidArrowStyle(arr.substring(k+1)))
+								p.arrowStyle[1] = arr.substring(k+1);
+					}
+				}
+			}
+			
+			if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+			j = params.indexOf(')', tmp[0]);
+			if(j==-1) throw new InvalidFormatCommandException(line);
+			
+			//	The first position must be here
+			Point2D.Double pt = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+			if(pt==null) throw new InvalidFormatCommandException(line);
+			if(Double.isNaN(pt.x)) pt.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			if(Double.isNaN(pt.y)) pt.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			pt.setLocation(pt.x+p.origin.x, pt.y+p.origin.y);
+			pts.addElement(pt);
+			tmp[0] = j+1;
+
+		}catch(IgnoreCommandException e1) { throw new InvalidFormatCommandException(line); }
+		
+		boolean stop=false;
+		while(!stop)
+		{
+			try
+			{
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+				j = params.indexOf(')', tmp[0]);
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				
+				Point2D.Double pt = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+				if(pt==null) throw new InvalidFormatCommandException(line);
+				if(Double.isNaN(pt.x)) pt.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				if(Double.isNaN(pt.y)) pt.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				pt.setLocation(pt.x+p.origin.x, pt.y+p.origin.y);
+				pts.addElement(pt);
+				tmp[0] = j+1;
+				
+			}catch(Exception e){ stop = true; }
+		} // while(!stop)
+		
+		if(pts.size()==1)
+			pts.add(0,new Point2D.Double(p.origin.x, p.origin.y));
+		
+		return tmp[0];
+	}
+
+	
+	
+	
+
+	/**
+	 * Allows to parse the parameters of a polygon command.
+	 * @param line The line of the command.
+	 * @param params The parameters.
+	 * @param pts The futures points of the polygon.
+	 * @param p The current generals parameters.
+	 * @return The index of the end of the parameters in params.
+	 * @throws InvalidFormatCommandException If the format of the command is invalid.
+	 */
+	public int parseParametersPolygon(int line, String params, Vector<Point2D.Double> pts, 
+			PSTricksParameters p) throws InvalidFormatCommandException
+	{
+		int i=0, j;
+		while(i<params.length() && params.charAt(i)!='[' && params.charAt(i)!='(' && params.charAt(i)!='{')
+		{
+			if(params.charAt(i)=='\\') throw new InvalidFormatCommandException(line);
+			i++;
+		}
+		
+		if(i>=params.length()) throw new InvalidFormatCommandException(line);
+		j=i;
+		
+		// We parse the options [..]
+		if(params.charAt(i)=='[') // Analyse of the options
+		{
+			while(j<params.length() && params.charAt(j)!=']') j++;
+			
+			if(j>=params.length()) throw new InvalidFormatCommandException(line);
+			
+			parseOptionsFigure(params.substring(i+1, j), p, !p.psCustomP.fromPsCustom);
+			j++;
+		}
+		
+		if(pts==null || p.origin==null) return j;
+		
+		boolean stop=false;
+		int[] tmp = {j};
+		while(!stop)
+		{
+			try
+			{
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+				j = params.indexOf(')', tmp[0]);
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				
+				Point2D.Double pt = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+				if(pt==null) throw new InvalidFormatCommandException(line);
+				if(Double.isNaN(pt.x)) pt.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				if(Double.isNaN(pt.y)) pt.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				pt.setLocation(pt.x+p.origin.x, pt.y+p.origin.y);
+				pts.addElement(pt);
+				tmp[0] = j+1;
+				
+			}catch(Exception e){ stop = true; }
+		} // while(!stop)
+		
+		if(pts.isEmpty())
+			throw new InvalidFormatCommandException(line);
+		
+		return tmp[0];
+	}
+
+
+	
+	
+
+
+	/**
+	 * Allows to parse the parameters of a Bézier curve command.
+	 * @param line The line of the command.
+	 * @param params The parameters.
+	 * @param pts The futures points of the Bézier curve.
+	 * @param p The current generals parameters.
+	 * @return The index of the end of the parameters in params.
+	 * @throws InvalidFormatCommandException If the format of the command is invalid.
+	 */
+	public int parseParametersBezierCurve(int line, String params, Vector<Point2D.Double> pts, 
+			PSTricksParameters p) throws InvalidFormatCommandException
+	{
+		int i=0, j;
+		while(i<params.length() && params.charAt(i)!='[' && params.charAt(i)!='(')
+		{
+			if(params.charAt(i)=='\\') throw new InvalidFormatCommandException(line);
+			i++;
+		}
+		
+		if(i>=params.length()) throw new InvalidFormatCommandException(line);
+		j=i;
+		
+		// We parse the options [..]
+		if(params.charAt(i)=='[') // Analyse of the options
+		{
+			while(j<params.length() && params.charAt(j)!=']') j++;
+			
+			if(j>=params.length()) throw new InvalidFormatCommandException(line);
+			
+			parseOptionsFigure(params.substring(i+1, j), p, !p.psCustomP.fromPsCustom);
+			j++;
+		}
+		
+		if(pts==null) return ERR_END_CMD_INDEX;
+	
+		int[] tmp = {j};
+		try
+		{
+			goToNextChar(params, tmp);
+			
+			if(params.charAt(tmp[0])=='{')// We read the arrows
+			{// {arrow1-arrow2}
+				j = params.indexOf("}", tmp[0]);//$NON-NLS-1$
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				
+				String arr = params.substring(tmp[0]+1, j);
+				tmp[0] = j+1;
+				
+				if(arr.length()>0)
+				{
+					int k = arr.indexOf("-");//$NON-NLS-1$
+					
+					if(k==-1)// One arrow
+					{
+						if(PSTricksConstants.isValidArrowStyle(arr))
+							p.arrowStyle[0] = ArrowHead.invertArrowStyle(arr);
+					}
+					else
+					{
+						if(k!=0)
+							if(PSTricksConstants.isValidArrowStyle(arr.substring(0, k)))
+								p.arrowStyle[0] = arr.substring(0, k);
+						
+						if(k!=arr.length())
+							if(PSTricksConstants.isValidArrowStyle(arr.substring(k+1)))
+								p.arrowStyle[1] = arr.substring(k+1);
+					}
+				}
+			}
+			
+			if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+			j = params.indexOf(')', tmp[0]);
+			if(j==-1) throw new InvalidFormatCommandException(line);
+			
+			//	The first position must be here
+			Point2D.Double pt = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+			if(pt==null) throw new InvalidFormatCommandException(line);
+			if(Double.isNaN(pt.x)) pt.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			if(Double.isNaN(pt.y)) pt.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			pt.setLocation(pt.x+p.origin.x, pt.y+p.origin.y);
+			pts.addElement(pt);
+			tmp[0] = j+1;
+
+		}catch(IgnoreCommandException e1) { throw new InvalidFormatCommandException(line); }
+		
+		boolean stop=false;
+		
+		while(!stop)
+		{
+			try
+			{
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+				j = params.indexOf(')', tmp[0]);
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				
+				Point2D.Double pt = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+				if(pt==null) throw new InvalidFormatCommandException(line);
+				if(Double.isNaN(pt.x)) pt.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				if(Double.isNaN(pt.y)) pt.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				pt.setLocation(pt.x+p.origin.x, pt.y+p.origin.y);
+				pts.addElement(pt);
+				tmp[0] = j+1;
+			}catch(Exception e){ stop = true; }
+		} // while(!stop)
+		
+		return tmp[0];
+	}
+
+	
+	
+	
+	
+
+	/**
+	 * Allows to parse the parameters of a Bézier curve command.
+	 * @param line The line of the command.
+	 * @param params The parameters.
+	 * @param radius The futures radius of the arc.
+	 * @param p The current generals parameters.
+	 * @param center The future centre of the arc.
+	 * @param angle1 The future first angle of the arc.
+	 * @param angle2 The future last angle of the arc.
+	 * @return The index of the end of the parameters in params.
+	 * @throws InvalidFormatCommandException If the format of the command is invalid.
+	 */
+	public int parseParametersArcWedge(int line, String params, double[] radius, Point2D.Double center, 
+			double[] angle1, double[] angle2, PSTricksParameters p, boolean isArc) throws InvalidFormatCommandException
+		{
+			int i=0, j;
+			while(i<params.length() && params.charAt(i)!='[' && params.charAt(i)!='('  && params.charAt(i)!='{')
+			{
+				if(params.charAt(i)=='\\') throw new InvalidFormatCommandException(line);
+				i++;
+			}
+				
+			
+			if(i>=params.length()) throw new InvalidFormatCommandException(line);
+			j=i;
+			
+			// We parse the options [..]
+			if(params.charAt(i)=='[') // Analyse of the options
+			{
+				while(j<params.length() && params.charAt(j)!=']') j++;
+				
+				if(j>=params.length()) throw new InvalidFormatCommandException(line);
+				
+				parseOptionsFigure(params.substring(i+1, j), p, !p.psCustomP.fromPsCustom);
+				j++;
+			}
+			
+			if(center==null || p.origin==null) return ERR_END_CMD_INDEX;
+		
+			int[] tmp = {j}, temp = {0};
+			try
+			{
+				goToNextChar(params, tmp);
+				
+				if(isArc)
+					if(params.charAt(tmp[0])=='{')// We read the arrows
+					{// {arrow1-arrow2}
+						j = params.indexOf("}", tmp[0]);//$NON-NLS-1$
+						if(j==-1) throw new InvalidFormatCommandException(line);
+						
+						String arr = params.substring(tmp[0]+1, j);
+						tmp[0] = j+1;
+						
+						if(arr.length()>0)
+						{
+							int k = arr.indexOf("-");//$NON-NLS-1$
+							
+							if(k==-1)// One arrow
+							{
+								if(PSTricksConstants.isValidArrowStyle(arr))
+									p.arrowStyle[0] = ArrowHead.invertArrowStyle(arr);
+							}
+							else
+							{
+								if(k!=0)
+									if(PSTricksConstants.isValidArrowStyle(arr.substring(0, k)))
+										p.arrowStyle[0] = arr.substring(0, k);
+								
+								if(k!=arr.length())
+									if(PSTricksConstants.isValidArrowStyle(arr.substring(k+1)))
+										p.arrowStyle[1] = arr.substring(k+1);
+							}
+						}
+					}
+				
+				try
+				{// The centre is optional
+					goToNextChar(params, tmp);
+					if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+					j = params.indexOf(')', tmp[0]);
+					if(j==-1) throw new InvalidFormatCommandException(line);
+					
+					Point2D.Double pt = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+					if(pt==null) throw new InvalidFormatCommandException(line);
+					pt.setLocation(pt.x+p.origin.x, pt.y+p.origin.y);
+					center.setLocation(pt);
+					tmp[0] = j+1;
+					
+				}catch(Exception e){ center.setLocation((Point2D.Double)p.origin.clone()); }
+
+				// We parse the radius {Real}
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='{') throw new InvalidFormatCommandException(line);
+				j = params.indexOf('}', tmp[0]);	
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				
+				radius[0] = readRealUnit(temp, params.substring(tmp[0]+1, j), true);
+				
+				tmp[0] = j+1;
+//					 We parse the first angle {Real}
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='{') throw new InvalidFormatCommandException(line);
+				j = params.indexOf('}', tmp[0]);	
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				temp[0] = 0;
+				angle1[0] = readReal(params.substring(tmp[0]+1, j), temp, true);
+				
+				tmp[0] = j+1;
+//					 We parse the second angle radius {Real}
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='{') throw new InvalidFormatCommandException(line);
+				j = params.indexOf('}', tmp[0]);	
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				temp[0] = 0;
+				angle2[0] = readReal(params.substring(tmp[0]+1, j), temp, true);
+				
+				return j+1;
+				
+			}catch(IgnoreCommandException e1) { throw new InvalidFormatCommandException(line); }
+		}
+
+	
+	
+	
+
+	/**
+	 * Allows to parse the parameters of a Bézier curve command.
+	 * @param line The line of the command.
+	 * @param params The parameters.
+	 * @param p The current generals parameters.
+	 * @param pts The future points of the grids.
+	 * @return The index of the end of the parameters in params.
+	 * @throws InvalidFormatCommandException If the format of the command is invalid.
+	 */
+	public int parseParametersGridAxes(int line, String params, Vector<Point2D.Double> pts, 
+			PSTricksParameters p) throws InvalidFormatCommandException
+		{
+			int i=0, j;
+			int[] k={0};
+			
+			try { goToNextChar(params, k); } 
+			catch(IgnoreCommandException e1) { throw new InvalidFormatCommandException(line); }
+			
+			if(params.charAt(k[0])!='[' && params.charAt(k[0])!='(' && params.charAt(k[0])!='{')
+				return k[0];
+
+			j=k[0];
+			
+			// We parse the options [..]
+			if(params.charAt(i)=='[') // Analyse of the options
+			{
+				while(j<params.length() && params.charAt(j)!=']') j++;
+				
+				if(j>=params.length()) throw new InvalidFormatCommandException(line);
+				
+				parseOptionsFigure(params.substring(i+1, j), p, !p.psCustomP.fromPsCustom);
+				j++;
+			}
+			
+			if(pts==null) return ERR_END_CMD_INDEX;
+		
+			int[] tmp = {j};
+			Point2D.Double p1, p2, p3;
+
+			try
+			{// These parameters are optional
+				goToNextChar(params, tmp);
+				
+				if(params.charAt(tmp[0])=='{')// We read the arrows
+				{// {arrow1-arrow2}
+					j = params.indexOf("}", tmp[0]);//$NON-NLS-1$
+					if(j==-1) throw new InvalidFormatCommandException(line);
+					
+					String arr = params.substring(tmp[0]+1, j);
+					tmp[0] = j+1;
+					
+					if(arr.length()>0)
+					{
+						int m = arr.indexOf("-");//$NON-NLS-1$
+						
+						if(m==-1)// One arrow
+						{
+							if(PSTricksConstants.isValidArrowStyle(arr))
+								p.arrowStyle[0] = ArrowHead.invertArrowStyle(arr);
+						}
+						else
+						{
+							if(m!=0)
+								if(PSTricksConstants.isValidArrowStyle(arr.substring(0, m)))
+									p.arrowStyle[0] = arr.substring(0, m);
+							
+							if(m!=arr.length())
+								if(PSTricksConstants.isValidArrowStyle(arr.substring(m+1)))
+									p.arrowStyle[1] = arr.substring(m+1);
+						}
+					}
+				}
+				
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+				j = params.indexOf(')', tmp[0]);
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				
+				p1 = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+				if(p1==null) throw new InvalidFormatCommandException(line);
+				if(Double.isNaN(p1.x)) p1.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				if(Double.isNaN(p1.y)) p1.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				pts.add(p1);
+				tmp[0] = j+1;
+				
+			}catch(Exception e) { return tmp[0]; }
+
+			try
+			{// These parameters are optional
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+				j = params.indexOf(')', tmp[0]);
+				if(j==-1) throw new InvalidFormatCommandException(line);
+				
+				p2 = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+				if(p2==null) throw new InvalidFormatCommandException(line);
+				if(Double.isNaN(p2.x)) p2.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				if(Double.isNaN(p2.y)) p2.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				pts.add(p2);
+				tmp[0] = j+1;
+				
+			}catch(Exception e) { return tmp[0]; }
+			
+			try
+			{// These parameters are optional
+				goToNextChar(params, tmp);
+				if(params.charAt(tmp[0])!='(') throw new InvalidFormatCommandException(line);
+				j = params.indexOf(')', tmp[0]);
+				if(j==-1) throw new InvalidFormatCommandException(line);
+		
+				p3 = readOneCoordinate(params.substring(tmp[0], j+1), 0, line, true); 
+				if(p3==null) throw new InvalidFormatCommandException(line);
+				if(Double.isNaN(p3.x)) p3.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				if(Double.isNaN(p3.y)) p3.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+				pts.add(p3);
+				tmp[0] = j+1;
+				
+				return tmp[0];
+				
+			}catch(Exception e) { return tmp[0]; }
+		}
+
+	
+	
+	
+	
+	/**
+	 * Allows to parse the options of any PSTricks figure (excepts psplot).<br>
+	 * All the parameters will be in cm.
+	 * @param params The code to parse.
+	 * @param pstp The pstricks parameters.
+	 * @param applyParams If <code>true</code> the parsed parameters will be applied to the <code>pstp</code>, 
+	 * else the parameters will be parsed but ignored.
+	 */
+	public static void parseOptionsFigure(String params, PSTricksParameters pstp, boolean applyParams)
+	{
+		int size = params.length(); 
+		int id[] = {0};
+		PSTricksParameters p = applyParams ? pstp : new PSTricksParameters(pstp);
+	
+		while(id[0]<params.length())
+		{
+			try
+			{
+				switch(params.charAt(id[0]))
+				{
+					case 's' : 
+						if(++id[0]>size) throw new IgnoreCommandException(-1);
+						switch(params.charAt(id[0]))
+						{
+							case 'h' : //sh
+								if(++id[0]>size) throw new IgnoreCommandException(-1);
+								switch(params.charAt(id[0]))
+								{
+									case 'a' : // sha
+										if(id[0]+3>size) throw new IgnoreCommandException(-1);
+										
+										if(params.charAt(++id[0])=='d' && params.charAt(++id[0])=='o' && 
+											params.charAt(++id[0])=='w') // shadow
+										{
+											if(++id[0]>size) throw new IgnoreCommandException(-1);
+											switch(params.charAt(id[0]))
+											{
+												case 's' : // shadowsize = Real unit
+													if(id[0]+4>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='i' && params.charAt(++id[0])=='z' && 
+														params.charAt(++id[0])=='e' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.shadowSize = readEqualRealUnit(id, params);
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'a' : // shadowangle = Real
+													if(id[0]+5>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='n' && params.charAt(++id[0])=='g' && 
+														params.charAt(++id[0])=='l' && params.charAt(++id[0])=='e' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.shadowAngle = readEqualReal(id, params);
+														goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'c' : // shadowcolor = String
+													if(id[0]+5>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='l' && 
+														params.charAt(++id[0])=='o' && params.charAt(++id[0])=='r' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														String s2 = readEqualString(id, params, true);
+														Color c = DviPsColors.getColour(s2); // We search the colour
+														if(c!=null) p.shadowCol = c;
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+												
+												default : 
+													if((params.charAt(id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{// shadow
+														String s = readEqualString(id, params, false);
+														if(s.equals("true")) 		 p.isShadow = true;//$NON-NLS-1$
+														else if(s.equals("false")) p.isShadow = false;//$NON-NLS-1$
+															
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+													}
+													else
+														throw new IgnoreCommandException(-1);
+											}
+										}else throw new IgnoreCommandException(-1);
+										break;
+										
+									case 'o' : // sho
+										if(id[0]+1>size) throw new IgnoreCommandException(-1);
+										
+										if(params.charAt(++id[0])=='w')//show
+										{
+											if(id[0]+1>size) throw new IgnoreCommandException(-1);
+											
+											switch(params.charAt(++id[0]))
+											{
+												case 'p'://showp
+													if(id[0]+6>size) throw new IgnoreCommandException(-1);
+													if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='i' && 
+														params.charAt(++id[0])=='n' && params.charAt(++id[0])=='t' && 
+														params.charAt(++id[0])=='s' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{//showpoints = true|false
+														String s = readEqualString(id, params, false);
+														if(s.equals("true")) 		 p.showPoints = true;//$NON-NLS-1$
+														else if(s.equals("false")) p.showPoints = false;//$NON-NLS-1$
+															
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+													}
+													else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'o'://showo
+													if(id[0]+6>size) throw new IgnoreCommandException(-1);
+													if(params.charAt(++id[0])=='r' && params.charAt(++id[0])=='i' && 
+														params.charAt(++id[0])=='g' && params.charAt(++id[0])=='i' && 
+														params.charAt(++id[0])=='n' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{//showorigin = true|false
+														String s = readEqualString(id, params, false);
+														if(s.equals("true")) 		 p.showOrigin = true;//$NON-NLS-1$
+														else if(s.equals("false")) p.showOrigin = false;//$NON-NLS-1$
+															
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+													}
+													else throw new IgnoreCommandException(-1);
+													break;
+													
+												default: throw new IgnoreCommandException(-1);
+											}
+											
+										}else throw new IgnoreCommandException(-1);
+										break;
+										
+									default : throw new IgnoreCommandException(-1);
+								}
+								break;
+								
+							case 'u' : // su
+								if(id[0]+5>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='b' && params.charAt(++id[0])=='g' && 
+									params.charAt(++id[0])=='r' && params.charAt(++id[0])=='i' && 
+									params.charAt(++id[0])=='d') // subgrid
+								{
+									if(++id[0]>size) throw new IgnoreCommandException(-1);
+									switch(params.charAt(id[0]))
+									{
+										case 'd' : // subgridd
+											if(++id[0]>size) throw new IgnoreCommandException(-1);
+											switch(params.charAt(id[0]))
+											{
+												case 'o' : // subgriddots = Integer
+													if(id[0]+3>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='t' && params.charAt(++id[0])=='s' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.subGridDots = readEqualInteger(id, params);
+														if(id[0]<size) goToNextChar(params, id);
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'i' : // subgriddiv = Integer
+													if(id[0]+2>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='v' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.subGridDiv = readEqualInteger(id, params);
+														if(id[0]<size) goToNextChar(params, id);
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+												
+												default : throw new IgnoreCommandException(-1);
+											}
+											break;
+											
+										case 'w' : // subgridwidth = Real unit
+											if(id[0]+5>size) throw new IgnoreCommandException(-1);
+											
+											if(params.charAt(++id[0])=='i' && params.charAt(++id[0])=='d' && 
+												params.charAt(++id[0])=='t' && params.charAt(++id[0])=='h' && 
+												(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+											{
+												p.subGridWidth = readEqualRealUnit(id, params);
+												if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+												
+											}else throw new IgnoreCommandException(-1);
+											break;
+											
+										case 'c': // subgridcolor = String
+											if(id[0]+5>size) throw new IgnoreCommandException(-1);
+											
+											if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='l' && 
+												params.charAt(++id[0])=='o' && params.charAt(++id[0])=='r' && 
+												(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+											{
+												String s2 = readEqualString(id, params, true);
+												Color c = DviPsColors.getColour(s2); // We search the colour
+												if(c!=null)	p.subGridCol = c;
+												if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+												
+											}else throw new IgnoreCommandException(-1);
+											break;
+											
+										default : throw new IgnoreCommandException(-1);
+									}
+								}else throw new IgnoreCommandException(-1);
+								break;
+								
+							case 'w' : // swapaxes = true|false
+								if(id[0]+7>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='a' && params.charAt(++id[0])=='p' && 
+									params.charAt(++id[0])=='a' && params.charAt(++id[0])=='x' && 
+									params.charAt(++id[0])=='e' && params.charAt(++id[0])=='s' && 
+									(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+								{
+									String s = readEqualString(id, params, false);
+									if(s.equals("true")) 		 p.swapAxes = true;//$NON-NLS-1$
+									else if(s.equals("false")) p.swapAxes = false;//$NON-NLS-1$
+										
+									if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+									
+								}else throw new IgnoreCommandException(-1);
+								break;
+						
+							default : throw new IgnoreCommandException(-1);
+						}
+						break;
+						
+					case 'd' : 
+						if(++id[0]>size) throw new IgnoreCommandException(-1);
+						switch(params.charAt(id[0]))
+						{
+							case 'o' : // do
+								if(++id[0]>size) throw new IgnoreCommandException(-1);
+								switch(params.charAt(id[0]))
+								{
+									case 't' : // dot
+										if(++id[0]>size) throw new IgnoreCommandException(-1);
+										switch(params.charAt(id[0]))
+										{
+											case 's' : // dots
+												if(++id[0]>size) throw new IgnoreCommandException(-1);
+												switch(params.charAt(id[0]))
+												{
+													case 'i' : //dotsize = Real unit Real
+														if(id[0]+3>size) throw new IgnoreCommandException(-1);
+														
+														if(params.charAt(++id[0])=='z' && params.charAt(++id[0])=='e' && 
+															(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+														{
+															p.arrowDotSD = readEqualRealUnit(id, params);
+															if(id[0]<size) goToNextChar(params, id); // We go to the next token
+
+															if(id[0]<size && (Character.isDigit(
+																			params.charAt(id[0])) || params.charAt(id[0])=='.')) 
+																p.arrowDotSN = readReal(params, id, true);// If there is the x, we read it
+															else p.arrowDotSN = 0;
+
+															if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+															
+														}else throw new IgnoreCommandException(-1);
+														break;
+														
+													case 't' : // dotstyle = String
+														if(id[0]+4>size) throw new IgnoreCommandException(-1);
+														
+														if(params.charAt(++id[0])=='y' && params.charAt(++id[0])=='l' && 
+															params.charAt(++id[0])=='e' && 
+															(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+														{
+															while(id[0]<size && params.charAt(id[0])!='=') id[0]++; // We search the '='
+															if(id[0]>=size) throw new IgnoreCommandException(-1);
+															id[0]++;
+															
+															goToNextChar(params, id); // We go to the next token
+															
+															String s;
+															
+															if(params.charAt(id[0])=='|' || params.charAt(id[0])=='+')
+																 s = String.valueOf(params.charAt(id[0]++));
+															else
+															{
+																s = readString(params, id, false);
+																if(id[0]<size && params.charAt(id[0])=='*')
+																	s+=String.valueOf(params.charAt(id[0]++));
+															}
+															
+															if(!PSTricksConstants.isValidDotStyle(s))
+																throw new IgnoreCommandException(-1);
+																
+															p.dotStyle = s;
+															if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+
+														}else throw new IgnoreCommandException(-1);
+														break;
+														
+													case 'c' : // dotscale = Real Real
+														if(id[0]+4>size) throw new IgnoreCommandException(-1);
+														
+														if(params.charAt(++id[0])=='a' && params.charAt(++id[0])=='l' && 
+															params.charAt(++id[0])=='e' && 
+															(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+														{
+															p.dotScale1 = readEqualReal(id, params); // We read the first parameter
+															
+															goToNextChar(params, id); // We go to the next token
+															if(id[0]<size && (Character.isDigit(
+																			params.charAt(id[0])) || params.charAt(id[0])=='.')) 
+																p.dotScale2 = readReal(params, id, true);// If there is the x, we read it
+															else p.dotScale2 = 1;
+															
+															if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+															
+														}else throw new IgnoreCommandException(-1);
+														break;
+														
+													case 'e' : // dotsep = Real unit
+														if(id[0]+2>size) throw new IgnoreCommandException(-1);
+
+														if(params.charAt(++id[0])=='p' && 
+															(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+														{
+															p.dotStep = readEqualRealUnit(id, params);
+															if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														} else throw new IgnoreCommandException(-1);
+														break;
+												
+													default : throw new IgnoreCommandException(-1);
+												}
+												break;
+												
+											case 'a' : // dotangle = Real
+												
+												if(id[0]+5>size) throw new IgnoreCommandException(-1);
+
+												if(params.charAt(++id[0])=='n' && params.charAt(++id[0])=='g' &&
+													params.charAt(++id[0])=='l' && params.charAt(++id[0])=='e' &&
+													(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+												{
+													p.dotAngle = readEqualReal(id, params);
+											
+													if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+												}else throw new IgnoreCommandException(-1);
+												break;
+										
+											default : throw new IgnoreCommandException(-1);
+										}
+										break;
+										
+									case 'u' : // dou
+										if(id[0]+3>size) throw new IgnoreCommandException(-1);
+										
+										if(params.charAt(++id[0])=='b' && params.charAt(++id[0])=='l' && 
+											params.charAt(++id[0])=='e') // double
+										{
+											if(++id[0]>size) throw new IgnoreCommandException(-1);
+											switch(params.charAt(id[0]))
+											{
+												case 'l' : // doubleline = true/false
+													if(id[0]+4>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='i' && params.charAt(++id[0])=='n' &&
+														params.charAt(++id[0])=='e' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														String s = readEqualString(id, params, false);
+														if(s.equals("true")) 		 p.dbleLine = true;//$NON-NLS-1$
+														else if(s.equals("false")) p.dbleLine = false;//$NON-NLS-1$
+														
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 's' : // doublesep = Real unit
+													if(id[0]+3>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='e' && params.charAt(++id[0])=='p' &&
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.dbleSep = readEqualRealUnit(id, params);
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'c' : // doubleColor = String
+													if(id[0]+5>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='l' &&
+														params.charAt(++id[0])=='o' && params.charAt(++id[0])=='r' &&
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														String s2 = readEqualString(id, params, true);
+														Color c = DviPsColors.getColour(s2); // We search the colour
+														if(c!=null) p.dbleColor = c;
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+												
+												default : throw new IgnoreCommandException(-1);
+											}
+										}else throw new IgnoreCommandException(-1);
+										break;
+									
+									default : throw new IgnoreCommandException(-1);
+								}
+								break;
+								
+							case 'i' : // dimen = outer|inner|middle
+								if(id[0]+4>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='m' && params.charAt(++id[0])=='e' && 
+									params.charAt(++id[0])=='n' && 
+									(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+								{
+									String s = readEqualString(id, params, false);
+									
+									if(s.equals(PSTricksConstants.BORDERS_INSIDE) ||
+										s.equals(PSTricksConstants.BORDERS_MIDDLE) ||
+										s.equals(PSTricksConstants.BORDERS_OUTSIDE))
+									{
+										p.borderPos = s;
+										if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+										
+									}else throw new IgnoreCommandException(-1);
+								}else throw new IgnoreCommandException(-1);
+								break;
+								
+							case 'a' : // dash = Real unit Real unit
+								if(id[0]+3>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='s' && params.charAt(++id[0])=='h' && 
+									(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+								{
+									
+									double r1 = readEqualRealUnit(id, params);
+									double r2 = readRealUnit(id, params, true); // We read the second parameter
+									
+									p.dashBlack = r1;
+									p.dashWhite = r2;
+									
+									if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+									
+								}else throw new IgnoreCommandException(-1);
+								break;
+								
+							case 'x'://dx = real unit
+								if(id[0]+1>size) throw new IgnoreCommandException(-1);
+								
+								if((params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+								{
+									p.dxLabelDist = readEqualRealUnit(id, params);
+									if(id[0]<size) goToNextChar(params, id);
+								}
+								else throw new IgnoreCommandException(-1);
+								break;
+								
+							case 'y'://dy = real unit
+								if(id[0]+1>size) throw new IgnoreCommandException(-1);
+								
+								if((params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+								{
+									p.dyLabelDist = readEqualRealUnit(id, params);
+									if(id[0]<size) goToNextChar(params, id);
+								}
+								else throw new IgnoreCommandException(-1);
+								break;
+						
+							default : throw new IgnoreCommandException(-1);
+						}
+						break;
+						
+					case 'a' : 
+						if(++id[0]>size) throw new IgnoreCommandException(-1);
+						
+						switch(params.charAt(id[0]))
+						{
+							case 'r':
+								if(++id[0]>size) throw new IgnoreCommandException(-1);
+								switch(params.charAt(id[0]))
+								{
+									case 'c' : //arc
+										if(id[0]+3>size) throw new IgnoreCommandException(-1);
+										
+										if(params.charAt(++id[0])=='s' && params.charAt(++id[0])=='e' && 
+											params.charAt(++id[0])=='p') // arcsep
+										{
+											if(++id[0]>size) throw new IgnoreCommandException(-1);
+											
+											switch(params.charAt(id[0]))
+											{
+												case 'A' : // arcsepA = Real unit
+													p.arcSepA = readEqualRealUnit(id, params);
+													if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+													break;
+														
+												case 'B' : // arcSepB = Real unit
+													p.arcSepB = readEqualRealUnit(id, params);
+													if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+													break;
+											
+												default : 
+													if(params.charAt(id[0])=='=' || isCharToIgnore(params.charAt(id[0])))
+													{ // arcsep = Real
+														p.arcSep = readEqualReal(id, params);
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+														
+													}else throw new IgnoreCommandException(-1);
+											}
+										}else throw new IgnoreCommandException(-1);
+										
+										break;
+										
+									case 'r' : //arr
+										if(id[0]+2>size) throw new IgnoreCommandException(-1);
+									
+										if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='w')
+										{ // arrow
+											if(++id[0]>size) throw new IgnoreCommandException(-1);
+											
+											switch(params.charAt(id[0]))
+											{
+												case 's' : // arrows
+													
+													if(++id[0]>size) throw new IgnoreCommandException(-1);
+													
+													switch(params.charAt(id[0]))
+													{
+														case 'i' : // arrowsize= Real unit Real
+												
+																if(id[0]+3>size) throw new IgnoreCommandException(-1);
+																
+																if(params.charAt(++id[0])=='z' && params.charAt(++id[0])=='e' && 
+																	(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+																{
+																	p.arrowSizeD = readEqualRealUnit(id, params);
+																	goToNextChar(params, id); // We go to the next token
+																	if(id[0]<size && (Character.isDigit(params.charAt(id[0])) || params.charAt(id[0])=='.')) 
+																		p.arrowSizeN = readReal(params, id, true);// If there is the x, we read it
+																	
+																	if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+																	
+																}else throw new IgnoreCommandException(-1);
+																break;
+															
+														case '=':
+																id[0]++;
+																goToNextChar(params, id);
+																char str = params.charAt(id[0]);
+																
+																if(str!='-')
+																{
+																	p.arrowStyle[0] = String.valueOf(str);
+																	id[0]++;
+																	goToNextChar(params, id);
+																	
+																	if(params.charAt(id[0])!='-')
+																		throw new IgnoreCommandException(-1);
+																}
+																
+																id[0]++;
+																goToNextChar(params, id);
+																
+																if(id[0]<params.length())
+																{
+																	str = params.charAt(id[0]);
+																	
+																	if(str!=',' || str!=']')
+																		p.arrowStyle[1] = String.valueOf(str);
+																	
+																	id[0]++;
+																}
+																break;
+																
+														default: throw new IgnoreCommandException(-1);
+													}
+													break;
+													
+												case 'l' : // arrowlength = Real
+													if(id[0]+6>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='e' && params.charAt(++id[0])=='n' && 
+														params.charAt(++id[0])=='g' && params.charAt(++id[0])=='t' && 
+														params.charAt(++id[0])=='h' &&
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.arrowLgth = readEqualReal(id, params);
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'i' : // arrowinset = Real
+													if(id[0]+5>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='n' && params.charAt(++id[0])=='s' && 
+														params.charAt(++id[0])=='e' && params.charAt(++id[0])=='t' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.arrowInset = readEqualReal(id, params);
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+												
+												default : throw new IgnoreCommandException(-1);
+											} // switch(params.charAt(id[0]))
+										}else throw new IgnoreCommandException(-1);
+										break;
+										
+									default : throw new IgnoreCommandException(-1);
+								} // switch(params.charAt(id[0]))
+								break;
+								
+							case 'x': // ax
+								
+								if(id[0]+6>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='e' && params.charAt(++id[0])=='s' && 
+									params.charAt(++id[0])=='s' &&
+									params.charAt(++id[0])=='t' && params.charAt(++id[0])=='y' && 
+									params.charAt(++id[0])=='l' && params.charAt(++id[0])=='e' && 
+									(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+								{// axestyle
+									p.axesStyle = readEqualString(id, params, true);
+									if(id[0]<size) goToNextChar(params, id);
+								}
+								else throw new IgnoreCommandException(-1);
+								break;
+								
+							default : throw new IgnoreCommandException(-1);
+						}
+						break;
+								
+						
+					case 'g' :
+						
+						if(++id[0]>size) throw new IgnoreCommandException(-1);
+						
+						switch(params.charAt(id[0]))
+						{
+							case 'r' : //gr
+								if(++id[0]>size) throw new IgnoreCommandException(-1);
+								
+								switch(params.charAt(id[0]))
+								{
+									case 'i':
+										if(id[0]+1>size) throw new IgnoreCommandException(-1);
+										if(params.charAt(++id[0])=='d')// grid
+										{ 
+											if(++id[0]>size) throw new IgnoreCommandException(-1);
+											
+											switch(params.charAt(id[0]))
+											{
+												case 'l' ://gridl
+													if(id[0]+4>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='a' && params.charAt(++id[0])=='b' && 
+														params.charAt(++id[0])=='e' && params.charAt(++id[0])=='l')// gridlabel
+													{ 
+														if(++id[0]>size) throw new IgnoreCommandException(-1);
+														
+														switch(params.charAt(id[0]))
+														{
+															case 's' : // gridlabels = Real unit
+																p.gridLabel = readEqualRealUnit(id, params);
+																if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+																break;
+																
+															case 'c' : // gridlabelcolor = string
+																String s = readEqualString(id, params, true);
+																Color c = DviPsColors.getColour(s); // We search the colour
+																if(c!=null) p.labelsGridCol = c;
+																if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+																break;
+															
+															default : throw new IgnoreCommandException(-1);
+														}
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'w' : //gridwidth = Real unit
+													if(id[0]+5>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='i' && params.charAt(++id[0])=='d' && 
+														params.charAt(++id[0])=='t' && params.charAt(++id[0])=='h' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.gridWidth = readEqualRealUnit(id, params);
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'c' : // gridcolor = string
+													if(id[0]+5>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='l' && 
+														params.charAt(++id[0])=='o' && params.charAt(++id[0])=='r' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														String s = readEqualString(id, params, true);
+														Color c = DviPsColors.getColour(s); // We search the colour
+														if(c!=null)	p.gridColor = c;
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'd' : // griddots = Integer
+													if(id[0]+4>size) throw new IgnoreCommandException(-1);
+													
+													if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='t' && 
+														params.charAt(++id[0])=='s' &&
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.gridDots = readEqualInteger(id, params);
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												default : throw new IgnoreCommandException(-1);
+											}
+										}else throw new IgnoreCommandException(-1);
+										break;
+									
+									case 'a'://gra
+										if(++id[0]>size) throw new IgnoreCommandException(-1);
+										if(params.charAt(id[0])=='d')// grad
+										{ 
+											if(++id[0]>size) throw new IgnoreCommandException(-1);
+											switch(params.charAt(id[0]))
+											{
+												case 'b' : //gradbegin
+													if(id[0]+5>size) throw new IgnoreCommandException(-1);
+													if(params.charAt(++id[0])=='e' && params.charAt(++id[0])=='g' && 
+													params.charAt(++id[0])=='i' && params.charAt(++id[0])=='n' && 
+													(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														String r = readEqualString(id, params, true);
+														Color c = DviPsColors.getColour(r); // We search the colour
+														if(c!=null)	p.gradBegin = c;
+														
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+												
+												case 'e' : //gradend
+													if(id[0]+3>size) throw new IgnoreCommandException(-1);
+													if(params.charAt(++id[0])=='n' && params.charAt(++id[0])=='d' && 
+													(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														String r = readEqualString(id, params, true);
+														Color c = DviPsColors.getColour(r); // We search the colour
+														if(c!=null)	p.gradEnd = c;
+														
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+														
+													}else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'l' : //gradlines
+													if(id[0]+5>size) throw new IgnoreCommandException(-1);
+													if(params.charAt(++id[0])=='i' && params.charAt(++id[0])=='n' && 
+														params.charAt(++id[0])=='e' && params.charAt(++id[0])=='s' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+														{
+															p.gradLines = readEqualInteger(id, params);
+															if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+															
+														} else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'm' : //gradmidpoint
+													if(id[0]+9>size) throw new IgnoreCommandException(-1);
+													if(params.charAt(++id[0])=='i' && params.charAt(++id[0])=='d' && 
+														params.charAt(++id[0])=='p' && params.charAt(++id[0])=='o' && 
+														params.charAt(++id[0])=='i' && params.charAt(++id[0])=='n' && 
+														params.charAt(++id[0])=='t' &&
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+														{
+															double midPt = readEqualReal(id, params);
+															if(midPt>=0 && midPt<=1)
+																p.gradMidPoint = midPt;
+															if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+															
+														} else throw new IgnoreCommandException(-1);
+													break;
+													
+												case 'a' : //gradangle
+													if(id[0]+5>size) throw new IgnoreCommandException(-1);
+													if(params.charAt(++id[0])=='n' && params.charAt(++id[0])=='g' && 
+														params.charAt(++id[0])=='l' && params.charAt(++id[0])=='e' && 
+														(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+														{
+															p.gradAngle = readEqualReal(id, params);
+															if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+															
+														} else throw new IgnoreCommandException(-1);
+													break;
+											
+												default : throw new IgnoreCommandException(-1);
+											}
+										}else throw new IgnoreCommandException(-1);
+										
+										break;
+										
+									default : throw new IgnoreCommandException(-1);
+								}
+								break;	
+								
+							case 'a' : //gangle
+								if(id[0]+5>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='n' && params.charAt(++id[0])=='g' && 
+									params.charAt(++id[0])=='l' && params.charAt(++id[0])=='e' && 
+									(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+									{
+										p.gangle = readEqualReal(id, params);
+										if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+										
+									} else throw new IgnoreCommandException(-1);
+								break;
+									
+							default : throw new IgnoreCommandException(-1);
+						}
+						
+						
+						
+						break;
+						
+					case 'l' : 
+						if(id[0]+1>size) throw new IgnoreCommandException(-1);
+						
+						switch(params.charAt(++id[0]))
+						{
+							case 'i':// li
+								if(id[0]+2>size) throw new IgnoreCommandException(-1);
+								if(params.charAt(++id[0])=='n' && params.charAt(++id[0])=='e')// line
+								{ 
+									if(++id[0]>size) throw new IgnoreCommandException(-1);
+									
+									switch(params.charAt(id[0]))
+									{
+										case 'w' : // linewidth = Real unit
+											if(id[0]+5>size) throw new IgnoreCommandException(-1);
+											
+											if(params.charAt(++id[0])=='i' && params.charAt(++id[0])=='d' && 
+												params.charAt(++id[0])=='t' && params.charAt(++id[0])=='h' &&
+												(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+											{
+												p.lineWidth = readEqualRealUnit(id, params);
+												if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+												
+											}else throw new IgnoreCommandException(-1);
+											break;
+											
+										case 'c' : // lineColor = string
+											if(id[0]+5>size) throw new IgnoreCommandException(-1);
+											
+											if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='l' && 
+												params.charAt(++id[0])=='o' && params.charAt(++id[0])=='r' &&
+												(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+											{
+												String r = readEqualString(id, params, true);
+												Color c = DviPsColors.getColour(r); // We search the colour
+												if(c!=null)	p.lineColor = c;
+												
+												if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+												
+											}else throw new IgnoreCommandException(-1);
+											break;
+											
+										case 'a' : // linearc = Real unit
+											if(id[0]+3>size) throw new IgnoreCommandException(-1);
+											
+											if(params.charAt(++id[0])=='r' && params.charAt(++id[0])=='c' && 
+												(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+											{
+												p.lineArc = readEqualRealUnit(id, params);
+												if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+												
+											}else throw new IgnoreCommandException(-1);
+											break;
+											
+										case 's' : // linestyle = string
+											if(id[0]+5>size) throw new IgnoreCommandException(-1);
+											
+											if(params.charAt(++id[0])=='t' && params.charAt(++id[0])=='y' && 
+												params.charAt(++id[0])=='l' && params.charAt(++id[0])=='e' && 
+												(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+											{
+												p.lineStyle = readEqualString(id, params, false);
+												if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+											}
+											else throw new IgnoreCommandException(-1);
+											break;
+									
+										default : throw new IgnoreCommandException(-1);
+									}
+								}else throw new IgnoreCommandException(-1);
+								break;
+								
+							case 'a':// la
+								if(id[0]+5>size) throw new IgnoreCommandException(-1);
+								if(params.charAt(++id[0])=='b' && params.charAt(++id[0])=='e' &&
+									params.charAt(++id[0])=='l' && params.charAt(++id[0])=='s'&& 
+									(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+								{ 
+									p.labels = readEqualString(id, params, false);
+									if(id[0]<size) goToNextChar(params, id);
+								}
+								else throw new IgnoreCommandException(-1);
+								break;
+								
+							default : throw new IgnoreCommandException(-1);
+						}
+						
+						break;
+						
+					case 'f' :
+						if(++id[0]>size) throw new IgnoreCommandException(-1);
+						
+						switch(params.charAt(id[0]))
+						{
+							case 'i': //fi
+								if(id[0]+2>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='l' && params.charAt(++id[0])=='l')//fill
+								{
+									if(++id[0]>size) throw new IgnoreCommandException(-1);
+									if(params.charAt(id[0])=='c')//fillc
+									{
+										if(id[0]+5>size) throw new IgnoreCommandException(-1);
+										
+										if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='l' && 
+											params.charAt(++id[0])=='o' && params.charAt(++id[0])=='r' && 
+											(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+										{ // fillColor = string
+											String r = readEqualString(id, params, true);
+											Color c = DviPsColors.getColour(r); // We search the colour
+											if(c!=null) p.fillColor = c;
+
+											if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+											
+										}else throw new IgnoreCommandException(-1);
+									}else
+									if(params.charAt(id[0])=='s')//fills
+									{
+										if(id[0]+5>size) throw new IgnoreCommandException(-1);
+										
+										if(params.charAt(++id[0])=='t' && params.charAt(++id[0])=='y' && 
+											params.charAt(++id[0])=='l' && params.charAt(++id[0])=='e' && 
+											(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+										{ // fillstyle = string
+											String r = readEqualString(id, params, false);
+											
+											if(id[0]<size && params.charAt(id[0])=='*') // We add the '*' the fillstyle
+											{
+												r+=String.valueOf(params.charAt(id[0]));
+												id[0]++;
+											}
+											
+											p.fillStyle = r;
+											if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+											
+										}else throw new IgnoreCommandException(-1);
+									}else throw new IgnoreCommandException(-1);
+								}else throw new IgnoreCommandException(-1);
+								
+								break;
+								
+							case 'r': //fr 
+								
+								if(id[0]+3>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='a' && params.charAt(++id[0])=='m' && params.charAt(++id[0])=='e')
+								{//frame
+									if(id[0]+1>size) throw new IgnoreCommandException(-1);
+									
+									switch(params.charAt(++id[0]))
+									{
+										case 'a' : // framearc
+											if(id[0]+3>size) throw new IgnoreCommandException(-1);
+											if(params.charAt(++id[0])=='r' && params.charAt(++id[0])=='c' && 
+												(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.frameArc = readEqualReal(id, params);
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+														
+													} else throw new IgnoreCommandException(-1);
+											break;
+											
+										case 's' : // framesep
+											if(id[0]+3>size) throw new IgnoreCommandException(-1);
+											if(params.charAt(++id[0])=='e' && params.charAt(++id[0])=='p' && 
+												(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+													{
+														p.frameSep = readEqualRealUnit(id, params);
+														if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+														
+													} else throw new IgnoreCommandException(-1);
+											break;
+											
+										default :
+											throw new IgnoreCommandException(-1);
+									}
+								}else throw new IgnoreCommandException(-1);
+									
+								break;
+								
+							default : throw new IgnoreCommandException(-1);
+						}
+						break;
+						
+					case 'b' :
+						if(++id[0]>size) throw new IgnoreCommandException(-1);
+						
+						switch(params.charAt(id[0]))
+						{
+							case 'o' ://bo
+								if(id[0]+1>size) throw new IgnoreCommandException(-1);
+								
+								switch(params.charAt(++id[0]))
+								{
+									case 'r'://bor
+										if(id[0]+3>size) throw new IgnoreCommandException(-1);
+										
+										if(params.charAt(++id[0])=='d' && params.charAt(++id[0])=='e' &&
+											params.charAt(++id[0])=='r')//border
+										{
+											if(++id[0]>size) throw new IgnoreCommandException(-1);
+											if(params.charAt(id[0])=='c')//borderc
+											{
+												if(id[0]+5>size) throw new IgnoreCommandException(-1);
+												if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='l' && params.charAt(++id[0])=='o' &&
+													params.charAt(++id[0])=='r' && (params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+												{ // bordercolor = string
+													String r = readEqualString(id, params, true);
+													Color c = DviPsColors.getColour(r); // We search the colour
+													if(c!=null) p.borderColor = c;
+													if(id[0]<size) goToNextChar(params, id);
+													
+												}else throw new IgnoreCommandException(-1);
+											}else
+												if(params.charAt(id[0])=='=' || isCharToIgnore(params.charAt(id[0])))
+												{// border = Real unit
+													p.border = readEqualRealUnit(id, params);
+													if(id[0]<size) goToNextChar(params, id); 
+													
+												}else throw new IgnoreCommandException(-1);
+										}else throw new IgnoreCommandException(-1);
+										break;
+										
+									case 'x' ://boxsep
+										if(id[0]+4>size) throw new IgnoreCommandException(-1);
+										if(params.charAt(++id[0])=='s' && params.charAt(++id[0])=='e' &&
+											params.charAt(++id[0])=='p' && (params.charAt(++id[0])=='=' || 
+											isCharToIgnore(params.charAt(id[0]))))//boxsep
+										{
+											String s = readEqualString(id, params, false);
+											if(s.equals("true")) 		 p.boxSep = true;//$NON-NLS-1$
+											else if(s.equals("false")) p.boxSep = false;//$NON-NLS-1$
+												
+											if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+											
+										}else throw new IgnoreCommandException(-1);
+										
+										break;
+										
+									default :
+										throw new IgnoreCommandException(-1);
+								}
+								break;
+								
+								
+							case 'r' :
+								if(id[0]+12>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='a' && params.charAt(++id[0])=='c' && params.charAt(++id[0])=='k' &&
+									params.charAt(++id[0])=='e' && params.charAt(++id[0])=='t' && params.charAt(++id[0])=='l' && 
+									params.charAt(++id[0])=='e' && params.charAt(++id[0])=='n' && params.charAt(++id[0])=='g' && 
+									params.charAt(++id[0])=='t' && params.charAt(++id[0])=='h' && (params.charAt(++id[0])=='=' || 
+									isCharToIgnore(params.charAt(id[0]))))
+									{
+										p.arrowBrLgth = readEqualReal(id, params);
+										if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+										
+									} else throw new IgnoreCommandException(-1);
+								break;
+								
+							default : throw new IgnoreCommandException(-1);
+						}
+						break;
+						
+					case 'c' :
+						if(++id[0]>size) throw new IgnoreCommandException(-1);
+						
+						switch(params.charAt(id[0]))
+						{
+							case 'o' : // cornersize = absolute/relative
+								if(id[0]+9>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='r' && params.charAt(++id[0])=='n' && params.charAt(++id[0])=='e' &&
+									params.charAt(++id[0])=='r' && params.charAt(++id[0])=='s' && params.charAt(++id[0])=='i' &&
+									params.charAt(++id[0])=='z' && params.charAt(++id[0])=='e' &&(params.charAt(++id[0])=='=' || 
+									isCharToIgnore(params.charAt(id[0]))))
+									{
+										String r = readString(params, id, false); // We read the parameter
+										r = r.toLowerCase();
+										if(r.equals(PSTricksConstants.TOKEN_ABSOLUTE))
+											p.isCornerRel = false;
+										else if(r.equals(PSTricksConstants.TOKEN_RELATIVE))
+											p.isCornerRel = true;
+										
+										if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+										
+									} else throw new IgnoreCommandException(-1);
+								break;
+								
+							case 'u' : // curvate = Real Real Real
+								if(id[0]+6>size) throw new IgnoreCommandException(-1);
+								
+								if(params.charAt(++id[0])=='r' && params.charAt(++id[0])=='v' && params.charAt(++id[0])=='a' &&
+									params.charAt(++id[0])=='t' && params.charAt(++id[0])=='e' && (params.charAt(++id[0])=='=' || 
+									isCharToIgnore(params.charAt(id[0]))))
+									{
+										p.curvature1 = readEqualReal(id, params); // We read the first parameter
+										p.curvature2 = readReal(params, id, true); // We read the second parameter
+										p.curvature3 = readReal(params, id, true); // We read the third parameter
+										if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+										
+									} else throw new IgnoreCommandException(-1);
+								break;
+								
+							default : throw new IgnoreCommandException(-1);
+						}
+						break;
+						
+					case 'o' : // origin = {Real unit, Real unit}
+					
+						if(id[0]+6>size) throw new IgnoreCommandException(-1);
+						
+						if(params.charAt(++id[0])=='r' && params.charAt(++id[0])=='i' && params.charAt(++id[0])=='g' &&
+							params.charAt(++id[0])=='i' && params.charAt(++id[0])=='n' && (params.charAt(++id[0])=='=' || 
+							isCharToIgnore(params.charAt(id[0]))))
+						{
+							readChar(params, '=', id);
+							readChar(params, '{', id);
+
+							double x=Double.NaN, y=Double.NaN;
+							
+							goToNextChar(params, id); // We go to the next token
+							if(id[0]<size && (Character.isDigit(params.charAt(id[0])) || params.charAt(id[0])=='.' || 
+								params.charAt(id[0])=='-'))
+								x = readRealUnit(id, params, true);// If there is the x, we read it
+							
+							readChar(params, ',', id);
+							
+							goToNextChar(params, id); // We go to the next token
+							if(id[0]<size && (Character.isDigit(params.charAt(id[0])) || params.charAt(id[0])=='.' || 
+								params.charAt(id[0])=='-')) 
+								y = readRealUnit(id, params, true);// If there is the y, we read it
+							
+							readChar(params, '}', id);
+							
+							if(!Double.isNaN(x)) p.origin.x = x;
+							if(!Double.isNaN(y)) p.origin.y = y;
+							
+							if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+
+						}else throw new IgnoreCommandException(-1);
+						break;
+						
+					case 'h' : 
+						
+						if(id[0]+4>size) throw new IgnoreCommandException(-1);
+						
+						if(params.charAt(++id[0])=='a' && params.charAt(++id[0])=='t' && 
+							params.charAt(++id[0])=='c' && params.charAt(++id[0])=='h')
+						{
+							if(++id[0]>size) throw new IgnoreCommandException(-1);
+							
+							switch(params.charAt(id[0]))
+							{
+								case 'a' : // hatchangle = Real
+									if(id[0]+5>size) throw new IgnoreCommandException(-1);
+									
+									if(params.charAt(++id[0])=='n' && params.charAt(++id[0])=='g' && 
+										params.charAt(++id[0])=='l' && params.charAt(++id[0])=='e' &&
+										(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+										{
+											p.hatchAngle = readEqualReal(id, params);
+											if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+											
+										}else throw new IgnoreCommandException(-1);
+									break;
+								
+								case 'w' : // hatchwidth = Real unit
+									if(id[0]+5>size) throw new IgnoreCommandException(-1);
+									
+									if(params.charAt(++id[0])=='i' && params.charAt(++id[0])=='d' && 
+										params.charAt(++id[0])=='t' && params.charAt(++id[0])=='h' &&
+										(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+										{
+											p.hatchWidth = readEqualRealUnit(id, params);
+											if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+											
+										}else throw new IgnoreCommandException(-1);
+									break;	
+									
+								case 's' : // hatchsep = Real unit
+									if(id[0]+3>size) throw new IgnoreCommandException(-1);
+									
+									if(params.charAt(++id[0])=='e' && params.charAt(++id[0])=='p' && 
+										(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+										{
+											p.hatchSep = readEqualRealUnit(id, params);
+											if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+											
+										}else throw new IgnoreCommandException(-1);
+									break;
+									
+								case 'c' : // hatchcolor = colour
+									if(id[0]+5>size) throw new IgnoreCommandException(-1);
+									
+									if(params.charAt(++id[0])=='o' && params.charAt(++id[0])=='l' && 
+										params.charAt(++id[0])=='o' && params.charAt(++id[0])=='r' &&
+										(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+										{
+											String r = readEqualString(id, params, true);
+											Color c = DviPsColors.getColour(r); // We search the colour
+											if(c!=null) p.hatchCol = c;
+	
+											if(id[0]<size) goToNextChar(params, id); // We go to the next token : ','
+											
+										}else throw new IgnoreCommandException(-1);
+									break;	
+									
+								default : throw new IgnoreCommandException(-1);
+							}
+						}else throw new IgnoreCommandException(-1);
+						break;
+				
+					case 'r' :// rbracketlength = Real
+						
+						if(id[0]+14>size) throw new IgnoreCommandException(-1);
+						
+						if(params.charAt(++id[0])=='b' && params.charAt(++id[0])=='r' && params.charAt(++id[0])=='a' &&
+							params.charAt(++id[0])=='c' && params.charAt(++id[0])=='k' && params.charAt(++id[0])=='e' &&
+							params.charAt(++id[0])=='t' && params.charAt(++id[0])=='l' && params.charAt(++id[0])=='e' &&
+							params.charAt(++id[0])=='n' && params.charAt(++id[0])=='g' && params.charAt(++id[0])=='t' &&
+							params.charAt(++id[0])=='h' && (params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+							{
+								p.arrowrBrLgth = readEqualReal(id, params);
+								if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+								
+							} else throw new IgnoreCommandException(-1);
+						break;
+						
+					case 't' :
+						if(id[0]+1>size) throw new IgnoreCommandException(-1);
+						
+						switch(params.charAt(++id[0]))
+						{
+							case 'b': //tb
+								if(params.charAt(++id[0])=='a' && params.charAt(++id[0])=='r' &&
+									params.charAt(++id[0])=='s' && params.charAt(++id[0])=='i' && params.charAt(++id[0])=='z' &&
+									params.charAt(++id[0])=='e' && (params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+								{ // tbarsize = Real unit Real
+									p.arrowTBarSD = readEqualRealUnit(id, params);
+									if(id[0]<size) goToNextChar(params, id); // We go to the next token
+									if(id[0]<size && (Character.isDigit(params.charAt(id[0])) || params.charAt(id[0])=='.')) 
+										p.arrowTBarSN = readReal(params, id, true);// If there is the x, we read it
+									
+									if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+								}
+								else throw new IgnoreCommandException(-1);
+								break;
+								
+							case 'i': //ti
+								if(id[0]+3>size) throw new IgnoreCommandException(-1);
+								if(params.charAt(++id[0])=='c' && params.charAt(++id[0])=='k' && 
+									params.charAt(++id[0])=='s')
+								{ // ticks
+									if(id[0]+1>size) throw new IgnoreCommandException(-1);
+									switch(params.charAt(++id[0]))
+									{
+										case 't'://tickst
+											if(id[0]+4>size) throw new IgnoreCommandException(-1);
+											if(params.charAt(++id[0])=='y' && params.charAt(++id[0])=='l' &&
+												params.charAt(++id[0])=='e' && (params.charAt(++id[0])=='=' || 
+												isCharToIgnore(params.charAt(id[0]))))
+											{//tickstyle = string
+												p.ticksStyle = readString(params, id, false);
+												if(id[0]<size) goToNextChar(params, id);
+											}
+											else throw new IgnoreCommandException(-1);
+											break;
+											
+										case 'i'://ticksi
+											if(id[0]+3>size) throw new IgnoreCommandException(-1);
+											if(params.charAt(++id[0])=='z' && params.charAt(++id[0])=='e' &&
+												(params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+											{//ticksize = real unit
+												p.ticksSize = readEqualRealUnit(id, params);
+												if(id[0]<size) goToNextChar(params, id);
+											}
+											else throw new IgnoreCommandException(-1);
+											break;
+											
+										default :
+											if(params.charAt(id[0])=='=' || isCharToIgnore(params.charAt(id[0])))//ticks = string
+											{
+												p.ticks = readString(params, id, false);
+												if(id[0]<size) goToNextChar(params, id);
+											}
+											else throw new IgnoreCommandException(-1);
+									}
+								}
+								break;
+						}
+						break;
+				
+					case 'u' : // unit = Real unit
+						
+						if(id[0]+4>size) throw new IgnoreCommandException(-1);
+						
+						if(params.charAt(++id[0])=='n' && params.charAt(++id[0])=='i' && 
+							params.charAt(++id[0])=='t' && (params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+						{
+							double r = readEqualReal(id, params); // We read the parameter
+							
+							goToNextChar(params, id); // We go to the next token
+							
+							if(id[0]<size && Character.isLetter(params.charAt(id[0])) && params.charAt(id[0])!=',') 
+							{
+								String lgth = readString(params, id, false);// If there is a unit of length, we read it
+								r = convertInCm(r, lgth);
+								p.unit = r;
+							}
+							else
+								p.unit *= r;
+							
+							if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+							
+						}else throw new IgnoreCommandException(-1);
+						break;
+						
+					case 'x' : // xunit = Real unit
+						
+						if(id[0]+5>size) throw new IgnoreCommandException(-1);
+						
+						if(params.charAt(++id[0])=='u' && params.charAt(++id[0])=='n' && params.charAt(++id[0])=='i' && 
+							params.charAt(++id[0])=='t' && (params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+						{
+							double r = readEqualReal(id, params); // We read the parameter
+							goToNextChar(params, id); // We go to the next token
+							
+							if(id[0]<size && Character.isLetter(params.charAt(id[0])) && params.charAt(id[0])!=',') 
+							 	p.xUnit = convertInCm(r, readString(params, id, false));
+							else p.xUnit *= r;
+							
+							if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+							
+						}else throw new IgnoreCommandException(-1);
+						break;
+						
+					case 'y' : // yunit = Real unit
+						if(id[0]+5>size) throw new IgnoreCommandException(-1);
+						
+						if(params.charAt(++id[0])=='u' && params.charAt(++id[0])=='n' && params.charAt(++id[0])=='i' && 
+							params.charAt(++id[0])=='t' && (params.charAt(++id[0])=='=' || isCharToIgnore(params.charAt(id[0]))))
+						{
+							double r = readEqualReal(id, params); // We read the parameter
+							goToNextChar(params, id); // We go to the next token
+							
+							if(id[0]<size && Character.isLetter(params.charAt(id[0])) && params.charAt(id[0])!=',') 
+							     p.yUnit = convertInCm(r, readString(params, id, false));
+							else p.yUnit *= r;
+							
+							if(id[0]<size) goToNextChar(params, id); // We go to the next token : the comma
+							
+						}else throw new IgnoreCommandException(-1);
+						break;
+						
+					case 'O': 
+						if(id[0]+1>size) throw new IgnoreCommandException(-1);
+						
+						switch(params.charAt(++id[0]))
+						{
+							case 'x': // Ox
+								p.ox = readEqualReal(id, params);
+								if(id[0]<size) goToNextChar(params, id);
+								break;
+								
+							case 'y': // Oy
+								p.oy = readEqualReal(id, params);
+								if(id[0]<size) goToNextChar(params, id); 
+								break;
+								
+							default: throw new IgnoreCommandException(-1);
+						}
+						break;
+						
+					case 'D':
+						if(id[0]+1>size) throw new IgnoreCommandException(-1);
+						
+						switch(params.charAt(++id[0]))
+						{
+							case 'x': // Dx
+								p.dxIncrement = readEqualReal(id, params);
+								if(id[0]<size) goToNextChar(params, id);
+								break;
+								
+							case 'y': // Dy
+								p.dyIncrement = readEqualReal(id, params);
+								if(id[0]<size) goToNextChar(params, id); 
+								break;
+								
+							default: throw new IgnoreCommandException(-1);
+						}
+						break;
+						
+					case 9 : // '\t'
+					case ',' :
+					case ' ' :
+						id[0]++;
+						break;
+						
+					default : 
+						if(isCharToIgnore(params.charAt(id[0]))) id[0]++;
+						else throw new IgnoreCommandException(-1);
+				}//switch
+			}
+			catch(IgnoreCommandException e) // We jump to the next parameter
+			{
+				int cptPar = 0;
+				int cptBrack = 0;
+				while(id[0]<size && (params.charAt(id[0])!=',' || cptPar!=0 || cptBrack!=0))
+				{
+					if(params.charAt(id[0])=='{') cptBrack++;
+					else if(params.charAt(id[0])=='(') cptPar++;
+					else if(params.charAt(id[0])=='}') cptBrack--;
+					else if(params.charAt(id[0])==')') cptPar--;
+					id[0]++;
+				}
+				id[0]++;
+			}
+		}//while
+	}//public void parseOptionsFigure
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to convert a value with a given unit of length (cm, pt, mm, in, or null)
+	 * to centimetre
+	 * @param value The value to convert
+	 * @param lgth The unit of length of value
+	 * @return The value in centimetre
+	 * @throws IgnoreCommandException If the given unit of length is invalid
+	 */
+	public static double convertInCm(double value, String lgth) throws IgnoreCommandException
+	{
+		if(lgth==null || lgth.length()==0) return value;
+		lgth = lgth.toLowerCase();
+		
+		if(lgth.equals(PSTricksConstants.TOKEN_PS_PT))
+			value/= PSTricksConstants.CM_VAL_PT; //by default the unit is postscript point
+		else if(lgth.equals(PSTricksConstants.TOKEN_INCH))
+			value*=PSTricksConstants.INCH_VAL_CM;
+		else if(lgth.equals(PSTricksConstants.TOKEN_MM))
+			value/=10.;
+		else if(!lgth.equals(PSTricksConstants.TOKEN_CM))
+			throw new IgnoreCommandException(-1);
+		
+		return value;
+	}
+
+
+
+
+	/**
+	 * Allows to read the next real in the string.
+	 * @param str The source.
+	 * @param id The position to start the research (we use a pointer to return the position at the end of the research.
+	 * @param errorOnCharBefore If a non-digit character is parsed before the real, and IgnoreCommand exception will occur.
+	 * @return The real.
+	 * @throws IgnoreCommandException If the next real is unreachable.
+	 */
+	public static double readReal(String str, int[] id, boolean errorOnCharBefore) throws IgnoreCommandException
+	{
+		try
+		{
+			if(id==null || id.length<1) throw new IgnoreCommandException(-1);
+			
+			int size = str.length(), i = id[0];
+			String realS = ""; //$NON-NLS-1$
+			boolean point = false;
+			boolean negative = false;
+			boolean positive = false;
+			boolean isNegatif = false;
+			
+			while(i<size && str.charAt(i)!='.' && str.charAt(i)!='-' && str.charAt(i)!='+' && (str.charAt(i)<'0' || str.charAt(i)>'9')) 
+			{
+				if(errorOnCharBefore && str.charAt(i)!='\t' && str.charAt(i)!='\n' && str.charAt(i)!=' ' && str.charAt(i)!='\r') 
+					throw new IgnoreCommandException(-1);
+				i++;
+			}
+			
+			if(i>=size) throw new IgnoreCommandException(-1);
+			if(str.charAt(i)=='.') 
+			{ 
+				point = true; 
+				realS='.'+realS;
+			}
+			else if(str.charAt(i)=='-') { negative = true; isNegatif = true; }
+			else if(str.charAt(i)=='+') positive = true;
+			else realS+=String.valueOf(str.charAt(i));
+			i++;
+			boolean again = true;
+			
+			while(again)
+			{
+				again = false;
+				while(i<size && str.charAt(i)=='+')
+				{
+					positive=true;
+					again=true;
+					i++;
+				}
+				
+				while(i<size && str.charAt(i)=='-')
+				{
+					negative=true;
+					again=true;
+					i++;
+					isNegatif=!isNegatif;
+				}
+			}
+			
+			while(i<size && (str.charAt(i)=='.' || str.charAt(i)=='-' || str.charAt(i)=='+' ||
+					(str.charAt(i)>='0' && str.charAt(i)<='9')))
+			{
+				if(str.charAt(i)=='.' && point) throw new IgnoreCommandException(-1);
+				else if(str.charAt(i)=='-' && negative) throw new IgnoreCommandException(-1);
+				else if(str.charAt(i)=='+' && positive) throw new IgnoreCommandException(-1);
+				
+				realS+=String.valueOf(str.charAt(i));
+				i++;
+			}
+			
+			id[0] = i;
+			
+			if(isNegatif)
+				realS='-'+realS;
+	
+			return Double.valueOf(realS);
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			throw new IgnoreCommandException(-1);
+		}
+	}
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to read the next string in the source str (the separator is ' ')
+	 * @param str The source
+	 * @param id The position to start the research (we use a pointer to return the position
+	 * at the end of the research
+	 * @return The string
+	 * @throws IgnoreCommandException If the next string is unreachable
+	 */
+	public static String readString(String str, int[] id, boolean withNumber) 
+				throws IgnoreCommandException
+	{
+		try
+		{
+			if(id==null || id.length<1) throw new IgnoreCommandException(-1);
+		
+			int size = str.length(), i = id[0];
+			String string = "";//$NON-NLS-1$
+
+			if(withNumber)
+			{
+				while(i<size && (str.charAt(i)<'a' || str.charAt(i)>'z') &&
+					(str.charAt(i)<'A' || str.charAt(i)>'Z') && (str.charAt(i)<'0' || str.charAt(i)>'9')) i++;
+				if(i>=size) throw new IgnoreCommandException(-1);
+				while(i<size && ((str.charAt(i)>='a' && str.charAt(i)<='z') ||
+						(str.charAt(i)>='A' && str.charAt(i)<='Z')|| (str.charAt(i)>='0' && str.charAt(i)<='9')))
+				{
+					string+=String.valueOf(str.charAt(i));
+					i++;
+				}
+			}
+			else
+			{
+				
+				while(i<size && (str.charAt(i)<'a' || str.charAt(i)>'z') &&
+					(str.charAt(i)<'A' || str.charAt(i)>'Z')) i++;
+				if(i>=size) throw new IgnoreCommandException(-1);
+				while(i<size && ((str.charAt(i)>='a' && str.charAt(i)<='z') ||
+						(str.charAt(i)>='A' && str.charAt(i)<='Z')))
+				{
+					string+=String.valueOf(str.charAt(i));
+					i++;
+				}
+			}
+			id[0] = i;
+			
+			return string;
+			
+		}catch(Exception e) { throw new IgnoreCommandException(-1); }
+	}
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to read the next integer in the string
+	 * @param str The source
+	 * @param id The position to start the research (we use a pointer to return the position
+	 * at the end of the research
+	 * @return The integer
+	 * @throws IgnoreCommandException If the next integer is unreachable
+	 */
+	public static int readInteger(String str, int[] id) throws IgnoreCommandException
+	{
+		try
+		{
+			if(id==null || id.length<1) throw new IgnoreCommandException(-1);
+			
+			int size = str.length(), i = id[0];
+			String realS = "";//$NON-NLS-1$
+			
+			while(i<size && ((str.charAt(i)<'0' || str.charAt(i)>'9') && str.charAt(id[0])!='+')) i++;
+			if(i>=size) throw new IgnoreCommandException(-1);
+			
+			boolean positif = str.charAt(id[0])=='+';
+			if(positif) i++;
+			while(str.charAt(i)=='+')
+				i++;
+			
+			while(i<size && ((str.charAt(i)>='0' && str.charAt(i)<='9') || str.charAt(i)=='+'))
+			{
+				if(str.charAt(i)=='+')
+				{
+					if(positif)
+						throw new IgnoreCommandException(-1);
+					positif = true;
+				}
+				else
+				{
+					realS+=String.valueOf(str.charAt(i));
+					i++;
+				}
+			}
+			
+			id[0] = i;
+			
+			return Integer.valueOf(realS);
+		
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			throw new IgnoreCommandException(-1);
+		}
+	}
+	
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to go to the next char (not ' ', '\t', '\n', '\r')
+	 * @param str The source
+	 * @param id The position of start
+	 * @throws IgnoreCommandException If there is no char
+	 */
+	public static void goToNextChar(String str, int[] id) throws IgnoreCommandException
+	{
+		try
+		{
+			if(str==null || id[0]<0) throw new IgnoreCommandException(-1); 
+			
+			int size = str.length(), i = id[0];
+			
+			while(i<size && isCharToIgnore(str.charAt(i)))
+				i++;
+		
+			id[0] = i;
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			throw new IgnoreCommandException(-1);
+		}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to read '= Real unit' 
+	 * @param id The position of the start of the research (a pointer : use id[0])
+	 * @param params The string to parse
+	 * @return The read value in cm
+	 * @throws IgnoreCommandException 
+	 */
+	public static double readEqualRealUnit(int[] id, String params) throws IgnoreCommandException
+	{
+		try
+		{
+			int size = params.length();
+			
+			while(id[0]<size && params.charAt(id[0])!='=') id[0]++; // We search the '='
+			if(id[0]>=size) throw new IgnoreCommandException(-1);
+			id[0]++;
+			
+			goToNextChar(params, id);
+			if((params.charAt(id[0])<'0' || params.charAt(id[0])>'9') &&
+				params.charAt(id[0])!='.' && params.charAt(id[0])!='-')
+				throw new IgnoreCommandException(-1);
+	
+			double r = readReal(params, id, true); // We read the parameter
+	
+			goToNextChar(params, id); // We go to the next token
+	
+			String lgth = null;
+			if(id[0]<size && Character.isLetter(params.charAt(id[0]))) 
+				lgth = readString(params, id, false);// If there is a unit of length, we read it
+			
+			return convertInCm(r, lgth);
+		}catch(Exception e)
+		{ throw new IgnoreCommandException(-1); }
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to read 'Real unit' converted in cm.
+	 * @param id The position of the start of the research (a pointer : use id[0])
+	 * @param params The string to parse
+	 * @param errorOnCharBefore If a non-digit character is parsed before the real, and IgnoreCommand exception will occur.
+	 * @return The read value 
+	 * @throws IgnoreCommandException 
+	 */
+	public static double readRealUnit(int[] id, String params, boolean errorOnCharBefore) throws IgnoreCommandException
+	{
+		int size = params.length(), i;
+
+		goToNextChar(params, id); // We go to the next token
+		double r = readReal(params, id, errorOnCharBefore); // We read the parameter	
+		
+		goToNextChar(params, id);
+		i = id[0];
+		String lgth = null;
+
+		if(id[0]<size && ((params.charAt(id[0])>='a' && params.charAt(id[0])<='z') ||
+			(params.charAt(id[0])>='A' && params.charAt(id[0])<='Z')))
+			try
+			{
+				if(id[0]<size) 
+					lgth = readString(params, id, false);// If there is a unit of length, we read it
+				
+				r = convertInCm(r, lgth);
+			}catch(Exception e) { id[0] = i; }
+		
+		return r;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to read '= string' 
+	 * @param id The position of the start of the research (a pointer : use id[0])
+	 * @param withNumber If true The string can contains number like 'color0'
+	 * @param params The string to parse
+	 * @return The read value 
+	 * @throws IgnoreCommandException 
+	 */
+	public static String readEqualString(int[] id, String params, boolean withNumber) throws IgnoreCommandException
+	{
+		int size = params.length();
+		
+		while(id[0]<size && params.charAt(id[0])!='=') id[0]++; // We search the '='
+		if(id[0]>=size) throw new IgnoreCommandException(-1);
+		id[0]++;
+		
+		return readString(params, id, withNumber); 
+	}
+	
+	
+	
+
+	
+	
+	/**
+	 * Allows to read '= Real' 
+	 * @param id The position of the start of the research (a pointer : use id[0])
+	 * @param params The string to parse
+	 * @return The read value 
+	 * @throws IgnoreCommandException 
+	 */
+	public static double readEqualReal(int[] id, String params) throws IgnoreCommandException
+	{
+		int size = params.length();
+		
+		while(id[0]<size && params.charAt(id[0])!='=') id[0]++; // We search the '='
+		if(id[0]>=size) throw new IgnoreCommandException(-1);
+		id[0]++;
+		
+		goToNextChar(params, id);
+		if((params.charAt(id[0])<'0' || params.charAt(id[0])>='9') &&
+			params.charAt(id[0])!='.' && params.charAt(id[0])!='-' && params.charAt(id[0])!='+')
+			throw new IgnoreCommandException(-1);
+		
+		return readReal(params, id, true); // We read the parameter
+	}
+	
+	
+	
+	/**
+	 * Allows to read '= Integer' 
+	 * @param id The position of the start of the research (a pointer : use id[0])
+	 * @param params The string to parse
+	 * @return The read value 
+	 * @throws IgnoreCommandException 
+	 */
+	public static int readEqualInteger(int[] id, String params) throws IgnoreCommandException
+	{
+		int size = params.length();
+		
+		while(id[0]<size && params.charAt(id[0])!='=') id[0]++; // We search the '='
+		if(id[0]>=size) throw new IgnoreCommandException(-1);
+		id[0]++;
+		
+		goToNextChar(params, id);
+		if((params.charAt(id[0])<'0' || params.charAt(id[0])>='9') && params.charAt(id[0])!='+')
+			throw new IgnoreCommandException(-1);
+		
+		return readInteger(params, id); // We read the parameter
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to read one coordinate: (x,y). Beware, for missing coordinates like (5,)
+	 * this function will return (5,NaN) instead of (5,1); because in several cases, 
+	 * the missing coordinate is very important.
+	 * @param s The string to parse.
+	 * @param i The position of the start.
+	 * @param nLine The number of the line where the code is.
+	 * @return The read coordinate.
+	 * @throws InvalidFormatCommandException If a problem occurred.
+	 */
+	public static Point2D.Double readOneCoordinate(String s, int i, int nLine, boolean withUnit) throws InvalidFormatCommandException
+	{
+		try
+		{
+			int size = s.length();
+			int[] id = {i};
+		
+			while(i<size && s.charAt(id[0])!='(') id[0]++; // We search the '('
+			if(i>=size) throw new InvalidFormatCommandException(nLine);
+			id[0]++;
+			
+			double x;
+			
+			goToNextChar(s, id); // We go to the next token
+		
+			if(id[0]<size && (Character.isDigit(s.charAt(id[0])) || s.charAt(id[0])=='.' || 
+				s.charAt(id[0])=='-' || s.charAt(id[0])=='+')) 
+				if(withUnit) x = readRealUnit(id, s, true);
+				else x = readReal(s, id, true);
+			else x = Double.NaN;
+		
+			while(id[0]<size && s.charAt(id[0])!=',')// We search the ','
+			{
+				if(!isCharToIgnore(s.charAt(id[0])))
+					throw new InvalidFormatCommandException(nLine);
+				id[0]++; // We search the ')'
+			}
+			
+			if(id[0]>=size) throw new InvalidFormatCommandException(nLine);
+			id[0]++;
+			
+			double y;
+			goToNextChar(s, id); // We go to the next token
+			
+			if(id[0]<size && (Character.isDigit(s.charAt(id[0])) || s.charAt(id[0])=='.' || s.charAt(id[0])=='-' || s.charAt(id[0])=='+')) 
+				if(withUnit) y = readRealUnit(id, s, true);
+				else y = readReal(s, id, true);
+			else y = Double.NaN;
+			
+			while(id[0]<size && s.charAt(id[0])!=')') 
+			{
+				if(!isCharToIgnore(s.charAt(id[0])))
+					throw new InvalidFormatCommandException(nLine);
+				id[0]++; // We search the ')'
+			}
+			
+			if(id[0]>=size) throw new InvalidFormatCommandException(nLine);
+			id[0]++;
+			
+			return new Point2D.Double(x, y);
+			
+		}catch(Exception e){throw new InvalidFormatCommandException(nLine);}
+	}
+
+
+
+
+
+	/**
+	 * Actions to do when a line must be parsed
+	 */
+	public abstract int actionsOnLine(int line, boolean hasStar, Vector<PSTricksParameters> ps,
+			String params) throws InvalidFormatCommandException;
+
+
+	/**
+	 * Actions to do when a polygon must be parsed
+	 */
+	public abstract int actionsOnPolygon(int line, boolean hasStar, Vector<PSTricksParameters> ps, 
+			String string) throws InvalidFormatCommandException;
+
+
+	/**
+	 * Actions to do when a diamond or a triangle must be parsed
+	 */
+	public abstract int actionsOnDiamondTriangle(int line, boolean hasStar, Vector<PSTricksParameters> ps, 
+			String string, boolean isDiamondNotTriangle) throws InvalidFormatCommandException;
+
+
+	/**
+	 * Actions to do when a Bézier curve must be parsed
+	 */
+	public abstract int actionsOnBezierCurve(int line, boolean hasStar, Vector<PSTricksParameters> ps, 
+			String string) throws InvalidFormatCommandException;
+
+
+	/**
+	 * Actions to do when an arc or a wedge must be parsed.
+	 */
+	public abstract int actionsOnArcWedge(int line, boolean hasStar, Vector<PSTricksParameters> ps, String params, 
+			boolean isArc) throws InvalidFormatCommandException;
+
+
+	/**
+	 * Actions to do when a grid must be parsed.
+	 */
+	public abstract int actionsOnGridAxes(int line, Vector<PSTricksParameters> ps, Point2D.Double pictureSWPt, 
+			Point2D.Double pictureNEPt, String string, boolean isGrid) throws InvalidFormatCommandException;
+
+
+	
+
+	/**
+	 * Allows to parse a psset command.
+	 * @param str The string to parse.
+	 * @param p The parameters to set.
+	 */
+	public static void parsepssetCommand(String str, PSTricksParameters p)
+	{
+		try
+		{
+			if(str==null || p==null) return;
+			
+			int lgth = str.length();
+			int[] i = {0};
+			
+			while(i[0]<lgth && str.charAt(i[0])!='{') i[0]++;
+			if(i[0]>=lgth) throw new IgnoreCommandException(-1);
+			i[0]++;
+			
+			goToNextChar(str, i);
+			parseOptionsFigure(str.substring(i[0]), p, !p.psCustomP.fromPsCustom);
+		
+		}catch(Exception e){e.printStackTrace();}
+	}
+	
+	
+	
+	
+/*
+	public static void parseuputCommand(String str, @SuppressWarnings("unused")boolean hasStar, Vector<PSTricksParameters> params)
+				throws Exception
+	{
+		if(str==null || str.length()==0 || params==null) throw new InvalidFormatCommandException("uput", -1);
+		
+		int[] i = {0};
+		int size = str.length();
+		double labelSep=PSTricksConstants.DEFAULT_LABEL_SEP, rotation=0, refA=0;
+		Point2D.Double coord = (Point2D.Double)params.lastElement().origin.clone();
+		String refAngle=null;
+	//	boolean isSum = false;
+		
+		goToNextChar(str, i);
+		
+		if(i[0]<size && str.charAt(i[0])=='{') // The labelsep
+		{
+			i[0]++;
+			labelSep = readRealUnit(i, str);
+			if(i[0]<size) goToNextChar(str, i);
+			if(str.charAt(i[0])!='}') throw new InvalidFormatCommandException("uput", -1);
+			i[0]++;
+			if(i[0]<size) goToNextChar(str, i);
+		}
+		
+		if(i[0]<size && str.charAt(i[0])=='[') // The refangle
+		{
+			i[0]++;
+			refAngle = readString(str, i, true);
+			if(i[0]<size) goToNextChar(str, i);
+			if(str.charAt(i[0])!=']') throw new InvalidFormatCommandException("uput", -1);
+			i[0]++;
+			if(i[0]<size) goToNextChar(str, i);
+			
+			try{ refA = Double.valueOf(refAngle);}
+			catch(Exception e)
+			{
+				if(refAngle.length()==1)
+				{
+					char c = refAngle.charAt(0);
+					
+					if(c==PSTricksConstants.TOKEN_UPUT_DOWN)
+						refA = PSTricksConstants.DEFAULT_UPUT_DOWN_ANGLE;
+					else if(c==PSTricksConstants.TOKEN_UPUT_UP)
+						refA = PSTricksConstants.DEFAULT_UPUT_UP_ANGLE;
+					else if(c==PSTricksConstants.TOKEN_UPUT_LEFT)
+						refA = PSTricksConstants.DEFAULT_UPUT_LEFT_ANGLE;
+					else if(c==PSTricksConstants.TOKEN_UPUT_RIGHT)
+						refA = PSTricksConstants.DEFAULT_UPUT_RIGHT_ANGLE;
+				}else
+				{
+					char c2 = refAngle.charAt(1), c1 = refAngle.charAt(0);
+					
+					
+					if( (c1==PSTricksConstants.TOKEN_UPUT_DOWN && c2==PSTricksConstants.TOKEN_UPUT_LEFT) ||
+						(c2==PSTricksConstants.TOKEN_UPUT_DOWN && c1==PSTricksConstants.TOKEN_UPUT_LEFT))
+						refA = PSTricksConstants.DEFAULT_UPUT_UP_RIGHT_ANGLE;
+					else if( (c1==PSTricksConstants.TOKEN_UPUT_UP && c2==PSTricksConstants.TOKEN_UPUT_RIGHT) ||
+						(c2==PSTricksConstants.TOKEN_UPUT_UP && c1==PSTricksConstants.TOKEN_UPUT_RIGHT))
+						refA = PSTricksConstants.DEFAULT_UPUT_UP_RIGHT_ANGLE;
+					else if( (c1==PSTricksConstants.TOKEN_UPUT_UP && c2==PSTricksConstants.TOKEN_UPUT_LEFT) ||
+						(c2==PSTricksConstants.TOKEN_UPUT_UP && c1==PSTricksConstants.TOKEN_UPUT_LEFT))
+						refA = PSTricksConstants.DEFAULT_UPUT_UP_LEFT_ANGLE;
+					else if( (c1==PSTricksConstants.TOKEN_UPUT_DOWN && c2==PSTricksConstants.TOKEN_UPUT_LEFT) ||
+						(c2==PSTricksConstants.TOKEN_UPUT_DOWN && c1==PSTricksConstants.TOKEN_UPUT_LEFT))
+						refA = PSTricksConstants.DEFAULT_UPUT_DOWN_LEFT_ANGLE;
+					else if(c1==PSTricksConstants.TOKEN_UPUT_DOWN && c2==PSTricksConstants.TOKEN_UPUT_DOWN)
+						refA = PSTricksConstants.DEFAULT_UPUT_DOWN_ANGLE;
+					else if(c1==PSTricksConstants.TOKEN_UPUT_UP && c2==PSTricksConstants.TOKEN_UPUT_UP)
+						refA = PSTricksConstants.DEFAULT_UPUT_UP_ANGLE;
+					else if(c1==PSTricksConstants.TOKEN_UPUT_LEFT && c2==PSTricksConstants.TOKEN_UPUT_LEFT)
+						refA = PSTricksConstants.DEFAULT_UPUT_LEFT_ANGLE;
+					else if(c1==PSTricksConstants.TOKEN_UPUT_RIGHT && c2==PSTricksConstants.TOKEN_UPUT_RIGHT)
+						refA = PSTricksConstants.DEFAULT_UPUT_RIGHT_ANGLE;
+					else if(c1==PSTricksConstants.TOKEN_UPUT_RIGHT && c2==PSTricksConstants.TOKEN_UPUT_LEFT)
+						refA = PSTricksConstants.DEFAULT_UPUT_LEFT_ANGLE;
+					else if(c1==PSTricksConstants.TOKEN_UPUT_LEFT && c2==PSTricksConstants.TOKEN_UPUT_RIGHT)
+						refA = PSTricksConstants.DEFAULT_UPUT_RIGHT_ANGLE;
+					else if(c1==PSTricksConstants.TOKEN_UPUT_DOWN && c2==PSTricksConstants.TOKEN_UPUT_UP)
+						refA = PSTricksConstants.DEFAULT_UPUT_UP_ANGLE;
+					else if(c1==PSTricksConstants.TOKEN_UPUT_UP && c2==PSTricksConstants.TOKEN_UPUT_DOWN)
+						refA = PSTricksConstants.DEFAULT_UPUT_DOWN_ANGLE;
+				}
+			}
+		}
+		else throw new InvalidFormatCommandException("uput", -1);
+		
+		if(i[0]<size && str.charAt(i[0])=='{') // The rotation
+		{
+			try
+			{
+				i[0]++;
+				if(str.charAt(i[0])=='*') { i[0]++; }
+				if(Character.isDigit(str.charAt(i[0])) || str.charAt(i[0])=='-' || str.charAt(i[0])=='.')
+					rotation = readReal(str, i);
+				else 
+				{
+					String rot = readString(str, i, true); 
+					if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_0)==0)
+						rotation = 0;
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_0_STAR)==0)
+					{
+						rotation = 0;
+				//		isSum = true;
+					}
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_90)==0)
+						rotation = 90;
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_90_STAR)==0)
+					{
+						rotation = 90;
+					//	isSum = true;
+					}
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_180)==0)
+						rotation = 180;
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_180_STAR)==0)
+					{
+						rotation = 180;
+				//		isSum = true;
+					}
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_270)==0)
+						rotation = 270;
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_270_STAR)==0)
+					{
+						rotation = 270;
+					//	isSum = true;
+					}
+				}
+			}catch(Exception e) {throw new InvalidFormatCommandException("uput", -1);}
+
+			if(i[0]<size) goToNextChar(str, i);
+			if(str.charAt(i[0])!='}') throw new InvalidFormatCommandException("uput", -1);
+			i[0]++;
+			if(i[0]<size) goToNextChar(str, i);
+		}
+		
+		if(i[0]<size && str.charAt(i[0])=='(') // The coordinate
+		{
+			coord = readOneCoordinate(str, i[0], -1);
+			if(coord==null) throw new InvalidFormatCommandException("uput", -1);
+			while(i[0]<size && str.charAt(i[0])!=')') i[0]++;
+			if(i[0]>=size) throw new IgnoreCommandException(-1);
+			i[0]++;
+			if(i[0]<size) goToNextChar(str, i);
+		}
+		else throw new InvalidFormatCommandException("uput", -1);
+		
+		if(i[0]<size && str.charAt(i[0])=='{')
+		{
+			PSTricksParameters p = new PSTricksParameters(params.lastElement());
+
+			if(Double.isNaN(coord.x)) coord.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			if(Double.isNaN(coord.y)) coord.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			
+			p.setPosition(coord.x, coord.y, true, rotation, 0, PositionParameters.REF_POINT_RIGHT, labelSep, refA);
+			if(params.size()>0)
+			{
+				PSTricksParameters p2 = params.lastElement();
+				p.origin.setLocation(p2.origin.x, p2.origin.y);
+			}
+			params.add(p);
+		}
+		else throw new InvalidFormatCommandException("uput", -1);
+	}
+	*/
+	
+	
+	
+	
+	/**
+	 * Allows to parse a rput command
+	 * @param str The string to parse.
+	 * @param hasStar If it is rput*
+	 * @param params The PsTricks parameters
+	 * @throws Exception If the command is invalid
+	 */
+	public static void parserputCommand(String str, boolean hasStar, Vector<PSTricksParameters> params) throws Exception
+	{
+		if(str==null || str.length()==0 || params==null) throw new InvalidFormatCommandException("rput", -1);//$NON-NLS-1$
+		
+		int[] i = {0};
+		int size = str.length();
+		boolean isValidFormat = false;
+		boolean isSumRot=true;
+		String refPt = null;
+		double rotation = 0;
+		Point2D.Double coord = (Point2D.Double)params.lastElement().origin.clone();
+		
+		goToNextChar(str, i);
+			
+		if(i[0]<size && str.charAt(i[0])=='[')
+		{
+			i[0]++;
+			refPt = readString(str, i, false);
+			if(refPt==null || refPt.length()==0) throw new InvalidFormatCommandException("rput", -1);//$NON-NLS-1$
+			if(i[0]<size) goToNextChar(str, i);
+			if(str.charAt(i[0])!=']') throw new InvalidFormatCommandException("rput", -1);//$NON-NLS-1$
+			i[0]++;
+			if(i[0]<size) goToNextChar(str, i);
+		}
+		
+		if(i[0]<size && str.charAt(i[0])=='{')
+		{
+			try
+			{
+				isValidFormat = true;
+				i[0]++;
+				if(str.charAt(i[0])=='*') { isSumRot=false; i[0]++; }
+				if(Character.isDigit(str.charAt(i[0])) || str.charAt(i[0])=='-' || str.charAt(i[0])=='.')
+					rotation = readReal(str, i, true);
+				else 
+				{
+					String rot = readString(str, i, true); 
+					if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_0))
+						rotation = 0;
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_0_STAR))
+					{
+						rotation = 0;
+						isSumRot = false;
+					}else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_90))
+						rotation = 90;
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_90_STAR))
+					{
+						rotation = 90;
+						isSumRot = false;
+					}else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_180))
+						rotation = 180;
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_180_STAR))
+					{
+						rotation = 180;
+						isSumRot = false;
+					}else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_270))
+						rotation = 270;
+					else if(rot.equals(PSTricksConstants.TOKEN_PUT_ANGLE_270_STAR))
+					{
+						rotation = 270;
+						isSumRot = false;
+					}
+				}
+			}catch(Exception e) {throw new InvalidFormatCommandException("rput", -1);}//$NON-NLS-1$
+
+			if(i[0]<size) goToNextChar(str, i);
+			if(str.charAt(i[0])!='}') throw new InvalidFormatCommandException("rput", -1);//$NON-NLS-1$
+			i[0]++;
+			if(i[0]<size) goToNextChar(str, i);
+		}
+		
+		if(i[0]<size && str.charAt(i[0])=='(')
+		{
+			isValidFormat = true;
+			coord = readOneCoordinate(str, i[0], -1, true);
+			if(coord==null) throw new InvalidFormatCommandException("rput", -1);//$NON-NLS-1$
+			while(i[0]<size && str.charAt(i[0])!=')') i[0]++;
+			if(i[0]>=size) throw new IgnoreCommandException(-1);
+			i[0]++;
+			if(i[0]<size) goToNextChar(str, i);
+		}
+		
+		if(i[0]<size && str.charAt(i[0])=='{')
+		{
+			PSTricksParameters p = new PSTricksParameters(params.lastElement());
+
+			if(Double.isNaN(coord.x)) coord.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			if(Double.isNaN(coord.y)) coord.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			
+			int xRefPoint = PositionParameters.REF_POINT_DEFAULT_CENTER;
+			int yRefPoint = PositionParameters.REF_POINT_DEFAULT_CENTER;
+			if(refPt==null) xRefPoint = yRefPoint = PositionParameters.REF_POINT_DEFAULT_CENTER;
+			else
+			{
+				char c = refPt.charAt(0);
+				
+				if(c==PSTricksConstants.TOKEN_RPUT_BASE)
+					xRefPoint = PositionParameters.REF_POINT_BASE;
+				else if(c==PSTricksConstants.TOKEN_RPUT_BOTTOM)
+					xRefPoint = PositionParameters.REF_POINT_BOTTOM;
+				else if(c==PSTricksConstants.TOKEN_RPUT_TOP)
+					xRefPoint = PositionParameters.REF_POINT_TOP;
+				else if(c==PSTricksConstants.TOKEN_RPUT_LEFT)
+					yRefPoint = PositionParameters.REF_POINT_LEFT;
+				else if(c==PSTricksConstants.TOKEN_RPUT_RIGHT)
+					yRefPoint = PositionParameters.REF_POINT_RIGHT;
+
+				if(refPt.length()>1)
+				{
+					c = refPt.charAt(1);
+					if(c==PSTricksConstants.TOKEN_RPUT_BASE)
+						xRefPoint = PositionParameters.REF_POINT_BASE;
+					else if(c==PSTricksConstants.TOKEN_RPUT_BOTTOM)
+						xRefPoint = PositionParameters.REF_POINT_BOTTOM;
+					else if(c==PSTricksConstants.TOKEN_RPUT_TOP)
+						xRefPoint = PositionParameters.REF_POINT_TOP;
+					else if(c==PSTricksConstants.TOKEN_RPUT_LEFT)
+						yRefPoint = PositionParameters.REF_POINT_LEFT;
+					else if(c==PSTricksConstants.TOKEN_RPUT_RIGHT)
+						yRefPoint = PositionParameters.REF_POINT_RIGHT;
+				}
+			}
+			
+			p.setPosition(coord.x, coord.y, isSumRot, rotation, 0, xRefPoint+yRefPoint, 0., 0);
+			if(params.size()>0)
+			{
+				PSTricksParameters p2 = params.lastElement();
+				p.origin.setLocation(p2.origin.x, p2.origin.y);
+			}
+			params.add(p);
+		}else throw new InvalidFormatCommandException("rput", -1);//$NON-NLS-1$
+		
+		if(!isValidFormat) throw new InvalidFormatCommandException("rput", -1);//$NON-NLS-1$
+	}
+	
+	
+	
+	
+	/**
+	 * Allow to move a point according to the parameters (Useful for dots, texts).<br>
+	 */
+	public static Point2D.Double moveCoordinate(Vector<PSTricksParameters> params, Point2D.Double pt)
+	{
+		if(params==null)
+			throw new IllegalArgumentException();
+		
+		int i, size = params.size();
+		double lastAngle=0;
+		Point2D.Double newPt = new Point2D.Double(0, 0);
+		PSTricksParameters p;
+		PositionParameters pos;
+		Vector<Point2D.Double> gcs = new Vector<Point2D.Double>();
+		boolean started = false;
+		
+		if(size==0) return new Point2D.Double(0,0);
+		gcs.add(new Point2D.Double(0,0));
+		
+		for(i=1; i<size; i++)
+		{
+			p = params.elementAt(i);
+			pos = p.getPosition();
+			
+			if(pos!=null)
+			{
+				newPt.x+=pos.dx * (p.unit==PSTricksConstants.DEFAULT_UNIT?  p.xUnit : p.unit);
+				newPt.y+=pos.dy * (p.unit==PSTricksConstants.DEFAULT_UNIT? p.yUnit : p.unit);
+
+				if(pos.angleRput!=0 || !pos.isSumRotation)
+				{
+					if(started)	
+						newPt = rotatePoint(newPt, gcs.lastElement(), toRadians(lastAngle));
+					
+					gcs.add((Point2D.Double)newPt.clone());
+					
+					if(pos.isSumRotation)
+						 lastAngle += (360/params.elementAt(i-1).degrees)*pos.angleRput;
+					else lastAngle =  (360/params.elementAt(i-1).degrees)*pos.angleRput;
+					
+					started = true;
+				}
+			}
+		}
+		
+		if(!gcs.isEmpty() && started)
+			newPt = rotatePoint(new Point2D.Double(newPt.x+pt.x, newPt.y+pt.y), gcs.lastElement(), toRadians(lastAngle));
+			
+		if(!started)
+			newPt.setLocation(newPt.x+pt.x, newPt.y+pt.y);
+		
+		gcs.removeAllElements();
+		
+		return newPt;
+	}
+
+	
+	
+	
+	/**
+	 * Allows to rotate a point with as reference an other point
+	 * @param p The point to rotate
+	 * @param gravityC The point of reference
+	 * @param theta The angle of rotation (in radian)
+	 * @return The rotated point
+	 */
+	public static Point2D.Double rotatePoint(Point2D.Double p, Point2D.Double gravityC, double theta)
+	{
+		if(theta==0) return (Point2D.Double)p.clone();
+		
+		Point2D.Double pt = new Point2D.Double();
+
+		pt.x = cos(theta) * (p.x - gravityC.x) - sin(theta)* (p.y - gravityC.y) + gravityC.x;
+		pt.y = sin(theta) * (p.x - gravityC.x) + cos(theta)* (p.y - gravityC.y) + gravityC.y;
+
+		return pt;
+	}
+
+
+
+	/**
+	 * Allows to parse the command \degrees[...].
+	 * @param cmd The command to parse.
+	 * @param p The current parameters.
+	 * @param nLine The number of the line of the command.
+	 * @return The position of the end of the command in the string cmd.
+	 * @throws InvalidFormatCommandException If the format of the command is not correct.
+	 */
+	public int parseDegreesCommand(String cmd, PSTricksParameters p, int nLine) throws InvalidFormatCommandException
+	{
+		try
+		{
+			int[] i = {0};
+			boolean end = false;
+			
+			while(i[0]<cmd.length() && cmd.charAt(i[0])!='[')
+			{
+				if(cmd.charAt(i[0])=='\\') end = true;
+				else i[0]++;
+			}
+			
+			if(i[0]>=cmd.length()) throw new InvalidFormatCommandException(nLine);
+			
+			double degrees;
+			
+			if(end) degrees = 360;
+			else    degrees = readReal(cmd, i, true);
+			
+			p.onRadians = false;
+			p.degrees = degrees;
+			
+			if(end) return 0;
+			return i[0]+1;
+			
+		}catch(Exception e)
+		{
+			throw new InvalidFormatCommandException("degrees", nLine); //$NON-NLS-1$
+		}
+	}
+
+
+	
+
+	/**
+	 * Action to do when a framed box is parsed.
+	 * @since 1.7
+	 * @param type The kind of box :<br>
+	 * 0: rectangle<br>
+	 * 1: circle<br>
+	 * 2: triangle<br>
+	 * 3: diamond<br>
+	 * 4: ellipse<br>
+	 * 5: double rectangle<br>
+	 * 6: rectangle with shadow<br>
+	 * @throws InvalidFormatCommandException When the format of the command is invalid.
+	 */
+	public abstract int actionsOnFramedBox(int nLine, boolean hasStar, Vector<PSTricksParameters> ps, 
+			String cmd, String params, int type) throws InvalidFormatCommandException;
+	
+	
+	
+	/**
+	 * Action to do when one or several framed boxes have been parsed.
+	 * @since 1.7
+	 * @throws InvalidFormatCommandException When the format of the command is invalid.
+	 */
+	public abstract void actionsOnTerminatedFramedBoxes(Vector<PSTricksParameters> params) 
+			throws InvalidFormatCommandException;
+
+
+
+	
+	/**
+	 * Parse the \begin{figure} command.
+	 * @param f The code to parse.
+	 * @param nLine The number of the current line.
+	 * @throws InvalidFormatCommandException 
+	 * @since 0.3
+	 */
+	public static int parseBeginFigureCmd(String f, int nLine) throws InvalidFormatCommandException
+	{
+		int[] i = {0};
+		try
+		{
+			goToNextChar(f, i);
+			if(f.charAt(i[0])=='[')
+			{
+				i[0]++;
+				goToNextChar(f, i);
+				String code = readString(f, i, false);
+				goToNextChar(f, i);
+				
+				if(f.charAt(i[0])!=']')
+					throw new InvalidFormatCommandException("\\begin{figure}", nLine); //$NON-NLS-1$
+				
+				PSTricksParameters.tokenPosition = code;
+				return i[0]+1;
+			}
+			throw new InvalidFormatCommandException("\\begin{figure}", nLine); //$NON-NLS-1$
+			
+		}catch(IgnoreCommandException e)
+		{
+			throw new InvalidFormatCommandException("\\begin{figure}", nLine); //$NON-NLS-1$
+		}
+		
+	}
+
+
+	/**
+	 * Parses the command <code>pscustom</code>.
+	 * @param line The current line.
+	 * @param hasStar True if the command <code>pscustom</code> has a star.
+	 * @param params The pstricks parameters.
+	 * @param txt The text to parse.
+	 * @return The index of the last parsed token.
+	 * @throws InvalidFormatCommandException If the command is invalid.
+	 * @since 0.3
+	 */
+	public int parsePsCustomCommand(int line, boolean hasStar, Vector<PSTricksParameters> params, 
+									String txt) throws InvalidFormatCommandException
+	{
+		int i[] = {0};
+		PSTricksParameters pstp 	= new PSTricksParameters(params.lastElement());
+		params.add(pstp);
+		pstp.psCustomP.hasStar 		= hasStar;
+		pstp.psCustomP.fromPsCustom = true;
+		
+		try
+		{
+			goToNextChar(txt, i);
+			
+			if(txt.charAt(i[0])=='[') // Analysis of the options
+			{
+				int j = txt.indexOf("]", i[0]+1);//$NON-NLS-1$
+				if(j==-1) throw new InvalidFormatCommandException("pscustom", line); //$NON-NLS-1$
+				
+				parseOptionsFigure(txt.substring(i[0]+1, j), pstp, true);
+				i[0] = j+1;
+				goToNextChar(txt, i);
+			}
+			
+			if(txt.charAt(i[0])=='{')
+				i[0]++;
+			else
+				throw new InvalidFormatCommandException("pscustom", line); //$NON-NLS-1$
+			
+			pstp.isShadow	= false; //shadow, double line must be activated be \openshadow.
+			pstp.dbleLine	= false;
+		
+			return i[0];
+			
+		} catch(IgnoreCommandException e)
+		{
+			throw new InvalidFormatCommandException("pscustom", line); //$NON-NLS-1$
+		}
+	}
+
+
+
+	/**
+	 * Actions to do when a <code>pscustom</code> command is finished.
+	 * @param param The pstricks parameters.
+	 * @since 0.3
+	 */
+	public abstract void actionsOnterminatedPsCustom(PSTricksParameters param) throws NotFullyManagedException;
+
+
+
+	
+	/**
+	 * Parses to parameters of the pstricks command <code>\openshadow</code>.
+	 * @param param The pstricks parameters.
+	 * @param line The number of the current line.
+	 * @param txt The code to parse.
+	 * @return The position of the last parsed token.
+	 * @throws InvalidFormatCommandException If the command is invalid.
+	 * @since 0.3
+	 */
+	public int parseOpenShadowCommand(PSTricksParameters param, int line, String txt) 
+					throws InvalidFormatCommandException
+	{
+		int i[] = {0};
+		
+		try
+		{
+			goToNextChar(txt, i);
+			
+			if(txt.charAt(i[0])=='[') // Analysis of the options
+			{
+				PSTricksParameters pstp = new PSTricksParameters(param);
+				
+				int j = txt.indexOf("]", i[0]+1);//$NON-NLS-1$
+				if(j==-1) throw new InvalidFormatCommandException("openshadow", line); //$NON-NLS-1$
+				
+				parseOptionsFigure(txt.substring(i[0]+1, j), pstp, true);
+				i[0] = j+1;
+				
+				param.shadowAngle 	= pstp.shadowAngle;
+				param.shadowCol		= pstp.shadowCol;
+				param.shadowSize	= pstp.shadowSize;
+			}
+			param.isShadow = true;
+			
+			return i[0];
+			
+		} catch(IgnoreCommandException e)
+		{
+			throw new InvalidFormatCommandException("openshadow", line); //$NON-NLS-1$
+		}
+	}
+
+
+
+	/**
+	 * Actions to do when a command <code>\newpath</code> is parsed.
+	 * @param line The number of the current line.
+	 * @since 0.3
+	 */
+	public abstract void actionsOnNewPath(int line);
+
+
+	
+	/**
+	 * Actions to do when the command <code>\lineto</code is parsed.
+	 * @param line The number of the current line.
+	 * @param params The pstricks parameters.
+	 * @param txt The code to parse.
+	 * @return The position of the last parsed token.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 0.3
+	 */
+	public abstract int actionsOnLineTo(int line, Vector<PSTricksParameters> params, String txt) 
+										throws InvalidFormatCommandException;
+	
+	
+	
+	/**
+	 * Actions to do when the command <code>\curveto</code is parsed.
+	 * @param line The number of the current line.
+	 * @param params The pstricks parameters.
+	 * @param txt The code to parse.
+	 * @return The position of the last parsed token.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 0.3
+	 */
+	public abstract int actionsOnCurveTo(int line, Vector<PSTricksParameters> params, String txt) 
+										throws InvalidFormatCommandException;
+	
+	
+	
+	/**
+	 * Actions to do when the command <code>\moveto</code is parsed.
+	 * @param line The number of the current line.
+	 * @param params The pstricks parameters.
+	 * @param txt The code to parse.
+	 * @return The position of the last parsed token.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 0.3
+	 */
+	public abstract int actionsOnMoveTo(int line, Vector<PSTricksParameters> params, String txt) 
+										throws InvalidFormatCommandException;
+
+
+	
+	/**
+	 * Define actions to do when the pstricks command <code>\closepath</path> is parsed.
+	 * @param line The number of the current line.
+	 * @since 0.3
+	 */
+	public abstract void actionsOnClosePathCommand(int line);
+	
+	
+	
+	/**
+	 * Parses the pstricks commands <code>\lineto</code> and <code>\moveto</code>.
+	 * @param nLine The number of the line.
+	 * @param txt The code to parse.
+	 * @param p1 The point to parse.
+	 * @return The position of the last parsed token.
+	 * @throws InvalidFormatCommandException If the command is not valid.
+	 * @throws IllegalArgumentException If txt or p1 is null.
+	 * @since 0.3
+	 */
+	public int parseParametersLineMoveTo(int nLine, String txt, Point2D.Double p1) throws InvalidFormatCommandException
+	{
+		if(p1==null || txt==null)
+			throw new IllegalArgumentException();
+		
+		p1.setLocation(readOneCoordinate(txt, 0, nLine, true));
+		
+		if(Double.isNaN(p1.x)) p1.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+		if(Double.isNaN(p1.y)) p1.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			
+		return txt.indexOf(')', 1);
+	}
+	
+	
+	
+	/**
+	 * Parses the pstricks command <code>\curveto</code>.
+	 * @param nLine The number of the line.
+	 * @param txt The code to parse.
+	 * @param p1 The first point to parse.
+	 * @param p2 The second point to parse.
+	 * @param p3 The third point to parse.
+	 * @return The position of the last parsed token.
+	 * @throws InvalidFormatCommandException If the command is not valid.
+	 * @throws IllegalArgumentException If txt or p1 is null.
+	 * @since 0.3
+	 */
+	public int parseParametersCurveTo(int nLine, String txt, Point2D.Double p1, Point2D.Double p2, 
+						Point2D.Double p3) throws InvalidFormatCommandException
+	{
+		int i = 0;
+		
+		p1.setLocation(readOneCoordinate(txt, 0, nLine, true));
+		
+		if(Double.isNaN(p1.x)) p1.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+		if(Double.isNaN(p1.y)) p1.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+			
+		i = txt.indexOf(')', 1);
+		p2.setLocation(readOneCoordinate(txt, i+1, nLine, true));
+		
+		if(Double.isNaN(p2.x)) p2.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+		if(Double.isNaN(p2.y)) p2.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+		
+		i = txt.indexOf(')', i+1);
+		p3.setLocation(readOneCoordinate(txt, i+1, nLine, true));
+		
+		if(Double.isNaN(p3.x)) p3.x = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+		if(Double.isNaN(p3.y)) p3.y = PSTricksConstants.DEFAULT_VALUE_MISSING_COORDINATE;
+		
+		return txt.indexOf(')', i+1);
+	}
+	
+	
+	
+	/**
+	 * Parses the parameters of the <code>rgbcolor</code> command (the name of the command is supposed parsed; for instance the parameters
+	 * to parse can be <code>{rgbColourName}{0.1 0.3 0.1}</code>. The parsed colour is added to the <code>DviPsColors</code> container.
+	 * @param p The code to parse.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 2.0.0
+	 */
+    public static void parseNewrgbcolorParameters(String p) throws InvalidFormatCommandException
+	{
+		String cmdName = "newrgbcolor";//$NON-NLS-1$
+		try
+		{
+			if(p == null || p.length() < 10)
+				throw new IllegalArgumentException(p);
+
+			String colourName;
+			double r;
+			double g;
+			double b;
+			int[] i = {0};
+			
+			if(p.charAt(i[0]) != '{')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			i[0]++;
+			colourName = readString(p, i, true);
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '}')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			i[0]++;
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '{')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			i[0]++;
+			r = readReal(p, i, true);
+			g = readReal(p, i, true);
+			b = readReal(p, i, true);
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '}')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			if(r < 0 || r > 1 || g < 0 || g > 1 || b < 0 || b > 1)
+				throw new InvalidFormatCommandException(cmdName, -1);
+
+			DviPsColors.addUserColour(new Color((int)(r*255), (int)(g*255), (int)(b*255)), colourName);
+			
+		}catch(IgnoreCommandException ex) { throw new InvalidFormatCommandException(cmdName, -1); }
+	}
+
+	
+	
+	
+	
+	/**
+	 * Parses the parameters of the <code>hsbcolor</code> command (the name of the command is supposed parsed; for instance the parameters
+	 * to parse can be <code>{hsbColourName}{0.1 0.3 0.1}</code>. The parsed colour is added to the <code>DviPsColors</code> container.
+	 * @param p The code to parse.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 2.0.0
+	 */
+    public static void parseNewhsbcolorParameters(String p) throws InvalidFormatCommandException
+	{
+		String cmdName = "newhsbcolor";//$NON-NLS-1$
+		try
+		{
+			if(p == null || p.length() < 10)
+				throw new IllegalArgumentException(p);
+
+			String colourName;
+			double h;
+			double s;
+			double b;
+			int[] i = {0};
+			
+			if(p.charAt(i[0]) != '{')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			i[0]++;
+			colourName = readString(p, i, true);
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '}')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			i[0]++;
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '{')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			i[0]++;
+			h = readReal(p, i, true);
+			s = readReal(p, i, true);
+			b = readReal(p, i, true);
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '}')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			if(h < 0 || h > 1 || s < 0 || s > 1 || b < 0 || b > 1)
+				throw new InvalidFormatCommandException(cmdName, -1);
+
+			DviPsColors.addUserColour(Color.getHSBColor((float)h, (float)s, (float)b), colourName);
+			
+		}catch(IgnoreCommandException ex) { throw new InvalidFormatCommandException(cmdName, -1); }
+	}
+
+
+
+
+	/**
+	 * Parses the parameters of the <code>cmykcolor</code> command (the name of the command is supposed parsed; for instance the parameters
+	 * to parse can be <code>{cmykColourName}{0.1 0.3 0.1 0.8}</code>. 
+	 * The parsed colour is added to the <code>DviPsColors</code> container.
+	 * @param p The code to parse.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 2.0.0
+	 */
+	public static void parseNewcmykcolorParameters(String p) throws InvalidFormatCommandException
+	{
+		String cmdName = "newcmykcolor";//$NON-NLS-1$
+		try
+		{
+			if(p == null || p.length() < 12)
+				throw new IllegalArgumentException(p);
+
+			String colourName;
+			double c;
+			double m;
+			double y;
+			double k;
+			int[] i = {0};
+			
+			if(p.charAt(i[0]) != '{')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			i[0]++;
+			colourName = readString(p, i, true);
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '}')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			i[0]++;
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '{')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			i[0]++;
+			c = readReal(p, i, true);
+			m = readReal(p, i, true);
+			y = readReal(p, i, true);
+			k = readReal(p, i, true);
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '}')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			if(c < 0 || c > 1 || m < 0 || m > 1 || y < 0 || y > 1 || k < 0 || k > 1)
+				throw new InvalidFormatCommandException(cmdName, -1);
+
+			DviPsColors.addUserColour(DviPsColors.CMYK2RGB(c, m, y, k), colourName);
+			
+		}catch(IgnoreCommandException ex) { throw new InvalidFormatCommandException(cmdName, -1); }
+	}
+
+
+
+
+	/**
+	 * Parses the parameters of the <code>newgray</code> command (the name of the command is supposed parsed; for instance the parameters
+	 * to parse can be <code>{grayColourName}{0.1}</code>
+	 * @param p The code to parse.
+	 * @throws InvalidFormatCommandException If the format of the command is not valid.
+	 * @since 2.0.0
+	 */
+	public static void parseNewgrayParameters(String p) throws InvalidFormatCommandException
+	{
+		String cmdName = "newgray";//$NON-NLS-1$
+		try
+		{
+			if(p == null || p.length() < 6)
+				throw new IllegalArgumentException(p);
+
+			String colourName;
+			double g;
+			int[] i = {0};
+			
+			if(p.charAt(i[0]) != '{')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			i[0]++;
+			colourName = readString(p, i, true);
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '}')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			i[0]++;
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '{')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			i[0]++;
+			g = readReal(p, i, true);
+			goToNextChar(p, i);
+			
+			if(p.charAt(i[0]) != '}')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			if(g < 0 || g > 1)
+				throw new InvalidFormatCommandException(cmdName, -1);
+
+			DviPsColors.addUserColour(DviPsColors.gray2RBG(g), colourName);
+			
+		}catch(IgnoreCommandException ex) { throw new InvalidFormatCommandException(cmdName, -1); }
+	}
+
+	
+	
+	
+	/**
+	 * Checks if the given character is a character to ignore (' ', '\t', '\n', '\r').
+	 * @param c The character to check.
+	 * @return True if the given character must be ignored.
+	 * @since 2.0.0
+	 */
+	public static boolean isCharToIgnore(char c)
+	{
+		return c==' ' || c==9 || c==10 || c==13;
+	}
+
+
+
+	
+	/**
+	 * Parses the command <code>rotateBox{angle}{..}</code>. In fact it parses only {angle}{, the name of the command is supposed parsed and the 
+	 * first character of <code>cmd</code> must be {.
+	 * @param cmd The command to parse.
+	 * @param params The PSTricks stack of parameters.
+	 * @throws InvalidFormatCommandException If the command is not valid.
+	 * @since 2.0.0
+	 */
+	public static void parseRotateBoxCommand(String cmd, Vector<PSTricksParameters> params) throws InvalidFormatCommandException
+	{
+		String cmdName = "rotateBox";//$NON-NLS-1$
+		int i[] = {0};
+		
+		if(cmd==null || cmd.length()==0)
+			throw new InvalidFormatCommandException(cmdName, -1);
+		
+		if(params==null)
+			throw new IllegalArgumentException();
+		
+		if(cmd.charAt(i[0])!='{')
+			throw new InvalidFormatCommandException(cmdName, -1);
+		
+		i[0]++;
+		try
+		{
+			double angle = readReal(cmd, i, true);
+			goToNextChar(cmd, i);
+			
+			if(cmd.charAt(i[0])!='}')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			i[0]++;
+			goToNextChar(cmd, i);
+			
+			if(cmd.charAt(i[0])!='{')
+				throw new InvalidFormatCommandException(cmdName, -1);
+			
+			if(params.isEmpty())
+				params.add(new PSTricksParameters());
+			else
+				params.add(new PSTricksParameters(params.lastElement()));
+			
+			params.lastElement().setPosition(0, 0, true, angle, 0., 0, 0., 0.);
+		}
+		catch(IgnoreCommandException e) { throw new InvalidFormatCommandException(cmdName, -1); }
+	}
+	
+	
+	
+	
+	/**
+	 * Goes to the next occurrence of the given character and jumps it.
+	 * @param str The code to parse.
+	 * @param id input: the position of the first character to analyse. Output: the position of the character just after the found character.
+	 * @throws IgnoreCommandException If the given character is unreachable or if a character (not a ignorable character) is 
+	 * reached before a comma.
+	 */
+	public static void readChar(String str, char c, int[] id) throws IgnoreCommandException
+	{
+		try
+		{
+			if(isCharToIgnore(c))
+				throw new IllegalArgumentException();
+			
+			if(id==null || id.length<1) 
+				throw new IgnoreCommandException(-1);
+			
+			int size = str.length();
+			
+			while(id[0]<size && isCharToIgnore(str.charAt(id[0])) && str.charAt(id[0])!=c) 
+				id[0]++;
+			
+			if(id[0]>=size || str.charAt(id[0])!=c) throw new IgnoreCommandException(-1);
+
+			id[0]++;
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			throw new IgnoreCommandException(-1);
+		}
+	}
+
+
+
+	
+	public static void parseputCommand(String str, Vector<PSTricksParameters> params) throws InvalidFormatCommandException, IgnoreCommandException
+	{
+		if(str==null || str.length()==0 || params==null) throw new InvalidFormatCommandException("put", -1);//$NON-NLS-1$
+		
+		int i[] = {0};
+		int size = str.length();
+		
+		if(i[0]<size && str.charAt(i[0])=='(')
+		{
+			Point2D.Double coord = readOneCoordinate(str, i[0], -1, true);
+			PSTricksParameters p = new PSTricksParameters(params.lastElement());
+			
+			if(coord==null) throw new InvalidFormatCommandException("put", -1);//$NON-NLS-1$
+			
+			while(i[0]<size && str.charAt(i[0])!=')') i[0]++;
+			
+			if(i[0]>=size) throw new IgnoreCommandException(-1);
+			
+			i[0]++;
+			
+			if(i[0]<size) goToNextChar(str, i);
+
+			p.setPosition(coord.x, coord.y, true, 0, 0, PositionParameters.REF_POINT_LEFT+PositionParameters.REF_POINT_BASE,
+					0, PositionParameters.REF_POINT_DEFAULT_CENTER);
+
+			if(params.size()>0)
+			{
+				PSTricksParameters p2 = params.lastElement();
+				p.origin.setLocation(p2.origin.x, p2.origin.y);
+			}
+			
+			params.add(p);
+		}
+	}
+}
diff --git a/current/latexDraw/parsers/svg/CSSColors.java b/current/latexDraw/parsers/svg/CSSColors.java
new file mode 100644
index 0000000..e3b4f04
--- /dev/null
+++ b/current/latexDraw/parsers/svg/CSSColors.java
@@ -0,0 +1,885 @@
+package latexDraw.parsers.svg;
+
+import java.awt.Color;
+import java.util.Hashtable;
+import java.util.Vector;
+
+/** 
+ * Defines colours used in CSS2.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 04/06/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public abstract class CSSColors
+{
+	/** Can be used to define the suffix of a user's colour. */
+	protected static long number = 0;
+	
+	/** The colours defined by the user. */
+	protected final static Vector<Color> usercolors = new Vector<Color>();
+	
+	/** The name of the colours defined by the user. */
+	protected final static Vector<String> userNamecolors = new Vector<String>();
+	
+	protected final static Hashtable<String, Color> colourHT = new Hashtable<String, Color>(100);
+	
+	protected final static Hashtable<Color, String> nameColourHT = new Hashtable<Color, String>(100);
+	
+	
+	
+    public static final String CSS_ALICEBLUE_NAME 		= "aliceblue";//$NON-NLS-1$
+    public static final String CSS_ANTIQUEWHITE_NAME 	= "antiquewhite";//$NON-NLS-1$
+    public static final String CSS_AQUAMARINE_NAME 		= "aquamarine";//$NON-NLS-1$
+    public static final String CSS_AQUA_NAME 			= "aqua";//$NON-NLS-1$
+    public static final String CSS_AZURE_NAME 			= "azure";//$NON-NLS-1$
+    public static final String CSS_BEIGE_NAME 			= "beige";//$NON-NLS-1$
+    public static final String CSS_BISQUE_NAME 			= "bisque";//$NON-NLS-1$
+    public static final String CSS_BLACK_NAME 			= "black";//$NON-NLS-1$
+    public static final String CSS_BLANCHEDALMOND_NAME 	= "blanchedalmond";//$NON-NLS-1$
+    public static final String CSS_BLUEVIOLET_NAME		= "blueviolet";//$NON-NLS-1$
+    public static final String CSS_BLUE_NAME 			= "blue";//$NON-NLS-1$
+    public static final String CSS_BROWN_NAME 			= "brown";//$NON-NLS-1$
+    public static final String CSS_BURLYWOOD_NAME 		= "burlywood";//$NON-NLS-1$
+    public static final String CSS_CADETBLUE_NAME 		= "cadetblue";//$NON-NLS-1$
+    public static final String CSS_CHARTREUSE_NAME 		= "chartreuse";//$NON-NLS-1$
+    public static final String CSS_CHOCOLATE_NAME 		= "chocolate";//$NON-NLS-1$
+    public static final String CSS_CORAL_NAME 			= "coral";//$NON-NLS-1$
+    public static final String CSS_CORNFLOWERBLUE_NAME  = "cornflowerblue";//$NON-NLS-1$
+    public static final String CSS_CORNSILK_NAME 		= "cornsilk";//$NON-NLS-1$
+    public static final String CSS_CRIMSON_NAME 		= "crimson";//$NON-NLS-1$
+    public static final String CSS_CYAN_NAME 			= "cyan";//$NON-NLS-1$
+    public static final String CSS_DARKBLUE_NAME		= "darkblue";//$NON-NLS-1$
+    public static final String CSS_DARKCYAN_NAME 		= "darkcyan";//$NON-NLS-1$
+    public static final String CSS_DARKGOLDENROD_NAME 	= "darkgoldenrod";//$NON-NLS-1$
+    public static final String CSS_DARKGRAY_NAME  		= "darkgray";//$NON-NLS-1$
+    public static final String CSS_DARKGREEN_NAME  		= "darkgreen";//$NON-NLS-1$
+    public static final String CSS_DARKGREY_NAME  		= "darkgrey";//$NON-NLS-1$
+    public static final String CSS_DARKKHAKI_NAME  		= "darkkhaki";//$NON-NLS-1$
+    public static final String CSS_DARKMAGENTA_NAME  	= "darkmagenta";//$NON-NLS-1$
+    public static final String CSS_DARKOLIVEGREEN_NAME  = "darkolivegreen";//$NON-NLS-1$
+    public static final String CSS_DARKORANGE_NAME  	= "darkorange";//$NON-NLS-1$
+    public static final String CSS_DARKORCHID_NAME  	= "darkorchid";//$NON-NLS-1$
+    public static final String CSS_DARKRED_NAME  		= "darkred";//$NON-NLS-1$
+    public static final String CSS_DARKSALMON_NAME  	= "darksalmon";//$NON-NLS-1$
+    public static final String CSS_DARKSEAGREEN_NAME  	= "darkseagreen";//$NON-NLS-1$
+    public static final String CSS_DARKSLATEBLUE_NAME  	= "darkslateblue";//$NON-NLS-1$
+    public static final String CSS_DARKSLATEGRAY_NAME 	= "darkslategray";//$NON-NLS-1$
+    public static final String CSS_DARKSLATEGREY_NAME 	= "darkslategrey";//$NON-NLS-1$
+    public static final String CSS_DARKTURQUOISE_NAME 	= "darkturquoise";//$NON-NLS-1$
+    public static final String CSS_DARKVIOLET_NAME  	= "darkviolet";//$NON-NLS-1$
+    public static final String CSS_DEEPPINK_NAME  		= "deeppink";//$NON-NLS-1$
+    public static final String CSS_DEEPSKYBLUE_NAME  	= "deepskyblue";//$NON-NLS-1$
+    public static final String CSS_DIMGRAY_NAME  		= "dimgray";//$NON-NLS-1$
+    public static final String CSS_DIMGREY_NAME  		= "dimgrey";//$NON-NLS-1$
+    public static final String CSS_DODGERBLUE_NAME  	= "dodgerblue";//$NON-NLS-1$
+    public static final String CSS_FIREBRICK_NAME  		= "firebrick";//$NON-NLS-1$
+    public static final String CSS_FLORALWHITE_NAME  	= "floralwhite";//$NON-NLS-1$
+    public static final String CSS_FORESTGREEN_NAME  	= "forestgreen";//$NON-NLS-1$
+    public static final String CSS_FUCHSIA_NAME  		= "fuchsia";//$NON-NLS-1$
+    public static final String CSS_GAINSBORO_NAME  		= "gainsboro";//$NON-NLS-1$
+    public static final String CSS_GHOSTWHITE_NAME  	= "ghostwhite";//$NON-NLS-1$
+    public static final String CSS_GOLDENROD_NAME  		= "goldenrod";//$NON-NLS-1$
+    public static final String CSS_GOLD_NAME  			= "gold";//$NON-NLS-1$
+    public static final String CSS_GRAY_NAME  			= "gray";//$NON-NLS-1$
+    public static final String CSS_GREENYELLOW_NAME  	= "greenyellow";//$NON-NLS-1$
+    public static final String CSS_GREEN_NAME  			= "green";//$NON-NLS-1$
+    public static final String CSS_GREY_NAME  			= "grey";//$NON-NLS-1$
+    public static final String CSS_HONEYDEW_NAME  		= "honeydew";//$NON-NLS-1$
+    public static final String CSS_HOTPINK_NAME  		= "hotpink";//$NON-NLS-1$
+    public static final String CSS_INDIGO_NAME  		= "indigo";//$NON-NLS-1$
+    public static final String CSS_IVORY_NAME  			= "ivory";//$NON-NLS-1$
+    public static final String CSS_INDIANRED_NAME		= "indianred";//$NON-NLS-1$
+    public static final String CSS_KHAKI_NAME  			= "khaki";//$NON-NLS-1$
+    public static final String CSS_LAVENDERBLUSH_NAME 	= "lavenderblush";//$NON-NLS-1$
+    public static final String CSS_LAVENDER_NAME  		= "lavender";//$NON-NLS-1$
+    public static final String CSS_LAWNGREEN_NAME  		= "lawngreen";//$NON-NLS-1$
+    public static final String CSS_LEMONCHIFFON_NAME  	= "lemonchiffon";//$NON-NLS-1$
+    public static final String CSS_LIGHTBLUE_NAME  		= "lightblue";//$NON-NLS-1$
+    public static final String CSS_LIGHTCORAL_NAME  	= "lightcoral";//$NON-NLS-1$
+    public static final String CSS_LIGHTCYAN_NAME  		= "lightcyan";//$NON-NLS-1$
+    public static final String CSS_LIGHTGOLDENRODYELLOW_NAME  	= "lightgoldenrodyellow";//$NON-NLS-1$
+    public static final String CSS_LIGHTGRAY_NAME  		= "lightgray";//$NON-NLS-1$
+    public static final String CSS_LIGHTGREEN_NAME  	= "lightgreen";//$NON-NLS-1$
+    public static final String CSS_LIGHTGREY_NAME  		= "lightgrey";//$NON-NLS-1$
+    public static final String CSS_LIGHTPINK_NAME  		= "lightpink";//$NON-NLS-1$
+    public static final String CSS_LIGHTSALMON_NAME  	= "lightsalmon";//$NON-NLS-1$
+    public static final String CSS_LIGHTSEAGREEN_NAME  	= "lightseagreen";//$NON-NLS-1$
+    public static final String CSS_LIGHTSKYBLUE_NAME  	= "lightskyblue";//$NON-NLS-1$
+    public static final String CSS_LIGHTSLATEGRAY_NAME 	= "lightslategray";//$NON-NLS-1$
+    public static final String CSS_LIGHTSLATEGREY_NAME 	= "lightslategrey";//$NON-NLS-1$
+    public static final String CSS_LIGHTSTEELBLUE_NAME	= "lightsteelblue";//$NON-NLS-1$
+    public static final String CSS_LIGHTYELLOW_NAME  	= "lightyellow";//$NON-NLS-1$
+    public static final String CSS_LIMEGREEN_NAME  		= "limegreen";//$NON-NLS-1$
+    public static final String CSS_LIME_NAME  			= "lime";//$NON-NLS-1$
+    public static final String CSS_MAGENTA_NAME  		= "magenta";//$NON-NLS-1$
+    public static final String CSS_MAROON_NAME  		= "maroon";//$NON-NLS-1$
+    public static final String CSS_MEDIUMAQUAMARINE_NAME  	= "mediumaquamarine";//$NON-NLS-1$
+    public static final String CSS_MEDIUMBLUE_NAME  		= "mediumblue";//$NON-NLS-1$
+    public static final String CSS_MEDIUMORCHID_NAME  		= "mediumorchid";//$NON-NLS-1$
+    public static final String CSS_MEDIUMPURPLE_NAME  		= "mediumpurple";//$NON-NLS-1$
+    public static final String CSS_MEDIUMSEAGREEN_NAME  	= "mediumseagreen";//$NON-NLS-1$
+    public static final String CSS_MEDIUMSLATEBLUE_NAME  	= "mediumslateblue";//$NON-NLS-1$
+    public static final String CSS_MEDIUMSPRINGGREEN_NAME  	= "mediumspringgreen";//$NON-NLS-1$
+    public static final String CSS_MEDIUMTURQUOISE_NAME  	= "mediumturquoise";//$NON-NLS-1$
+    public static final String CSS_MEDIUMVIOLETRED_NAME  	= "mediumvioletred";//$NON-NLS-1$
+    public static final String CSS_MIDNIGHTBLUE_NAME  		= "midnightblue";//$NON-NLS-1$
+    public static final String CSS_MINTCREAM_NAME  			= "mintcream";//$NON-NLS-1$
+    public static final String CSS_MISTYROSE_NAME  			= "mistyrose";//$NON-NLS-1$
+    public static final String CSS_MOCCASIN_NAME  			= "moccasin";//$NON-NLS-1$
+    public static final String CSS_NAVAJOWHITE_NAME  		= "navajowhite";//$NON-NLS-1$
+    public static final String CSS_NAVY_NAME  				= "navy";//$NON-NLS-1$
+    public static final String CSS_OLDLACE_NAME  			= "oldlace";//$NON-NLS-1$
+    public static final String CSS_OLIVEDRAB_NAME  			= "olivedrab";//$NON-NLS-1$
+    public static final String CSS_OLIVE_NAME  				= "olive";//$NON-NLS-1$
+    public static final String CSS_ORANGERED_NAME  			= "orangered";//$NON-NLS-1$
+    public static final String CSS_ORANGE_NAME  			= "orange";//$NON-NLS-1$
+    public static final String CSS_ORCHID_NAME  			= "orchid";//$NON-NLS-1$
+    public static final String CSS_PALEGOLDENROD_NAME  		= "palegoldenrod";//$NON-NLS-1$
+    public static final String CSS_PALEGREEN_NAME  			= "palegreen";//$NON-NLS-1$
+    public static final String CSS_PALETURQUOISE_NAME  		= "paleturquoise";//$NON-NLS-1$
+    public static final String CSS_PALEVIOLETRED_NAME  		= "palevioletred";//$NON-NLS-1$
+    public static final String CSS_PAPAYAWHIP_NAME  		= "papayawhip";//$NON-NLS-1$
+    public static final String CSS_PEACHPUFF_NAME  			= "peachpuff";//$NON-NLS-1$
+    public static final String CSS_PERU_NAME  				= "peru";//$NON-NLS-1$
+    public static final String CSS_PINK_NAME  				= "pink";//$NON-NLS-1$
+    public static final String CSS_PLUM_NAME  				= "plum";//$NON-NLS-1$
+    public static final String CSS_POWDERBLUE_NAME  		= "powderblue";//$NON-NLS-1$
+    public static final String CSS_PURPLE_NAME  			= "purple";//$NON-NLS-1$
+    public static final String CSS_RED_NAME  				= "red";//$NON-NLS-1$
+    public static final String CSS_ROSYBROWN_NAME  			= "rosybrown";//$NON-NLS-1$
+    public static final String CSS_ROYALBLUE_NAME  			= "royalblue";//$NON-NLS-1$
+    public static final String CSS_SADDLEBROWN_NAME  		= "saddlebrown";//$NON-NLS-1$
+    public static final String CSS_SALMON_NAME  			= "salmon";//$NON-NLS-1$
+    public static final String CSS_SANDYBROWN_NAME  		= "sandybrown";//$NON-NLS-1$
+    public static final String CSS_SEAGREEN_NAME  			= "seagreen";//$NON-NLS-1$
+    public static final String CSS_SEASHELL_NAME  			= "seashell";//$NON-NLS-1$
+    public static final String CSS_SIENNA_NAME  			= "sienna";//$NON-NLS-1$
+    public static final String CSS_SILVER_NAME  			= "silver";//$NON-NLS-1$
+    public static final String CSS_SKYBLUE_NAME  			= "skyblue";//$NON-NLS-1$
+    public static final String CSS_SLATEBLUE_NAME  			= "slateblue";//$NON-NLS-1$
+    public static final String CSS_SLATEGRAY_NAME  			= "slategray";//$NON-NLS-1$
+    public static final String CSS_SLATEGREY_NAME  			= "slategrey";//$NON-NLS-1$
+    public static final String CSS_SNOW_NAME  				= "snow";//$NON-NLS-1$
+    public static final String CSS_SPRINGGREEN_NAME  		= "springgreen";//$NON-NLS-1$
+    public static final String CSS_STEELBLUE_NAME  			= "steelblue";//$NON-NLS-1$
+    public static final String CSS_TAN_NAME  				= "tan";//$NON-NLS-1$
+    public static final String CSS_TEAL_NAME  				= "teal";//$NON-NLS-1$
+    public static final String CSS_THISTLE_NAME  			= "thistle";//$NON-NLS-1$
+    public static final String CSS_TOMATO_NAME  			= "tomato";//$NON-NLS-1$
+    public static final String CSS_TURQUOISE_NAME  			= "turquoise";//$NON-NLS-1$
+    public static final String CSS_VIOLET_NAME  			= "violet";//$NON-NLS-1$
+    public static final String CSS_WHEAT_NAME  				= "wheat";//$NON-NLS-1$
+    public static final String CSS_WHITESMOKE_NAME  		= "whitesmoke";//$NON-NLS-1$
+    public static final String CSS_WHITE_NAME  				= "white";//$NON-NLS-1$
+    public static final String CSS_YELLOWGREEN_NAME  		= "yellowgreen";//$NON-NLS-1$
+    public static final String CSS_YELLOW_NAME  			= "yellow";//$NON-NLS-1$
+    
+    
+    public final static Color CSS_YELLOW_RGB_VALUE         	 	= new Color(255, 255, 0);
+    public final static Color CSS_RED_RGB_VALUE         	 	= new Color(255, 0, 0);
+    public final static Color CSS_TEAL_RGB_VALUE         	 	= new Color(0, 128, 128);
+    public final static Color CSS_PURPLE_RGB_VALUE         	 	= new Color(128, 0, 128);
+    public final static Color CSS_SILVER_RGB_VALUE         	 	= new Color(192, 192, 192);
+    public final static Color CSS_NAVY_RGB_VALUE         	 	= new Color(0, 0, 128);
+    public final static Color CSS_OLIVE_RGB_VALUE         	 	= new Color(128, 128, 0);
+    public final static Color CSS_LIME_RGB_VALUE         	 	= new Color(0, 255, 0);
+    public final static Color CSS_MAROON_RGB_VALUE         	 	= new Color(128, 0, 0);
+    public final static Color CSS_GRAY_RGB_VALUE         	 	= new Color(128, 128, 128);
+    public final static Color CSS_GREEN_RGB_VALUE         	 	= new Color(0, 128, 0);
+	public final static Color CSS_BLACK_RGB_VALUE         	 	= new Color(0, 0, 0);
+	public final static Color CSS_WHITE_RGB_VALUE          		= new Color(255,255,255);
+	public final static Color CSS_BLUE_RGB_VALUE          		= new Color(0, 0, 255);
+	public final static Color CSS_FUCHSIA_RGB_VALUE          	= new Color(255, 0, 255);
+    public static final Color CSS_ALICEBLUE_RGB_VALUE 			= new Color(240, 248, 255);
+    public static final Color CSS_ANTIQUEWHITE_RGB_VALUE 		= new Color(250, 235, 215);
+    public static final Color CSS_AQUA_RGB_VALUE 				= new Color(0, 255, 255);
+    public static final Color CSS_AQUAMARINE_RGB_VALUE 			= new Color(127, 255, 212);
+    public static final Color CSS_AZURE_RGB_VALUE 				= new Color(240, 255, 255);
+    public static final Color CSS_BEIGE_RGB_VALUE 				= new Color(245, 245, 220);
+    public static final Color CSS_BISQUE_RGB_VALUE 				= new Color(255, 228, 196);       
+    public static final Color CSS_BLANCHEDALMOND_RGB_VALUE		= new Color(255, 235, 205);
+    public static final Color CSS_BLUEVIOLET_RGB_VALUE 			= new Color(138, 43, 226);
+    public static final Color CSS_BROWN_RGB_VALUE 				= new Color(165, 42, 42);
+    public static final Color CSS_BURLYWOOD_RGB_VALUE 			= new Color(222, 184, 135);
+    public static final Color CSS_CADETBLUE_RGB_VALUE 			= new Color(95, 158, 160);
+    public static final Color CSS_CHARTREUSE_RGB_VALUE 			= new Color(127, 255, 0);
+    public static final Color CSS_CHOCOLATE_RGB_VALUE			= new Color(210, 105, 30);
+    public static final Color CSS_CORAL_RGB_VALUE 				= new Color(255, 127, 80);
+    public static final Color CSS_CORNFLOWERBLUE_RGB_VALUE 		= new Color(100, 149, 237);
+    public static final Color CSS_CORNSILK_RGB_VALUE 			= new Color(255, 248, 220);
+    public static final Color CSS_CRIMSON_RGB_VALUE 			= new Color(220, 20, 60);
+    public static final Color CSS_CYAN_RGB_VALUE 				= new Color(0, 255, 255);
+    public static final Color CSS_DARKBLUE_RGB_VALUE 			= new Color(0, 0, 139);
+    public static final Color CSS_DARKCYAN_RGB_VALUE 			= new Color(0, 139, 139);
+    public static final Color CSS_DARKGOLDENROD_RGB_VALUE 		= new Color(184, 134, 11);
+    public static final Color CSS_DARKGRAY_RGB_VALUE 			= new Color(169, 169, 169);
+    public static final Color CSS_DARKGREEN_RGB_VALUE 			= new Color(0, 100, 0);
+    public static final Color CSS_DARKGREY_RGB_VALUE 			= new Color(169, 169, 169);
+    public static final Color CSS_DARKKHAKI_RGB_VALUE 			= new Color(189, 183, 107);
+    public static final Color CSS_DARKMAGENTA_RGB_VALUE 		= new Color(139, 0, 139);
+    public static final Color CSS_DARKOLIVEGREEN_RGB_VALUE 		= new Color(85, 107, 47);
+    public static final Color CSS_DARKORANGE_RGB_VALUE 			= new Color(255, 140, 0);
+    public static final Color CSS_DARKORCHID_RGB_VALUE 			= new Color(153, 50, 204);
+    public static final Color CSS_DARKRED_RGB_VALUE 			= new Color(139, 0, 0);
+    public static final Color CSS_DARKSALMON_RGB_VALUE 			= new Color(233, 150, 122);
+    public static final Color CSS_DARKSEAGREEN_RGB_VALUE 		= new Color(143, 188, 143);
+    public static final Color CSS_DARKSLATEBLUE_RGB_VALUE 		= new Color(72, 61, 139);
+    public static final Color CSS_DARKSLATEGRAY_RGB_VALUE 		= new Color(47, 79, 79);
+    public static final Color CSS_DARKSLATEGREY_RGB_VALUE 		= new Color(47, 79, 79);
+    public static final Color CSS_DARKTURQUOISE_RGB_VALUE 		= new Color(0, 206, 209);
+    public static final Color CSS_DARKVIOLET_RGB_VALUE 			= new Color(148, 0, 211);
+    public static final Color CSS_DEEPPINK_RGB_VALUE 			= new Color(255, 20, 147);
+    public static final Color CSS_DEEPSKYBLUE_RGB_VALUE 		= new Color(0, 191, 255);
+    public static final Color CSS_DIMGRAY_RGB_VALUE 			= new Color(105, 105, 105);
+    public static final Color CSS_DIMGREY_RGB_VALUE 			= new Color(105, 105, 105);
+    public static final Color CSS_DODGERBLUE_RGB_VALUE 			= new Color(30, 144, 255);
+    public static final Color CSS_FIREBRICK_RGB_VALUE 			= new Color(178, 34, 34);
+    public static final Color CSS_FLORALWHITE_RGB_VALUE 		= new Color(255, 250, 240);
+    public static final Color CSS_FORESTGREEN_RGB_VALUE 		= new Color(34, 139, 34);
+    public static final Color CSS_GAINSBORO_RGB_VALUE			= new Color(220, 200, 200);
+    public static final Color CSS_GHOSTWHITE_RGB_VALUE 			= new Color(248, 248, 255);
+    public static final Color CSS_GOLD_RGB_VALUE 				= new Color(255, 215, 0);
+    public static final Color CSS_GOLDENROD_RGB_VALUE 			= new Color(218, 165, 32);
+    public static final Color CSS_GREY_RGB_VALUE 				= new Color(128, 128, 128);
+    public static final Color CSS_GREENYELLOW_RGB_VALUE 		= new Color(173, 255, 47);
+    public static final Color CSS_HONEYDEW_RGB_VALUE 			= new Color(240, 255, 240);
+    public static final Color CSS_HOTPINK_RGB_VALUE 			= new Color(255, 105, 180);
+    public static final Color CSS_INDIANRED_RGB_VALUE 			= new Color(205, 92, 92);
+    public static final Color CSS_INDIGO_RGB_VALUE 				= new Color(75, 0, 130);
+    public static final Color CSS_IVORY_RGB_VALUE 				= new Color(255, 255, 240);
+    public static final Color CSS_KHAKI_RGB_VALUE 				= new Color(240, 230, 140);
+    public static final Color CSS_LAVENDER_RGB_VALUE 			= new Color(230, 230, 250);
+    public static final Color CSS_LAVENDERBLUSH_RGB_VALUE 		= new Color(255, 240, 255);
+    public static final Color CSS_LAWNGREEN_RGB_VALUE 			= new Color(124, 252, 0);
+    public static final Color CSS_LEMONCHIFFON_RGB_VALUE 		= new Color(255, 250, 205);
+    public static final Color CSS_LIGHTBLUE_RGB_VALUE 			= new Color(173, 216, 230);
+    public static final Color CSS_LIGHTCORAL_RGB_VALUE 			= new Color(240, 128, 128);
+    public static final Color CSS_LIGHTCYAN_RGB_VALUE 			= new Color(224, 255, 255);
+    public static final Color CSS_LIGHTGOLDENRODYELLOW_RGB_VALUE= new Color(250, 250, 210);
+    public static final Color CSS_LIGHTGRAY_RGB_VALUE 			= new Color(211, 211, 211);
+    public static final Color CSS_LIGHTGREEN_RGB_VALUE 			= new Color(144, 238, 144);
+    public static final Color CSS_LIGHTGREY_RGB_VALUE 			= new Color(211, 211, 211);
+    public static final Color CSS_LIGHTPINK_RGB_VALUE 			= new Color(255, 182, 193);
+    public static final Color CSS_LIGHTSALMON_RGB_VALUE 		= new Color(255, 160, 122);
+    public static final Color CSS_LIGHTSEAGREEN_RGB_VALUE 		= new Color(32, 178, 170);
+    public static final Color CSS_LIGHTSKYBLUE_RGB_VALUE 		= new Color(135, 206, 250);
+    public static final Color CSS_LIGHTSLATEGRAY_RGB_VALUE 		= new Color(119, 136, 153);
+    public static final Color CSS_LIGHTSLATEGREY_RGB_VALUE 		= new Color(119, 136, 153);
+    public static final Color CSS_LIGHTSTEELBLUE_RGB_VALUE 		= new Color(176, 196, 222);
+    public static final Color CSS_LIGHTYELLOW_RGB_VALUE 		= new Color(255, 255, 224);
+    public static final Color CSS_LIMEGREEN_RGB_VALUE 			= new Color(50, 205, 50);
+    public static final Color CSS_LINEN_RGB_VALUE 				= new Color(250, 240, 230);
+    public static final Color CSS_MAGENTA_RGB_VALUE 			= new Color(255, 0, 255);
+    public static final Color CSS_MEDIUMAQUAMARINE_RGB_VALUE 	= new Color(102, 205, 170);
+    public static final Color CSS_MEDIUMBLUE_RGB_VALUE 			= new Color(0, 0, 205);
+    public static final Color CSS_MEDIUMORCHID_RGB_VALUE 		= new Color(186, 85, 211);
+    public static final Color CSS_MEDIUMPURPLE_RGB_VALUE 		= new Color(147, 112, 219);
+    public static final Color CSS_MEDIUMSEAGREEN_RGB_VALUE 		= new Color(60, 179, 113);
+    public static final Color CSS_MEDIUMSLATEBLUE_RGB_VALUE 	= new Color(123, 104, 238);
+    public static final Color CSS_MEDIUMSPRINGGREEN_RGB_VALUE 	= new Color(0, 250, 154);
+    public static final Color CSS_MEDIUMTURQUOISE_RGB_VALUE 	= new Color(72, 209, 204);
+    public static final Color CSS_MEDIUMVIOLETRED_RGB_VALUE 	= new Color(199, 21, 133);
+    public static final Color CSS_MIDNIGHTBLUE_RGB_VALUE 		= new Color(25, 25, 112);
+    public static final Color CSS_MINTCREAM_RGB_VALUE 			= new Color(245, 255, 250);
+    public static final Color CSS_MISTYROSE_RGB_VALUE 			= new Color(255, 228, 225);
+    public static final Color CSS_MOCCASIN_RGB_VALUE 			= new Color(255, 228, 181);
+    public static final Color CSS_NAVAJOWHITE_RGB_VALUE 		= new Color(255, 222, 173);
+    public static final Color CSS_OLDLACE_RGB_VALUE 			= new Color(253, 245, 230);
+    public static final Color CSS_OLIVEDRAB_RGB_VALUE 			= new Color(107, 142, 35);
+    public static final Color CSS_ORANGE_RGB_VALUE				= new Color(255, 165, 0);
+    public static final Color CSS_ORANGERED_RGB_VALUE 			= new Color(255, 69, 0);
+    public static final Color CSS_ORCHID_RGB_VALUE 				= new Color(218, 112, 214);
+    public static final Color CSS_PALEGOLDENROD_RGB_VALUE 		= new Color(238, 232, 170);
+    public static final Color CSS_PALEGREEN_RGB_VALUE 			= new Color(152, 251, 152);
+    public static final Color CSS_PALETURQUOISE_RGB_VALUE 		= new Color(175, 238, 238);
+    public static final Color CSS_PALEVIOLETRED_RGB_VALUE 		= new Color(219, 112, 147);
+    public static final Color CSS_PAPAYAWHIP_RGB_VALUE 			= new Color(255, 239, 213);
+    public static final Color CSS_PEACHPUFF_RGB_VALUE 			= new Color(255, 218, 185);
+    public static final Color CSS_PERU_RGB_VALUE 				= new Color(205, 133, 63);
+    public static final Color CSS_PINK_RGB_VALUE 				= new Color(255, 192, 203);
+    public static final Color CSS_PLUM_RGB_VALUE 				= new Color(221, 160, 221);
+    public static final Color CSS_POWDERBLUE_RGB_VALUE 			= new Color(176, 224, 230);
+    public static final Color CSS_ROSYBROWN_RGB_VALUE 			= new Color(188, 143, 143);
+    public static final Color CSS_ROYALBLUE_RGB_VALUE 			= new Color(65, 105, 225);
+    public static final Color CSS_SADDLEBROWN_RGB_VALUE 		= new Color(139, 69, 19);
+    public static final Color CSS_SALMON_RGB_VALUE 				= new Color(250, 69, 114);
+    public static final Color CSS_SANDYBROWN_RGB_VALUE 			= new Color(244, 164, 96);
+    public static final Color CSS_SEAGREEN_RGB_VALUE 			= new Color(46, 139, 87);
+    public static final Color CSS_SEASHELL_RGB_VALUE 			= new Color(255, 245, 238);
+    public static final Color CSS_SIENNA_RGB_VALUE 				= new Color(160, 82, 45);
+    public static final Color CSS_SKYBLUE_RGB_VALUE 			= new Color(135, 206, 235);
+    public static final Color CSS_SLATEBLUE_RGB_VALUE 			= new Color(106, 90, 205);
+    public static final Color CSS_SLATEGRAY_RGB_VALUE 			= new Color(112, 128, 144);
+    public static final Color CSS_SLATEGREY_RGB_VALUE 			= new Color(112, 128, 144);
+    public static final Color CSS_SNOW_RGB_VALUE 				= new Color(255, 250, 250);
+    public static final Color CSS_SPRINGGREEN_RGB_VALUE 		= new Color(0, 255, 127);
+    public static final Color CSS_STEELBLUE_RGB_VALUE 			= new Color(70, 130, 180);
+    public static final Color CSS_TAN_RGB_VALUE 				= new Color(210, 180, 140);
+    public static final Color CSS_THISTLE_RGB_VALUE 			= new Color(216, 91, 216);
+    public static final Color CSS_TOMATO_RGB_VALUE 				= new Color(255, 99, 71);
+    public static final Color CSS_TURQUOISE_RGB_VALUE 			= new Color(64, 224, 208);
+    public static final Color CSS_VIOLET_RGB_VALUE 				= new Color(238, 130, 238);
+    public static final Color CSS_WHEAT_RGB_VALUE 				= new Color(245, 222, 179);
+    public static final Color CSS_WHITESMOKE_RGB_VALUE 			= new Color(245, 245, 245);
+    public static final Color CSS_YELLOWGREEN_RGB_VALUE 		= new Color(154, 205, 50);
+    
+    
+    
+	protected static void createColourHashTable()
+	{
+		colourHT.clear();
+	    colourHT.put(CSS_ALICEBLUE_NAME, CSS_ALICEBLUE_RGB_VALUE);
+	    colourHT.put(CSS_ANTIQUEWHITE_NAME, CSS_ANTIQUEWHITE_RGB_VALUE);
+	    colourHT.put(CSS_AQUAMARINE_NAME, CSS_AQUAMARINE_RGB_VALUE);
+	    colourHT.put(CSS_AQUA_NAME, CSS_AQUA_RGB_VALUE);
+	    colourHT.put(CSS_AZURE_NAME, CSS_AZURE_RGB_VALUE);
+	    colourHT.put(CSS_BEIGE_NAME, CSS_BEIGE_RGB_VALUE);
+	    colourHT.put(CSS_BISQUE_NAME, CSS_BISQUE_RGB_VALUE);
+	    colourHT.put(CSS_BLACK_NAME, CSS_BLACK_RGB_VALUE);
+	    colourHT.put(CSS_BLANCHEDALMOND_NAME, CSS_BLANCHEDALMOND_RGB_VALUE);
+	    colourHT.put(CSS_BLUEVIOLET_NAME, CSS_BLUEVIOLET_RGB_VALUE);
+	    colourHT.put(CSS_BLUE_NAME, CSS_BLUE_RGB_VALUE);
+	    colourHT.put(CSS_BROWN_NAME, CSS_BROWN_RGB_VALUE);
+	    colourHT.put(CSS_BURLYWOOD_NAME, CSS_BURLYWOOD_RGB_VALUE);
+	    colourHT.put(CSS_CADETBLUE_NAME, CSS_CADETBLUE_RGB_VALUE);
+	    colourHT.put(CSS_CHARTREUSE_NAME, CSS_CHARTREUSE_RGB_VALUE);
+	    colourHT.put(CSS_CHOCOLATE_NAME, CSS_CHOCOLATE_RGB_VALUE);
+	    colourHT.put(CSS_CORAL_NAME, CSS_CORAL_RGB_VALUE);
+	    colourHT.put(CSS_CORNFLOWERBLUE_NAME, CSS_CORNFLOWERBLUE_RGB_VALUE);
+	    colourHT.put(CSS_CORNSILK_NAME, CSS_CORNSILK_RGB_VALUE);
+	    colourHT.put(CSS_CRIMSON_NAME, CSS_CRIMSON_RGB_VALUE);
+	    colourHT.put(CSS_CYAN_NAME, CSS_CYAN_RGB_VALUE);
+	    colourHT.put(CSS_DARKBLUE_NAME, CSS_DARKBLUE_RGB_VALUE);
+	    colourHT.put(CSS_DARKCYAN_NAME, CSS_DARKCYAN_RGB_VALUE);
+	    colourHT.put(CSS_DARKGOLDENROD_NAME, CSS_DARKGOLDENROD_RGB_VALUE);
+	    colourHT.put(CSS_DARKGRAY_NAME, CSS_DARKGRAY_RGB_VALUE);
+	    colourHT.put(CSS_DARKGREEN_NAME, CSS_DARKGREEN_RGB_VALUE);
+	    colourHT.put(CSS_DARKGREY_NAME, CSS_DARKGREY_RGB_VALUE);
+	    colourHT.put(CSS_DARKKHAKI_NAME, CSS_DARKKHAKI_RGB_VALUE);
+	    colourHT.put(CSS_DARKMAGENTA_NAME, CSS_DARKMAGENTA_RGB_VALUE);
+	    colourHT.put(CSS_DARKOLIVEGREEN_NAME, CSS_DARKOLIVEGREEN_RGB_VALUE);
+	    colourHT.put(CSS_DARKORANGE_NAME, CSS_DARKORANGE_RGB_VALUE);
+	    colourHT.put(CSS_DARKORCHID_NAME, CSS_DARKORCHID_RGB_VALUE);
+	    colourHT.put(CSS_DARKRED_NAME, CSS_DARKRED_RGB_VALUE);
+	    colourHT.put(CSS_DARKSALMON_NAME, CSS_DARKSALMON_RGB_VALUE);
+	    colourHT.put(CSS_DARKSEAGREEN_NAME, CSS_DARKSEAGREEN_RGB_VALUE);
+	    colourHT.put(CSS_DARKSLATEBLUE_NAME, CSS_DARKSLATEBLUE_RGB_VALUE);
+	    colourHT.put(CSS_DARKSLATEGRAY_NAME, CSS_DARKSLATEGRAY_RGB_VALUE);
+	    colourHT.put(CSS_DARKSLATEGREY_NAME, CSS_DARKSLATEGRAY_RGB_VALUE);
+	    colourHT.put(CSS_DARKTURQUOISE_NAME, CSS_DARKTURQUOISE_RGB_VALUE);
+	    colourHT.put(CSS_DARKVIOLET_NAME, CSS_DARKVIOLET_RGB_VALUE);
+	    colourHT.put(CSS_DEEPPINK_NAME, CSS_DEEPPINK_RGB_VALUE);
+	    colourHT.put(CSS_DEEPSKYBLUE_NAME, CSS_DEEPSKYBLUE_RGB_VALUE);
+	    colourHT.put(CSS_DIMGRAY_NAME, CSS_DIMGRAY_RGB_VALUE);
+	    colourHT.put(CSS_DIMGREY_NAME, CSS_DIMGREY_RGB_VALUE);
+	    colourHT.put(CSS_DODGERBLUE_NAME, CSS_DODGERBLUE_RGB_VALUE);
+	    colourHT.put(CSS_FIREBRICK_NAME, CSS_FIREBRICK_RGB_VALUE);
+	    colourHT.put(CSS_FLORALWHITE_NAME, CSS_FLORALWHITE_RGB_VALUE);
+	    colourHT.put(CSS_FORESTGREEN_NAME, CSS_FORESTGREEN_RGB_VALUE);
+	    colourHT.put(CSS_FUCHSIA_NAME, CSS_FUCHSIA_RGB_VALUE);
+	    colourHT.put(CSS_GAINSBORO_NAME, CSS_GAINSBORO_RGB_VALUE);
+	    colourHT.put(CSS_GHOSTWHITE_NAME, CSS_GHOSTWHITE_RGB_VALUE);
+	    colourHT.put(CSS_GOLDENROD_NAME, CSS_GOLDENROD_RGB_VALUE);
+	    colourHT.put(CSS_GOLD_NAME, CSS_GOLD_RGB_VALUE);
+	    colourHT.put(CSS_GRAY_NAME, CSS_GRAY_RGB_VALUE);
+	    colourHT.put(CSS_GREENYELLOW_NAME, CSS_GREENYELLOW_RGB_VALUE);
+	    colourHT.put(CSS_GREEN_NAME, CSS_GREEN_RGB_VALUE);
+	    colourHT.put(CSS_GREY_NAME, CSS_GRAY_RGB_VALUE);
+	    colourHT.put(CSS_HONEYDEW_NAME, CSS_HONEYDEW_RGB_VALUE);
+	    colourHT.put(CSS_HOTPINK_NAME, CSS_HOTPINK_RGB_VALUE);
+	    colourHT.put(CSS_INDIGO_NAME, CSS_INDIGO_RGB_VALUE);
+	    colourHT.put(CSS_IVORY_NAME, CSS_IVORY_RGB_VALUE);
+	    colourHT.put(CSS_INDIANRED_NAME, CSS_INDIANRED_RGB_VALUE);
+	    colourHT.put(CSS_KHAKI_NAME, CSS_KHAKI_RGB_VALUE);
+	    colourHT.put(CSS_LAVENDERBLUSH_NAME, CSS_LAVENDERBLUSH_RGB_VALUE);
+	    colourHT.put(CSS_LAVENDER_NAME, CSS_LAVENDER_RGB_VALUE);
+	    colourHT.put(CSS_LAWNGREEN_NAME, CSS_LAWNGREEN_RGB_VALUE);
+	    colourHT.put(CSS_LEMONCHIFFON_NAME, CSS_LEMONCHIFFON_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTBLUE_NAME, CSS_LIGHTBLUE_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTCORAL_NAME, CSS_LIGHTCORAL_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTCYAN_NAME, CSS_LIGHTCYAN_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTGOLDENRODYELLOW_NAME, CSS_LIGHTGOLDENRODYELLOW_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTGRAY_NAME, CSS_LIGHTGRAY_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTGREEN_NAME, CSS_LIGHTGREEN_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTGREY_NAME, CSS_LIGHTGREY_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTPINK_NAME, CSS_LIGHTPINK_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTSALMON_NAME, CSS_LIGHTSALMON_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTSEAGREEN_NAME, CSS_LIGHTSEAGREEN_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTSKYBLUE_NAME, CSS_LIGHTSKYBLUE_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTSLATEGRAY_NAME, CSS_LIGHTSLATEGRAY_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTSLATEGREY_NAME, CSS_LIGHTSLATEGREY_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTSTEELBLUE_NAME, CSS_LIGHTSTEELBLUE_RGB_VALUE);
+	    colourHT.put(CSS_LIGHTYELLOW_NAME, CSS_LIGHTYELLOW_RGB_VALUE);
+	    colourHT.put(CSS_LIMEGREEN_NAME, CSS_LIMEGREEN_RGB_VALUE);
+	    colourHT.put(CSS_LIME_NAME, CSS_LIME_RGB_VALUE);
+	    colourHT.put(CSS_MAGENTA_NAME, CSS_MAGENTA_RGB_VALUE);
+	    colourHT.put(CSS_MAROON_NAME, CSS_MAROON_RGB_VALUE);
+	    colourHT.put(CSS_MEDIUMAQUAMARINE_NAME, CSS_MEDIUMAQUAMARINE_RGB_VALUE);
+	    colourHT.put(CSS_MEDIUMBLUE_NAME, CSS_MEDIUMBLUE_RGB_VALUE);
+	    colourHT.put(CSS_MEDIUMORCHID_NAME, CSS_MEDIUMORCHID_RGB_VALUE);
+	    colourHT.put(CSS_MEDIUMPURPLE_NAME, CSS_MEDIUMPURPLE_RGB_VALUE);
+	    colourHT.put(CSS_MEDIUMSEAGREEN_NAME, CSS_MEDIUMSEAGREEN_RGB_VALUE);
+	    colourHT.put(CSS_MEDIUMSLATEBLUE_NAME, CSS_MEDIUMSLATEBLUE_RGB_VALUE);
+	    colourHT.put(CSS_MEDIUMSPRINGGREEN_NAME, CSS_MEDIUMSPRINGGREEN_RGB_VALUE);
+	    colourHT.put(CSS_MEDIUMTURQUOISE_NAME, CSS_MEDIUMTURQUOISE_RGB_VALUE);
+	    colourHT.put(CSS_MEDIUMVIOLETRED_NAME, CSS_MEDIUMVIOLETRED_RGB_VALUE);
+	    colourHT.put(CSS_MIDNIGHTBLUE_NAME, CSS_MIDNIGHTBLUE_RGB_VALUE);
+	    colourHT.put(CSS_MINTCREAM_NAME, CSS_MINTCREAM_RGB_VALUE);
+	    colourHT.put(CSS_MISTYROSE_NAME, CSS_MISTYROSE_RGB_VALUE);
+	    colourHT.put(CSS_MOCCASIN_NAME, CSS_MOCCASIN_RGB_VALUE);
+	    colourHT.put(CSS_NAVAJOWHITE_NAME, CSS_NAVAJOWHITE_RGB_VALUE);
+	    colourHT.put(CSS_NAVY_NAME, CSS_NAVY_RGB_VALUE);
+	    colourHT.put(CSS_OLDLACE_NAME, CSS_OLDLACE_RGB_VALUE);
+	    colourHT.put(CSS_OLIVEDRAB_NAME, CSS_OLIVEDRAB_RGB_VALUE);
+	    colourHT.put(CSS_OLIVE_NAME, CSS_OLIVE_RGB_VALUE);
+	    colourHT.put(CSS_ORANGERED_NAME, CSS_ORANGERED_RGB_VALUE);
+	    colourHT.put(CSS_ORANGE_NAME, CSS_ORANGE_RGB_VALUE);
+	    colourHT.put(CSS_ORCHID_NAME, CSS_ORCHID_RGB_VALUE);
+	    colourHT.put(CSS_PALEGOLDENROD_NAME, CSS_PALEGOLDENROD_RGB_VALUE);
+	    colourHT.put(CSS_PALEGREEN_NAME, CSS_PALEGREEN_RGB_VALUE);
+	    colourHT.put(CSS_PALETURQUOISE_NAME, CSS_PALETURQUOISE_RGB_VALUE);
+	    colourHT.put(CSS_PALEVIOLETRED_NAME, CSS_PALEVIOLETRED_RGB_VALUE);
+	    colourHT.put(CSS_PAPAYAWHIP_NAME, CSS_PAPAYAWHIP_RGB_VALUE);
+	    colourHT.put(CSS_PEACHPUFF_NAME, CSS_PEACHPUFF_RGB_VALUE);
+	    colourHT.put(CSS_PERU_NAME, CSS_PERU_RGB_VALUE);
+	    colourHT.put(CSS_PINK_NAME, CSS_PINK_RGB_VALUE);
+	    colourHT.put(CSS_PLUM_NAME, CSS_PLUM_RGB_VALUE);
+	    colourHT.put(CSS_POWDERBLUE_NAME, CSS_POWDERBLUE_RGB_VALUE);
+	    colourHT.put(CSS_PURPLE_NAME, CSS_PURPLE_RGB_VALUE);
+	    colourHT.put(CSS_RED_NAME, CSS_RED_RGB_VALUE);
+	    colourHT.put(CSS_ROSYBROWN_NAME, CSS_ROSYBROWN_RGB_VALUE);
+	    colourHT.put(CSS_ROYALBLUE_NAME, CSS_ROYALBLUE_RGB_VALUE);
+	    colourHT.put(CSS_SADDLEBROWN_NAME, CSS_SADDLEBROWN_RGB_VALUE);
+	    colourHT.put(CSS_SALMON_NAME, CSS_SALMON_RGB_VALUE);
+	    colourHT.put(CSS_SANDYBROWN_NAME, CSS_SANDYBROWN_RGB_VALUE);
+	    colourHT.put(CSS_SEAGREEN_NAME, CSS_SEAGREEN_RGB_VALUE);
+	    colourHT.put(CSS_SEASHELL_NAME, CSS_SEASHELL_RGB_VALUE);
+	    colourHT.put(CSS_SIENNA_NAME, CSS_SIENNA_RGB_VALUE);
+	    colourHT.put(CSS_SILVER_NAME, CSS_SILVER_RGB_VALUE);
+	    colourHT.put(CSS_SKYBLUE_NAME, CSS_SKYBLUE_RGB_VALUE);
+	    colourHT.put(CSS_SLATEBLUE_NAME, CSS_SLATEBLUE_RGB_VALUE);
+	    colourHT.put(CSS_SLATEGRAY_NAME, CSS_SLATEGRAY_RGB_VALUE);
+	    colourHT.put(CSS_SLATEGREY_NAME, CSS_SLATEGREY_RGB_VALUE);
+	    colourHT.put(CSS_SNOW_NAME, CSS_SNOW_RGB_VALUE);
+	    colourHT.put(CSS_SPRINGGREEN_NAME, CSS_SPRINGGREEN_RGB_VALUE);
+	    colourHT.put(CSS_STEELBLUE_NAME, CSS_STEELBLUE_RGB_VALUE);
+	    colourHT.put(CSS_TAN_NAME, CSS_TAN_RGB_VALUE);
+	    colourHT.put(CSS_TEAL_NAME, CSS_TEAL_RGB_VALUE);
+	    colourHT.put(CSS_THISTLE_NAME, CSS_THISTLE_RGB_VALUE);
+	    colourHT.put(CSS_TOMATO_NAME, CSS_TOMATO_RGB_VALUE);
+	    colourHT.put(CSS_TURQUOISE_NAME, CSS_TURQUOISE_RGB_VALUE);
+	    colourHT.put(CSS_VIOLET_NAME, CSS_VIOLET_RGB_VALUE);
+	    colourHT.put(CSS_WHEAT_NAME, CSS_WHEAT_RGB_VALUE);
+	    colourHT.put(CSS_WHITESMOKE_NAME, CSS_WHITESMOKE_RGB_VALUE);
+	    colourHT.put(CSS_WHITE_NAME, CSS_WHITE_RGB_VALUE);
+	    colourHT.put(CSS_YELLOWGREEN_NAME, CSS_YELLOWGREEN_RGB_VALUE);
+	    colourHT.put(CSS_YELLOW_NAME, CSS_YELLOW_RGB_VALUE);
+	}
+	
+	
+	
+	protected static void createNameColourHashTable()
+	{
+		nameColourHT.clear();
+	    nameColourHT.put(CSS_ALICEBLUE_RGB_VALUE, CSS_ALICEBLUE_NAME);
+	    nameColourHT.put(CSS_ANTIQUEWHITE_RGB_VALUE, CSS_ANTIQUEWHITE_NAME);
+	    nameColourHT.put(CSS_AQUAMARINE_RGB_VALUE, CSS_AQUAMARINE_NAME);
+	    nameColourHT.put(CSS_AZURE_RGB_VALUE, CSS_AZURE_NAME);
+	    nameColourHT.put(CSS_BEIGE_RGB_VALUE, CSS_BEIGE_NAME);
+	    nameColourHT.put(CSS_BISQUE_RGB_VALUE, CSS_BISQUE_NAME);
+	    nameColourHT.put(CSS_BLACK_RGB_VALUE, CSS_BLACK_NAME);
+	    nameColourHT.put(CSS_BLANCHEDALMOND_RGB_VALUE, CSS_BLANCHEDALMOND_NAME);
+	    nameColourHT.put(CSS_BLUEVIOLET_RGB_VALUE, CSS_BLUEVIOLET_NAME);
+	    nameColourHT.put(CSS_BLUE_RGB_VALUE, CSS_BLUE_NAME);
+	    nameColourHT.put(CSS_BROWN_RGB_VALUE, CSS_BROWN_NAME);
+	    nameColourHT.put(CSS_BURLYWOOD_RGB_VALUE, CSS_BURLYWOOD_NAME);
+	    nameColourHT.put(CSS_CADETBLUE_RGB_VALUE, CSS_CADETBLUE_NAME);
+	    nameColourHT.put(CSS_CHARTREUSE_RGB_VALUE, CSS_CHARTREUSE_NAME);
+	    nameColourHT.put(CSS_CHOCOLATE_RGB_VALUE, CSS_CHOCOLATE_NAME);
+	    nameColourHT.put(CSS_CORAL_RGB_VALUE, CSS_CORAL_NAME);
+	    nameColourHT.put(CSS_CORNFLOWERBLUE_RGB_VALUE, CSS_CORNFLOWERBLUE_NAME);
+	    nameColourHT.put(CSS_CORNSILK_RGB_VALUE, CSS_CORNSILK_NAME);
+	    nameColourHT.put(CSS_CRIMSON_RGB_VALUE, CSS_CRIMSON_NAME);
+	    nameColourHT.put(CSS_CYAN_RGB_VALUE, CSS_CYAN_NAME);
+	    nameColourHT.put(CSS_DARKBLUE_RGB_VALUE, CSS_DARKBLUE_NAME);
+	    nameColourHT.put(CSS_DARKCYAN_RGB_VALUE, CSS_DARKCYAN_NAME);
+	    nameColourHT.put(CSS_DARKGOLDENROD_RGB_VALUE, CSS_DARKGOLDENROD_NAME);
+	    nameColourHT.put(CSS_DARKGRAY_RGB_VALUE, CSS_DARKGRAY_NAME);
+	    nameColourHT.put(CSS_DARKGREEN_RGB_VALUE, CSS_DARKGREEN_NAME);
+	    nameColourHT.put(CSS_DARKKHAKI_RGB_VALUE, CSS_DARKKHAKI_NAME);
+	    nameColourHT.put(CSS_DARKMAGENTA_RGB_VALUE, CSS_DARKMAGENTA_NAME);
+	    nameColourHT.put(CSS_DARKOLIVEGREEN_RGB_VALUE, CSS_DARKOLIVEGREEN_NAME);
+	    nameColourHT.put(CSS_DARKORANGE_RGB_VALUE, CSS_DARKORANGE_NAME);
+	    nameColourHT.put(CSS_DARKORCHID_RGB_VALUE, CSS_DARKORCHID_NAME);
+	    nameColourHT.put(CSS_DARKRED_RGB_VALUE, CSS_DARKRED_NAME);
+	    nameColourHT.put(CSS_DARKSALMON_RGB_VALUE, CSS_DARKSALMON_NAME);
+	    nameColourHT.put(CSS_DARKSEAGREEN_RGB_VALUE, CSS_DARKSEAGREEN_NAME);
+	    nameColourHT.put(CSS_DARKSLATEBLUE_RGB_VALUE, CSS_DARKSLATEBLUE_NAME);
+	    nameColourHT.put(CSS_DARKSLATEGRAY_RGB_VALUE, CSS_DARKSLATEGRAY_NAME);
+	    nameColourHT.put(CSS_DARKTURQUOISE_RGB_VALUE, CSS_DARKTURQUOISE_NAME);
+	    nameColourHT.put(CSS_DARKVIOLET_RGB_VALUE, CSS_DARKVIOLET_NAME);
+	    nameColourHT.put(CSS_DEEPPINK_RGB_VALUE, CSS_DEEPPINK_NAME);
+	    nameColourHT.put(CSS_DEEPSKYBLUE_RGB_VALUE, CSS_DEEPSKYBLUE_NAME);
+	    nameColourHT.put(CSS_DIMGRAY_RGB_VALUE, CSS_DIMGRAY_NAME);
+	    nameColourHT.put(CSS_DODGERBLUE_RGB_VALUE, CSS_DODGERBLUE_NAME);
+	    nameColourHT.put(CSS_FIREBRICK_RGB_VALUE, CSS_FIREBRICK_NAME);
+	    nameColourHT.put(CSS_FLORALWHITE_RGB_VALUE, CSS_FLORALWHITE_NAME);
+	    nameColourHT.put(CSS_FORESTGREEN_RGB_VALUE, CSS_FORESTGREEN_NAME);
+	    nameColourHT.put(CSS_GAINSBORO_RGB_VALUE, CSS_GAINSBORO_NAME);
+	    nameColourHT.put(CSS_GHOSTWHITE_RGB_VALUE, CSS_GHOSTWHITE_NAME);
+	    nameColourHT.put(CSS_GOLDENROD_RGB_VALUE, CSS_GOLDENROD_NAME);
+	    nameColourHT.put(CSS_GOLD_RGB_VALUE, CSS_GOLD_NAME);
+	    nameColourHT.put(CSS_GRAY_RGB_VALUE, CSS_GRAY_NAME);
+	    nameColourHT.put(CSS_GREENYELLOW_RGB_VALUE, CSS_GREENYELLOW_NAME);
+	    nameColourHT.put(CSS_GREEN_RGB_VALUE, CSS_GREEN_NAME);
+	    nameColourHT.put(CSS_HONEYDEW_RGB_VALUE, CSS_HONEYDEW_NAME);
+	    nameColourHT.put(CSS_HOTPINK_RGB_VALUE, CSS_HOTPINK_NAME);
+	    nameColourHT.put(CSS_INDIGO_RGB_VALUE, CSS_INDIGO_NAME);
+	    nameColourHT.put(CSS_INDIANRED_RGB_VALUE, CSS_INDIANRED_NAME);
+	    nameColourHT.put(CSS_IVORY_RGB_VALUE, CSS_IVORY_NAME);
+	    nameColourHT.put(CSS_KHAKI_RGB_VALUE, CSS_KHAKI_NAME);
+	    nameColourHT.put(CSS_LAVENDERBLUSH_RGB_VALUE, CSS_LAVENDERBLUSH_NAME);
+	    nameColourHT.put(CSS_LAVENDER_RGB_VALUE, CSS_LAVENDER_NAME);
+	    nameColourHT.put(CSS_LAWNGREEN_RGB_VALUE, CSS_LAWNGREEN_NAME);
+	    nameColourHT.put(CSS_LEMONCHIFFON_RGB_VALUE, CSS_LEMONCHIFFON_NAME);
+	    nameColourHT.put(CSS_LIGHTBLUE_RGB_VALUE, CSS_LIGHTBLUE_NAME);
+	    nameColourHT.put(CSS_LIGHTCORAL_RGB_VALUE, CSS_LIGHTCORAL_NAME);
+	    nameColourHT.put(CSS_LIGHTCYAN_RGB_VALUE, CSS_LIGHTCYAN_NAME);
+	    nameColourHT.put(CSS_LIGHTGOLDENRODYELLOW_RGB_VALUE, CSS_LIGHTGOLDENRODYELLOW_NAME);
+	    nameColourHT.put(CSS_LIGHTGRAY_RGB_VALUE, CSS_LIGHTGRAY_NAME);
+	    nameColourHT.put(CSS_LIGHTGREEN_RGB_VALUE, CSS_LIGHTGREEN_NAME);
+	    nameColourHT.put(CSS_LIGHTPINK_RGB_VALUE, CSS_LIGHTPINK_NAME);
+	    nameColourHT.put(CSS_LIGHTSALMON_RGB_VALUE, CSS_LIGHTSALMON_NAME);
+	    nameColourHT.put(CSS_LIGHTSEAGREEN_RGB_VALUE, CSS_LIGHTSEAGREEN_NAME);
+	    nameColourHT.put(CSS_LIGHTSKYBLUE_RGB_VALUE, CSS_LIGHTSKYBLUE_NAME);
+	    nameColourHT.put(CSS_LIGHTSLATEGRAY_RGB_VALUE, CSS_LIGHTSLATEGRAY_NAME);
+	    nameColourHT.put(CSS_LIGHTSTEELBLUE_RGB_VALUE, CSS_LIGHTSTEELBLUE_NAME);
+	    nameColourHT.put(CSS_LIGHTYELLOW_RGB_VALUE, CSS_LIGHTYELLOW_NAME);
+	    nameColourHT.put(CSS_LIMEGREEN_RGB_VALUE, CSS_LIMEGREEN_NAME);
+	    nameColourHT.put(CSS_LIME_RGB_VALUE, CSS_LIME_NAME);
+	    nameColourHT.put(CSS_MAGENTA_RGB_VALUE, CSS_MAGENTA_NAME);
+	    nameColourHT.put(CSS_MAROON_RGB_VALUE, CSS_MAROON_NAME);
+	    nameColourHT.put(CSS_MEDIUMAQUAMARINE_RGB_VALUE, CSS_MEDIUMAQUAMARINE_NAME);
+	    nameColourHT.put(CSS_MEDIUMBLUE_RGB_VALUE, CSS_MEDIUMBLUE_NAME);
+	    nameColourHT.put(CSS_MEDIUMORCHID_RGB_VALUE, CSS_MEDIUMORCHID_NAME);
+	    nameColourHT.put(CSS_MEDIUMPURPLE_RGB_VALUE, CSS_MEDIUMPURPLE_NAME);
+	    nameColourHT.put(CSS_MEDIUMSEAGREEN_RGB_VALUE, CSS_MEDIUMSEAGREEN_NAME);
+	    nameColourHT.put(CSS_MEDIUMSLATEBLUE_RGB_VALUE, CSS_MEDIUMSLATEBLUE_NAME);
+	    nameColourHT.put(CSS_MEDIUMSPRINGGREEN_RGB_VALUE, CSS_MEDIUMSPRINGGREEN_NAME);
+	    nameColourHT.put(CSS_MEDIUMTURQUOISE_RGB_VALUE, CSS_MEDIUMTURQUOISE_NAME);
+	    nameColourHT.put(CSS_MEDIUMVIOLETRED_RGB_VALUE, CSS_MEDIUMVIOLETRED_NAME);
+	    nameColourHT.put(CSS_MIDNIGHTBLUE_RGB_VALUE, CSS_MIDNIGHTBLUE_NAME);
+	    nameColourHT.put(CSS_MINTCREAM_RGB_VALUE, CSS_MINTCREAM_NAME);
+	    nameColourHT.put(CSS_MISTYROSE_RGB_VALUE, CSS_MISTYROSE_NAME);
+	    nameColourHT.put(CSS_MOCCASIN_RGB_VALUE, CSS_MOCCASIN_NAME);
+	    nameColourHT.put(CSS_NAVAJOWHITE_RGB_VALUE, CSS_NAVAJOWHITE_NAME);
+	    nameColourHT.put(CSS_NAVY_RGB_VALUE, CSS_NAVY_NAME);
+	    nameColourHT.put(CSS_OLDLACE_RGB_VALUE, CSS_OLDLACE_NAME);
+	    nameColourHT.put(CSS_OLIVEDRAB_RGB_VALUE, CSS_OLIVEDRAB_NAME);
+	    nameColourHT.put(CSS_OLIVE_RGB_VALUE, CSS_OLIVE_NAME);
+	    nameColourHT.put(CSS_ORANGERED_RGB_VALUE, CSS_ORANGERED_NAME);
+	    nameColourHT.put(CSS_ORANGE_RGB_VALUE, CSS_ORANGE_NAME);
+	    nameColourHT.put(CSS_ORCHID_RGB_VALUE, CSS_ORCHID_NAME);
+	    nameColourHT.put(CSS_PALEGOLDENROD_RGB_VALUE, CSS_PALEGOLDENROD_NAME);
+	    nameColourHT.put(CSS_PALEGREEN_RGB_VALUE, CSS_PALEGREEN_NAME);
+	    nameColourHT.put(CSS_PALETURQUOISE_RGB_VALUE, CSS_PALETURQUOISE_NAME);
+	    nameColourHT.put(CSS_PALEVIOLETRED_RGB_VALUE, CSS_PALEVIOLETRED_NAME);
+	    nameColourHT.put(CSS_PAPAYAWHIP_RGB_VALUE, CSS_PAPAYAWHIP_NAME);
+	    nameColourHT.put(CSS_PEACHPUFF_RGB_VALUE, CSS_PEACHPUFF_NAME);
+	    nameColourHT.put(CSS_PERU_RGB_VALUE, CSS_PERU_NAME);
+	    nameColourHT.put(CSS_PINK_RGB_VALUE, CSS_PINK_NAME);
+	    nameColourHT.put(CSS_PLUM_RGB_VALUE, CSS_PLUM_NAME);
+	    nameColourHT.put(CSS_POWDERBLUE_RGB_VALUE, CSS_POWDERBLUE_NAME);
+	    nameColourHT.put(CSS_PURPLE_RGB_VALUE, CSS_PURPLE_NAME);
+	    nameColourHT.put(CSS_RED_RGB_VALUE, CSS_RED_NAME);
+	    nameColourHT.put(CSS_ROSYBROWN_RGB_VALUE, CSS_ROSYBROWN_NAME);
+	    nameColourHT.put(CSS_ROYALBLUE_RGB_VALUE, CSS_ROYALBLUE_NAME);
+	    nameColourHT.put(CSS_SADDLEBROWN_RGB_VALUE, CSS_SADDLEBROWN_NAME);
+	    nameColourHT.put(CSS_SALMON_RGB_VALUE, CSS_SALMON_NAME);
+	    nameColourHT.put(CSS_SANDYBROWN_RGB_VALUE, CSS_SANDYBROWN_NAME);
+	    nameColourHT.put(CSS_SEAGREEN_RGB_VALUE, CSS_SEAGREEN_NAME);
+	    nameColourHT.put(CSS_SEASHELL_RGB_VALUE, CSS_SEASHELL_NAME);
+	    nameColourHT.put(CSS_SIENNA_RGB_VALUE, CSS_SIENNA_NAME);
+	    nameColourHT.put(CSS_SILVER_RGB_VALUE, CSS_SILVER_NAME);
+	    nameColourHT.put(CSS_SKYBLUE_RGB_VALUE, CSS_SKYBLUE_NAME);
+	    nameColourHT.put(CSS_SLATEBLUE_RGB_VALUE, CSS_SLATEBLUE_NAME);
+	    nameColourHT.put(CSS_SLATEGRAY_RGB_VALUE, CSS_SLATEGRAY_NAME);
+	    nameColourHT.put(CSS_SNOW_RGB_VALUE, CSS_SNOW_NAME);
+	    nameColourHT.put(CSS_SPRINGGREEN_RGB_VALUE, CSS_SPRINGGREEN_NAME);
+	    nameColourHT.put(CSS_STEELBLUE_RGB_VALUE, CSS_STEELBLUE_NAME);
+	    nameColourHT.put(CSS_TAN_RGB_VALUE, CSS_TAN_NAME);
+	    nameColourHT.put(CSS_TEAL_RGB_VALUE, CSS_TEAL_NAME);
+	    nameColourHT.put(CSS_THISTLE_RGB_VALUE, CSS_THISTLE_NAME);
+	    nameColourHT.put(CSS_TOMATO_RGB_VALUE, CSS_TOMATO_NAME);
+	    nameColourHT.put(CSS_TURQUOISE_RGB_VALUE, CSS_TURQUOISE_NAME);
+	    nameColourHT.put(CSS_VIOLET_RGB_VALUE, CSS_VIOLET_NAME);
+	    nameColourHT.put(CSS_WHEAT_RGB_VALUE, CSS_WHEAT_NAME);
+	    nameColourHT.put(CSS_WHITESMOKE_RGB_VALUE, CSS_WHITESMOKE_NAME);
+	    nameColourHT.put(CSS_WHITE_RGB_VALUE, CSS_WHITE_NAME);
+	    nameColourHT.put(CSS_YELLOWGREEN_RGB_VALUE, CSS_YELLOWGREEN_NAME);
+	    nameColourHT.put(CSS_YELLOW_RGB_VALUE, CSS_YELLOW_NAME);
+	}
+	    
+	    
+	static
+	{
+		createColourHashTable();
+		createNameColourHashTable();
+	}
+	
+	
+	
+	/**
+	 * @param name The name of the wanted colour or null if the colour is not found.
+	 * @return The colour.
+	 */
+	public static Color getColor(String name)
+	{
+		if(name==null || name.length()==0) 
+			return null;
+
+		Color c = colourHT.get(name);
+		
+		if(c!=null)
+			return c;
+		
+		boolean found = false;
+		int i=0, size = usercolors.size();
+		
+		while(!found && i<size)
+			found = name.equals(userNamecolors.elementAt(i++));
+		
+		return found ? usercolors.elementAt(i-1) : null;
+	}
+	
+	
+	
+	
+	/**
+	 * Adds a colour defined by the user.
+	 * @param c The colour to add.
+	 * @param name The name of this colour.
+	 */
+	public static void addUserColor(Color c, String name)
+	{
+		if(name==null || c==null)
+			return ;
+		
+		boolean exist = false;
+		int i=0, size = userNamecolors.size();
+		
+		while(!exist && i<size)
+		{
+			exist = name.equals(userNamecolors.elementAt(i));
+			i++;
+		}
+		
+		if(exist)
+		{
+			userNamecolors.removeElementAt(i-1);
+			usercolors.removeElementAt(i-1);
+		}
+		
+		usercolors.add(c);
+		userNamecolors.add(name);
+	}
+
+	
+	
+	
+	/**
+	 * @param c The colour of the colour with the given name.
+	 * @param create If true and if the colour is not found, then the colour will be created, added to the user's colours and returned.
+	 * The created name will be then its hexadecimal value.
+	 * @return The name of the colour or null.
+	 */
+	public static String getColorName(Color c, boolean create)
+	{
+		if(c==null)
+			return null;
+		
+		String name = nameColourHT.get(c);
+		
+		if(name!=null)
+			return name;
+		
+		boolean found = false;
+		int i=0, size = usercolors.size();
+		
+		while(!found && i<size)
+			found = c.equals(usercolors.elementAt(i++));
+		
+		if(found) 
+			return userNamecolors.elementAt(i-1);
+		
+		if(create)
+		{
+			addUserColor(c, RGBToHex(c));
+			return getColorName(c, false);
+		}
+		
+		return null;
+	}
+
+	
+	
+	/**
+	 * Converts an hexadecimal colour to an RBG one.
+	 * @param hex The colour in hexadecimal.
+	 * @throws IllegalArgumentException If the hex value is not hexadecimal.
+	 * @return The corresponding colour.
+	 * @since 2.0.0
+	 */
+	public static Color hexToRBG(String hex)
+	{
+		if(hex==null || !hex.startsWith("#")) //$NON-NLS-1$
+			throw new IllegalArgumentException();
+		
+		try
+		{
+			String col = hex.substring(1);
+			String r, g, b;
+			
+			switch(col.length())
+			{
+				case 6:// #112233 for instance.
+					r = col.substring(0, 2);
+					g = col.substring(2, 4);
+					b = col.substring(4, 6);
+					break;
+					
+				case 3: // #123 for instance.
+					r = String.valueOf(col.charAt(0));
+					g = String.valueOf(col.charAt(1));
+					b = String.valueOf(col.charAt(2));
+					
+					r+=r;
+					g+=g;
+					b+=b;
+					break;
+				
+				default:
+					throw new IllegalArgumentException();
+			}
+			
+			return new Color(Integer.valueOf(r, 16).intValue(), Integer.valueOf(g, 16).intValue(), Integer.valueOf(b, 16).intValue());
+		}
+		catch(Exception e) { throw new IllegalArgumentException(hex); }
+	}
+	
+
+	
+	
+	/**
+	 * Creates the corresponding hexadecimal colour given a RGB one.
+	 * @param c The given RBG colour.
+	 * @return The corresponding hexadecimal colour.
+	 * @since 2.0.0
+	 */
+	public static String RGBToHex(Color c)
+	{
+		if(c==null)
+			return ""; //$NON-NLS-1$
+		
+		String r = Integer.toHexString(c.getRed());
+		String g = Integer.toHexString(c.getGreen());
+		String b = Integer.toHexString(c.getBlue());
+		
+		if(r.length()==1)
+			r = '0' + r;
+		
+		if(g.length()==1)
+			g = '0' + g;
+		
+		if(b.length()==1)
+			b = '0' + b;
+		
+		return '#' + r + g + b;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get a RGB colour from a string which can be either an hexadecimal colour (CSS) or an explicit colour name (blue,...)
+	 * or an RGB colour in this format: rgb(r,g,b).
+	 * If <code>str</code> is null, null is returned.
+	 * @param str The colour to read.
+	 * @return The found colour or null.
+	 * @since 2.0.0
+	 */
+	public static Color getRGBColour(String str)
+	{
+		Color c = null;
+		
+		try
+		{
+			if(str!=null)
+				if(str.startsWith("#"))//$NON-NLS-1$
+					c = CSSColors.hexToRBG(str);
+				else
+					if(str.startsWith("rgb("))//$NON-NLS-1$
+						c = CSSColors.SVGRGBtoRGB(str);
+					else
+						c = CSSColors.getColor(str);
+			
+			return c;
+		}
+		catch(IllegalArgumentException e) { return null; }
+	}
+	
+	
+	
+	/**
+	 * Converts an SVG RGB colour: "rgb(int,int,int)" or "rgb(pc,pc,pc)" in an AWT colour.
+	 * @param str The string to parse.
+	 * @return The extracted colour or null.
+	 * @since 2.0.0
+	 */
+	public static Color SVGRGBtoRGB(String str)
+	{
+		if(str==null || !str.startsWith("rgb(") || !str.endsWith(")"))//$NON-NLS-1$//$NON-NLS-2$
+			return null;
+		
+		Color c = null;
+		String s = str.substring(4, str.length()-1);
+		String[] rgbs = s.split(",");//$NON-NLS-1$
+		
+		try
+		{
+			if(rgbs!=null && rgbs.length==3)
+			{
+				rgbs[0] = rgbs[0].replaceAll("[\t ]", "");//$NON-NLS-1$//$NON-NLS-2$
+				rgbs[1] = rgbs[1].replaceAll("[\t ]", "");//$NON-NLS-1$//$NON-NLS-2$
+				rgbs[2] = rgbs[2].replaceAll("[\t ]", "");//$NON-NLS-1$//$NON-NLS-2$
+				
+				if(rgbs[0].contains("%"))//$NON-NLS-1$
+				{
+					if(rgbs[0].endsWith("%") && rgbs[1].endsWith("%") && rgbs[2].endsWith("%"))//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+						c = new Color(Double.valueOf(rgbs[0].substring(0, rgbs[0].length()-1)).floatValue()/100f, 
+									Double.valueOf(rgbs[1].substring(0, rgbs[1].length()-1)).floatValue()/100f, 
+									Double.valueOf(rgbs[2].substring(0, rgbs[2].length()-1)).floatValue()/100f);
+				}
+				else
+					c = new Color(Integer.valueOf(rgbs[0]), Integer.valueOf(rgbs[1]), Integer.valueOf(rgbs[2]));
+			}
+		}
+		catch(NumberFormatException e) 		{ return null; }
+		catch(IllegalArgumentException e) 	{ return null; }
+		
+		return c;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/CSSStyleList.java b/current/latexDraw/parsers/svg/CSSStyleList.java
new file mode 100644
index 0000000..8ac61fc
--- /dev/null
+++ b/current/latexDraw/parsers/svg/CSSStyleList.java
@@ -0,0 +1,61 @@
+package latexDraw.parsers.svg;
+
+import java.util.HashMap;
+
+import latexDraw.parsers.svg.parsers.CSSStyleHandler;
+
+/**
+ * Defines a list of CSS styles.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class CSSStyleList extends HashMap<String, String> implements CSSStyleHandler
+{
+	private static final long serialVersionUID = 1L;
+
+
+	/**
+	 * Adds a CSS style to the list.
+	 * @param name The name of the style.
+	 * @param value The value of the style.
+	 * @since 0.1
+	 */
+	public void addCSSStyle(String name, String value)
+	{
+		if(name!=null && value!=null)
+			put(name, value);
+	}
+	
+	
+	
+	/**
+	 * @param styleName The name of the style.
+	 * @return The value of the given CSS style name or null.
+	 */
+	public String getCSSValue(String styleName)
+	{
+		return get(styleName);
+	}
+	
+	
+	
+	public void onCSSStyle(String name, String value)
+	{
+		if(name!=null && value!=null)
+			addCSSStyle(name, value);
+	}
+}
diff --git a/current/latexDraw/parsers/svg/LaTeXDrawFiguresFactory.java b/current/latexDraw/parsers/svg/LaTeXDrawFiguresFactory.java
new file mode 100644
index 0000000..c31b4c5
--- /dev/null
+++ b/current/latexDraw/parsers/svg/LaTeXDrawFiguresFactory.java
@@ -0,0 +1,132 @@
+package latexDraw.parsers.svg;
+
+import latexDraw.figures.*;
+import latexDraw.generators.svg.*;
+import latexDraw.parsers.svg.elements.*;
+import latexDraw.util.LaTeXDrawNamespace;
+
+/**
+ * Creates latexdraw figures according to the given SVG element.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/21/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class LaTeXDrawFiguresFactory
+{
+	public static Figure createFigure(SVGElement e)
+	{
+		return createFigure(e, true);
+	}
+	
+	
+	public static Figure createFigure(SVGElement e, boolean withTransformations)
+	{
+		if(e==null || !e.enableRendering())
+			return null;
+		
+		try
+		{
+			if(e instanceof SVGRectElement)
+				return new LRectangleSVGGenerator((SVGRectElement)e).getShape();
+			else if(e instanceof SVGEllipseElement)
+				return new LEllipseSVGGenerator((SVGEllipseElement)e).getShape();
+			else if(e instanceof SVGCircleElement)
+				return new LCircleSVGGenerator((SVGCircleElement)e).getShape();
+			else if(e instanceof SVGPolygonElement)
+				return new LPolygonSVGGenerator((SVGPolygonElement)e).getShape();
+			else if(e instanceof SVGPolyLineElement)
+				return new LLinesSVGGenerator((SVGPolyLineElement)e).getShape();
+			else if(e instanceof SVGImageElement)
+				return new LPictureSVGGenerator((SVGImageElement)e).getShape();
+			else if(e instanceof SVGLineElement)
+				return new LLineSVGGenerator((SVGLineElement)e).getShape();
+			else if(e instanceof SVGTextElement)
+				return new LTextSVGGenerator((SVGTextElement)e).getShape();
+			else if(e instanceof SVGPathElement)
+			{
+				SVGPathElement p = (SVGPathElement)e;
+				
+				if(p.isPolygon())
+					return new LPolygonSVGGenerator((SVGPathElement)e).getShape();
+				else
+					if(p.isLines())
+						return new LLinesSVGGenerator((SVGPathElement)e).getShape();
+					else
+						if(p.isLine())
+							return new LLineSVGGenerator((SVGPathElement)e).getShape();
+			}
+			else
+				if(e instanceof SVGGElement)
+				{
+					String ltdPref = e.lookupPrefixUsable(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI);
+					String type = e.getAttribute(ltdPref+LaTeXDrawNamespace.XML_TYPE);
+					
+					if(type==null || type.length()==0 || LaTeXDrawNamespace.XML_TYPE_DRAWING.equals(type))
+					{
+						switch(e.getChildNodes().getLength())
+						{
+							case 0:
+								return null;
+							case 1:
+								return createFigure((SVGElement)e.getChildNodes().item(0));
+							default:
+								return new LDrawingSVGGenerator((SVGGElement)e, withTransformations).getShape();
+						}
+					}
+					
+					if(type.equals(LaTeXDrawNamespace.XML_TYPE_RECT))
+						return new LRectangleSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_ELLIPSE))
+						return new LEllipseSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_CIRCLE))
+						return new LCircleSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_POLYGON))
+						return new LPolygonSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_SQUARE))
+						return new LSquareSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_TRIANGLE))
+						return new LTriangleSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_RHOMBUS))
+						return new LRhombusSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_JOINED_LINES))
+						return new LLinesSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_AKIN_PTS))
+						return new LFreeHandSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_LINE))
+						return new LLineSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_BEZIER_CURVE))
+						return new LBezierCurveSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_GRID))
+						return new LGridSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_AXE))
+						return new LAxeSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_TEXT))
+						return new LTextSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_DRAWING))
+						return new LDrawingSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_DOT))
+						return new LDotSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_ARC))
+						return new LArcSVGGenerator((SVGGElement)e, withTransformations).getShape();
+					else if(type.equals(LaTeXDrawNamespace.XML_TYPE_PICTURE))
+						return new LPictureSVGGenerator((SVGGElement)e, withTransformations).getShape();
+				}
+		}
+		catch(Exception ex) { ex.printStackTrace(); }
+		
+		return null;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/MalformedSVGDocument.java b/current/latexDraw/parsers/svg/MalformedSVGDocument.java
new file mode 100644
index 0000000..e32ebcf
--- /dev/null
+++ b/current/latexDraw/parsers/svg/MalformedSVGDocument.java
@@ -0,0 +1,31 @@
+package latexDraw.parsers.svg;
+
+/**
+ * Defines the exception to use when an SVG document is malformed.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class MalformedSVGDocument extends Exception
+{
+	private static final long	serialVersionUID	= 1L;
+
+	@Override
+	public String toString()
+	{
+		return "The SVG document is malformed.";//$NON-NLS-1$
+	}
+}
diff --git a/current/latexDraw/parsers/svg/SVGAttr.java b/current/latexDraw/parsers/svg/SVGAttr.java
new file mode 100644
index 0000000..251fd79
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGAttr.java
@@ -0,0 +1,283 @@
+package latexDraw.parsers.svg;
+
+import org.w3c.dom.*;
+
+/**
+ * Defines an SVG attribute.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/16/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGAttr implements Attr, Cloneable
+{
+	/** The name of the attribute. @since 0.1 */
+	protected String name;
+	
+	/** The owner of the attribute. @since 0.1 */
+	protected Element owner;
+	
+	/** The value of the attribute. @since 0.1 */
+	protected String value;
+	
+	
+	
+	public SVGAttr(String n, String v, Element parent)
+	{
+		if(n==null || parent==null || v==null)
+			throw new IllegalArgumentException();
+		
+		name 	= n;
+		owner 	= parent;
+		value 	= v;
+	}
+	
+	
+	
+	public String getName()
+	{
+		return name;
+	}
+
+
+
+	public Element getOwnerElement()
+	{
+		return owner;
+	}
+
+
+
+	public String getValue()
+	{
+		return value;
+	}
+
+
+
+	public boolean isId()
+	{
+		return name.equals(SVGAttributes.SVG_ID);
+	}
+
+
+
+	public void setValue(String value) throws DOMException
+	{
+		if(value==null)
+			throw new DOMException(DOMException.SYNTAX_ERR, "A value cannot be null");//$NON-NLS-1$
+		
+		this.value = value;
+	}
+
+
+	
+	/** No deep allow. */
+	public Node cloneNode(boolean deep)
+	{
+		try { return (SVGAttr)super.clone(); }
+		catch(CloneNotSupportedException e) { return null; }
+	}
+
+
+
+	public String getNodeName()
+	{
+		return name;
+	}
+
+
+
+	public short getNodeType()
+	{
+		return Node.ATTRIBUTE_NODE;
+	}
+
+
+
+	public String getNodeValue() throws DOMException
+	{
+		return value;
+	}
+
+
+
+	public Node getParentNode()
+	{
+		return owner;
+	}
+
+
+	public boolean hasAttributes()
+	{
+		return false;
+	}
+
+
+	public boolean hasChildNodes()
+	{
+		return false;
+	}
+
+
+
+	public boolean isEqualNode(Node arg)
+	{
+		return arg!=null && arg.getNodeName().equals(name) && arg.getNodeValue().equals(value) &&
+			   arg.getNodeType()==getNodeType();
+	}
+
+	
+
+	public boolean isSameNode(Node other)
+	{
+		return other!=null && other==this;
+	}
+
+
+	
+	public void setNodeValue(String nodeValue) throws DOMException
+	{
+		setValue(nodeValue);
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append("["); //$NON-NLS-1$
+		stringBuffer.append(name);
+		stringBuffer.append(", "); //$NON-NLS-1$
+		stringBuffer.append(value);
+		stringBuffer.append("]"); //$NON-NLS-1$
+		
+		return stringBuffer.toString();
+	}
+
+	
+	public String getPrefix()
+	{
+		if(getNodeName()==null)
+			return null;
+		
+		int index = getName().indexOf(':');
+		
+		if(index!=-1)
+			return getName().substring(0, index);
+		
+		return null;
+	}
+
+	
+	public boolean getSpecified()
+	{
+		return true; 
+	}
+	
+	
+	public String getNamespaceURI()
+	{ 
+		return lookupNamespaceURI(getPrefix()); 
+	}
+	
+	
+	public String lookupNamespaceURI(String prefix)
+	{ 
+		return owner.lookupNamespaceURI(prefix);
+	}
+	
+	
+	public String getLocalName()
+	{	
+		return name;
+	}
+	
+	
+	public TypeInfo getSchemaTypeInfo()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public short compareDocumentPosition(Node other) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public String getBaseURI()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Object getFeature(String feature, String version)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Node getNextSibling()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Document getOwnerDocument()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Node getPreviousSibling()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public String getTextContent() throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Object getUserData(String key)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public boolean isDefaultNamespace(String namespaceURI)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public boolean isSupported(String feature, String version)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public String lookupPrefix(String namespaceURI)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void normalize()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+	
+	public Node replaceChild(Node newChild, Node oldChild) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void setPrefix(String prefix) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void setTextContent(String textContent) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Object setUserData(String key, Object data, UserDataHandler handler)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	
+	public Node removeChild(Node oldChild) throws DOMException
+	{ return null; }
+
+	public Node insertBefore(Node newChild, Node refChild) throws DOMException
+	{ return null; }
+	
+	public NamedNodeMap getAttributes()
+	{ return null; }
+
+	public NodeList getChildNodes()
+	{ return null; }
+
+	public Node getFirstChild()
+	{ return null; }
+
+	public Node getLastChild()
+	{ return null; }
+
+	public Node appendChild(Node newChild) throws DOMException
+	{ return null; }
+}
diff --git a/current/latexDraw/parsers/svg/SVGAttributes.java b/current/latexDraw/parsers/svg/SVGAttributes.java
new file mode 100644
index 0000000..1a3b970
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGAttributes.java
@@ -0,0 +1,281 @@
+package latexDraw.parsers.svg;
+
+
+/** 
+ * Contains SVG attributes according to the SVG specification version 1.1.<br>
+ *<br>
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 06/04/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+public abstract class SVGAttributes
+{
+	public static final String SVG_X 						= "x";								//$NON-NLS-1$
+	public static final String SVG_Y 						= "y";								//$NON-NLS-1$
+	public static final String SVG_X1 						= "x1";								//$NON-NLS-1$
+	public static final String SVG_Y1 						= "y1";								//$NON-NLS-1$
+	public static final String SVG_X2 						= "x2";								//$NON-NLS-1$
+	public static final String SVG_Y2 						= "y2";								//$NON-NLS-1$
+	public static final String SVG_RX 						= "rx";								//$NON-NLS-1$
+	public static final String SVG_RY 						= "ry";								//$NON-NLS-1$
+	public static final String SVG_ID 						= "id";								//$NON-NLS-1$
+	public static final String SVG_HEIGHT					= "height";							//$NON-NLS-1$
+	public static final String SVG_WIDTH					= "width";							//$NON-NLS-1$
+	public static final String SVG_FILL						= "fill";							//$NON-NLS-1$
+	public static final String SVG_STROKE					= "stroke";							//$NON-NLS-1$
+	public static final String SVG_STROKE_WIDTH				= "stroke-width";					//$NON-NLS-1$
+	public static final String SVG_TRANSFORM				= "transform";						//$NON-NLS-1$
+	public static final String SVG_OFFSET					= "offset";							//$NON-NLS-1$
+	public static final String SVG_STOP_COLOR				= "stop-color";						//$NON-NLS-1$
+	public static final String SVG_GRADIENT_UNITS			= "gradientUnits";					//$NON-NLS-1$
+	public static final String SVG_PATTERN_UNITS			= "patternUnits";					//$NON-NLS-1$
+	public static final String SVG_D						= "d";								//$NON-NLS-1$
+	public static final String SVG_STROKE_DASHARRAY			= "stroke-dasharray";				//$NON-NLS-1$
+	public static final String SVG_STROKE_LINECAP			= "stroke-linecap";					//$NON-NLS-1$
+	public static final String SVG_POINTS					= "points";							//$NON-NLS-1$
+	public static final String SVG_MARKER_END				= "marker-end";						//$NON-NLS-1$
+	public static final String SVG_MARKER_START				= "marker-start";					//$NON-NLS-1$
+	public static final String SVG_MARKER_MID				= "marker-mid";						//$NON-NLS-1$
+	public static final String SVG_ORIENT					= "orient";							//$NON-NLS-1$
+	public static final String SVG_R						= "r";								//$NON-NLS-1$
+	public static final String SVG_REF_X					= "refX";							//$NON-NLS-1$
+	public static final String SVG_REF_Y					= "refY";							//$NON-NLS-1$
+	public static final String SVG_CX						= "cx";								//$NON-NLS-1$
+	public static final String SVG_CY						= "cy";								//$NON-NLS-1$
+	public static final String SVG_DX						= "dx";								//$NON-NLS-1$
+	public static final String SVG_DY						= "dy";								//$NON-NLS-1$
+	public static final String SVG_FONT_SIZE				= "font-size";						//$NON-NLS-1$
+	public static final String SVG_FONT_FAMILY				= "font-family";					//$NON-NLS-1$
+	public static final String SVG_VERSION					= "version";						//$NON-NLS-1$
+	public static final String SVG_PATTERN_CONTENTS_UNITS	= "patternContentUnits";			//$NON-NLS-1$
+	public static final String SVG_SPREAD_METHOD			= "spreadMethod";					//$NON-NLS-1$
+	public static final String SVG_STYLE					= "style";							//$NON-NLS-1$
+	public static final String SVG_MARKER_UNITS				= "markerUnits";					//$NON-NLS-1$
+	public static final String SVG_MARKER_HEIGHT			= "markerHeight";					//$NON-NLS-1$
+	public static final String SVG_MARKER_WIDTH				= "markerWidth";					//$NON-NLS-1$
+	public static final String SVG_OVERFLOW					= "overflow";						//$NON-NLS-1$
+	public static final String SVG_BASE_PROFILE				= "baseProfile";					//$NON-NLS-1$
+	public static final String SVG_FONT_STYLE				= "font-style";						//$NON-NLS-1$
+	public static final String SVG_FONT_WEIGHT				= "font-weight";					//$NON-NLS-1$
+	
+	public static final String SVG_VALUE_NONE				= "none";							//$NON-NLS-1$
+	public static final String SVG_UNITS_VALUE_USR 			= "userSpaceOnUse";					//$NON-NLS-1$
+	public static final String SVG_UNITS_VALUE_OBJ 			= "objectBoundingBox";				//$NON-NLS-1$
+	public static final String SVG_LINECAP_VALUE_BUTT		= "butt";							//$NON-NLS-1$
+	public static final String SVG_LINECAP_VALUE_ROUND		= "round";							//$NON-NLS-1$
+	public static final String SVG_LINECAP_VALUE_SQUARE		= "square";							//$NON-NLS-1$
+	public static final String SVG_VALUE_AUTO				= "auto";							//$NON-NLS-1$
+	public static final String SVG_INHERIT					= "inherit";						//$NON-NLS-1$
+	public static final String SVG_PAD						= "pad";							//$NON-NLS-1$
+	public static final String SVG_REFLECT					= "reflect";						//$NON-NLS-1$
+	public static final String SVG_REPEAT					= "repeat";							//$NON-NLS-1$
+	public static final String SVG_UNITS_VALUE_STROKE		= "strokeWidth";					//$NON-NLS-1$
+	public static final String SVG_VALUE_VISIBLE			= "visible";						//$NON-NLS-1$
+	
+	public static final String SVG_TRANSFORM_ROTATE			= "rotate";							//$NON-NLS-1$
+	public static final String SVG_TRANSFORM_MATRIX			= "matrix";							//$NON-NLS-1$
+	public static final String SVG_TRANSFORM_TRANSLATE		= "translate";						//$NON-NLS-1$
+	public static final String SVG_TRANSFORM_SCALE			= "scale";							//$NON-NLS-1$
+	public static final String SVG_TRANSFORM_SKEW_X			= "skewX";							//$NON-NLS-1$
+	public static final String SVG_TRANSFORM_SKEW_Y			= "skewY";							//$NON-NLS-1$
+
+	public static final String SVG_FONT_STYLE_ITALIC		= "italic";							//$NON-NLS-1$
+	public static final String SVG_FONT_WEIGHT_BOLD			= "bold";							//$NON-NLS-1$
+	
+//	public static final String SVG_TEXT_ANCHOR				= "text-anchor";					//$NON-NLS-1$
+//	public static final String SVG_TEXT_ANCHOR_VALUE_END	= "end";							//$NON-NLS-1$
+//	public static final String SVG_TEXT_ANCHOR_VALUE_START	= "start";							//$NON-NLS-1$
+//	public static final String SVG_TEXT_ANCHOR_VALUE_MIDDLE	= "middle";							//$NON-NLS-1$
+//	public static final String SVG_STOP_OPACITY				= "stop-opacity";					//$NON-NLS-1$
+//	public static final String SVG_ACCENT_HEIGHT 			= "accent-height";					//$NON-NLS-1$
+//	public static final String SVG_ACCUMULATE				= "accumulate";						//$NON-NLS-1$
+//	public static final String SVG_ALIGNMENT_BASELINE		= "alignment-baseline";				//$NON-NLS-1$
+//	public static final String SVG_ALPHABETIC				= "alphabetic";						//$NON-NLS-1$
+//	public static final String SVG_AMPLITUDE				= "amplitude";						//$NON-NLS-1$
+//	public static final String SVG_ANIMATE					= "animate";						//$NON-NLS-1$
+//	public static final String SVG_ARABIC_FORM				= "arabic-form";					//$NON-NLS-1$
+//	public static final String SVG_ASCENT					= "ascent";							//$NON-NLS-1$
+//	public static final String SVG_ATTRIBUTE_TYPE			= "attributeType";					//$NON-NLS-1$
+//	public static final String SVG_AZIMUTH					= "azimuth";						//$NON-NLS-1$
+//	public static final String SVG_BASE_FREQUENCY			= "baseFrequency";					//$NON-NLS-1$
+//	public static final String SVG_BASELINE_SHIFT			= "baseline-shift";					//$NON-NLS-1$
+//	public static final String SVG_BBOX						= "bbox";							//$NON-NLS-1$
+//	public static final String SVG_BIAS						= "bias";							//$NON-NLS-1$
+//	public static final String SVG_BY						= "by";								//$NON-NLS-1$
+//	public static final String SVG_CALC_MODE				= "calcMode";						//$NON-NLS-1$
+//	public static final String SVG_CAP_HEIGHT				= "cap-height";						//$NON-NLS-1$
+//	public static final String SVG_CAP_CLASS				= "class";							//$NON-NLS-1$
+//	public static final String SVG_CLIP						= "clip";							//$NON-NLS-1$
+//	public static final String SVG_CLIP_PATH				= "clip-path";						//$NON-NLS-1$
+//	public static final String SVG_CLIP_RULE				= "clip-rule";						//$NON-NLS-1$
+//	public static final String SVG_CLIP_PATH_UNITS			= "clipPathUnits";					//$NON-NLS-1$
+//	public static final String SVG_COLOR					= "color";							//$NON-NLS-1$
+//	public static final String SVG_COLOR_INTERPOLATION		= "color-interpolation";			//$NON-NLS-1$
+//	public static final String SVG_COLOR_INTERPOLATION_FILTERS	= "color-interpolation-filters";//$NON-NLS-1$
+//	public static final String SVG_COLOR_PROFILE			= "color-profile";					//$NON-NLS-1$
+//	public static final String SVG_COLOR_RENDERING			= "color-rendering";				//$NON-NLS-1$
+//	public static final String SVG_CONTENT_SCRIPT_TYPE		= "contentScriptType";				//$NON-NLS-1$
+//	public static final String SVG_CONTENT_STYLE_TYPE		= "contentStyleType";				//$NON-NLS-1$
+//	public static final String SVG_CURSOR					= "cursor";							//$NON-NLS-1$
+//	public static final String SVG_DESCENT					= "descent";						//$NON-NLS-1$
+//	public static final String SVG_DIFFUSE_CONSTANT			= "diffuseConstant";				//$NON-NLS-1$
+//	public static final String SVG_DIRECTION				= "direction";						//$NON-NLS-1$
+//	public static final String SVG_DISPLAY					= "display";						//$NON-NLS-1$
+//	public static final String SVG_DIVISOR					= "divisor";						//$NON-NLS-1$
+//	public static final String SVG_DOMINANT_BASELINE		= "dominant-baseline";				//$NON-NLS-1$
+//	public static final String SVG_EDGE_MODE				= "edgeMode";						//$NON-NLS-1$
+//	public static final String SVG_ELEVATION				= "elevation";						//$NON-NLS-1$
+//	public static final String SVG_ENABLE_BACKGROUND		= "enable-background";				//$NON-NLS-1$
+//	public static final String SVG_END						= "end";							//$NON-NLS-1$
+//	public static final String SVG_EXPONENT					= "exponent";						//$NON-NLS-1$
+//	public static final String SVG_EXTERNAL_RESOURCES_REQUIRED	= "externalResourcesRequired";	//$NON-NLS-1$
+//	public static final String SVG_FE_COLOR_MATRIX			= "feColorMatrix";					//$NON-NLS-1$
+//	public static final String SVG_FE_COMPOSITE				= "feComposite";					//$NON-NLS-1$
+//	public static final String SVG_FE_GAUSSIAN_BLUR			= "feGaussianBlur";					//$NON-NLS-1$
+//	public static final String SVG_FE_MORPHOLOGY			= "feMorphology";					//$NON-NLS-1$
+//	public static final String SVG_FE_TILE					= "feTile";							//$NON-NLS-1$
+//	public static final String SVG_FILL_OPACITY				= "fill-opacity";					//$NON-NLS-1$
+//	public static final String SVG_FILL_RULE				= "fill-rule";						//$NON-NLS-1$
+//	public static final String SVG_FILTER					= "filter";							//$NON-NLS-1$
+//	public static final String SVG_FILTER_RES				= "filterRes";						//$NON-NLS-1$
+//	public static final String SVG_FILTER_UNITS				= "filterUnits";					//$NON-NLS-1$
+//	public static final String SVG_FLOOD_COLOR				= "flood-color";					//$NON-NLS-1$
+//	public static final String SVG_FLOOD_OPACITY			= "flood-opacity";					//$NON-NLS-1$
+//	public static final String SVG_FONT_SIZE_ADJUST			= "font-size-adjust";				//$NON-NLS-1$
+//	public static final String SVG_FONT_STRETCH				= "font-stretch";					//$NON-NLS-1$
+//	public static final String SVG_FONT_VARIANT				= "font-variant";					//$NON-NLS-1$
+//	public static final String SVG_FORMAT					= "format";							//$NON-NLS-1$
+//	public static final String SVG_FROM						= "from";							//$NON-NLS-1$
+//	public static final String SVG_FX						= "fx";								//$NON-NLS-1$
+//	public static final String SVG_FY						= "fy";								//$NON-NLS-1$
+//	public static final String SVG_G1						= "g1";								//$NON-NLS-1$
+//	public static final String SVG_G2						= "g2";								//$NON-NLS-1$
+//	public static final String SVG_GLYPH_NAME				= "glyph-name";						//$NON-NLS-1$
+//	public static final String SVG_GLYPH_ORIENTATION_HORIZONTAL	= "glyph-orientation-horizontal";	//$NON-NLS-1$
+//	public static final String SVG_GLYPH_ORIENTATION_VERTICAL	= "glyph-orientation-vertical";		//$NON-NLS-1$
+//	public static final String SVG_GLYPH_REF				= "glyphRef";						//$NON-NLS-1$
+//	public static final String SVG_GRADIENT_TRANSFORM		= "gradientTransform";				//$NON-NLS-1$
+//	public static final String SVG_HANGING					= "hanging";						//$NON-NLS-1$
+//	public static final String SVG_HORIZ_ADV_X				= "horiz-adv-x";					//$NON-NLS-1$
+//	public static final String SVG_HORIZ_ORIGIN_X			= "horiz-origin-x";					//$NON-NLS-1$
+//	public static final String SVG_HORIZ_ORIGIN_Y			= "horiz-origin-y";					//$NON-NLS-1$
+//	public static final String SVG_IDEOGRAPHIC				= "ideographic";					//$NON-NLS-1$
+//	public static final String SVG_IMAGE_RENDERING			= "image-rendering";				//$NON-NLS-1$
+//	public static final String SVG_IN						= "in";								//$NON-NLS-1$
+//	public static final String SVG_IN2						= "in2";							//$NON-NLS-1$
+//	public static final String SVG_INTERCEPT				= "intercept";						//$NON-NLS-1$
+//	public static final String SVG_K						= "k";								//$NON-NLS-1$
+//	public static final String SVG_K1						= "k1";								//$NON-NLS-1$
+//	public static final String SVG_K2						= "k2";								//$NON-NLS-1$
+//	public static final String SVG_K3						= "k3";								//$NON-NLS-1$
+//	public static final String SVG_K4						= "k4";								//$NON-NLS-1$
+//	public static final String SVG_KERNEL_MATRIX			= "kernelMatrix";					//$NON-NLS-1$
+//	public static final String SVG_KERNEL_UNIT_LENGTH		= "kernelUnitLength";				//$NON-NLS-1$
+//	public static final String SVG_KERNING					= "kerning";						//$NON-NLS-1$
+//	public static final String SVG_KEY_POINTS				= "keyPoints";						//$NON-NLS-1$
+//	public static final String SVG_KEY_SPLINES				= "keySplines";						//$NON-NLS-1$
+//	public static final String SVG_KEY_TIMES				= "keyTimes";						//$NON-NLS-1$
+//	public static final String SVG_LANG						= "lang";							//$NON-NLS-1$
+//	public static final String SVG_LENGTH_ADJUST			= "lengthAdjust";					//$NON-NLS-1$
+//	public static final String SVG_LETTER_SPACING			= "letter-spacing";					//$NON-NLS-1$
+//	public static final String SVG_LIGHTING_COLOR			= "lighting-color";					//$NON-NLS-1$
+//	public static final String SVG_LIMITING_CONE_ANGLE		= "limitingConeAngle";				//$NON-NLS-1$
+//	public static final String SVG_LOCAL					= "local";							//$NON-NLS-1$
+//	public static final String SVG_MASK						= "mask";							//$NON-NLS-1$
+//	public static final String SVG_MASK_CONTENT_UNITS		= "maskContentUnits";				//$NON-NLS-1$
+//	public static final String SVG_MASK_UNITS				= "maskUnits";						//$NON-NLS-1$
+//	public static final String SVG_MASK_MATHEMATICAL		= "mathematical";					//$NON-NLS-1$
+//	public static final String SVG_MAX						= "max";							//$NON-NLS-1$
+//	public static final String SVG_MEDIA					= "media";							//$NON-NLS-1$
+//	public static final String SVG_METHOD					= "method";							//$NON-NLS-1$
+//	public static final String SVG_MIN						= "min";							//$NON-NLS-1$
+//	public static final String SVG_MODE						= "mode";							//$NON-NLS-1$
+//	public static final String SVG_NAME						= "name";							//$NON-NLS-1$
+//	public static final String SVG_NUM_OCTAVES				= "numOctaves";						//$NON-NLS-1$
+//	public static final String SVG_ONABORT					= "onabort";						//$NON-NLS-1$
+//	public static final String SVG_ONACTIVE					= "onactivate";						//$NON-NLS-1$
+//	public static final String SVG_ONBEGIN					= "onbegin";						//$NON-NLS-1$
+//	public static final String SVG_ONCLICK					= "onclick";						//$NON-NLS-1$
+//	public static final String SVG_ONEND					= "onend";							//$NON-NLS-1$
+//	public static final String SVG_ONERROR					= "onerror";						//$NON-NLS-1$
+//	public static final String SVG_ONFOCUSIN				= "onfocusin";						//$NON-NLS-1$
+//	public static final String SVG_ONFOCUSOUT				= "onfocusout";						//$NON-NLS-1$
+//	public static final String SVG_ONLOAD					= "onload";							//$NON-NLS-1$
+//	public static final String SVG_ONMOUSEDOWN				= "onmousedown";					//$NON-NLS-1$
+//	public static final String SVG_ONMOUSEMOVE				= "onmousemove";					//$NON-NLS-1$
+//	public static final String SVG_ONMOUSEOUT				= "onmouseout";						//$NON-NLS-1$
+//	public static final String SVG_ONMOUSEOVER				= "onmouseover";					//$NON-NLS-1$
+//	public static final String SVG_ONMOUSEUP				= "onmouseup";						//$NON-NLS-1$
+//	public static final String SVG_ONREPEAT					= "onrepeat";						//$NON-NLS-1$
+//	public static final String SVG_ONRESIZE					= "onresize";						//$NON-NLS-1$
+//	public static final String SVG_ONSCROLL					= "onscroll";						//$NON-NLS-1$
+//	public static final String SVG_ONUNLOAD					= "onunload";						//$NON-NLS-1$
+//	public static final String SVG_ONZOOM					= "onzoom";							//$NON-NLS-1$
+//	public static final String SVG_OPACITY					= "opacity";						//$NON-NLS-1$
+//	public static final String SVG_OPERATOR					= "operator";						//$NON-NLS-1$
+//	public static final String SVG_ORDER					= "order";							//$NON-NLS-1$
+//	public static final String SVG_ORIENTATION				= "orientation";					//$NON-NLS-1$
+//	public static final String SVG_ORIGIN					= "origin";							//$NON-NLS-1$
+//	public static final String SVG_OVERLINE_POSITION		= "overline-position";				//$NON-NLS-1$
+//	public static final String SVG_OVERLINE_THICKNESS		= "overline-thickness";				//$NON-NLS-1$
+//	public static final String SVG_PANOSE_1					= "panose-1";						//$NON-NLS-1$
+//	public static final String SVG_PATH						= "path";							//$NON-NLS-1$
+//	public static final String SVG_PATH_LENGTH				= "pathLength";						//$NON-NLS-1$
+//	public static final String SVG_PATTERN_TRANSFORMATION	= "patternTransform";				//$NON-NLS-1$
+//	public static final String SVG_POINTER_EVENTS			= "pointer-events";					//$NON-NLS-1$
+//	public static final String SVG_POINTS_AT_X				= "pointsAtX";						//$NON-NLS-1$
+//	public static final String SVG_POINTS_AT_Y				= "pointsAtY";						//$NON-NLS-1$
+//	public static final String SVG_POINTS_AT_Z				= "pointsAtZ";						//$NON-NLS-1$
+//	public static final String SVG_PRESERVE_ALPHA			= "preserveAlpha";					//$NON-NLS-1$
+//	public static final String SVG_PRESERVE_ASPECT_RATIO	= "preserveAspectRatio";			//$NON-NLS-1$
+//	public static final String SVG_PRIMITIVE_UNITS			= "primitiveUnits";					//$NON-NLS-1$
+//	public static final String SVG_RADIUS					= "radius";							//$NON-NLS-1$
+//	public static final String SVG_RENDERING_INTENT			= "rendering-intent";				//$NON-NLS-1$
+//	public static final String SVG_REPEAT_COUNT				= "repeatCount";					//$NON-NLS-1$
+//	public static final String SVG_REPEAT_DUR				= "repeatDur";						//$NON-NLS-1$
+//	public static final String SVG_REQUIRED_EXTENSIONS		= "requiredExtensions";				//$NON-NLS-1$
+//	public static final String SVG_RESTART					= "restart";						//$NON-NLS-1$
+//	public static final String SVG_RESULT					= "result";							//$NON-NLS-1$
+//	public static final String SVG_ROTATE					= "rotate";							//$NON-NLS-1$
+//	public static final String SVG_SCALE					= "scale";							//$NON-NLS-1$
+//	public static final String SVG_SEED						= "seed";							//$NON-NLS-1$
+//	public static final String SVG_SHAPE_RENDERING			= "shape-rendering";				//$NON-NLS-1$
+//	public static final String SVG_SLOPE					= "slope";							//$NON-NLS-1$
+//	public static final String SVG_SPACING					= "spacing";						//$NON-NLS-1$
+//	public static final String SVG_SPECULAR_CONSTANT		= "specularConstant";				//$NON-NLS-1$
+//	public static final String SVG_SPECULAR_EXPONENT		= "specularExponent";				//$NON-NLS-1$
+//	public static final String SVG_START_OFFSET				= "startOffset";					//$NON-NLS-1$
+//	public static final String SVG_STD_DEVIATION			= "stdDeviation";					//$NON-NLS-1$
+//	public static final String SVG_STEMH					= "stemh";							//$NON-NLS-1$
+//	public static final String SVG_STEMV					= "stemv";							//$NON-NLS-1$
+//	public static final String SVG_STITCH_TILES				= "stitchTiles";					//$NON-NLS-1$
+//	public static final String SVG_STRIKETHROUGH_POSITION	= "strikethrough-position";			//$NON-NLS-1$
+//	public static final String SVG_STRIKETHROUGH_THICKNESS	= "strikethrough-thickness";		//$NON-NLS-1$
+//	public static final String SVG_STROKE_DASHOFFSET		= "stroke-dashoffset";				//$NON-NLS-1$
+//	public static final String SVG_STROKE_LINEJOIN			= "stroke-linejoin";				//$NON-NLS-1$
+//	public static final String SVG_STROKE_MITERLIMIT		= "stroke-miterlimit";				//$NON-NLS-1$
+//	public static final String SVG_STROKE_OPACITY			= "stroke-opacity";					//$NON-NLS-1$
+//	public static final String SVG_SURFACE_SCALE			= "surfaceScale";					//$NON-NLS-1$
+//	public static final String SVG_SYSTEM_LANGUAGE			= "systemLanguage";					//$NON-NLS-1$
+//	public static final String SVG_TABLE_VALUES				= "tableValues";					//$NON-NLS-1$
+//	public static final String SVG_TARGET					= "target";							//$NON-NLS-1$
+//	public static final String SVG_TARGETX					= "targetX";						//$NON-NLS-1$
+//	public static final String SVG_TARGETY					= "targetY";						//$NON-NLS-1$
+//	public static final String SVG_TEXT_DECORATION			= "text-decoration";				//$NON-NLS-1$
+//	public static final String SVG_TEXT_RENDERING			= "text-rendering";					//$NON-NLS-1$
+//	public static final String SVG_TEXT_LENGTH				= "textLength";						//$NON-NLS-1$
+}
diff --git a/current/latexDraw/parsers/svg/SVGCDATASection.java b/current/latexDraw/parsers/svg/SVGCDATASection.java
new file mode 100644
index 0000000..8ee2376
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGCDATASection.java
@@ -0,0 +1,40 @@
+package latexDraw.parsers.svg;
+
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Node;
+
+/**
+ * Defines a CDATA node.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/31/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGCDATASection extends SVGText implements CDATASection
+{
+
+	public SVGCDATASection(String text, SVGDocument owner)
+	{
+		super(text, owner);
+		setNodeName("#cdata-section");//$NON-NLS-1$
+	}
+
+	
+    @Override
+	public short getNodeType() 
+    {
+        return Node.CDATA_SECTION_NODE;
+    }
+}
diff --git a/current/latexDraw/parsers/svg/SVGComment.java b/current/latexDraw/parsers/svg/SVGComment.java
new file mode 100644
index 0000000..1f2b06e
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGComment.java
@@ -0,0 +1,45 @@
+package latexDraw.parsers.svg;
+
+import org.w3c.dom.Comment;
+import org.w3c.dom.Node;
+
+/**
+ * Defines a comment node.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/31/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGComment extends SVGText implements Comment
+{
+	public SVGComment(String comment, SVGDocument owner)
+	{
+		super(comment, owner);
+	}
+
+	
+    @Override
+	public short getNodeType() 
+    {
+        return Node.COMMENT_NODE;
+    }
+
+
+    @Override
+	public String getNodeName() 
+    {
+        return "#comment";//$NON-NLS-1$
+    }
+}
diff --git a/current/latexDraw/parsers/svg/SVGDocument.java b/current/latexDraw/parsers/svg/SVGDocument.java
new file mode 100644
index 0000000..8ab681e
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGDocument.java
@@ -0,0 +1,519 @@
+/*
+ * SVGDOcument.java
+ */
+package latexDraw.parsers.svg;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.net.URI;
+
+import javax.swing.JProgressBar;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import latexDraw.figures.Figure;
+import latexDraw.parsers.svg.elements.OtherNSElement;
+import latexDraw.parsers.svg.elements.SVGSVGElement;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.CDATASection;
+import org.w3c.dom.Comment;
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.w3c.dom.EntityReference;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.ProcessingInstruction;
+import org.w3c.dom.Text;
+import org.w3c.dom.UserDataHandler;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+
+/**
+ * Defines an SVG document.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGDocument implements Document
+{
+	/** The root of the SVG drawing. @since 0.1 */
+	protected SVGSVGElement root;
+	
+    /** Defines if the document is standalone. @since 0.1 */
+    protected boolean xmlStandalone;
+
+    /** The document URI. @since 0.1 */
+    protected String documentURI;
+    
+    /** The version of XML. @since 0.1 */
+    protected String xmlVersion;
+	
+    /** The encoding of the document. @since 0.1 */ 
+    protected String xmlEncoding;
+    
+    
+    public final static String ACTION_NOT_IMPLEMENTED = "Action not implemented.";//$NON-NLS-1$
+    
+    
+    public static final String SVG_NAMESPACE = "http://www.w3.org/2000/svg";//$NON-NLS-1$
+    
+    
+	/**
+	 * The constructor. An URI defines the location of the SVG document to parse. If the document is valid,
+	 * the document is read an place in the <code>root</code> attribute. 
+	 * @param uri The file to parse.
+	 * @throws MalformedSVGDocument If an error occurs.
+	 * @throws IllegalArgumentException If a n argument is not valid.
+	 */
+	public SVGDocument(URI uri) throws MalformedSVGDocument
+	{
+		if(uri==null)
+			throw new IllegalArgumentException();
+		
+		try
+		{
+			DocumentBuilderFactory factory 	= DocumentBuilderFactory.newInstance();
+	        DocumentBuilder builder 		= factory.newDocumentBuilder();
+	        
+	        builder.setEntityResolver(new EntityResolver()
+			{
+				public InputSource resolveEntity(String publicId, String systemId)
+				{
+					return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes()));
+				}
+			});
+	        
+			Document doc = builder.parse(uri.getPath());
+			NodeList nl;
+			
+			setDocumentURI(getDocumentURI());
+			setXmlStandalone(doc.getXmlStandalone());
+			setXmlVersion(doc.getXmlVersion());
+			xmlEncoding = doc.getXmlEncoding();
+			root 		= null;
+			nl 			= doc.getChildNodes();
+			Node n;
+			
+			for(int i=0, size = nl.getLength(); i<size && root==null; i++)
+			{
+				n = nl.item(i);
+				
+				if(n instanceof Element && n.getNodeName().endsWith(SVGElements.SVG_SVG))
+					root = new SVGSVGElement(this, nl.item(i));
+			}
+				
+			nl		= null;
+			doc		= null;
+			builder	= null;
+			factory	= null;
+		}
+		catch(SAXException e)
+		{
+			e.printStackTrace();
+			throw new MalformedSVGDocument();
+		}
+		catch(IOException e)
+		{
+			e.printStackTrace();
+			throw new MalformedSVGDocument();
+		}
+		catch(ParserConfigurationException e1)
+		{
+			e1.printStackTrace();
+			throw new MalformedSVGDocument();
+		}
+	}
+
+
+	
+	/**
+	 * Creates an SVG document with an empty SVG element.
+	 */
+	public SVGDocument()
+	{
+		setDocumentURI(null);
+		setXmlVersion("1.1");//$NON-NLS-1$
+		setXmlStandalone(false);
+		
+		root = new SVGSVGElement(this);
+	}
+
+
+
+
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append("SVG Document:");//$NON-NLS-1$
+		stringBuffer.append(root.toString());
+		
+		return stringBuffer.toString();
+	}
+
+	
+	
+	/**
+	 * Allows to get the latexdraw version of the SVG drawing.
+	 * @return A drawing containing all the figures or a unique figure or null.
+	 * @since 0.1
+	 */
+	public Figure toLaTeXDraw(JProgressBar progressBar)
+	{
+		return root.toLaTeXDraw(progressBar);
+	}
+
+	
+	
+	public SVGSVGElement adoptNode(Node source) throws DOMException
+	{
+		if(source==null || !(source instanceof SVGSVGElement))
+			throw new DOMException(DOMException.TYPE_MISMATCH_ERR, "SVGSVGElement expected here.");//$NON-NLS-1$
+		
+		root = (SVGSVGElement)source;
+		root.setOwnerDocument(this);
+		
+		return root;
+	}
+
+
+
+	public SVGSVGElement getDocumentElement()
+	{
+		return root;
+	}
+
+
+	public String getDocumentURI()
+	{
+		return documentURI;
+	}
+
+
+	public String getXmlEncoding()
+	{
+		return xmlEncoding;
+	}
+
+
+	public boolean getXmlStandalone()
+	{
+		return xmlStandalone;
+	}
+
+
+	public String getXmlVersion()
+	{
+		return xmlVersion;
+	}
+
+
+	public void setDocumentURI(String documentURI)
+	{
+		this.documentURI = documentURI;
+	}
+
+
+	public void setXmlStandalone(boolean xmlStandalone) throws DOMException
+	{
+		this.xmlStandalone = xmlStandalone;
+	}
+
+
+	public void setXmlVersion(String xmlVersion) throws DOMException
+	{
+		this.xmlVersion = xmlVersion;
+	}
+
+
+
+	public NamedNodeMap getAttributes()
+	{
+		return null;
+	}
+
+
+	public NodeList getChildNodes()
+	{
+		return null;
+	}
+
+
+	public SVGSVGElement getFirstChild()
+	{
+		return root;
+	}
+
+
+	public SVGSVGElement getLastChild()
+	{
+		return root;
+	}
+
+
+
+	public Node getNextSibling()
+	{
+		return null;
+	}
+
+
+	public String getNodeName()
+	{
+		return "#document";//$NON-NLS-1$
+	}
+
+
+	public short getNodeType()
+	{
+		return Node.DOCUMENT_NODE;
+	}
+
+
+	public String getNodeValue() throws DOMException
+	{
+		return null;
+	}
+
+
+	public Document getOwnerDocument()
+	{
+		return null;
+	}
+
+
+	public Node getParentNode()
+	{
+		return null;
+	}
+
+
+
+	public Node getPreviousSibling()
+	{
+		return null;
+	}
+
+
+
+	public boolean hasAttributes()
+	{
+		return false;
+	}
+
+
+	public boolean hasChildNodes()
+	{
+		return root!=null;
+	}
+
+
+
+	public boolean isEqualNode(Node node)
+	{
+		if(node==null || !(node instanceof SVGDocument))
+			return false;
+		
+		SVGDocument doc = (SVGDocument)node;
+		boolean encod = xmlEncoding==null ? doc.xmlEncoding==null : xmlEncoding.equals(doc.xmlEncoding);
+		boolean uri   = documentURI==null ? doc.documentURI==null : documentURI.equals(doc.documentURI);
+		
+		return xmlStandalone==doc.xmlStandalone && encod && root.isEqualNode(doc.root) && uri;
+	}
+
+
+	public boolean isSameNode(Node other)
+	{ 
+		return other!=null && other==this;
+	}
+
+	
+	public DocumentType getDoctype()
+	{
+		return null;
+	}
+	
+	
+	
+	public Element createElement(String tagName) throws DOMException
+	{
+		if(tagName==null)
+			throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "Invalid tagName.");//$NON-NLS-1$
+		
+		OtherNSElement elt = new OtherNSElement(this);
+		elt.setNodeName(tagName);
+		
+		return elt;
+	}
+	
+	
+	public Text createTextNode(String data)
+	{
+		if(data==null)
+			throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "Invalid data.");//$NON-NLS-1$
+		
+		return new SVGText(data, this);
+	}
+	
+	
+	public Comment createComment(String data)
+	{
+		if(data==null)
+			throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "Invalid data.");//$NON-NLS-1$
+		
+		return new SVGComment(data, this);
+	}
+	
+	
+	public CDATASection createCDATASection(String data) throws DOMException
+	{
+		if(data==null)
+			throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "Invalid data.");//$NON-NLS-1$
+		
+		return new SVGCDATASection(data, this);
+	}
+	
+	
+	public DOMConfiguration getDomConfig()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public DOMImplementation getImplementation()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public String getInputEncoding()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public boolean getStrictErrorChecking()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public Node importNode(Node importedNode, boolean deep) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public void normalizeDocument()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public void setStrictErrorChecking(boolean strictErrorChecking)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public Node appendChild(Node newChild) throws DOMException
+	{ return null; }
+
+	public Node cloneNode(boolean deep)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public short compareDocumentPosition(Node other) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public String getBaseURI()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public Object getFeature(String feature, String version)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public String getLocalName()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public String getNamespaceURI()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public String getPrefix()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public String getTextContent() throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public Object getUserData(String key)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public boolean isDefaultNamespace(String namespaceURI)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+	
+	public Attr createAttribute(String name) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public DocumentFragment createDocumentFragment()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public EntityReference createEntityReference(String name) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public boolean isSupported(String feature, String version)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public String lookupNamespaceURI(String prefix)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+	
+	public String lookupPrefix(String namespaceURI)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public void normalize()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+
+	public Object setUserData(String key, Object data, UserDataHandler handler)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, ACTION_NOT_IMPLEMENTED); }
+	
+	
+	
+	public Node insertBefore(Node newChild, Node refChild) throws DOMException
+	{ return null; }
+	
+	public void setPrefix(String prefix) throws DOMException
+	{ /* Nothing to do. */ }
+	
+	public void setTextContent(String textContent) throws DOMException
+	{ /* Nothing to do. */ }
+	
+	public Node removeChild(Node oldChild) throws DOMException
+	{ return null; }
+
+	public Node replaceChild(Node newChild, Node oldChild) throws DOMException
+	{ return null; }
+
+	public void setNodeValue(String nodeValue) throws DOMException
+	{ /* Nothing to do. */ }
+	
+	public Element getElementById(String elementId)
+	{ return null; }
+
+	public NodeList getElementsByTagName(String tagname)
+	{ return null; }
+
+	public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
+	{ return null; }
+}
diff --git a/current/latexDraw/parsers/svg/SVGElements.java b/current/latexDraw/parsers/svg/SVGElements.java
new file mode 100644
index 0000000..020f7c3
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGElements.java
@@ -0,0 +1,107 @@
+package latexDraw.parsers.svg;
+
+/** 
+ * Contains SVG elements according to the SVG specification version 1.1.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 06/03/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 2.0.0<br>
+ */
+public abstract class SVGElements
+{
+	public static final String SVG_CIRCLE				= "circle";					//$NON-NLS-1$
+	public static final String SVG_DEFS					= "defs";					//$NON-NLS-1$
+//	public static final String SVG_DESC		   			= "desc";					//$NON-NLS-1$
+//	public static final String SVG_CLIP_PATH			= "clipPath";				//$NON-NLS-1$
+	public static final String SVG_ELLIPSE	   			= "ellipse";				//$NON-NLS-1$
+//	public static final String SVG_FONT					= "font";					//$NON-NLS-1$
+//	public static final String SVG_FONT_FACE			= "font-face";				//$NON-NLS-1$
+//	public static final String SVG_FONT_FACE_FORMAT		= "font-face-format";		//$NON-NLS-1$
+//	public static final String SVG_FONT_FACE_NAME		= "font-face-name";			//$NON-NLS-1$
+	public static final String SVG_G					= "g";						//$NON-NLS-1$
+	public static final String SVG_METADATA				= "metadata";				//$NON-NLS-1$
+	public static final String SVG_POLYGON				= "polygon";				//$NON-NLS-1$
+	public static final String SVG_POLY_LINE			= "polyline";				//$NON-NLS-1$
+	public static final String SVG_LINEAR_GRADIENT		= "linearGradient";			//$NON-NLS-1$
+	public static final String SVG_RECT					= "rect";					//$NON-NLS-1$
+	public static final String SVG_TEXT					= "text";					//$NON-NLS-1$
+//	public static final String SVG_TEXT_PATH			= "textPath";				//$NON-NLS-1$
+	public static final String SVG_SVG					= "svg";					//$NON-NLS-1$
+	public static final String SVG_STOP					= "stop";					//$NON-NLS-1$
+	public static final String SVG_PATTERN				= "pattern";				//$NON-NLS-1$
+	public static final String SVG_PATH					= "path";					//$NON-NLS-1$
+	public static final String SVG_USE					= "use";					//$NON-NLS-1$
+	public static final String SVG_MARKER				= "marker";					//$NON-NLS-1$
+	public static final String SVG_LINE					= "line";					//$NON-NLS-1$
+	public static final String SVG_IMAGE				= "image";					//$NON-NLS-1$	
+	
+//	public static final String SVG_RADIAL_GRADIENT		= "radialGradient";			//$NON-NLS-1$
+//	public static final String SVG_A					= "a";						//$NON-NLS-1$
+//	public static final String SVG_ALT_GLYPH			= "altGlyph";				//$NON-NLS-1$
+//	public static final String SVG_ALT_GLYPH_DEF		= "altGlyphDef";			//$NON-NLS-1$
+//	public static final String SVG_ALT_GLYPH_ITEM		= "altGlyphItem";			//$NON-NLS-1$
+//	public static final String SVG_ANIMATE				= "animate";				//$NON-NLS-1$
+//	public static final String SVG_ANIMATE_COLOR		= "animateColor";			//$NON-NLS-1$
+//	public static final String SVG_ANIMATE_MOTION		= "animateMotion";			//$NON-NLS-1$
+//	public static final String SVG_ANIMATE_TRANSFORM	= "animateTransform";		//$NON-NLS-1$
+//	public static final String SVG_COLOR_PROFILE		= "color-profile";			//$NON-NLS-1$
+//	public static final String SVG_CURSOR				= "cursor";					//$NON-NLS-1$
+//	public static final String SVG_DEFINITION_SRC		= "definition-src";			//$NON-NLS-1$
+//	public static final String SVG_FE_BLEND	   			= "feBlend";				//$NON-NLS-1$
+//	public static final String SVG_FE_COLOR_MATRIX		= "feColorMatrix";			//$NON-NLS-1$
+//	public static final String SVG_FE_COMPONENT_TRANSFER= "feComponentTransfer";	//$NON-NLS-1$
+//	public static final String SVG_FE_COMPOSITE			= "feComposite";			//$NON-NLS-1$
+//	public static final String SVG_FE_CONVOLVE_MATRIX	= "feConvolveMatrix";		//$NON-NLS-1$
+//	public static final String SVG_FE_DIFFUSE_LIGHTING	= "feDiffuseLighting";		//$NON-NLS-1$
+//	public static final String SVG_FE_DISPLACEMENT_MAP	= "feDisplacementMap";		//$NON-NLS-1$
+//	public static final String SVG_FE_DISTANT_LIGHT		= "feDistantLight";			//$NON-NLS-1$
+//	public static final String SVG_FE_FLOOD				= "feFlood";				//$NON-NLS-1$
+//	public static final String SVG_FE_FUNC_A			= "feFuncA";				//$NON-NLS-1$
+//	public static final String SVG_FE_FUNC_B			= "feFuncB";				//$NON-NLS-1$
+//	public static final String SVG_FE_FUNC_R			= "feFuncR";				//$NON-NLS-1$
+//	public static final String SVG_FE_FUNC_G			= "feFuncG";				//$NON-NLS-1$
+//	public static final String SVG_FE_GAUSSIAN_BLUR		= "feGaussianBlur";			//$NON-NLS-1$
+//	public static final String SVG_FE_IMAGE				= "feImage";				//$NON-NLS-1$
+//	public static final String SVG_FE_MERGE				= "feMerge";				//$NON-NLS-1$
+//	public static final String SVG_FE_MERGE_NODE		= "feMergeNode";			//$NON-NLS-1$
+//	public static final String SVG_FE_MORPHOLOGY		= "feMorphology";			//$NON-NLS-1$
+//	public static final String SVG_FE_OFFSET			= "feOffset";				//$NON-NLS-1$
+//	public static final String SVG_FE_POINT_LIGHT		= "fePointLight";			//$NON-NLS-1$
+//	public static final String SVG_FE_SPECULAR_LIGHTING	= "feSpecularLighting";		//$NON-NLS-1$
+//	public static final String SVG_FE_SPOT_LIGHT		= "feSpotLight";			//$NON-NLS-1$
+//	public static final String SVG_FE_TILE				= "feTile";					//$NON-NLS-1$
+//	public static final String SVG_FE_TURBULENCE		= "feTurbulence";			//$NON-NLS-1$
+//	public static final String SVG_FILTER				= "filter";					//$NON-NLS-1$
+//	public static final String SVG_FONT_FACE_SRC		= "font-face-src";			//$NON-NLS-1$
+//	public static final String SVG_FONT_FACE_URI		= "font-face-uri";			//$NON-NLS-1$
+//	public static final String SVG_FOREIGN_OBJECT		= "foreignObject";			//$NON-NLS-1$
+//	public static final String SVG_GLYPH				= "glyph";					//$NON-NLS-1$
+//	public static final String SVG_GLYPH_REF			= "glyphRef";				//$NON-NLS-1$
+//	public static final String SVG_HKERN				= "hkern";					//$NON-NLS-1$
+//	public static final String SVG_MASK					= "mask";					//$NON-NLS-1$
+//	public static final String SVG_MISSING_GLYPH		= "missing-glyph";			//$NON-NLS-1$
+//	public static final String SVG_MPATH				= "mpath";					//$NON-NLS-1$
+//	public static final String SVG_SCRIPT				= "script";					//$NON-NLS-1$
+//	public static final String SVG_SET					= "set";					//$NON-NLS-1$
+//	public static final String SVG_STYLE				= "style";					//$NON-NLS-1$
+//	public static final String SVG_SWITCH				= "switch";					//$NON-NLS-1$
+//	public static final String SVG_SYMBOL				= "symbol";					//$NON-NLS-1$
+//	public static final String SVG_TITLE				= "title";					//$NON-NLS-1$
+//	public static final String SVG_TREF					= "tref";					//$NON-NLS-1$
+//	public static final String SVG_TSPAN				= "tspan";					//$NON-NLS-1$
+//	public static final String SVG_VIEW					= "view";					//$NON-NLS-1$
+//	public static final String SVG_VKERN				= "vkern";					//$NON-NLS-1$
+}
diff --git a/current/latexDraw/parsers/svg/SVGElementsFactory.java b/current/latexDraw/parsers/svg/SVGElementsFactory.java
new file mode 100644
index 0000000..42144f7
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGElementsFactory.java
@@ -0,0 +1,115 @@
+/*
+ * SVGElementFactory.java
+ */
+package latexDraw.parsers.svg;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.elements.*;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+
+/**
+ * This class must be used to create SVG elements.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGElementsFactory
+{
+	/**
+	 * This factory can be used in order to create an SVG element according to the given SVG node (tag).
+	 * @param src The node that will be used to create the SVG element.
+	 * @return The created SVG element.
+	 * @since 0.1
+	 */
+	public static SVGElement createSVGElement(Node src, SVGElement parent)
+	{
+		if(src==null || parent==null)
+			return null;
+		
+		try
+		{
+			String name = src.getNodeName();
+			
+			if(name==null)
+				return null;
+	
+			String pref = src.getNodeName().contains(":") ? src.getNodeName().substring(0, src.getNodeName().indexOf(':')) : null;//$NON-NLS-1$
+			NamedNodeMap nnm = src.getAttributes();
+			String ns;
+			
+			if(nnm==null)
+				ns = parent.lookupNamespaceURI(pref);
+			else
+			{
+				Node xmlnsNode = nnm.getNamedItem(pref==null ? "xmlns" : "xmlns:"+pref);//$NON-NLS-1$//$NON-NLS-2$
+				
+				if(xmlnsNode==null)
+					ns = parent.lookupNamespaceURI(pref);
+				else
+					ns = xmlnsNode.getNodeValue();
+			}
+			
+			if(ns==null || name.endsWith("#text") || name.endsWith("#comment"))//$NON-NLS-1$//$NON-NLS-2$
+				return null;
+			
+			if(SVGDocument.SVG_NAMESPACE.equals(ns))
+			{
+				if(name.endsWith(SVGElements.SVG_SVG))
+					return new SVGSVGElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_G))
+					return new SVGGElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_RECT))
+					return new SVGRectElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_ELLIPSE))
+					return new SVGEllipseElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_CIRCLE))
+					return new SVGCircleElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_POLY_LINE))
+					return new SVGPolyLineElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_LINE))
+					return new SVGLineElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_POLYGON))
+					return new SVGPolygonElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_METADATA))
+					return new SVGMetadataElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_DEFS))
+					return new SVGDefsElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_PATTERN))
+					return new SVGPatternElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_LINEAR_GRADIENT))
+					return new SVGLinearGradientElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_STOP))
+					return new SVGStopElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_PATH))
+					return new SVGPathElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_MARKER))
+					return new SVGMarkerElement(src, parent);
+				else if(name.endsWith(SVGElements.SVG_TEXT))
+					return new SVGTextElement(src, parent);
+			}
+			else
+				return new OtherNSElement(src, parent);
+		}
+		catch(MalformedSVGDocument ex) { ex.printStackTrace(); return null; }
+		catch(ParseException       ex) { ex.printStackTrace(); return null; }
+		
+		return null;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/SVGLength.java b/current/latexDraw/parsers/svg/SVGLength.java
new file mode 100644
index 0000000..78cedec
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGLength.java
@@ -0,0 +1,88 @@
+package latexDraw.parsers.svg;
+
+/**
+ * Defines an SVG length implementation.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGLength
+{
+	public static enum LengthType { UNKNOWN, NUMBER, PERCENTAGE, EM, 
+									EX, PX, CM, MM, IN, PT, PC }
+
+    /** The value of the length in the user space. @since 0.1 */
+    protected double value;
+    
+    /** The type of the length. @since 0.1 */
+    protected LengthType lengthType;
+    
+    /** The original parsed length value (without the length token). @since 0.1 */
+    protected String valueAsString;
+    
+    
+    
+    /**
+     * Builds an SVGLength.
+     * @param value The value of the length in the user space.
+     * @param lengthType The type of the length.
+     * @param valueAsString The original parsed length value (without the length token).
+     * @since 0.1
+     */
+    public SVGLength(double value, LengthType lengthType, String valueAsString)
+    {
+    	if(lengthType==null || valueAsString==null)
+    		throw new IllegalArgumentException();
+    	
+    	try{ Double.valueOf(valueAsString); }
+    	catch(NumberFormatException e){ throw new IllegalArgumentException(); }
+    	
+    	this.value = value;
+    	this.lengthType = lengthType;
+    	this.valueAsString = valueAsString;
+    }
+
+
+	/**
+	 * @return the value
+	 * @since 0.1
+	 */
+	public double getValue()
+	{
+		return value;
+	}
+
+
+	/**
+	 * @return the lengthType
+	 * @since 0.1
+	 */
+	public LengthType getLengthType()
+	{
+		return lengthType;
+	}
+
+
+	/**
+	 * @return the valueAsString
+	 * @since 0.1
+	 */
+	public String getValueAsString()
+	{
+		return valueAsString;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/SVGMatrix.java b/current/latexDraw/parsers/svg/SVGMatrix.java
new file mode 100644
index 0000000..5f7f693
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGMatrix.java
@@ -0,0 +1,269 @@
+package latexDraw.parsers.svg;
+
+
+/** 
+ * Defines a matrix according to the SVG specifications.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/16/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+public class SVGMatrix
+{
+	public static final short WIDTH		= 3;
+	
+	public static final short HEIGHT	= 3;
+	
+	/** [a, c, e, b, d, f, 0, 0, 1] An element of the matrix. */
+	protected double a;
+
+	/** [a, c, e, b, d, f, 0, 0, 1] An element of the matrix. */
+	protected double b;
+
+	/** [a, c, e, b, d, f, 0, 0, 1] An element of the matrix. */
+	protected double c;
+
+	/** [a, c, e, b, d, f, 0, 0, 1] An element of the matrix. */
+	protected double d;
+
+	/** [a, c, e, b, d, f, 0, 0, 1] An element of the matrix. */
+	protected double e;
+
+	/** [a, c, e, b, d, f, 0, 0, 1] An element of the matrix. */
+	protected double f;
+	
+	
+	
+	/**
+	 * Creates a matrix by initialising it as the identity.
+	 * @since 0.1
+	 */
+	public SVGMatrix()
+	{
+		initMatrix();
+	}
+	
+	
+	/**
+	 * Initialises the matrix as the identity.
+	 * @since 0.1
+	 */
+	public void initMatrix()
+	{
+		a = d = 1;
+		b = c = e = f = 0;
+	}
+	
+	
+	/**
+	 * Rotates the matrix (without reinitialisation).
+	 * @param angle The angle of rotation (in radian).
+	 * @since 0.1
+	 */
+	public void rotate(double angle)
+	{
+		a = Math.cos(angle);
+		b = Math.sin(angle);
+		c = -Math.sin(angle);
+		d = Math.cos(angle);
+	}
+	
+	
+
+	/**
+	 * Translates the matrix (without reinitialisation).
+	 * @param x The x translation.
+	 * @param y The y translation.
+	 * @since 0.1
+	 */
+	public void translate(double x, double y)
+	{
+		e = x;
+		f = y;
+	}
+	
+	
+	
+	/**
+	 * Scales the matrix (without reinitialisation).
+	 * @param scaleFactor The scale factor.
+	 * @since 0.1
+	 */
+	public void scale(double scaleFactor)
+	{
+		scaleNonUniform(scaleFactor, scaleFactor);
+	}
+	
+	
+	
+	/**
+	 * Scales the matrix (without reinitialisation).
+	 * @param scaleFactorX The x scale factor.
+	 * @param scaleFactorY The y scale factor.
+	 * @since 0.1
+	 */
+	public void scaleNonUniform(double scaleFactorX, double scaleFactorY)
+	{
+		a = scaleFactorX;
+		d = scaleFactorY;
+	}
+	
+	
+	
+	/**
+	 * Skews the matrix (without reinitialisation).
+	 * @param angle The X angle.
+	 * @since 0.1
+	 */
+	public void skewX(double angle)
+	{
+		c = Math.tan(angle);
+	}
+	
+	
+	
+	/**
+	 * Skews the matrix (without reinitialisation).
+	 * @param angle The Y angle.
+	 * @since 0.1
+	 */
+	public void skewY(double angle)
+	{
+		b = Math.tan(angle);
+	}
+
+
+	
+	
+	/**
+	 * @param m The matrix to multiply to the called matrix: this * m = out. Or null if m is null.
+	 * @return Creates a SVGMatrix  from the multiplication of the two given matrixes.
+	 */
+	public SVGMatrix multiply(SVGMatrix m)
+	{
+		if(m==null)
+			return null;
+		
+		SVGMatrix out = new SVGMatrix();
+
+		out.a = a*m.a + c*m.b;
+		out.b = b*m.a + d*m.b;
+		out.c = a*m.c + c*m.d;
+		out.d = b*m.c + d*m.d;
+		out.e = a*m.e + c*m.f + e;
+		out.f = b*m.e + d*m.f + f;
+		
+		return out;
+	}
+	
+	
+	
+	/**
+	 * Sets the matrix with the given values.
+	 * @param a b c d e f The values of the matrix: [a, c, e, b, d, f, 0, 0, 1].
+	 * @since 0.1
+	 */
+	public void setMatrix(double a, double b, double c, double d, double e, double f)
+	{
+		this.a = a;
+		this.b = b;
+		this.c = c;
+		this.d = d;
+		this.e = e;
+		this.f = f;
+	}
+	
+	
+	
+	/**
+	 * @return The (0,0) element of the matrix.
+	 * @since 0.1
+	 */
+	public double getA()
+	{
+		return a;
+	}
+
+	
+	/**
+	 * @return The (1,0) element of the matrix.
+	 * @since 0.1
+	 */
+	public double getB()
+	{
+		return b;
+	}
+
+
+	/**
+	 * @return The (2,0) element of the matrix.
+	 * @since 0.1
+	 */
+	public double getC()
+	{
+		return c;
+	}
+
+
+	/**
+	 * @return The (0,1) element of the matrix.
+	 * @since 0.1
+	 */
+	public double getD()
+	{
+		return d;
+	}
+
+
+	/**
+	 * @return The (1,1) element of the matrix.
+	 * @since 0.1
+	 */
+	public double getE()
+	{
+		return e;
+	}
+
+
+	/**
+	 * @return The (2,1) element of the matrix.
+	 * @since 0.1
+	 */
+	public double getF()
+	{
+		return f;
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		stringBuffer.append(a);
+		stringBuffer.append(" "); //$NON-NLS-1$
+		stringBuffer.append(c);
+		stringBuffer.append(" "); //$NON-NLS-1$
+		stringBuffer.append(e);
+		stringBuffer.append(" "); //$NON-NLS-1$
+		stringBuffer.append(b);
+		stringBuffer.append(" "); //$NON-NLS-1$
+		stringBuffer.append(d);
+		stringBuffer.append(" "); //$NON-NLS-1$
+		stringBuffer.append(f);
+		return stringBuffer.toString();
+	}
+}
diff --git a/current/latexDraw/parsers/svg/SVGNamedNodeMap.java b/current/latexDraw/parsers/svg/SVGNamedNodeMap.java
new file mode 100644
index 0000000..add9d99
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGNamedNodeMap.java
@@ -0,0 +1,201 @@
+package latexDraw.parsers.svg;
+
+import java.util.Vector;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * Defines an SVG named node map.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/16/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGNamedNodeMap implements NamedNodeMap, Cloneable
+{
+	/** The set of nodes. @since 0.1 */
+	protected Vector<SVGAttr> nnm;
+	
+	
+	/**
+	 * The constructor by default.
+	 * @since 0.1
+	 */
+	public SVGNamedNodeMap()
+	{
+		nnm = new Vector<SVGAttr>();
+	}
+	
+	
+	
+	public int getLength()
+	{
+		return nnm==null ? 0 : nnm.size();
+	}
+
+
+
+	
+	public Node getNamedItem(String name)
+	{
+		if(nnm==null || name==null)
+			return null;
+		
+		int i = 0, size = getLength();
+		boolean found = false;
+		
+		while(i<size && !found)
+			if(nnm.elementAt(i).getName().equals(name))
+				found = true;
+			else
+				i++;
+		
+		if(found)
+			return nnm.elementAt(i);
+		
+		return null;
+	}
+
+
+	
+
+	public Node item(int index)
+	{
+		return nnm==null || index<0 || index>=getLength() ? null : nnm.elementAt(index);
+	}
+
+
+
+	public Node removeNamedItem(String name) throws DOMException
+	{
+		if(name==null)
+			throw new DOMException(DOMException.NOT_FOUND_ERR, "name is null");
+		
+		int i = 0, size = getLength();
+		boolean found = false;
+		
+		while(i<size && !found)
+			if(nnm.elementAt(i).getName().equals(name))
+				found = true;
+			else
+				i++;
+		
+		if(found)
+			return nnm.remove(i);
+		
+		throw new DOMException(DOMException.NOT_FOUND_ERR, name);
+	}
+
+
+
+	public Node setNamedItem(Node node) throws DOMException
+	{
+		if(node==null)
+			return null;
+		
+		Node attr = getNamedItem(node.getNodeName());
+		
+		if(attr==null)
+		{
+			nnm.add((SVGAttr)node);
+			return null;
+		}
+		
+		if(attr==node)
+			return null;
+		
+		int index = nnm.indexOf(attr);
+		nnm.remove(attr);
+		nnm.add(index, (SVGAttr)node);
+		
+		return attr;
+	}
+
+
+
+	@Override
+	public Object clone()
+	{
+		try
+		{
+			SVGNamedNodeMap clone = (SVGNamedNodeMap)super.clone();
+			
+			clone.nnm = new Vector<SVGAttr>();
+			
+			for(SVGAttr attr : nnm)
+				clone.nnm.add((SVGAttr)attr.cloneNode(false));
+			
+			return clone;
+		}
+		catch(CloneNotSupportedException e) { return null; }
+	}
+
+
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer str = new StringBuffer().append("{");//$NON-NLS-1$
+		
+		for(SVGAttr e : nnm)
+			str.append(e.toString()).append(", ");//$NON-NLS-1$
+		
+		return str.append("}").toString();//$NON-NLS-1$
+	}
+
+
+	public Node getNamedItemNS(String namespaceURI, String localName) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Node setNamedItemNS(Node arg) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+
+
+	/**
+	 * @return the attributes.
+	 * @since 0.1
+	 */
+	public Vector<SVGAttr> getAttributes()
+	{
+		return nnm;
+	}
+
+
+
+	@Override
+	public boolean equals(Object obj)
+	{
+		if(obj==null || !(obj instanceof SVGNamedNodeMap))
+			return false;
+		
+		SVGNamedNodeMap map = (SVGNamedNodeMap)obj;
+		boolean ok = true;
+		int i, size = getLength();
+		
+		if(size!=map.getLength())
+			return false;
+		
+		for(i=0; i<size && ok; i++)
+			ok = item(i).isEqualNode(map.item(i));
+		
+		return ok;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/SVGNodeList.java b/current/latexDraw/parsers/svg/SVGNodeList.java
new file mode 100644
index 0000000..26836f6
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGNodeList.java
@@ -0,0 +1,80 @@
+package latexDraw.parsers.svg;
+
+import java.util.Vector;
+
+import latexDraw.parsers.svg.elements.SVGElement;
+
+import org.w3c.dom.NodeList;
+
+
+/**
+ * Defines an SVG node list.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/16/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGNodeList implements NodeList
+{
+	/** The nodes of the list. @since 0.1 */
+	protected Vector<SVGElement> nodes;
+	
+	
+	/**
+	 * The constructor by default.
+	 */
+	public SVGNodeList()
+	{
+		nodes = new Vector<SVGElement>();
+	}
+	
+	
+	
+	public int getLength()
+	{
+		return nodes==null ? 0 : nodes.size();
+	}
+
+
+
+	public SVGElement item(int index)
+	{
+		return nodes==null || index<0 || index>=nodes.size() ? null : nodes.elementAt(index);
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer str = new StringBuffer().append("{");//$NON-NLS-1$
+		
+		for(SVGElement e : nodes)
+			str.append(e.toString()).append(", ");//$NON-NLS-1$
+		
+		return str.append("}").toString();//$NON-NLS-1$
+	}
+
+
+
+	/**
+	 * @return the nodes.
+	 * @since 0.1
+	 */
+	public Vector<SVGElement> getNodes()
+	{
+		return nodes;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/SVGText.java b/current/latexDraw/parsers/svg/SVGText.java
new file mode 100644
index 0000000..a81bfb0
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGText.java
@@ -0,0 +1,132 @@
+package latexDraw.parsers.svg;
+
+import latexDraw.parsers.svg.elements.SVGElement;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+
+/**
+ * Defines a text node.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/31/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGText extends SVGElement implements Text
+{
+	/** The content of the text node. @since 0.1 */
+	protected String data;
+	
+	public static final String TEXT_NODE_NAME = "#text";//$NON-NLS-1$
+	
+	
+	/**
+	 * Creates a text node.
+	 * @param text The content of the node.
+	 * @param owner The owner document.
+	 */
+	public SVGText(String text, SVGDocument owner)
+	{
+		super();
+		
+		if(text==null)
+			throw new IllegalArgumentException();
+		
+		ownerDocument = owner;
+		data = text;
+		setNodeName(TEXT_NODE_NAME);
+	}
+	
+	
+	@Override
+	public String getNodeValue() throws DOMException
+	{
+		return data;
+	}
+	
+	
+	public void appendData(String arg) throws DOMException
+	{
+		if(arg!=null)
+			setData(getData()+arg);
+	}
+	
+	
+	public String getData() throws DOMException
+	{
+		return data;
+	}
+
+	
+	public int getLength()
+	{
+		return data.length();
+	}
+
+	
+	@Override
+	public short getNodeType()
+	{
+		return Node.TEXT_NODE;
+	}
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return true;
+	}
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return false;
+	}
+	
+	
+	public void setData(String data) throws DOMException
+	{
+		if(data!=null)
+			this.data = data; 
+	}
+	
+	
+	
+	public String getWholeText()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public boolean isElementContentWhitespace()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Text replaceWholeText(String content) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Text splitText(int offset) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void deleteData(int offset, int count) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void insertData(int offset, String arg) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void replaceData(int offset, int count, String arg) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public String substringData(int offset, int count) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+}
diff --git a/current/latexDraw/parsers/svg/SVGTransform.java b/current/latexDraw/parsers/svg/SVGTransform.java
new file mode 100644
index 0000000..7f35dce
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGTransform.java
@@ -0,0 +1,547 @@
+package latexDraw.parsers.svg;
+
+
+/** 
+ * Defines an SVG transformation.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/16/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+public class SVGTransform
+{
+	public static final short SVG_TRANSFORM_UNKNOWN		= 0;
+	public static final short SVG_TRANSFORM_MATRIX		= 1;
+	public static final short SVG_TRANSFORM_TRANSLATE	= 2;
+	public static final short SVG_TRANSFORM_SCALE		= 3;
+	public static final short SVG_TRANSFORM_ROTATE		= 4;
+	public static final short SVG_TRANSFORM_SKEWX		= 5;
+	public static final short SVG_TRANSFORM_SKEWY		= 6;
+
+	/** The type of the transformation. */
+	protected short type;
+	
+	/** The matrix of the transformation. */
+	protected SVGMatrix matrix;
+	
+	/** The angle of a possible rotation or skew. */
+	protected double angle;
+	
+	
+	/**
+	 * Creates a transformation with no type.
+	 */
+	public SVGTransform()
+	{
+		type = SVG_TRANSFORM_UNKNOWN;
+		matrix = new SVGMatrix();
+		angle = Double.NaN;
+	}
+	
+	
+	
+	/**
+	 * The constructor using a string containing the transformation. The transformation is not added if it is not valid.
+	 * @param transformation The SVG transformation.
+	 * @throws IllegalArgumentException If the transformation is no valid.
+	 * @since 0.1
+	 */
+	public SVGTransform(String transformation)
+	{
+		this();
+		setTransformation(transformation);
+	}
+
+	
+	
+	
+	/**
+	 * Parses a string containing the SVG transformation in order to set the transformation.
+	 * @param transformation The string to parse.
+	 * @throws IllegalArgumentException If the transformation is no valid.
+	 * @since 0.1
+	 */
+	public void setTransformation(String transformation)
+	{
+		if(transformation==null)
+			throw new IllegalArgumentException();
+		
+		String code = transformation.replaceAll("[ \t\n\r\f]+", " ");//$NON-NLS-1$//$NON-NLS-2$
+		code = code.replaceAll("^[ ]", "");//$NON-NLS-1$//$NON-NLS-2$
+		code = code.replaceAll("[ ]$", "");//$NON-NLS-1$//$NON-NLS-2$
+		code = code.replaceAll("[ ]?[(][ ]?", "(");//$NON-NLS-1$//$NON-NLS-2$
+		code = code.replaceAll("[ ]?[)]", ")");//$NON-NLS-1$//$NON-NLS-2$
+		code = code.replaceAll("[ ]?,[ ]?", ",");//$NON-NLS-1$//$NON-NLS-2$
+		int i, lgth = code.length(), j, k;
+		
+		if(code.startsWith(SVGAttributes.SVG_TRANSFORM_ROTATE))
+		{
+			i = SVGAttributes.SVG_TRANSFORM_ROTATE.length();
+			j = code.indexOf(')');
+			int k1 = code.indexOf(' '), k2 = code.indexOf(',');
+			
+			if(i>=lgth || code.charAt(i)!='(' || j==-1)
+				throw new IllegalArgumentException();
+			
+			k = k1==-1 ? k2 : k2==-1 ? k1 : Math.min(k1, k2);
+			
+			if(k==-1)
+				setRotate(Double.valueOf(code.substring(i+1, j)), 0., 0.);
+			else
+			{
+				double cx, cy, rotAngle;
+				
+				rotAngle = Double.valueOf(code.substring(i+1, k));
+				i = k+1;
+				
+				k1 = code.indexOf(' ', k+1);
+				k2 = code.indexOf(',', k+1);
+				k = k1==-1 ? k2 : k2==-1 ? k1 : Math.min(k1, k2);
+				
+				if(k==-1)
+					throw new IllegalArgumentException();
+				
+				cx = Double.valueOf(code.substring(i, k));
+				cy = Double.valueOf(code.substring(k+1, j));
+				
+				setRotate(rotAngle, cx, cy);
+			}
+		}
+		else if(code.startsWith(SVGAttributes.SVG_TRANSFORM_SCALE))
+		{
+			k = code.indexOf(',');
+			i = SVGAttributes.SVG_TRANSFORM_SCALE.length();
+			j = code.indexOf(')');
+			double sx, sy;
+			
+			if(i>=lgth || code.charAt(i)!='(' || j==-1)
+				throw new IllegalArgumentException();
+			
+			if(k==-1)
+				k = code.indexOf(' ');
+			
+			if(k==-1)
+				sx = sy = Double.valueOf(code.substring(i+1, j));
+			else
+			{
+				sx = Double.valueOf(code.substring(i+1, k));
+				sy = Double.valueOf(code.substring(k+1, j));
+			}
+				
+			setScale(sx, sy);
+		}
+		else if(code.startsWith(SVGAttributes.SVG_TRANSFORM_TRANSLATE))
+		{
+			k = code.indexOf(',');
+			i = SVGAttributes.SVG_TRANSFORM_TRANSLATE.length();
+			j = code.indexOf(')');
+			double tx, ty;
+			
+			if(i>=lgth || code.charAt(i)!='(' || j==-1)
+				throw new IllegalArgumentException();
+			
+			if(k==-1)
+				k = code.indexOf(' ');
+			
+			if(k==-1)
+				tx = ty = Double.valueOf(code.substring(i+1, j));
+			else
+			{
+				tx = Double.valueOf(code.substring(i+1, k));
+				ty = Double.valueOf(code.substring(k+1, j));
+			}
+				
+			setTranslate(tx, ty);
+		}
+		else if(code.startsWith(SVGAttributes.SVG_TRANSFORM_MATRIX))
+		{
+			int nbPts = 6, l, k1, k2;
+			i = SVGAttributes.SVG_TRANSFORM_MATRIX.length();
+			j = code.indexOf(')');
+			double coords[] = new double[nbPts];
+			
+			if(i>=lgth || code.charAt(i)!='(' || j==-1)
+				throw new IllegalArgumentException();
+			
+			i++;
+			for(l=0; l<nbPts-1; l++)
+			{
+				k1 = code.indexOf(' ', i);
+				k2 = code.indexOf(',', i);
+				
+				k = k1==-1 ? k2 : k2==-1 ? k1 : Math.min(k1, k2);
+				
+				if(k==-1)
+					throw new IllegalArgumentException();
+				
+				coords[l] = Double.valueOf(code.substring(i, k));
+				i = k+1;
+			}
+			
+			coords[nbPts-1] = Double.valueOf(code.substring(i, j));
+			
+			setMatrix(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]);
+		}
+		else if(code.startsWith(SVGAttributes.SVG_TRANSFORM_SKEW_X))
+		{
+			i = SVGAttributes.SVG_TRANSFORM_SKEW_X.length();
+			j = code.indexOf(')');
+			
+			if(i>=lgth || code.charAt(i)!='(' || j==-1)
+				throw new IllegalArgumentException();
+			
+			setSkewX(Double.valueOf(code.substring(i+1, j)));
+		}
+		else if(code.startsWith(SVGAttributes.SVG_TRANSFORM_SKEW_Y))
+		{
+			i = SVGAttributes.SVG_TRANSFORM_SKEW_Y.length();
+			j = code.indexOf(')');
+			
+			if(i>=lgth || code.charAt(i)!='(' || j==-1)
+				throw new IllegalArgumentException();
+			
+			setSkewY(Double.valueOf(code.substring(i+1, j)));
+		}
+		else
+			throw new IllegalArgumentException();
+	}
+	
+	
+
+	/**
+	 * The transformation will be a translation.
+	 * @param tx The X translation.
+	 * @param ty The Y translation.
+	 * @since 0.1
+	 */
+	public void setTranslate(double tx, double ty)
+	{
+		type = SVG_TRANSFORM_TRANSLATE;
+		matrix.initMatrix();
+		matrix.translate(tx, ty);
+		angle = Double.NaN;
+	}
+	
+	
+	
+	
+	/**
+	 * The transformation will be set by the given values.
+	 * @param a b c d e f The values of the matrix: [a, c, e, b, d, f, 0, 0, 1].
+	 * @since 0.1
+	 */
+	public void setMatrix(double a, double b, double c, double d, double e, double f)
+	{
+		type = SVG_TRANSFORM_MATRIX;
+		matrix.setMatrix(a, b, c, d, e, f);
+		angle = Double.NaN;
+	}
+	
+	
+	
+	/**
+	 * The transformation will be a scaling.
+	 * @param sx The X scaling.
+	 * @param sy The Y scaling.
+	 * @since 0.1
+	 */
+	public void setScale(double sx, double sy)
+	{
+		type = SVG_TRANSFORM_SCALE;
+		matrix.initMatrix();
+		matrix.scaleNonUniform(sx, sy);
+		angle = Double.NaN;
+	}
+	
+	
+	
+	/**
+	 * The transformation will be a rotation form the origin.
+	 * @param angle The rotation angle in degree.
+	 * @param cx The X centre of the rotation.
+	 * @param cy The Y centre of the rotation.
+	 * @since 0.1
+	 */
+	public void setRotate(double angle, double cx, double cy)
+	{
+		SVGMatrix m1 = new SVGMatrix();
+		SVGMatrix m2 = new SVGMatrix();
+		
+		type = SVG_TRANSFORM_ROTATE;
+		matrix.initMatrix();
+		
+		m1.translate(cx, cy);
+		m2.rotate(Math.toRadians(angle));
+		m1 = m1.multiply(m2);
+		m2.translate(-cx, -cy);
+		m1.multiply(m2);
+		
+		matrix.setMatrix(m1.a, m1.b, m1.c, m1.d, m1.e, m1.f);
+		this.angle = angle;
+	}
+	
+	
+	
+	/**
+	 * The transformation will be a X skew.
+	 * @param angle The angle of the skew in degree.
+	 * @since 0.1
+	 */
+	public void setSkewX(double angle)
+	{
+		type = SVG_TRANSFORM_SKEWX;
+		matrix.initMatrix();
+		matrix.skewX(Math.toRadians(angle));
+		this.angle = angle;
+	}
+	
+	
+	
+	/**
+	 * The transformation will be a Y skew.
+	 * @param angle The angle of the skew in degree.
+	 * @since 0.1
+	 */
+	public void setSkewY(double angle)
+	{
+		type = SVG_TRANSFORM_SKEWY;
+		matrix.initMatrix();
+		matrix.skewY(Math.toRadians(angle));
+		this.angle = angle;
+	}
+
+
+	
+	/**
+	 * @return the type of the transformation.
+	 * @since 0.1
+	 */
+	public short getType()
+	{
+		return type;
+	}
+	
+	
+	
+	/**
+	 * @return True if the transformation is a rotation.
+	 * @since 0.1
+	 */
+	public boolean isRotation()
+	{
+		return getType()==SVG_TRANSFORM_ROTATE;
+	}
+	
+	
+	
+	/**
+	 * @return True if the transformation is a translation.
+	 * @since 0.1
+	 */
+	public boolean isTranslation()
+	{
+		return getType()==SVG_TRANSFORM_TRANSLATE;
+	}
+	
+	
+	
+	/**
+	 * @return True if the transformation is a scale.
+	 * @since 0.1
+	 */
+	public boolean isScale()
+	{
+		return getType()==SVG_TRANSFORM_SCALE;
+	}
+	
+	
+	
+	/**
+	 * @return True if the transformation is a X skew.
+	 * @since 0.1
+	 */
+	public boolean isXSkew()
+	{
+		return getType()==SVG_TRANSFORM_SKEWX;
+	}
+	
+	
+	
+	/**
+	 * @return True if the transformation is a Y skew.
+	 * @since 0.1
+	 */
+	public boolean isYSkew()
+	{
+		return getType()==SVG_TRANSFORM_SKEWY;
+	}
+	
+	
+	
+	/**
+	 * @return The rotation angle in degree if the transformation is a rotation. NaN otherwise.
+	 */
+	public double getRotationAngle()
+	{
+		return isRotation() ? angle : Double.NaN;
+	}
+	
+	
+	
+	/**
+	 * @return The skew angle in degree if the transformation is a X skew. NaN otherwise.
+	 */
+	public double getXSkewAngle()
+	{
+		return isXSkew() ? angle : Double.NaN;
+	}
+	
+	
+	
+	/**
+	 * @return The skew angle in degree if the transformation is a Y skew. NaN otherwise.
+	 */
+	public double getYSkewAngle()
+	{
+		return isYSkew() ? angle : Double.NaN;
+	}
+	
+	
+	
+	/**
+	 * @return The X scale factor if the transformation is a scaling. NaN otherwise.
+	 */
+	public double getXScaleFactor()
+	{
+		return isScale() ? matrix.getA() : Double.NaN;
+	}
+	
+	
+	
+	/**
+	 * @return The Y scale factor if the transformation is a scaling. NaN otherwise.
+	 */
+	public double getYScaleFactor()
+	{
+		return isScale() ? matrix.getD() : Double.NaN;
+	}
+	
+	
+	
+	/**
+	 * @return The X translation if the transformation is a translation. NaN otherwise.
+	 */
+	public double getTX()
+	{
+		return isTranslation() ? matrix.getE() : Double.NaN;
+	}
+	
+	
+	
+	/**
+	 * @return The Y translation if the transformation is a translation. NaN otherwise.
+	 */
+	public double getTY()
+	{
+		return isTranslation() ? matrix.getF() : Double.NaN;
+	}
+
+
+	
+	/**
+	 * @return the matrix.
+	 * @since 0.1
+	 */
+	public SVGMatrix getMatrix()
+	{
+		return matrix;
+	}
+
+
+
+	/**
+	 * Creates a translation.
+	 * @param x The tx.
+	 * @param y The ty.
+	 * @return The created translation.
+	 * @since 2.0.0
+	 */
+	public static SVGTransform createTranslation(double x, double y)
+	{
+		SVGTransform t = new SVGTransform();
+		t.setTranslate(x, y);
+		
+		return t;
+	}
+	
+	
+	/**
+	 * Creates a rotation.
+	 * @param cx The X centre of the rotation.
+	 * @param cy The Y centre of the rotation.
+	 * @param angle The angle of rotation in radian. 
+	 * @return The created translation.
+	 * @since 0.1
+	 */
+	public static SVGTransform createRotation(double angle, double cx, double cy)
+	{
+		SVGTransform r = new SVGTransform();
+		r.setRotate(angle, cx, cy);
+		
+		return r;
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer code = new StringBuffer();
+		SVGMatrix m = getMatrix();
+		
+		switch(getType())
+		{
+			case SVG_TRANSFORM_MATRIX:
+				code.append(SVGAttributes.SVG_TRANSFORM_MATRIX).append("(").append(m.toString()).append(")");//$NON-NLS-1$//$NON-NLS-2$
+				break;
+				
+			case SVG_TRANSFORM_ROTATE:
+				code.append(SVGAttributes.SVG_TRANSFORM_ROTATE).append("(").append(getRotationAngle()).append(//$NON-NLS-1$
+								m.getE()==0 && m.getF()==0 ? "" : " " + m.getE() + " " + m.getF()).append(")");//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+				break;
+				
+			case SVG_TRANSFORM_SCALE:
+				code.append(SVGAttributes.SVG_TRANSFORM_SCALE).append("(").append(getXScaleFactor()).append(" ").append(//$NON-NLS-2$//$NON-NLS-1$
+						getYScaleFactor()).append(")");//$NON-NLS-1$
+				break;
+				
+			case SVG_TRANSFORM_SKEWX:
+				code.append(SVGAttributes.SVG_TRANSFORM_SKEW_X).append("(").append(getXSkewAngle()).append(")");//$NON-NLS-1$//$NON-NLS-2$
+				break;
+				
+			case SVG_TRANSFORM_SKEWY:
+				code.append(SVGAttributes.SVG_TRANSFORM_SKEW_Y).append("(").append(getYSkewAngle()).append(")");//$NON-NLS-1$//$NON-NLS-2$
+				break;
+				
+			case SVG_TRANSFORM_TRANSLATE:
+				code.append(SVGAttributes.SVG_TRANSFORM_TRANSLATE).append("(").append(getTX()).append(" ").append(//$NON-NLS-2$ //$NON-NLS-1$
+						getTY()).append(")");//$NON-NLS-1$
+				break;
+		}
+		
+		return code.toString();
+	}
+}
diff --git a/current/latexDraw/parsers/svg/SVGTransformList.java b/current/latexDraw/parsers/svg/SVGTransformList.java
new file mode 100644
index 0000000..5573ef2
--- /dev/null
+++ b/current/latexDraw/parsers/svg/SVGTransformList.java
@@ -0,0 +1,140 @@
+package latexDraw.parsers.svg;
+
+import java.awt.geom.Point2D;
+import java.util.Vector;
+import java.util.regex.PatternSyntaxException;
+
+/** 
+ * Defines a list containing SVG transformations.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/16/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1<br>
+ */
+public class SVGTransformList extends Vector<SVGTransform>
+{
+	private static final long serialVersionUID = 1L;
+	
+
+	/**
+	 * The constructor by default.
+	 * @since 0.1
+	 */
+	public SVGTransformList()
+	{
+		super();
+	}
+	
+	
+	
+	/**
+	 * The constructor using a string containing the transformations.
+	 * @param transformations The set of SVG transformations.
+	 * @since 0.1
+	 */
+	public SVGTransformList(String transformations)
+	{
+		this();
+		
+		addTransformations(transformations);
+	}
+	
+	
+	
+	
+	/**
+	 * Add some transformations using a string containing the transformations.
+	 * @param transformations The set of SVG transformations.
+	 * @since 0.1
+	 */
+	public void addTransformations(String transformations)
+	{
+		if(transformations==null)
+			return ;
+		
+		try
+		{
+			String code = transformations.replaceAll("[ \t\n\r\f]+", " ");//$NON-NLS-1$//$NON-NLS-2$
+			code = code.replaceAll("^[ ]", "");//$NON-NLS-1$//$NON-NLS-2$
+			code = code.replaceAll("[ ]$", "");//$NON-NLS-1$//$NON-NLS-2$
+			code = code.replaceAll("[ ]?[(][ ]?", "(");//$NON-NLS-1$//$NON-NLS-2$
+			code = code.replaceAll("[ ]?[)]", ")");//$NON-NLS-1$//$NON-NLS-2$
+			code = code.replaceAll("[ ]?,[ ]?", ",");//$NON-NLS-1$//$NON-NLS-2$
+			code = code.replaceAll("[)][, ]?", ")_");//$NON-NLS-1$//$NON-NLS-2$
+		
+			String[] trans = code.split("_");//$NON-NLS-1$
+			
+			if(trans==null)
+				return;
+			
+			for(int i=0; i<trans.length; i++)
+				try{ add(new SVGTransform(trans[i])); }
+				catch(IllegalArgumentException e) { /* */ }
+		}
+		catch(PatternSyntaxException e){ /* */ }
+	}
+	
+	
+	
+	
+	/**
+	 * @return The global transformation which is the multiplication of all the transformation matrix of the list. Or
+	 * null is the list has no transformation.
+	 * @since 0.1
+	 */
+	public SVGMatrix getGlobalTransformationMatrix()
+	{
+		if(isEmpty())
+			return null;
+		
+		SVGMatrix out = firstElement().getMatrix();
+		
+		for(int i=1, size=size(); i<size; i++)
+			out = out.multiply(elementAt(i).getMatrix());
+		
+		return out;
+	}
+	
+	
+	
+	/**
+	 * Transforms a point according to the transformation of the list. Or null if pt is null.
+	 * @param pt The point to transform.
+	 * @return The transformed point.
+	 */
+	public Point2D transformPoint(Point2D pt)
+	{
+		if(pt==null)
+			return null;
+		
+		SVGMatrix m = getGlobalTransformationMatrix();
+		
+		if(m==null)
+			return new Point2D.Double(pt.getX(), pt.getY());
+		
+		SVGMatrix ptM = new SVGMatrix();
+		SVGMatrix out;
+		
+		ptM.e = pt.getX();
+		ptM.f = pt.getY();
+		out = m.multiply(ptM);
+		
+		if(out==null)
+			return new Point2D.Double(pt.getX(), pt.getY());
+		
+		return new Point2D.Double(out.e, out.f);
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/AbstractPointsElement.java b/current/latexDraw/parsers/svg/elements/AbstractPointsElement.java
new file mode 100644
index 0000000..afd3a1e
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/AbstractPointsElement.java
@@ -0,0 +1,114 @@
+package latexDraw.parsers.svg.elements;
+
+import java.awt.geom.Point2D;
+import java.text.ParseException;
+import java.util.Vector;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.parsers.SVGPointsParser;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines a model for shapes that have the <code>points</code> SVG attribute.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public abstract class AbstractPointsElement extends SVGElement
+{
+	/** The points of the element. @since 2.0.3 */
+	protected Vector<Point2D> points;
+	
+	
+	public AbstractPointsElement(Node n, SVGElement p) throws MalformedSVGDocument, ParseException
+	{
+		super(n, p);
+		
+		parsePoints();
+	}
+	
+	
+	/**
+	 * Parses the points of the element.
+	 * @throws ParseException If the format of the points is not valid.
+	 * @since 2.0.3
+	 */
+	public void parsePoints() throws ParseException
+	{
+		SVGPointsParser parser = new SVGPointsParser(getPoints());
+		parser.parse();
+		points = parser.getPoints();
+	}
+	
+	
+	
+	
+	public AbstractPointsElement(SVGDocument doc)
+	{
+		super(doc);
+		
+		try { setPoints("0,0 1,1"); }//$NON-NLS-1$
+		catch(ParseException e) { e.printStackTrace(); }
+	}
+
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return getPoints()!=null;
+	}
+	
+	
+	/**
+	 * Parses and sets the points to the element.
+	 * @throws ParseException If the format of the points is not valid.
+	 * @since 2.0.3
+	 */
+	public void setPoints(String points) throws ParseException
+	{
+		if(points!=null) {
+			setAttribute(SVGAttributes.SVG_POINTS, points);
+			parsePoints();
+		}
+	}
+	
+	
+	
+	/**
+	 * @return The points that make up the shape.
+	 * @since 0.1
+	 */
+	public String getPoints()
+	{
+		return getAttribute(getUsablePrefix()+SVGAttributes.SVG_POINTS);
+	}
+
+	
+	
+	/**
+	 * @return The set of points in the Point2D format or null if the format of <code>points</code> is not valid.
+	 * @since 0.1
+	 */
+	public Vector<Point2D> getPoints2D()
+	{
+		return points;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/OtherNSElement.java b/current/latexDraw/parsers/svg/elements/OtherNSElement.java
new file mode 100644
index 0000000..8dab8f0
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/OtherNSElement.java
@@ -0,0 +1,76 @@
+/*
+ * OtherNSElement.java
+ */
+package latexDraw.parsers.svg.elements;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGDocument;
+
+import org.w3c.dom.Node;
+
+
+/**
+ * Defines a generic element to store a non-SVG tag.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/12/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class OtherNSElement extends SVGElement
+{
+	
+	/**
+	 * See {@link SVGElement#SVGElement(Node, SVGElement)}.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 */
+	public OtherNSElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+
+
+
+	/**
+	 * Creates an non SVG element.
+	 * @param document The owner document.
+	 * @throws IllegalArgumentException if document is null.
+	 * @since 0.1
+	 */
+	public OtherNSElement(SVGDocument document)
+	{
+		super();
+		
+		if(document==null)
+			throw new IllegalArgumentException();
+		
+		ownerDocument = document;
+	}
+
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return true;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return false;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGCircleElement.java b/current/latexDraw/parsers/svg/elements/SVGCircleElement.java
new file mode 100644
index 0000000..bc3db61
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGCircleElement.java
@@ -0,0 +1,185 @@
+package latexDraw.parsers.svg.elements;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>ciricle</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGCircleElement extends SVGElement
+{
+
+	public SVGCircleElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+	
+	
+	/**
+	 * Creates an SVG circle element.
+	 * @param cx The X-centre coordinate.
+	 * @param cy The Y-centre coordinate.
+	 * @param r The radius of the circle.
+	 * @param owner The document owner.
+	 * @throws IllegalArgumentException If owner is null or if a given value is not valid.
+	 * @since 0.1
+	 */
+	public SVGCircleElement(double cx, double cy, double r, SVGDocument owner)
+	{
+		super(owner);
+		
+		setAttribute(SVGAttributes.SVG_CX, String.valueOf(cx));
+		setAttribute(SVGAttributes.SVG_CY, String.valueOf(cy));
+		setAttribute(SVGAttributes.SVG_R, String.valueOf(r));
+		setNodeName(SVGElements.SVG_CIRCLE);
+		ownerDocument = owner;
+		
+		if(!checkAttributes())
+			throw new IllegalArgumentException();
+	}
+	
+	
+	
+	/**
+	 * Creates a circle with a radius equal to 0.
+	 * @param doc The owner document.
+	 * @since 0.1
+	 */
+	public SVGCircleElement(SVGDocument doc)
+	{
+		super(doc);
+		
+		setNodeName(SVGElements.SVG_CIRCLE);
+		setAttribute(SVGAttributes.SVG_R, "0");//$NON-NLS-1$
+	}
+
+
+
+	/**
+	 * @return The x-axis coordinate of the centre of the circle (0 if there it does not exist or it is not a coordinate).
+	 * @since 0.1
+	 */
+	public double getCx()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_CX);
+		double cx;
+		
+		try { cx = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { cx = 0; }
+		
+		return cx;
+	}
+	
+	
+	
+	/**
+	 * @return The y-axis coordinate of the centre of the circle (0 if there it does not exist or it is not a coordinate).
+	 * @since 0.1
+	 */
+	public double getCy()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_CY);
+		double cy;
+		
+		try { cy = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { cy = 0; }
+		
+		return cy;
+	}
+	
+	
+	
+	/**
+	 * @return The radius of the circle (NaN if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getR()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_R);
+		double r;
+		
+		try { r = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { r = Double.NaN; }
+		
+		return r;
+	}
+	
+	
+	
+	/**
+	 * Sets the X-coordinate of the circle.
+	 * @param cx The new X-coordinate of the circle.
+	 * @since 0.1
+	 */
+	public void setCx(double cx)
+	{
+		setAttribute(getUsablePrefix()+SVGAttributes.SVG_CX, String.valueOf(cx));
+	}
+	
+	
+	
+	
+	/**
+	 * Sets the Y-coordinate of the circle.
+	 * @param cy The new Y-coordinate of the circle.
+	 * @since 0.1
+	 */
+	public void setCy(Double cy)
+	{
+		setAttribute(getUsablePrefix()+SVGAttributes.SVG_CY, String.valueOf(cy));
+	}
+	
+	
+	
+	/**
+	 * Sets the radius of the circle.
+	 * @param width The new radius of the circle.
+	 * @since 0.1
+	 */
+	public void setR(double width)
+	{
+		if(width>=0)
+			setAttribute(getUsablePrefix()+SVGAttributes.SVG_R, String.valueOf(width));
+	}
+	
+	
+	@Override
+	public boolean checkAttributes()
+	{
+		double r = getR();
+		
+		return !Double.isNaN(r) && r>=0;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return getR()!=0 ;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGDefsElement.java b/current/latexDraw/parsers/svg/elements/SVGDefsElement.java
new file mode 100644
index 0000000..6fea934
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGDefsElement.java
@@ -0,0 +1,101 @@
+/*
+ * SVGDefsElement.java
+ */
+package latexDraw.parsers.svg.elements;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Defines the SVG tag <code>defs</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGDefsElement extends SVGElement
+{
+
+	/**
+	 * See {@link SVGElement#SVGElement(Node, SVGElement)}.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 */
+	public SVGDefsElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+
+	
+
+	/**
+	 * Creates a meta data element.
+	 * @param owner The owner document.
+	 * @throws IllegalArgumentException If owner is null.
+	 * @since 0.1
+	 */
+	public SVGDefsElement(SVGDocument owner)
+	{
+		super();
+	
+		if(owner==null)
+			throw new IllegalArgumentException();
+		
+		ownerDocument = owner;
+		setNodeName(SVGElements.SVG_DEFS);
+	}
+
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return true;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return false;
+	}
+	
+	
+	
+	@Override
+	public SVGElement getDef(String id)
+	{
+		if(id==null)
+			return null;
+		
+		NodeList nl = getChildNodes();
+		SVGElement e = null;
+		Node n;
+		
+		for(int i=0, size = nl.getLength(); i<size && e==null; i++)
+		{
+			n = nl.item(i);
+			
+			if(n!=null && n instanceof SVGElement && id.equals(((SVGElement)n).getId()))
+				e = (SVGElement)n;
+		}
+		
+		return e;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGElement.java b/current/latexDraw/parsers/svg/elements/SVGElement.java
new file mode 100644
index 0000000..c3b0f86
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGElement.java
@@ -0,0 +1,1156 @@
+package latexDraw.parsers.svg.elements;
+
+import java.awt.Color;
+import java.text.ParseException;
+
+import latexDraw.figures.Figure;
+import latexDraw.parsers.svg.*;
+import latexDraw.parsers.svg.parsers.CSSStyleParser;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.*;
+
+/**
+ * Defines an SVG element.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public abstract class SVGElement implements Element, Cloneable
+{
+	/** The attributes of the element. @since 0.1 */
+	protected SVGNamedNodeMap attributes;
+	
+	/** The children of this element. @since 0.1 */
+	protected SVGNodeList children;
+	
+	/** The parent SVGElement of this element. @since 0.1 */
+	protected SVGElement parent;
+	
+	/** The name of the tag. @since 0.1 */
+	protected String name;
+	
+	/** The list of transformations which concern the element. @since 0.1 */
+	protected SVGTransformList transform;
+	
+	/** The list of the CSS styles of the SVG attribute style. @since 0.1 */
+	protected CSSStyleList stylesCSS;
+	
+	/** The document containing the element. @since 0.1 */
+	protected SVGDocument ownerDocument;
+	
+	
+	
+	/**
+	 * The constructor by default.
+	 * @since 0.1
+	 */
+	public SVGElement()
+	{
+		
+		children 	= new SVGNodeList();
+		attributes 	= null;
+		transform	= null;
+		stylesCSS	= null;
+		parent 		= null;
+		name 		= null;
+		ownerDocument = null;
+	}
+	
+	
+	
+	/**
+	 * Creates an simple SVGElement with the owner document.
+	 * @param owner The owner document.
+	 * @since 0.1
+	 */
+	public SVGElement(SVGDocument owner)
+	{
+		this();
+		
+		if(owner==null)
+			throw new IllegalArgumentException();
+		
+		ownerDocument = owner;
+	}
+	
+	
+	
+	/**
+	 * The constructor using a node in order to be initialised.
+	 * @param n The node.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 * @since 0.1
+	 */
+	public SVGElement(Node n) throws MalformedSVGDocument
+	{
+		this(n, null);
+	}
+
+	
+
+	/**
+	 * The constructor using a node to create the SVG element and an SVG element to be its parent.
+	 * @param n The node.
+	 * @param p The parent SVG element.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 * @since 0.1
+	 */
+	public SVGElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		this();
+		
+		if(n==null)
+			throw new IllegalArgumentException();
+		
+		if(p!=null)
+		{
+			ownerDocument = p.getOwnerDocument();
+			setParent(p);
+		}
+		
+		setAttributes(n);
+		setNodeValue(n.getNodeValue());
+		setNodeName(n.getNodeName());
+		
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_TRANSFORM);
+		
+		if(v!=null)
+		{
+			transform = new SVGTransformList();
+			transform.addTransformations(getAttribute(getUsablePrefix()+SVGAttributes.SVG_TRANSFORM));
+		}
+		
+		v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_STYLE);
+		
+		if(v!=null)
+		{
+			stylesCSS = new CSSStyleList();
+			try { new CSSStyleParser(v, stylesCSS).parse(); }
+			catch(ParseException e) {e.printStackTrace(); }
+		}
+		
+		if(!checkAttributes())
+			throw new MalformedSVGDocument();
+		
+		NodeList nl = n.getChildNodes();
+		int i, size = nl.getLength();
+		
+		if(size==1)
+			if(nl.item(0).getNodeName().equals("#text") || nl.item(0).getNodeName().equals("#cdata-section"))//$NON-NLS-1$//$NON-NLS-2$
+				setTextContent(n.getTextContent());
+		
+		for(i=0; i<size; i++)
+			SVGElementsFactory.createSVGElement(nl.item(i), this);
+	}
+	
+	
+	
+	protected void setAttributes(Node n)
+	{
+		if(n==null || n.getAttributes()==null)
+			return;
+		
+		NamedNodeMap nnm = n.getAttributes();
+		int i, size = nnm.getLength();
+		
+		if(size>0)
+		{
+			if(attributes==null)
+				attributes = new SVGNamedNodeMap();
+			
+			for(i=0; i<size; i++)
+				attributes.getAttributes().add(new SVGAttr(nnm.item(i).getNodeName(), nnm.item(i).getNodeValue(), this));
+		}
+	}
+	
+	
+	
+	/**
+	 * Allows to get the root of the SVG document.
+	 * @return The root.
+	 * @since 0.1
+	 */
+	public SVGElement getRootElement()
+	{
+		if(parent==null)
+			return this;
+		
+		return parent.getRootElement();
+	}
+
+	
+
+	/**
+	 * @return the parent.
+	 * @since 0.1
+	 */
+	public SVGElement getParent()
+	{
+		return parent;
+	}
+
+
+
+	/**
+	 * @param parent the parent to set.
+	 * @since 0.1
+	 */
+	public void setParent(SVGElement parent)
+	{
+		if(this.parent!=parent)
+		{
+			if(this.parent!=null)
+				this.parent.children.getNodes().remove(this);
+				
+			this.parent = parent;
+			
+			if(this.parent!=null && !this.parent.children.getNodes().contains(this))
+				this.parent.children.getNodes().add(this);
+		}
+	}
+
+
+
+	public NamedNodeMap getAttributes()
+	{
+		return attributes;
+	}
+
+
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer str = new StringBuffer().append('[');
+		int i, size = children==null ? 0 : children.getLength();
+		
+		str.append("name=").append(name).append(",");//$NON-NLS-1$//$NON-NLS-2$
+		
+		if(!hasChildNodes())
+			str.append("textContent=").append(getTextContent()).append(",");//$NON-NLS-1$//$NON-NLS-2$
+		
+		str.append("attributes=");//$NON-NLS-1$
+		
+		if(attributes!=null)
+			str.append(attributes.toString());
+		
+		str.append(", children={");//$NON-NLS-1$
+		
+		for(i=0; i<size-1; i++)
+			str.append(children.item(i).toString()).append(',');
+		
+		if(size>0)
+			str.append(children.getNodes().lastElement().toString());
+		
+		str.append('}');
+		
+		return str.append(']').toString();
+	}
+
+
+	
+	protected void setGeneralAttributes(SVGNamedNodeMap attr, Figure f)
+	{
+		if(f==null || attr==null)
+			return ;
+		
+		Node node;
+		
+		if(f.isThicknessable())
+		{
+			node = attr.getNamedItem(SVGAttributes.SVG_STROKE_WIDTH);
+		
+			if(node!=null)
+				f.setThickness(Double.valueOf(node.getNodeValue()).floatValue());
+		}
+		
+		node = attr.getNamedItem(SVGAttributes.SVG_STROKE);
+		
+		if(node!=null)
+		{
+			Color c = CSSColors.getRGBColour(node.getNodeValue());
+		
+			if(c!=null)
+				f.setLinesColor(c);
+		}
+		
+		if(f.canBeFilled())
+		{
+			node = attr.getNamedItem(SVGAttributes.SVG_FILL);
+			
+			if(node!=null)
+			{
+				f.setIsFilled(true);
+				Color c = CSSColors.getRGBColour(node.getNodeValue());
+				
+				if(c!=null)
+					f.setInteriorColor(c);
+			}
+		}
+	}
+
+
+
+	public String getNodeName()
+	{
+		return name;
+	}
+
+
+
+	public void setNodeName(String name)
+	{
+		this.name = name;
+	}
+
+
+
+	public String getAttribute(String nameAttr)
+	{
+		if(attributes==null || nameAttr==null)
+			return null;
+		
+		Node n = attributes.getNamedItem(nameAttr);
+		
+		if(n!=null)
+			return n.getNodeValue();
+		
+		return null;
+	}
+
+
+
+	public Attr getAttributeNode(String nameAttr)
+	{
+		if(attributes==null)
+			return null;
+		
+		return (Attr)attributes.getNamedItem(nameAttr);
+	}
+
+
+	public String getTagName()
+	{
+		return getNodeName();
+	}
+
+
+
+	public Node appendChild(Node newChild) throws DOMException
+	{
+		if(!(newChild instanceof SVGElement))
+			throw new DOMException(DOMException.TYPE_MISMATCH_ERR, "SVGElement excepted here.");//$NON-NLS-1$
+		
+		if(children.getNodes().contains(newChild))
+			children.getNodes().remove(newChild);
+			
+		children.getNodes().add((SVGElement)newChild);
+		((SVGElement)newChild).setParent(this);
+		
+		return newChild;
+	}
+
+
+
+	public NodeList getChildNodes()
+	{
+		return children;
+	}
+
+
+
+	public Node getFirstChild()
+	{
+		return children==null || children.getNodes()==null || children.getNodes().isEmpty() ? null : children.getNodes().firstElement();
+	}
+
+
+
+	public Node getLastChild()
+	{
+		return children==null || children.getNodes()==null || children.getNodes().isEmpty() ? null : children.getNodes().lastElement();
+	}
+
+
+
+	public short getNodeType()
+	{
+		return Node.ELEMENT_NODE;
+	}
+
+
+
+	public SVGDocument getOwnerDocument()
+	{
+		return ownerDocument;
+	}
+
+
+
+	public Node getParentNode()
+	{
+		return parent;
+	}
+
+
+
+	public boolean hasAttributes()
+	{
+		return attributes!=null && attributes.getAttributes()!=null && !attributes.getAttributes().isEmpty();
+	}
+
+
+
+	public boolean hasChildNodes()
+	{
+		return children!=null && children.getNodes()!=null && !children.getNodes().isEmpty();
+	}
+
+
+
+	public Node insertBefore(Node newChild, Node refChild) throws DOMException
+	{
+		boolean ok = false;
+		
+		if(children!=null && newChild!=null && refChild!=null)
+		{
+			int pos = children.getNodes().indexOf(refChild);
+			
+			if(pos!=-1 && newChild instanceof SVGElement)
+			{
+				children.getNodes().add(pos, (SVGElement)newChild);
+				ok = true;
+			}
+		}
+		
+		return ok ? newChild : null;
+	}
+
+
+
+
+	public boolean isEqualNode(Node node)
+	{
+		if(node==null || !(node instanceof SVGElement))
+			return false;
+		
+		SVGElement elt = (SVGElement)node;
+		String uri = lookupNamespaceURI(null);
+		String val = getNodeValue();
+		boolean valEq = val==null ? elt.getNodeValue()==null : val.equals(elt.getNodeValue());
+		boolean uriEq = uri==null ? elt.lookupNamespaceURI(null)==null : uri.equals(elt.lookupNamespaceURI(null));
+		boolean attrEq = attributes==null ? elt.attributes==null : attributes.equals(elt.attributes);
+		
+		return name.equals(elt.name) && getUsablePrefix().equals(elt.getUsablePrefix()) && uriEq && valEq && attrEq;
+	}
+
+
+
+	public boolean isSameNode(Node other)
+	{
+		return other!=null && other==this;
+	}
+
+
+
+	public Node removeChild(Node oldChild) throws DOMException
+	{
+		boolean ok = false;
+		
+		if(children!=null && oldChild!=null)
+			ok = children.getNodes().remove(oldChild);
+		
+		return ok ? oldChild : null;
+	}
+
+
+
+	public void setTextContent(String textContent) throws DOMException
+	{
+		if(textContent==null)
+			throw new DOMException(DOMException.DOMSTRING_SIZE_ERR, "textContent is null.");//$NON-NLS-1$
+		
+		appendChild(new SVGText(textContent, getOwnerDocument()));
+	}
+
+
+	public String lookupPrefix(String namespaceURI)
+	{
+		if(namespaceURI == null)
+			return null;
+        
+		String pref = null, xmlns = "xmlns";//$NON-NLS-1$
+		
+		if(attributes!=null)
+		{
+			int i=0, size = attributes.getLength();
+			boolean again = true;
+			
+			while(i<size && again)
+			{
+				SVGAttr attr = attributes.getAttributes().elementAt(i);
+				String attrName = attr.getName();
+				
+				if(attrName!=null && attrName.startsWith(xmlns) && namespaceURI.equals(attr.getValue()))
+				{
+					int index = attrName.indexOf(':');
+					
+					pref = index==-1 ? "" : attrName.substring(index+1); //$NON-NLS-1$
+					again = false;
+				}
+				else
+					i++;
+			}
+		}
+		
+		if(pref!=null)
+			return pref;
+		
+		if(getParentNode()==null)
+			return null;
+		
+		return getParentNode().lookupPrefix(namespaceURI);
+	}
+
+	
+	public boolean hasAttribute(String nameAttr)
+	{ 
+		return attributes!=null && attributes.getLength()>0;
+	}
+	
+	
+	
+	
+	public String getNamespaceURI()
+	{ 
+		return lookupNamespaceURI(getPrefix());
+	}
+	
+	
+	
+	
+	public String lookupNamespaceURI(String pref)
+	{ 
+		String uri = null;
+		
+		if(attributes!=null)
+			if(pref==null)
+			{
+				int i=0, size = attributes.getLength();
+				boolean again = true;
+				String xmlns = "xmlns";//$NON-NLS-1$
+				
+				while(i<size && again)
+				{
+					SVGAttr attr = attributes.getAttributes().elementAt(i);
+					String attrName = attr.getName();
+					
+					if(attrName!=null && attrName.equals(xmlns))
+					{
+						uri = attr.getNodeValue();
+						again = false;
+					}
+					else
+						i++;
+				}
+			}
+			else
+			{
+				int i=0, size = attributes.getLength();
+				boolean again = true;
+				String xmlns = "xmlns:";//$NON-NLS-1$
+				
+				while(i<size && again)
+				{
+					SVGAttr attr = attributes.getAttributes().elementAt(i);
+					String attrName = attr.getName();
+					
+					if(attrName!=null && attrName.startsWith(xmlns) && pref.equals(attrName.substring(xmlns.length())))
+					{
+						uri = attr.getNodeValue();
+						again = false;
+					}
+					else
+						i++;
+				}
+			}
+		
+		if(uri!=null)
+			return uri;
+		
+		if(getParentNode()==null)
+			return null;
+		
+		return parent.lookupNamespaceURI(pref);
+	}
+	
+	
+	
+	public String getPrefix()
+	{ 
+		if(getNodeName()==null)
+			return null;
+		
+		int index = getNodeName().indexOf(':');
+		
+		if(index!=-1)
+			return getNodeName().substring(0, index);
+		
+		return null;
+	}
+	
+	
+	public String getUsablePrefix()
+	{ 
+		if(getNodeName()==null)
+			return "";
+		
+		int index = getNodeName().indexOf(':');
+		
+		if(index!=-1)
+			return getNodeName().substring(0, index+1);
+		
+		return "";//$NON-NLS-1$
+	}
+	
+	
+	public void setAttribute(String name, String value) throws DOMException
+	{ 
+		if(value==null || name==null)
+			throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "Invalid name or/and value");//$NON-NLS-1$
+		
+		if(attributes==null)
+			attributes = new SVGNamedNodeMap();
+
+		attributes.setNamedItem(new SVGAttr(name, value, this));
+	}
+
+	
+	public Node getNextSibling()
+	{
+		if(parent==null)
+			return null;
+		
+		SVGNodeList nl = (SVGNodeList)parent.getChildNodes();
+		int index = nl.getNodes().indexOf(this);
+		
+		if(index==-1)
+			return null;
+		
+		return index+1>=nl.getLength() ? null : nl.getNodes().elementAt(index+1);
+		
+	}
+
+	
+	
+	public Node getPreviousSibling()
+	{
+		if(parent==null)
+			return null;
+		
+		SVGNodeList nl = (SVGNodeList)parent.getChildNodes();
+		int index = nl.getNodes().indexOf(this);
+		
+		if(index==-1)
+			return null;
+		
+		return index-1<0 ? null : nl.getNodes().elementAt(index+1);
+	}
+	
+	
+	
+	
+	public NodeList getElementsByTagName(String nameElt)
+	{ 
+		if("*".equals(nameElt)) //$NON-NLS-1$
+			return getChildNodes();
+		
+		SVGNodeList nl = new SVGNodeList();
+		
+		if(nameElt!=null)
+		{
+			NodeList nl2 = getChildNodes();
+			int i, size = nl2.getLength();
+			Node n;
+			
+			for(i=0; i<size; i++)
+			{
+				n = nl2.item(i);
+				
+				if(n!=null && nameElt.equals(n.getNodeName()) && n instanceof SVGElement)
+					nl.getNodes().add((SVGElement)n);
+			}
+		}
+		
+		return nl;
+	}
+		
+	
+
+	
+	public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException
+	{
+		String all = "*"; //$NON-NLS-1$
+		
+		if(all.equals(namespaceURI))
+			return getElementsByTagName(localName);
+		
+		SVGNodeList nl = new SVGNodeList();
+		
+		if(namespaceURI!=null && localName!=null)
+		{
+			boolean getAll = all.equals(localName);
+			NodeList nl2 = getChildNodes();
+			int i, size = nl2.getLength();
+			Node n;
+			
+			for(i=0; i<size; i++)
+			{
+				n = nl2.item(i);
+				
+				if(n!=null && n instanceof SVGElement && namespaceURI.equals(n.getNamespaceURI()) && (getAll || n.getNodeName().endsWith(localName)))
+						nl.getNodes().add((SVGElement)n);
+			}
+		}
+		
+		return nl;
+	}
+	
+	
+	
+	public String getTextContent() throws DOMException
+	{
+		String content = ""; //$NON-NLS-1$
+		NodeList nl = getElementsByTagName(SVGText.TEXT_NODE_NAME);
+		
+		for(int i=0, size=nl.getLength(); i<size; i++)
+			content += ((SVGText)nl.item(i)).getData();
+		
+		return content;
+	}
+	
+	
+	public String getLocalName()
+	{ 
+		return name; 
+	}
+	
+	
+	public void removeAttribute(String nameAttr) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void removeAttributeNS(String namespaceURI, String localName) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Attr removeAttributeNode(Attr oldAttr) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Attr setAttributeNode(Attr newAttr) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Attr setAttributeNodeNS(Attr newAttr) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void setIdAttribute(String name, boolean isId) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public Node cloneNode(boolean deep)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public short compareDocumentPosition(Node other) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public String getBaseURI()
+	{ return null; }
+
+	public TypeInfo getSchemaTypeInfo()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+	
+	public Object getFeature(String feature, String version)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+	
+	public Object getUserData(String key)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+	
+	public boolean isDefaultNamespace(String namespaceURI)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+	
+	public boolean isSupported(String feature, String version)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void normalize()
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+	
+	public Node replaceChild(Node newChild, Node oldChild) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+	
+	public Object setUserData(String key, Object data, UserDataHandler handler)
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+
+	public void setPrefix(String prefix) throws DOMException
+	{ throw new DOMException(DOMException.INVALID_ACCESS_ERR, SVGDocument.ACTION_NOT_IMPLEMENTED); }
+	
+	
+	public String getNodeValue() throws DOMException
+	{ return null; }
+
+	public void setNodeValue(String nodeValue) throws DOMException
+	{ /* No value. */ }
+	
+	
+	/**
+	 * Returns the prefix of the given namespace URI with the ':' character after or an empty string
+	 * if no prefix is found.
+	 * @param namespaceURI The URI to look for.
+	 * @return the prefix followed by ':' or an empty string.
+	 * @since 0.1
+	 */
+	public String lookupPrefixUsable(String namespaceURI)
+	{
+		String pref = lookupPrefix(namespaceURI);
+		
+		if(pref==null)
+			pref = "";//$NON-NLS-1$
+		else
+			pref = pref + ":";//$NON-NLS-1$
+		
+		return pref;
+	}
+	
+	
+	/**
+	 * Check if the SVG element is valid according to the SVG specification.
+	 * @return True if valid.
+	 * @since 0.1
+	 */
+	public abstract boolean checkAttributes();
+	
+	
+	/**
+	 * According to the SVG specification, some attributes may lead to disables rendering of the element (e.g. width=0, 
+	 * height=0,...). This method checks these conditions depending of the SVG element.
+	 * @return True if the element can be rendered.
+	 * @since 0.1
+	 */
+	public abstract boolean enableRendering();
+	
+	
+	
+	public Attr getAttributeNodeNS(String namespaceURI, String localName)
+	{
+		if(localName==null)
+			return null;
+		
+		return getAttributeNode(lookupPrefixUsable(namespaceURI) + localName);
+	}
+	
+	
+	public String getAttributeNS(String namespaceURI, String localName) throws DOMException
+	{
+		if(localName==null)
+			return null;
+		
+		return getAttribute(lookupPrefixUsable(namespaceURI) + localName);
+	}
+	
+	
+	
+	public boolean hasAttributeNS(String namespaceURI, String localName) throws DOMException
+	{
+		return  getAttributeNodeNS(namespaceURI, localName)!=null;
+	}
+	
+	
+	/**
+	 * @return The root element of the SVG document: an SVGSVGElement.
+	 * @since 0.1
+	 */
+	public SVGSVGElement getSVGRoot()
+	{
+		SVGElement e = getRootElement();
+		
+		if(e instanceof SVGSVGElement)
+			return (SVGSVGElement)e;
+		
+		return null;
+	}
+	
+	
+	
+	/**
+	 * Allows to get a definition (a tag in the 'def' part) with the identifier 'id'.
+	 * @param id The identifier of the wanted definition.
+	 * @return The definition or null.
+	 * @since 0.1
+	 */
+	public SVGElement getDef(String id)
+	{
+		SVGSVGElement root = getSVGRoot();
+		
+		if(root==null)
+			return null;
+		
+		return root.getDefs().getDef(id);
+	}
+	
+	
+	
+	/**
+	 * @return The identifier of the SVGElement.
+	 * @since 0.1
+	 */
+	public String getId()
+	{
+		return getAttribute(getUsablePrefix()+SVGAttributes.SVG_ID);
+	}
+	
+	
+	
+	/**
+	 * Allow to get a set of children having the name 'nodeName'
+	 * @param nodeName The name of the wanted nodes.
+	 * @return The set of nodes (may be empty but not null).
+	 * @since 0.1
+	 */
+	public SVGNodeList getChildren(String nodeName)
+	{
+		SVGNodeList nl 	= new SVGNodeList();
+		NodeList nl2 	=  getChildNodes();
+		
+		for(int i=0, size = nl2.getLength(); i<size; i++)
+			if(nl2.item(i).getNodeName().equals(nodeName))
+				nl.getNodes().add((SVGElement)nl2.item(i));
+		
+		return nl;
+	}
+	
+	
+	
+	/**
+	 * Sets the stroke width of the SVG shape.
+	 * @param strokeW The new stroke width (must be greater than 0).
+	 * @since 0.1
+	 */
+	public void setStrokeWidth(double strokeW)
+	{
+		if(strokeW>0)
+			setAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE_WIDTH, String.valueOf(strokeW));
+	}
+	
+	
+	
+	/**
+	 * @return The stroke width of the element (if it is possible) or 1.
+	 * @since 0.1
+	 */
+	public double getStrokeWidth()
+	{
+		String swStr = getAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE_WIDTH);
+		double sw;
+		
+		try 
+		{ 
+			sw = swStr==null ? parent==null ? 1 : parent.getStrokeWidth() : 
+				new SVGLengthParser(swStr).parseLength().getValue();
+		}
+		catch(ParseException e){ sw = 1; }
+		
+		return sw;
+	}
+	
+	
+	
+	/**
+	 * @return The dash array of the element (if it is possible) or null.
+	 * @since 0.1
+	 */
+	public String getStrokeDasharray()
+	{
+		String da = getAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE_DASHARRAY);
+		
+		return da==null ? parent==null ? SVGAttributes.SVG_VALUE_NONE : parent.getStrokeDasharray() : da;
+	}
+	
+	
+	
+	/**
+	 * @return The linecap of the element (if it is possible) or null.
+	 * @since 0.1
+	 */
+	public String getLinecap()
+	{
+		String linecap = getAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE_LINECAP);
+
+		return linecap==null ? parent==null ? SVGAttributes.SVG_LINECAP_VALUE_BUTT : parent.getLinecap() : linecap;
+	}
+	
+	
+	
+	/**
+	 * Sets the colour of the filling.
+	 * @param c The new filling colour.
+	 * @since 0.1
+	 */
+	public void setFill(Color c)
+	{
+		if(c!=null)
+			setAttribute(getUsablePrefix()+SVGAttributes.SVG_FILL, CSSColors.getColorName(c, true));
+	}
+	
+	
+	
+	/**
+	 * @return The fill content of the element (if it is possible) or null.
+	 * @since 0.1
+	 */
+	public String getFill()
+	{
+		String fill = getAttribute(getUsablePrefix()+SVGAttributes.SVG_FILL);
+		
+		return fill==null ? parent==null ? CSSColors.CSS_BLACK_NAME : parent.getFill() : fill;
+	}
+	
+	
+	
+	/**
+	 * Sets The colour of the stroke.
+	 * @param c The new colour of the stroke (must not be null).
+	 * @since 0.1
+	 */
+	public void setStroke(Color c)
+	{
+		if(c!=null)
+			setAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE, CSSColors.getColorName(c, true));
+	}
+	
+	
+	
+	/**
+	 * @return The fill content of the element (if it is possible) or null.
+	 * @since 0.1
+	 */
+	public Color getStroke()
+	{
+		Node n = getAttributeNode(getUsablePrefix()+SVGAttributes.SVG_STROKE);
+		
+		return n==null ? parent==null ? null : parent.getStroke() : CSSColors.getRGBColour(n.getNodeValue());
+	}
+	
+	
+	
+	/**
+	 * @return The prefix followed by ':' if there is a prefix. An empty string is returned in the other case.
+	 * @since 0.1
+	 */
+	public String getUsablePrefix(String uri)
+	{
+		String pref = lookupPrefix(uri);
+		
+		return pref==null || pref.length()==0 ? "" : pref+':';//$NON-NLS-1$
+	}
+
+
+
+	/**
+	 * @return The list of transformations of the current SVG element (may be null).
+	 * @since 0.1
+	 */
+	public SVGTransformList getTransform()
+	{
+		return transform;
+	}
+	
+	
+	
+	
+	/**
+	 * @return The list of all the transformations of the node's parents followed by the node's transformations. 
+	 * The first transformations will be the transformations of the oldest parent and the last ones, the 
+	 * transformations of the current node. If no transformation are defined, an empty list is returned.
+	 * @since 0.1
+	 */
+	public SVGTransformList getWholeTransform()
+	{
+		SVGTransformList tl = new SVGTransformList(); 	// The list that will be returned.
+		SVGElement p = getParent();						// A parent element.
+		
+		if(getTransform()!=null)
+			tl.addAll(getTransform());
+		
+		while(p!=null)
+		{
+			if(p.getTransform()!=null)
+				tl.addAll(0, p.getTransform());
+			
+			p = p.getParent();
+		}
+		
+		return tl;
+	}
+	
+	
+	
+	/**
+	 * Sets the owner document of the node.
+	 * @param doc The document to set.
+	 * @since 2.0.0
+	 */
+	public void setOwnerDocument(SVGDocument doc)
+	{
+		if(doc!=null)
+		{
+			ownerDocument = doc;
+			
+			for(int i=0, size=children.getLength(); i<size; i++)
+				children.item(i).setOwnerDocument(doc);
+		}
+	}
+	
+	
+	
+	public int getNbChildren(int deep)
+	{
+		if(children==null || deep<1)
+			return 0;
+		
+		int cpt = children.getLength();
+		
+		for(SVGElement e : children.getNodes())
+			cpt += e.getNbChildren(deep-1);
+		
+		return cpt;
+	}
+
+
+	/**
+	 * @return the stylesCSS
+	 * @since 0.1
+	 */
+	public CSSStyleList getStylesCSS()
+	{
+		return stylesCSS;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGEllipseElement.java b/current/latexDraw/parsers/svg/elements/SVGEllipseElement.java
new file mode 100644
index 0000000..739fbc2
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGEllipseElement.java
@@ -0,0 +1,166 @@
+package latexDraw.parsers.svg.elements;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>ellipse</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGEllipseElement extends SVGElement
+{
+	
+	public SVGEllipseElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+
+	
+	/**
+	 * Creates an SVG ellipse element.
+	 * @param cx The X-centre coordinate.
+	 * @param cy The Y-centre coordinate.
+	 * @param rx The X-radius of the ellipse.
+	 * @param ry The Y-radius of the ellipse.
+	 * @param owner The document owner.
+	 * @throws IllegalArgumentException If owner is null or if a given value is not valid.
+	 * @since 0.1
+	 */
+	public SVGEllipseElement(double cx, double cy, double rx, double ry, SVGDocument owner)
+	{
+		super(owner);
+		
+		setAttribute(SVGAttributes.SVG_CX, String.valueOf(cx));
+		setAttribute(SVGAttributes.SVG_CY, String.valueOf(cy));
+		setAttribute(SVGAttributes.SVG_RX, String.valueOf(rx));
+		setAttribute(SVGAttributes.SVG_RY, String.valueOf(ry));
+		setNodeName(SVGElements.SVG_ELLIPSE);
+		ownerDocument = owner;
+		
+		if(!checkAttributes())
+			throw new IllegalArgumentException();
+	}
+	
+	
+	/**
+	 * Creates an empty ellipse.
+	 * @param doc The owner document.
+	 * @since 0.1
+	 */
+	public SVGEllipseElement(SVGDocument doc)
+	{
+		super(doc);
+		
+		setNodeName(SVGElements.SVG_ELLIPSE);
+		setAttribute(SVGAttributes.SVG_RX, "0");//$NON-NLS-1$
+		setAttribute(SVGAttributes.SVG_RY, "0");//$NON-NLS-1$
+	}
+
+
+
+	/**
+	 * @return The x-axis coordinate of the centre of the ellipse (0 if there it does not exist or it is not a coordinate).
+	 * @since 0.1
+	 */
+	public double getCx()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_CX);
+		double cx;
+		
+		try { cx = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { cx = 0; }
+		
+		return cx;
+	}
+	
+	
+	/**
+	 * @return The y-axis coordinate of the centre of the ellipse (0 if there it does not exist or it is not a coordinate).
+	 * @since 0.1
+	 */
+	public double getCy()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_CY);
+		double cy;
+		
+		try { cy = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { cy = 0; }
+		
+		return cy;
+	}
+	
+	
+	
+	/**
+	 * @return The x-axis radius of the ellipse (NaN if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getRx()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_RX);
+		double rx;
+		
+		try { rx = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { rx = Double.NaN; }
+		
+		return rx;
+	}
+
+	
+	
+	/**
+	 * @return The y-axis radius of the ellipse (NaN if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getRy()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_RY);
+		double ry;
+		
+		try { ry = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { ry = Double.NaN; }
+		
+		return ry;
+	}
+	
+	
+
+	@Override
+	public boolean checkAttributes()
+	{
+		double rx = getRx(), ry = getRy();
+		
+		return !Double.isNaN(rx) && !Double.isNaN(ry) && rx>=0 && ry>=0;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return getRx()!=0 && getRy()!=0 ;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGGElement.java b/current/latexDraw/parsers/svg/elements/SVGGElement.java
new file mode 100644
index 0000000..99f7d6b
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGGElement.java
@@ -0,0 +1,77 @@
+/*
+ * SVGGElement.java
+ */
+package latexDraw.parsers.svg.elements;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+
+import org.w3c.dom.Node;
+
+
+/**
+ * Defines the SVG tag <code>g</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGGElement extends SVGElement
+{
+
+	/**
+	 * See {@link SVGElement#SVGElement(Node, SVGElement)}.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 */
+	public SVGGElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+
+	
+	
+	/**
+	 * Creates an empty G element.
+	 * @param owner The owner document.
+	 * @throws IllegalArgumentException If p is null.
+	 * @since 0.1
+	 */
+	public SVGGElement(SVGDocument owner)
+	{
+		super();
+		
+		if(owner==null)
+			throw new IllegalArgumentException();
+		
+		ownerDocument = owner;
+		setNodeName(SVGElements.SVG_G);
+	}
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return true;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return true;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGImageElement.java b/current/latexDraw/parsers/svg/elements/SVGImageElement.java
new file mode 100644
index 0000000..29a4fb8
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGImageElement.java
@@ -0,0 +1,158 @@
+package latexDraw.parsers.svg.elements;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+public class SVGImageElement extends SVGElement
+{
+
+	public SVGImageElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+
+
+	
+	/**
+	 * Creates an SVG image.
+	 * @param doc The owner document.
+	 * @param pathSource The path of the picture.
+	 * @since 0.1
+	 */
+	public SVGImageElement(SVGDocument doc, String pathSource)
+	{
+		super(doc);
+		
+		if(pathSource==null)
+			throw new IllegalArgumentException();
+		
+		setNodeName(SVGElements.SVG_IMAGE);
+		setAttribute("xlink:href", pathSource);//$NON-NLS-1$
+	}
+
+
+
+	/**
+	 * @return The value of the X attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X);
+		double x;
+		
+		try { x = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { x = 0; }
+		
+		return x;
+	}
+	
+	
+	
+	
+	/**
+	 * @return The value of the Y attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y);
+		double y;
+		
+		try { y = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { y = 0; }
+		
+		return y;
+	}
+	
+	
+	/**
+	 * @return The value of the <code>width</code> attribute.
+	 * @since 0.1
+	 */
+	public double getWidth()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_WIDTH);
+		double width;
+		
+		try { width = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { width = Double.NaN; }
+		
+		return width;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the <code>height</code> attribute.
+	 * @since 0.1
+	 */
+	public double getHeight()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_HEIGHT);
+		double height;
+		
+		try { height = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { height = Double.NaN; }
+		
+		return height;
+	}
+	
+	
+	
+	/**
+	 * @return The URI reference.
+	 * @since 0.1
+	 */
+	public String getURI()
+	{
+		return getAttribute("xlink:href");//$NON-NLS-1$
+	}
+	
+	
+
+	@Override
+	public boolean checkAttributes()
+	{
+		double vWidth	= getWidth();
+		double vHeight	= getHeight();
+		
+		if(Double.isNaN(vWidth) || Double.isNaN(vHeight) || vWidth<0 || vHeight<0)
+			return false;
+		
+		return true;
+	}
+
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		if(getWidth()==0 || getHeight()==0 || getURI()==null)
+			return false;
+		
+		try
+		{
+			URI uri = new URI(getURI());
+			File f = new File(uri.getPath());
+			
+			if(!f.exists() || !f.canRead())
+				return false;
+		}
+		catch(URISyntaxException e) { return false; }
+		
+		return true;
+	}
+
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGLineElement.java b/current/latexDraw/parsers/svg/elements/SVGLineElement.java
new file mode 100644
index 0000000..a8dd8d0
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGLineElement.java
@@ -0,0 +1,204 @@
+package latexDraw.parsers.svg.elements;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>line</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGLineElement extends SVGElement
+{
+
+	public SVGLineElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+	
+	
+	
+	/**
+	 * Creates an SVGLine.
+	 * @param owner The owner document.
+	 * @throws MalformedSVGDocument If the given coordinates are not valid.
+	 * @since 0.1
+	 */
+	public SVGLineElement(double x1, double y1, double x2, double y2, SVGDocument owner) throws MalformedSVGDocument
+	{
+		this(owner);
+
+		setAttribute(SVGAttributes.SVG_X1, String.valueOf(x1));
+		setAttribute(SVGAttributes.SVG_X2, String.valueOf(x2));
+		setAttribute(SVGAttributes.SVG_Y1, String.valueOf(y1));
+		setAttribute(SVGAttributes.SVG_Y2, String.valueOf(y2));
+		
+		if(!checkAttributes())
+			throw new MalformedSVGDocument();
+	}
+	
+	
+	
+	/**
+	 * Creates an SVG line (0,0 ; 0,0)
+	 * @param doc The owner document.
+	 * @since 0.1
+	 */
+	public SVGLineElement(SVGDocument doc)
+	{
+		super(doc);
+		setNodeName(SVGElements.SVG_LINE);
+		setAttribute(SVGAttributes.SVG_X1, "0");//$NON-NLS-1$
+		setAttribute(SVGAttributes.SVG_X2, "0");//$NON-NLS-1$
+		setAttribute(SVGAttributes.SVG_Y1, "0");//$NON-NLS-1$
+		setAttribute(SVGAttributes.SVG_Y2, "0");//$NON-NLS-1$
+	}
+
+
+
+	/**
+	 * @return The x-axis coordinate of the start of the line (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getX1()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X1);
+		double x1;
+		
+		try { x1 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { x1 = 0; }
+		
+		return x1;
+	}
+	
+	
+	/**
+	 * @return The y-axis coordinate of the start of the line (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getY1()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y1);
+		double y1;
+		
+		try { y1 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { y1 = 0; }
+		
+		return y1;
+	}
+	
+	
+	
+	/**
+	 * @return The x-axis coordinate of the end of the line (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getX2()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X2);
+		double x2;
+		
+		try { x2 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { x2 = 0; }
+		
+		return x2;
+	}
+	
+	
+	/**
+	 * @return The y-axis coordinate of the end of the line (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getY2()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y2);
+		double y2;
+		
+		try { y2 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { y2 = 0; }
+		
+		return y2;
+	}
+	
+	
+	/**
+	 * Sets the first X-coordinate of the line.
+	 * @param x1 The first X-coordinate of the line.
+	 * @since 2.0.0
+	 */
+	public void setX1(double x1)
+	{
+		setAttribute(getUsablePrefix()+SVGAttributes.SVG_X1, String.valueOf(x1));
+	}
+	
+	
+	/**
+	 * Sets the second X-coordinate of the line.
+	 * @param x2 The second X-coordinate of the line.
+	 * @since 2.0.0
+	 */
+	public void setX2(double x2)
+	{
+		setAttribute(getUsablePrefix()+SVGAttributes.SVG_X2, String.valueOf(x2));
+	}
+	
+	
+	/**
+	 * Sets the first Y-coordinate of the line.
+	 * @param y1 The first Y-coordinate of the line.
+	 * @since 2.0.0
+	 */
+	public void setY1(double y1)
+	{
+		setAttribute(getUsablePrefix()+SVGAttributes.SVG_Y1, String.valueOf(y1));
+	}
+	
+	
+	/**
+	 * Sets the second Y-coordinate of the line.
+	 * @param y2 The second Y-coordinate of the line.
+	 * @since 2.0.0
+	 */
+	public void setY2(double y2)
+	{
+		setAttribute(getUsablePrefix()+SVGAttributes.SVG_Y2, String.valueOf(y2));
+	}
+	
+	
+	
+	@Override
+	public boolean checkAttributes()
+	{
+		return true;
+	}
+
+
+	
+	@Override
+	public boolean enableRendering()
+	{
+		return true;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGLinearGradientElement.java b/current/latexDraw/parsers/svg/elements/SVGLinearGradientElement.java
new file mode 100644
index 0000000..4ac2ba1
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGLinearGradientElement.java
@@ -0,0 +1,309 @@
+package latexDraw.parsers.svg.elements;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.*;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+
+/**
+ * Defines the SVG tag <code>linearGradient</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/04/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGLinearGradientElement extends SVGElement
+{
+	public SVGLinearGradientElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+	
+	
+	
+	/**
+	 * Creates an simple SVGLinearGradientElement with the owner document.
+	 * @param owner The owner document.
+	 * @throws IllegalArgumentException If owner is null.
+	 * @since 0.1
+	 */
+	public SVGLinearGradientElement(SVGDocument owner)
+	{
+		super(owner);
+		
+		setNodeName(SVGElements.SVG_LINEAR_GRADIENT);
+	}
+
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return true;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return true;
+	}
+	
+	
+	
+	/**
+	 * @return The coordinate system for attributes x1, y1, x2 and y2.
+	 * @since 0.1
+	 */
+	public String getGradientUnits()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_GRADIENT_UNITS);
+		
+		return v==null || (!SVGAttributes.SVG_UNITS_VALUE_OBJ.equals(v) &&
+						!SVGAttributes.SVG_UNITS_VALUE_USR.equals(v)) ? SVGAttributes.SVG_UNITS_VALUE_OBJ : v;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the X1 attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getX1()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X1);
+		double x1;
+		
+		try { x1 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { x1 = 0; }
+		
+		return x1;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the Y1 attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getY1()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y1);
+		double y1;
+		
+		try { y1 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { y1 = 0; }
+		
+		return y1;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the X2 attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getX2()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X2);
+		double x2;
+		
+		try { x2 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { x2 = 0; }
+		
+		return x2;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the Y2 attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getY2()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y2);
+		double y2;
+		
+		try { y2 = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { y2 = 0; }
+		
+		return y2;
+	}
+	
+	
+	
+	/**
+	 * @return The start colour of the gradient or null.
+	 * @since 0.1
+	 */
+	public Color getStartColor()
+	{
+		SVGNodeList nl = getChildren(SVGElements.SVG_STOP);
+		
+		if(nl.getLength()==2)
+		{
+			if(((SVGStopElement)nl.item(0)).getOffset()<((SVGStopElement)nl.item(1)).getOffset())
+				return ((SVGStopElement)nl.item(0)).getStopColor();
+			
+			return ((SVGStopElement)nl.item(1)).getStopColor();
+		}
+		else
+			if(nl.getLength()==3)
+			{
+				SVGStopElement s1 = ((SVGStopElement)nl.item(0)), s2 = ((SVGStopElement)nl.item(1));
+				SVGStopElement s3 = ((SVGStopElement)nl.item(2));
+				
+				if(s1.getOffset()<s2.getOffset())
+				{
+					if(s1.getOffset()<s3.getOffset())
+						return s1.getStopColor();
+					
+					return s3.getStopColor();
+				}
+				
+				if(s2.getOffset()<s3.getOffset())
+					return s2.getStopColor();
+				
+				return s3.getStopColor();
+			}
+		
+		return null;
+	}
+	
+	
+	
+	/**
+	 * @return The end colour of the gradient or null.
+	 * @since 0.1
+	 */
+	public Color getEndColor()
+	{
+		SVGNodeList nl = getChildren(SVGElements.SVG_STOP);
+		
+		if(nl.getLength()==2)
+		{
+			if(((SVGStopElement)nl.item(0)).getOffset()>((SVGStopElement)nl.item(1)).getOffset())
+				return ((SVGStopElement)nl.item(0)).getStopColor();
+			
+			return ((SVGStopElement)nl.item(1)).getStopColor();
+		}
+		else
+			if(nl.getLength()==3)
+			{
+				SVGStopElement s1 = ((SVGStopElement)nl.item(0)), s2 = ((SVGStopElement)nl.item(1));
+				SVGStopElement s3 = ((SVGStopElement)nl.item(2));
+				
+				if(s1.getOffset()>s2.getOffset())
+				{
+					if(s1.getOffset()<s3.getOffset())
+						return s1.getStopColor();
+					
+					return s3.getStopColor();
+				}
+				
+				if(s2.getOffset()<s3.getOffset())
+					return s2.getStopColor();
+				
+				return s3.getStopColor();
+			}
+		
+		return null;
+	}
+	
+	
+	
+	/**
+	 * @return The middle point of the gradient (between 0 and 1 inclued) or NaN.
+	 * @since 0.1
+	 */
+	public double getMiddlePoint()
+	{
+		double midPoint = Double.NaN;
+		SVGNodeList nl = getChildren(SVGElements.SVG_STOP);
+		
+		if(nl.getLength()==2)
+			midPoint = Math.max(((SVGStopElement)nl.item(0)).getOffset(), ((SVGStopElement)nl.item(1)).getOffset());
+		else
+			if(nl.getLength()==3)
+			{
+				SVGStopElement s1 = ((SVGStopElement)nl.item(0)), s2 = ((SVGStopElement)nl.item(1));
+				SVGStopElement s3 = ((SVGStopElement)nl.item(2));
+				
+				if(s1.getOffset()>s2.getOffset())
+					if(s1.getOffset()<s3.getOffset())
+						midPoint = s1.getOffset();
+					else
+						midPoint = s3.getOffset();
+				else
+					if(s2.getOffset()<s3.getOffset())
+						midPoint = s2.getOffset();
+					else
+						midPoint = s3.getOffset();
+			}
+		
+		return midPoint;
+	}
+	
+	
+	
+	/**
+	 * @return The angle of the gradient in radian or NaN.
+	 * @since 0.1
+	 */
+	public double getAngle()
+	{
+		double x1 = getX1(), x2 = getX2(), y1 = getY1(), y2 = getY2();
+		double angle = Double.NaN;
+		
+		if(((float)x1)==((float)x2))
+			if(SVGAttributes.SVG_UNITS_VALUE_OBJ.equals(getGradientUnits()))
+				angle = Math.PI/2.;
+			else
+				angle = 0.;
+		else
+			if(((float)y1)==((float)y2))
+				angle = Math.PI;
+		
+		if(Double.isNaN(angle))
+		{
+			Point2D.Double c = new Point2D.Double((x1+x2)/2., (y1+y2)/2.);
+			angle = Math.asin(c.distance(x1, c.y)/c.distance(x1, y1));
+		}
+		
+		return angle%(2*Math.PI);
+	}
+	
+	
+	
+	/**
+	 * Indicates what happens if the gradient starts or ends inside the bounds of the target rectangle.
+	 * @return pad | reflect | repeat
+	 * @since 0.1
+	 */
+	public String getSpreadMethod()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_SPREAD_METHOD);
+		
+		return v==null || (!SVGAttributes.SVG_PAD.equals(v) && !SVGAttributes.SVG_REFLECT.equals(v) &&
+				!SVGAttributes.SVG_REPEAT.equals(v)) ? SVGAttributes.SVG_PAD : v;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGMarkerElement.java b/current/latexDraw/parsers/svg/elements/SVGMarkerElement.java
new file mode 100644
index 0000000..6426ed3
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGMarkerElement.java
@@ -0,0 +1,143 @@
+package latexDraw.parsers.svg.elements;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>marker</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/04/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGMarkerElement extends SVGElement
+{
+	public SVGMarkerElement(SVGDocument owner)
+	{
+		super(owner);
+		
+		setNodeName(SVGElements.SVG_MARKER);
+	}
+
+
+	public SVGMarkerElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+
+
+	/**
+	 * @return The x-axis coordinate of the reference point which is to be aligned exactly at the marker position.
+	 * @since 0.1
+	 */
+	public double getRefX()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_REF_X);
+		double refx;
+		
+		try { refx = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { refx = 0; }
+		
+		return refx;
+	}
+	
+	
+	
+	/**
+	 * @return The y-axis coordinate of the reference point which is to be aligned exactly at the marker position.
+	 * @since 0.1
+	 */
+	public double getRefY()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_REF_Y);
+		double refy;
+		
+		try { refy = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { refy = 0; }
+		
+		return refy;
+	}
+	
+	
+	/**
+	 * @return Represents the width of the viewport into which the marker is to be fitted when it is rendered.
+	 * @since 0.1
+	 */
+	public double getMarkerWidth()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_MARKER_WIDTH);
+		double markerW;
+		
+		try { markerW = v==null ? 3 : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { markerW = 3; }
+		
+		return markerW;
+	}
+	
+	
+	
+	/**
+	 * @return Represents the height of the viewport into which the marker is to be fitted when it is rendered.
+	 * @since 0.1
+	 */
+	public double getMarkerHeight()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_MARKER_HEIGHT);
+		double markerH;
+		
+		try { markerH = v==null ? 3 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { markerH = 3; }
+		
+		return markerH;
+	}
+	
+	
+	
+	/**
+	 * @return The coordinate system for attributes markerWidth, markerHeight and the contents of the 'marker'.
+	 * @since 0.1
+	 */
+	public String getMarkerUnits()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_MARKER_UNITS);
+		
+		return v==null || (!SVGAttributes.SVG_UNITS_VALUE_STROKE.equals(v) &&
+						!SVGAttributes.SVG_UNITS_VALUE_USR.equals(v)) ? SVGAttributes.SVG_UNITS_VALUE_STROKE : v;
+	}
+	
+	
+	
+	@Override
+	public boolean checkAttributes()
+	{
+		return getMarkerWidth()>=0 && getMarkerHeight()>=0;
+	}
+
+	
+
+	@Override
+	public boolean enableRendering()
+	{
+		return getMarkerWidth()>0 && getMarkerHeight()>0;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGMetadataElement.java b/current/latexDraw/parsers/svg/elements/SVGMetadataElement.java
new file mode 100644
index 0000000..0f12f3e
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGMetadataElement.java
@@ -0,0 +1,73 @@
+/*
+ * SVGMetadataElement.java
+ */
+package latexDraw.parsers.svg.elements;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>metadata</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class SVGMetadataElement extends SVGElement
+{
+
+	/**
+	 * See {@link SVGElement#SVGElement(Node, SVGElement)}.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 */
+	public SVGMetadataElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+
+	
+
+	/**
+	 * Creates a meta data element.
+	 * @param owner The owner document.
+	 * @throws IllegalArgumentException If owner is null.
+	 * @since 0.1
+	 */
+	public SVGMetadataElement(SVGDocument owner)
+	{
+		super(owner);
+	
+		setNodeName(SVGElements.SVG_METADATA);
+	}
+
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return true;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return false;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGPathElement.java b/current/latexDraw/parsers/svg/elements/SVGPathElement.java
new file mode 100644
index 0000000..bc9d934
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGPathElement.java
@@ -0,0 +1,170 @@
+package latexDraw.parsers.svg.elements;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.path.*;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>path</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/06/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathElement extends SVGElement
+{
+	/**
+	 * See {@link SVGElement#SVGElement(Node, SVGElement)}.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 */
+	public SVGPathElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+
+	
+	
+	/**
+	 * Creates an empty SVG path element.
+	 * @param owner The owner document.
+	 * @since 0.1
+	 */
+	public SVGPathElement(SVGDocument owner)
+	{
+		super(owner);
+		
+		setAttribute(SVGAttributes.SVG_D, "");//$NON-NLS-1$
+		setNodeName(SVGElements.SVG_PATH);
+	}
+	
+	
+
+	/**
+	 * @return True if the path is a unique line.
+	 * @since 0.1
+	 */
+	public boolean isLine()
+	{
+		SVGPathSegList segList = getSegList();
+		
+		return segList.size()==2 && segList.firstElement() instanceof SVGPathSegMoveto && 
+				segList.elementAt(1) instanceof SVGPathSegLineto ; 
+	}
+	
+	
+	
+	
+	/**
+	 * @return True if the path is composed of lines and has a 'close path' segment at the end.
+	 * @since 0.1
+	 */
+	public boolean isLines()
+	{
+		SVGPathSegList segList = getSegList();
+		
+		if(segList.size()<3 || !(segList.firstElement() instanceof SVGPathSegMoveto))
+			return false;
+		
+		boolean ok = true;
+		int i, size;
+		
+		for(i=1, size=segList.size()-1; i<size && ok; i++)
+			if(!(segList.elementAt(i) instanceof SVGPathSegLineto))
+				ok = false;
+		
+		return ok;
+	}
+	
+	
+	
+	/**
+	 * @return True if the path is composed of lines and has a 'close path' segment at the end.
+	 * @since 0.1
+	 */
+	public boolean isPolygon()
+	{
+		SVGPathSegList segList = getSegList();
+		
+		if(segList.isEmpty() || !(segList.firstElement() instanceof SVGPathSegMoveto))
+			return false;
+		
+		boolean ok = true;
+		int i, size;
+		
+		for(i=1, size=segList.size()-1; i<size && ok; i++)
+			if(!(segList.elementAt(i) instanceof SVGPathSegLineto))
+				ok = false;
+		
+		if(!(segList.lastElement() instanceof SVGPathSegClosePath))
+			ok = false;
+		
+		return ok;
+	}
+	
+	
+	
+	/**
+	 * The definition of the outline of a shape.
+	 * @return The path data (in postscript) from the segList attribute.
+	 * @since 0.1
+	 */
+	public String getPathData()
+	{
+		return getAttribute(getUsablePrefix()+SVGAttributes.SVG_D);
+	}
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return getPathData()!=null;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return getPathData().length()>0;
+	}
+
+
+	/**
+	 * @return the segList.
+	 * @since 0.1
+	 */
+	public SVGPathSegList getSegList()
+	{
+		return new SVGPathSegList(getPathData());
+	}
+
+
+
+	/**
+	 * Sets the path data.
+	 * @param path The path to set.
+	 * @since 2.0.0
+	 */
+	public void setPathData(SVGPathSegList path)
+	{
+		if(path!=null)
+			setAttribute(SVGAttributes.SVG_D, path.toString());
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGPatternElement.java b/current/latexDraw/parsers/svg/elements/SVGPatternElement.java
new file mode 100644
index 0000000..33a645f
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGPatternElement.java
@@ -0,0 +1,290 @@
+package latexDraw.parsers.svg.elements;
+
+import java.awt.Color;
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.CSSColors;
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+
+/**
+ * Defines the SVG tag <code>pattern</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/04/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPatternElement extends SVGElement
+{
+	/**
+	 * See {@link SVGElement#SVGElement(Node, SVGElement)}.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 */
+	public SVGPatternElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+	
+	
+	@Override
+	public boolean checkAttributes()
+	{
+		double width	= getWidth();
+		double height	= getHeight();
+		
+		if(width<0 || height<0)
+			return false;
+		
+		return true;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		if(getWidth()==0 || getHeight()==0)
+			return false;
+		
+		return true;
+	}
+	
+	
+	/**
+	 * @return The value of the X attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X);
+		double x;
+		
+		try { x = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { x = 0; }
+		
+		return x;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the Y attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y);
+		double y;
+		
+		try { y = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { y = 0; }
+		
+		return y;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the <code>width</code> attribute.
+	 * @since 0.1
+	 */
+	public double getWidth()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_WIDTH);
+		double width;
+		
+		try { width = v==null ? 0 : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { width = 0; }
+		
+		return width;
+	}
+	
+	
+	/**
+	 * @return The value of the <code>height</code> attribute.
+	 * @since 0.1
+	 */
+	public double getHeight()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_HEIGHT);
+		double height;
+		
+		try { height = v==null ? 0 : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { height = 0; }
+		
+		return height;
+	}
+	
+	
+	
+	/**
+	 * @return The coordinate system for the contents of the 'pattern'.
+	 * @since 0.1
+	 */
+	public String getPatternContentUnits()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_PATTERN_CONTENTS_UNITS);
+		
+		return v==null || (!SVGAttributes.SVG_UNITS_VALUE_OBJ.equals(v) &&
+				!SVGAttributes.SVG_UNITS_VALUE_USR.equals(v)) ? SVGAttributes.SVG_UNITS_VALUE_USR : v;
+	}
+	
+	
+	
+	/**
+	 * @return The coordinate system for attributes x, y, width and height.
+	 * @since 0.1
+	 */
+	public String getPatternUnits()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_PATTERN_UNITS);
+		
+		return v==null || (!SVGAttributes.SVG_UNITS_VALUE_OBJ.equals(v) &&
+				!SVGAttributes.SVG_UNITS_VALUE_USR.equals(v)) ? SVGAttributes.SVG_UNITS_VALUE_OBJ : v;
+	}
+	
+	
+	
+	
+	/**
+	 * @return The g element of the pattern if there is a one (used to define if there is hatching).
+	 * @since 0.1
+	 */
+	protected SVGGElement getGElement()
+	{
+		int i=0, size = children.getLength();
+		SVGGElement g = null;
+		
+		while(g==null && i<size)
+			if(children.getNodes().elementAt(i) instanceof SVGGElement)
+				g = (SVGGElement)children.getNodes().elementAt(i);
+			else
+				i++;
+		
+		return g;
+	}
+	
+	
+	
+	/**
+	 * @return The background colour of the pattern if there is a one.
+	 * @since 0.1
+	 */
+	public Color getBackgroundColor()
+	{
+		int i=0, size = children.getLength();
+		SVGRectElement rec = null;
+		
+		while(rec==null && i<size)
+			if(children.getNodes().elementAt(i) instanceof SVGRectElement)
+				rec = (SVGRectElement)children.getNodes().elementAt(i);
+			else
+				i++;
+		
+		return rec==null ? null : CSSColors.getRGBColour(rec.getFill());
+	}
+
+
+	/**
+	 * @return The separation between each line of the hatching if there is an hatching (based on the two first lines of the possible
+	 * hatching).
+	 * @since 2.0.0
+	 */
+	@Deprecated
+	public double getHatchingSep()
+	{
+		SVGGElement g = getGElement();
+		
+		if(g==null)
+			return Double.NaN;
+		
+		SVGPathElement p = null;
+		int i = 0, size = g.children.getLength(), j=-1;
+		
+		while(p==null && i<size)
+			if(g.children.getNodes().elementAt(i) instanceof SVGPathElement)
+				p = (SVGPathElement)g.children.getNodes().elementAt(i);
+			else
+				i++;
+			
+		if(p==null)
+			return Double.NaN;
+		
+		String path = p.getPathData();
+		i = path.indexOf('L');
+		
+		if(i!=-1)
+			j = path.indexOf('L', i+1);
+		
+		if(i==-1 || j==-1)
+			return Double.NaN;
+		
+		String[] coord1 = path.substring(i, j).split(" ");//$NON-NLS-1$
+		String[] coord2 = path.substring(j).split(" ");//$NON-NLS-1$
+		
+		if(coord1.length<3 || coord2.length<3)
+			return Double.NaN;
+		
+		try
+		{
+			float l1x, l2x, l1y, l2y;
+			
+			l1x = Double.valueOf(coord1[1]).floatValue();
+			l1y = Double.valueOf(coord1[2]).floatValue();
+			l2x = Double.valueOf(coord2[1]).floatValue();
+			l2y = Double.valueOf(coord2[2]).floatValue();
+			
+			if(l1x==l2x)
+				return Math.abs(l1y-l2y)-getHatchingStrokeWidth(); 
+			
+			return Math.abs(l1x-l2x)-getHatchingStrokeWidth();
+		}
+		catch(NumberFormatException e) { /* To ignore. */ }
+		
+		return Double.NaN;
+	}
+
+
+	/**
+	 * @return The colour of the possible hatching if there is a one.
+	 * @since 0.1
+	 */
+	public Color getHatchingColor()
+	{
+		SVGGElement g = getGElement();
+		
+		return g==null ? null : CSSColors.getRGBColour(g.getAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE));
+	}
+
+
+	
+	/**
+	 * @return The stroke width of the possible hatching.
+	 * @since 0.1
+	 */
+	public double getHatchingStrokeWidth()
+	{
+		SVGGElement g = getGElement();
+		String code = g==null ? null : g.getAttribute(getUsablePrefix()+SVGAttributes.SVG_STROKE_WIDTH);
+		
+		try { return code==null ? Double.NaN : new SVGLengthParser(code).parseLength().getValue(); }
+		catch(ParseException e){ return Double.NaN; }
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGPolyLineElement.java b/current/latexDraw/parsers/svg/elements/SVGPolyLineElement.java
new file mode 100644
index 0000000..ee93079
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGPolyLineElement.java
@@ -0,0 +1,55 @@
+package latexDraw.parsers.svg.elements;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>polyline</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPolyLineElement extends AbstractPointsElement
+{
+
+	public SVGPolyLineElement(Node n, SVGElement p) throws MalformedSVGDocument, ParseException
+	{
+		super(n, p);
+	}
+
+	
+
+	public SVGPolyLineElement(SVGDocument doc)
+	{
+		super(doc);
+		
+		setNodeName(SVGElements.SVG_POLY_LINE);
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return true;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGPolygonElement.java b/current/latexDraw/parsers/svg/elements/SVGPolygonElement.java
new file mode 100644
index 0000000..0ae4fdc
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGPolygonElement.java
@@ -0,0 +1,53 @@
+package latexDraw.parsers.svg.elements;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>polygon</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPolygonElement extends AbstractPointsElement
+{
+
+	public SVGPolygonElement(Node n, SVGElement p) throws MalformedSVGDocument, ParseException
+	{
+		super(n, p);
+	}
+
+	
+	public SVGPolygonElement(SVGDocument doc)
+	{
+		super(doc);
+		
+		setNodeName(SVGElements.SVG_POLYGON);
+	}
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return true;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGRectElement.java b/current/latexDraw/parsers/svg/elements/SVGRectElement.java
new file mode 100644
index 0000000..78024e4
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGRectElement.java
@@ -0,0 +1,214 @@
+/*
+ * SVGRectElement.java
+ */
+package latexDraw.parsers.svg.elements;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>rect</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGRectElement extends SVGElement
+{
+	/**
+	 * See {@link SVGElement#SVGElement(Node, SVGElement)}.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 */
+	public SVGRectElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+	
+	
+	
+	/**
+	 * Creates an SVG rect element.
+	 * @param x The top-left X coordinate.
+	 * @param y The top-left Y coordinate.
+	 * @param w The width of the rectangle.
+	 * @param h The height of the rectangle.
+	 * @param owner The document owner.
+	 * @throws IllegalArgumentException If owner is null or if a given value is not valid.
+	 * @since 0.1
+	 */
+	public SVGRectElement(double x, double y, double w, double h, SVGDocument owner)
+	{
+		super(owner);
+		
+		setAttribute(SVGAttributes.SVG_X, String.valueOf(x));
+		setAttribute(SVGAttributes.SVG_Y, String.valueOf(y));
+		setAttribute(SVGAttributes.SVG_WIDTH, String.valueOf(w));
+		setAttribute(SVGAttributes.SVG_HEIGHT, String.valueOf(h));
+		setNodeName(SVGElements.SVG_RECT);
+		ownerDocument = owner;
+		
+		if(!checkAttributes())
+			throw new IllegalArgumentException();
+	}
+
+
+
+	/**
+	 * Creates an SVG rectangle with width=height=0.
+	 * @param doc The owner document.
+	 * @since 0.1
+	 */
+	public SVGRectElement(SVGDocument doc)
+	{
+		super(doc);
+		
+		setNodeName(SVGElements.SVG_RECT);
+		setAttribute(SVGAttributes.SVG_WIDTH, "0");//$NON-NLS-1$
+		setAttribute(SVGAttributes.SVG_HEIGHT, "0");//$NON-NLS-1$
+	}
+
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		double vWidth	= getWidth();
+		double vHeight	= getHeight();
+		double vrx		= getRx();
+		double vry		= getRy();
+		
+		if(Double.isNaN(vWidth) || Double.isNaN(vHeight) || vWidth<0 || vHeight<0 || vrx<0 || vry<0)
+			return false;
+		
+		return true;
+	}
+
+	
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		if(getWidth()==0 || getHeight()==0)
+			return false;
+		
+		return true;
+	}
+	
+	
+	/**
+	 * @return The value of the X attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X);
+		double x;
+		
+		try { x = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { x = 0; }
+		
+		return x;
+	}
+	
+	
+	/**
+	 * @return The value of the Y attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y);
+		double y;
+		
+		try { y = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { y = 0; }
+		
+		return y;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the <code>width</code> attribute.
+	 * @since 0.1
+	 */
+	public double getWidth()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_WIDTH);
+		double width;
+		
+		try { width = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { width = Double.NaN; }
+		
+		return width;
+	}
+	
+	
+	/**
+	 * @return The value of the <code>height</code> attribute.
+	 * @since 0.1
+	 */
+	public double getHeight()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_HEIGHT);
+		double height;
+		
+		try { height = v==null ? Double.NaN : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { height = Double.NaN; }
+		
+		return height;
+	}
+	
+	
+	/**
+	 * @return The value of the rx attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getRx()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_RX);
+		double rx;
+		
+		try { rx = v==null ? 0 : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { rx = 0; }
+		
+		return rx;
+	}
+	
+	
+	/**
+	 * @return The value of the ry attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getRy()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_RY);
+		double ry;
+		
+		try { ry = v==null ? 0 : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { ry = 0; }
+		
+		return ry;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGSVGElement.java b/current/latexDraw/parsers/svg/elements/SVGSVGElement.java
new file mode 100644
index 0000000..90b6597
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGSVGElement.java
@@ -0,0 +1,290 @@
+/*
+ * SVGSVGElement.java
+ */
+package latexDraw.parsers.svg.elements;
+
+import java.lang.reflect.InvocationTargetException;
+import java.text.ParseException;
+
+import javax.swing.JProgressBar;
+import javax.swing.SwingUtilities;
+
+import latexDraw.figures.Draw;
+import latexDraw.figures.Figure;
+import latexDraw.parsers.svg.*;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+
+/**
+ * Defines the SVG tag <code>SVG</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGSVGElement extends SVGElement
+{
+	/**
+	 * See {@link SVGElement#SVGElement()}
+	 * @param n The node.
+	 * @throws MalformedSVGDocument If the tag is not valid.
+	 */
+	public SVGSVGElement(SVGDocument owner, Node n) throws MalformedSVGDocument
+	{
+		super(n);
+
+		if(n==null || !n.getNodeName().endsWith(SVGElements.SVG_SVG) || owner==null)
+			throw new IllegalArgumentException();
+		
+		if(!checkAttributes())
+			throw new MalformedSVGDocument();
+		
+		ownerDocument = owner;
+	}
+
+	
+	
+	/**
+	 * 
+	 * @param n The source node.
+	 * @param e Will not be used.
+	 * @throws MalformedSVGDocument If the document is not valid.
+	 */
+	public SVGSVGElement(Node n, SVGElement e) throws MalformedSVGDocument
+	{
+		super(n, e);
+		
+		if(n==null || !n.getNodeName().endsWith(SVGElements.SVG_SVG))
+			throw new IllegalArgumentException();
+		
+		if(!checkAttributes())
+			throw new MalformedSVGDocument();
+	}
+	
+	
+
+	/**
+	 * Creates an empty SVG element.
+	 * @param owner The owner document.
+	 * @throws IllegalArgumentException If owner is null.
+	 */
+	public SVGSVGElement(SVGDocument owner)
+	{
+		super();
+		
+		if(owner==null)
+			throw new IllegalArgumentException();
+		
+		setAttribute("xmlns", SVGDocument.SVG_NAMESPACE);//$NON-NLS-1$
+		ownerDocument = owner;
+		
+		setNodeName(SVGElements.SVG_SVG);
+	}
+
+
+
+	/**
+	 * @return the meta element or null.
+	 * @since 0.1
+	 */
+	public SVGMetadataElement getMeta()
+	{
+		SVGMetadataElement meta = null;
+		
+		for(int i=0, size=children.getLength(); i<size && meta==null; i++)
+			if(children.item(i) instanceof SVGMetadataElement)
+				meta = (SVGMetadataElement)children.item(i);
+		
+		return meta;
+	}
+
+	
+
+	/**
+	 * @return the defs element or null.
+	 * @since 0.1
+	 */
+	public SVGDefsElement getDefs()
+	{
+		SVGDefsElement defs = null;
+		
+		for(int i=0, size=children.getLength(); i<size && defs==null; i++)
+			if(children.item(i) instanceof SVGDefsElement)
+				defs = (SVGDefsElement)children.item(i);
+		
+		return defs;
+	}
+
+	
+	
+	@Override
+	public String toString()
+	{
+		int i, size = children==null ? 0 : children.getNodes().size();
+		SVGMetadataElement meta	= getMeta();
+		SVGDefsElement defs		= getDefs();
+		StringBuffer str = new StringBuffer().append('[').append("attributes=");//$NON-NLS-1$
+		
+		if(attributes!=null)
+			str.append(attributes.toString()).append("\n");//$NON-NLS-1$
+		
+		if(meta!=null)
+			str.append(", meta=").append(meta.toString()).append("\n");//$NON-NLS-1$//$NON-NLS-2$
+		
+		if(defs!=null)
+			str.append(", defs=").append(defs.toString()).append("\n");//$NON-NLS-1$//$NON-NLS-2$
+		
+		str.append(", children={");//$NON-NLS-1$
+		
+		for(i=0; i<size-1; i++)
+			str.append(children.getNodes().elementAt(i).toString()).append(',');
+		
+		if(size>0)
+			str.append(children.getNodes().lastElement().toString());
+		
+		str.append('}');
+		
+		return str.append(']').toString();
+	}
+
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return true;
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return getWidth()!=0 && getHeight()!=0;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the X attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X);
+		double x;
+		
+		try { x = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { x = 0; }
+		
+		return x;
+	}
+	
+	
+	/**
+	 * @return The value of the X attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y);
+		double y;
+		
+		try { y = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { y = 0; }
+		
+		return y;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the <code>width</code> attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getWidth()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_WIDTH);
+		double width;
+		
+		try { width = v==null ? 1 : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { width = 1; }
+		
+		return width;//FIXME: doit retourner 100%
+	}
+	
+	
+	/**
+	 * @return The value of the <code>height</code> attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getHeight()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_HEIGHT);
+		double height;
+		
+		try { height = v==null ? 1 : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { height = 1; }
+		
+		return height; //FIXME: doit retourner 100%
+	}
+	
+	
+	/**
+	 * @return The version of the SVG document or an empty string if it is not specified.
+	 * @since 0.1
+	 */
+	public String getVersion()
+	{
+		return getAttribute(getUsablePrefix()+SVGAttributes.SVG_VERSION);
+	}
+	
+	
+	/**
+	 * Creates a set of latexdraw figure.
+	 * @return The latexdraw figures or null.
+	 * @since 0.1
+	 */
+	public Figure toLaTeXDraw(final JProgressBar progressBar)
+	{
+		Draw figures = new Draw(false, false);
+		Figure f;
+		double increment = progressBar==null ? 0 : (progressBar.getMaximum()-progressBar.getValue())/(double)getNbChildren(2);
+		double value 	 = progressBar==null ? 0 : progressBar.getValue();
+		
+		for(SVGElement e : children.getNodes())
+		{
+			f = LaTeXDrawFiguresFactory.createFigure(e);
+			
+			if(f!=null)
+				figures.addFigure(f);
+			
+			if(progressBar!=null)
+				try 
+				{
+					final int valueFinal = (int)(value+increment);
+					value += increment;
+					SwingUtilities.invokeAndWait(new Runnable() { public void run() { progressBar.setValue(valueFinal); } }); 
+				}
+				catch(InterruptedException ex) 			{ ex.printStackTrace(); }
+				catch(InvocationTargetException ex) 	{ ex.printStackTrace(); }
+		}
+		
+		return figures.size() == 1 ? figures.getFigureAt(0) : figures.size()==0 ? null : figures;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGStopElement.java b/current/latexDraw/parsers/svg/elements/SVGStopElement.java
new file mode 100644
index 0000000..5aeab4b
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGStopElement.java
@@ -0,0 +1,91 @@
+package latexDraw.parsers.svg.elements;
+
+import java.awt.Color;
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.CSSColors;
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+
+/**
+ * Defines the SVG tag <code>stop</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/06/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGStopElement extends SVGElement
+{
+	/**
+	 * See {@link SVGElement#SVGElement(Node, SVGElement)}.
+	 * @throws MalformedSVGDocument If the element is not well formed.
+	 */
+	public SVGStopElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+	
+	
+	@Override
+	public boolean checkAttributes()
+	{
+		return !Double.isNaN(getOffset());
+	}
+
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return true;
+	}
+
+	
+	
+	/**
+	 * The offset attribute indicates where the gradient stop is placed.
+	 * @return The read offset or NaN.
+	 * @since 0.1
+	 */
+	public double getOffset()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_OFFSET);
+		double offset;
+		
+		try { offset = v==null ? Double.NaN : new SVGLengthParser(v).parseNumberOrPercent().getValue(); }
+		catch(ParseException e) { offset = Double.NaN; }
+		
+		return offset;
+	}
+	
+	
+	
+	/**
+	 * Indicates what colour to use at that gradient stop.
+	 * @return The read colour or black.
+	 * @since 0.1
+	 */
+	public Color getStopColor()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_STOP_COLOR);
+		Color c = CSSColors.getRGBColour(v);
+		
+		return c==null ? Color.BLACK : c;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/SVGTextElement.java b/current/latexDraw/parsers/svg/elements/SVGTextElement.java
new file mode 100644
index 0000000..096d916
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/SVGTextElement.java
@@ -0,0 +1,145 @@
+package latexDraw.parsers.svg.elements;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.*;
+import latexDraw.parsers.svg.parsers.SVGLengthParser;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Defines the SVG tag <code>text</code>.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/05/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGTextElement extends SVGElement
+{
+	public SVGTextElement(SVGDocument owner)
+	{
+		super(owner);
+		setNodeName(SVGElements.SVG_TEXT);
+	}
+
+
+	public SVGTextElement(Node n, SVGElement p) throws MalformedSVGDocument
+	{
+		super(n, p);
+	}
+
+	
+	
+	/**
+	 * @return The text of the SVG text element.
+	 * @since 0.1
+	 */
+	public String getText()
+	{
+		String txt = ""; //$NON-NLS-1$
+		NodeList nl = getChildNodes();
+		int i, size = nl.getLength();
+		
+		for(i=0; i<size; i++)
+			if(nl.item(i) instanceof SVGText)
+				txt += ((SVGText)nl.item(i)).getData();
+		
+		return txt;
+	}
+
+
+	@Override
+	public boolean checkAttributes()
+	{
+		return true;
+	}
+
+
+	@Override
+	public boolean enableRendering()
+	{
+		return true;
+	}
+
+
+	
+	/**
+	 * @return The value of the X attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_X);
+		double x;
+		
+		try { x = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { x = 0; }
+		
+		return x;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the Y attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_Y);
+		double y;
+		
+		try { y = v==null ? 0 : new SVGLengthParser(v).parseCoordinate().getValue(); }
+		catch(ParseException e) { y = 0; }
+		
+		return y;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the dx attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getDX()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_DX);
+		double dx;
+		
+		try { dx = v==null ? 0 : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { dx = 0; }
+		
+		return dx;
+	}
+	
+	
+	
+	/**
+	 * @return The value of the dy attribute (0 if there it does not exist or it is not a length).
+	 * @since 0.1
+	 */
+	public double getDY()
+	{
+		String v = getAttribute(getUsablePrefix()+SVGAttributes.SVG_DY);
+		double dy;
+		
+		try { dy = v==null ? 0 : new SVGLengthParser(v).parseLength().getValue(); }
+		catch(ParseException e) { dy = 0; }
+		
+		return dy;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSeg.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSeg.java
new file mode 100644
index 0000000..d06cf28
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSeg.java
@@ -0,0 +1,79 @@
+package latexDraw.parsers.svg.elements.path;
+
+/**
+ * Defines a model for the SVGPath segments.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public abstract class SVGPathSeg
+{
+	public static enum PathSeg { UNKNOWN, CLOSEPATH, MOVETO_ABS, MOVETO_REL, 
+								LINETO_ABS, LINETO_REL, CURVETO_CUBIC_ABS, CURVETO_CUBIC_REL,
+								CURVETO_QUADRATIC_ABS, CURVETO_QUADRATIC_REL, ARC_ABS,
+								ARC_REL, LINETO_HORIZONTAL_ABS, LINETO_HORIZONTAL_REL,
+								LINETO_VERTICAL_ABS, LINETO_VERTICAL_REL, CURVETO_CUBIC_SMOOTH_ABS,
+								CURVETO_CUBIC_SMOOTH_REL, CURVETO_QUADRATIC_SMOOTH_ABS, 
+								CURVETO_QUADRATIC_SMOOTH_REL }
+
+	
+	/** Defines if the segment path is relative or absolute. @since 0.1 */
+	protected boolean isRelative;
+
+	/** The type of the segment path. @since 0.1 */
+	protected PathSeg type;
+	
+	
+	/**
+	 * The main constructor.
+	 * @param isRelative True: the path segment is relative, false it is absolute.
+	 * @since 0.1
+	 */
+	public SVGPathSeg(boolean isRelative)
+	{
+		this.isRelative = isRelative;
+	}
+	
+	
+	
+	/**
+	 * @return The type of the segment path.
+	 * @since 0.1
+	 */
+	public abstract PathSeg getType();
+	
+	
+	
+	/**
+	 * @return the isRelative.
+	 * @since 0.1
+	 */
+	public boolean isRelative()
+	{
+		return isRelative;
+	}
+
+	
+	/**
+	 * @param isRelative the isRelative to set.
+	 * @since 0.1
+	 */
+	public void setRelative(boolean isRelative)
+	{
+		this.isRelative = isRelative;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegArc.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegArc.java
new file mode 100644
index 0000000..f899096
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegArc.java
@@ -0,0 +1,251 @@
+package latexDraw.parsers.svg.elements.path;
+
+import java.awt.geom.Arc2D;
+
+/**
+ * Defines the SVGPath arc segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegArc extends SVGPathSeg
+{
+	/** The X-coordinate of the second point of the arc. @since 0.1 */
+	protected double x;
+	
+	/** The Y-coordinate of the second point of the arc. @since 0.1 */
+	protected double y;
+	
+	/** The x radius of the arc. @since 0.1 */
+	protected double rx;
+	
+	/** The y radius of the arc. @since 0.1 */
+	protected double ry;
+	
+	/** The x-axis rotation angle. @since 0.1 */
+	protected double angle;
+	
+	protected boolean largeArcFlag;
+	
+	protected boolean sweepFlag;
+
+	
+	/**
+	 * The main constructor.
+	 * @param x The X-coordinate of the second point of the arc.
+	 * @param y The Y-coordinate of the second point of the arc.
+	 * @param rx The x radius of the arc.
+	 * @param ry The y radius of the arc.
+	 * @param angle The x-axis rotation angle.
+	 * @param isRelative True: the path segment is relative, false it is absolute.
+	 */
+	public SVGPathSegArc(double x, double y, double rx, double ry, double angle, 
+						boolean largeArcFlag, boolean sweepFlag, boolean isRelative)
+	{
+		super(isRelative);
+		
+		this.x = x;
+		this.y = y;
+		this.rx = rx;
+		this.ry = ry;
+		this.angle = angle;
+		this.largeArcFlag = largeArcFlag;
+		this.sweepFlag = sweepFlag;
+	}
+	
+	
+	
+	/**
+	 * Creates a Java Arc2D corresponding to the position and the angles of the arc segment (computations based on the SVG 
+	 * specification instructions concerning the build of an arc, p. 643-649).
+	 * @param x0 The X-coordinate of the initial position.
+	 * @param y0 The Y-coordinate of the initial position.
+	 * @return An Java Arc2D with double values.
+	 * @since 0.1
+	 */
+    public Arc2D getArc2D(double x0, double y0)
+	{
+    	double a 	= getAngle();
+    	double _rx 	= getRX();
+    	double _ry 	= getRY();
+    	double _x 	= getX();
+    	double _y	= getY();
+    	boolean laf	= isLargeArcFlag();
+    	boolean sf	= isSweepFlag();
+    	
+		double dx2 = (x0-_x)/2.;
+		double dy2 = (y0-_y)/2.;
+		a = Math.toRadians(a%360.);
+
+		// Step 1: Compute (x1', y1')
+		double x1 = Math.cos(a)*dx2 + Math.sin(a)*dy2;
+		double y1 = -Math.sin(a)*dx2 + Math.cos(a)*dy2;
+		
+		// Ensure radii are large enough
+		_rx = Math.abs(_rx);
+		_ry = Math.abs(_ry);
+		double Prx = _rx*_rx;
+		double Pry = _ry*_ry;
+		double Px1 = x1*x1;
+		double Py1 = y1*y1;
+		double radiiCheck = Px1/Prx + Py1/Pry;
+		
+		if(radiiCheck>1)
+		{
+			_rx = Math.sqrt(radiiCheck) * _rx;
+			_ry = Math.sqrt(radiiCheck) * _ry;
+			Prx = _rx * _rx;
+			Pry = _ry * _ry;
+		}
+
+		// Step 2: Compute (cx1, cy1)
+		double sign = (laf == sf) ? -1 : 1;
+		double sq = ((Prx * Pry) - (Prx * Py1) - (Pry * Px1)) / ((Prx * Py1) + (Pry * Px1));
+		sq = (sq < 0) ? 0 : sq;
+		double coef = (sign * Math.sqrt(sq));
+		double cx1 = coef * ((_rx * y1) / _ry);
+		double cy1 = coef * -((_ry * x1) / _rx);
+
+		// Step 3: Compute (cx, cy) from (cx1, cy1)
+		double sx2 = (x0+_x)/2.;
+		double sy2 = (y0+_y)/2.;
+		double cx = sx2 + (Math.cos(a) * cx1 - Math.sin(a) * cy1);
+		double cy = sy2 + (Math.sin(a) * cx1 + Math.cos(a) * cy1);
+
+		// Step 4: Compute the angleStart (angle1) and the angleExtent (dangle)
+		double ux = (x1 - cx1) / _rx;
+		double uy = (y1 - cy1) / _ry;
+		double vx = (-x1 - cx1) / _rx;
+		double vy = (-y1 - cy1) / _ry;
+		double p = ux, n = Math.sqrt((ux * ux) + (uy * uy));
+
+		sign = (uy < 0) ? -1. : 1.;
+		double angleStart = Math.toDegrees(sign * Math.acos(p / n));
+
+		// Compute the angle extent
+		n = Math.sqrt((ux * ux + uy * uy) * (vx * vx + vy * vy));
+		p = ux * vx + uy * vy;
+		sign = (ux * vy - uy * vx < 0) ? -1. : 1.;
+		
+		double angleExtent = Math.toDegrees(sign * Math.acos(p / n));
+		
+		if(!sf && angleExtent > 0)
+			angleExtent -= 360.;
+		else
+			if(sf && angleExtent < 0)
+				angleExtent += 360.;
+		
+		return new Arc2D.Double(cx-_rx, cy-_ry, _rx*2., _ry*2., -angleStart%360., -angleExtent%360., Arc2D.OPEN);
+	}
+	
+	
+	
+	/**
+	 * @return the x.
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		return x;
+	}
+
+	/**
+	 * @return the y.
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		return y;
+	}
+
+	/**
+	 * @return the rx.
+	 * @since 0.1
+	 */
+	public double getRX()
+	{
+		return rx;
+	}
+
+	/**
+	 * @return the ry.
+	 * @since 0.1
+	 */
+	public double getRY()
+	{
+		return ry;
+	}
+
+	/**
+	 * @return the angle.
+	 * @since 0.1
+	 */
+	public double getAngle()
+	{
+		return angle;
+	}
+
+	/**
+	 * @return the largeArcFlag.
+	 * @since 0.1
+	 */
+	public boolean isLargeArcFlag()
+	{
+		return largeArcFlag;
+	}
+
+	/**
+	 * @return the sweepFlag.
+	 * @since 0.1
+	 */
+	public boolean isSweepFlag()
+	{
+		return sweepFlag;
+	}
+
+	
+	@Override
+	public PathSeg getType()
+	{
+		return isRelative() ? PathSeg.ARC_REL : PathSeg.ARC_ABS;
+	}
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append((isRelative() ? "a" : "A")); //$NON-NLS-1$ //$NON-NLS-2$
+		stringBuffer.append(' ');
+		stringBuffer.append(rx);
+		stringBuffer.append(' ');
+		stringBuffer.append(ry);
+		stringBuffer.append(' ');
+		stringBuffer.append(angle);
+		stringBuffer.append(' ');
+		stringBuffer.append((largeArcFlag?'1':'0'));
+		stringBuffer.append(' ');
+		stringBuffer.append((sweepFlag?'1':'0'));
+		stringBuffer.append(' ');
+		stringBuffer.append(x);
+		stringBuffer.append(' ');
+		stringBuffer.append(y);
+		
+		return stringBuffer.toString();
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegClosePath.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegClosePath.java
new file mode 100644
index 0000000..ca4029a
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegClosePath.java
@@ -0,0 +1,46 @@
+package latexDraw.parsers.svg.elements.path;
+
+/**
+ * Defines the SVGPath closepath segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegClosePath extends SVGPathSeg
+{
+	/**
+	 * The constructor.
+	 * @since 0.1
+	 */
+	public SVGPathSegClosePath()
+	{
+		super(true);
+	}
+
+	
+	@Override
+	public String toString()
+	{
+		return "z";//$NON-NLS-1$
+	}
+	
+	@Override
+	public PathSeg getType()
+	{
+		return PathSeg.CLOSEPATH;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoCubic.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoCubic.java
new file mode 100644
index 0000000..918c522
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoCubic.java
@@ -0,0 +1,156 @@
+package latexDraw.parsers.svg.elements.path;
+
+/**
+ * Defines the SVGPath curveto segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegCurvetoCubic extends SVGPathSeg
+{
+	/** The X-coordinate of the second point of the curve. @since 0.1 */
+	protected double x;
+	
+	/** The Y-coordinate of the second point of the curve. @since 0.1 */
+	protected double y;
+	
+	/** The x-coordinate of the first control point. @since 0.1 */
+	protected double x1;
+	
+	/** The y-coordinate of the first control point. @since 0.1 */
+	protected double y1;
+	
+	/** The x-coordinate of the second control point. @since 0.1 */
+	protected double x2;
+	
+	/** The y-coordinate of the second control point. @since 0.1 */
+	protected double y2;
+
+	
+	/**
+	 * The main constructor.
+	 * @param x The X-coordinate of the second point of the curve.
+	 * @param y The Y-coordinate of the second point of the curve.
+	 * @param x1 The x-coordinate of the first control point.
+	 * @param y1 The y-coordinate of the first control point
+	 * @param x2 The x-coordinate of the second control point.
+	 * @param y2 The y-coordinate of the second control point.
+	 * @param isRelative isRelative True: the path segment is relative, false it is absolute.
+	 */
+	public SVGPathSegCurvetoCubic(double x, double y, double x1, double y1, double x2, double y2, boolean isRelative)
+	{
+		super(isRelative);
+		
+		this.x = x;
+		this.y = y;
+		this.x1 = x1;
+		this.x2 = x2;
+		this.y1 = y1;
+		this.y2 = y2;
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append((isRelative() ? "c" : "C"));//$NON-NLS-1$//$NON-NLS-2$
+		stringBuffer.append(' ');
+		stringBuffer.append(x1);
+		stringBuffer.append(' ');
+		stringBuffer.append(y1);
+		stringBuffer.append(' ');
+		stringBuffer.append(x2);
+		stringBuffer.append(' ');
+		stringBuffer.append(y2);
+		stringBuffer.append(' ');
+		stringBuffer.append(x);
+		stringBuffer.append(' ');
+		stringBuffer.append(y);
+		
+		return stringBuffer.toString();
+	}
+	
+	
+	/**
+	 * @return the x.
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		return x;
+	}
+
+	
+	/**
+	 * @return the y.
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		return y;
+	}
+
+	
+	/**
+	 * @return the x1.
+	 * @since 0.1
+	 */
+	public double getX1()
+	{
+		return x1;
+	}
+
+	
+	/**
+	 * @return the y1.
+	 * @since 0.1
+	 */
+	public double getY1()
+	{
+		return y1;
+	}
+
+	
+	/**
+	 * @return the x2.
+	 * @since 0.1
+	 */
+	public double getX2()
+	{
+		return x2;
+	}
+
+	
+	/**
+	 * @return the y2.
+	 * @since 0.1
+	 */
+	public double getY2()
+	{
+		return y2;
+	}
+
+
+	@Override
+	public PathSeg getType()
+	{
+		return isRelative() ? PathSeg.CURVETO_CUBIC_REL : PathSeg.CURVETO_CUBIC_ABS;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoCubicSmooth.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoCubicSmooth.java
new file mode 100644
index 0000000..adf6fa4
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoCubicSmooth.java
@@ -0,0 +1,120 @@
+package latexDraw.parsers.svg.elements.path;
+
+/**
+ * Defines the SVGPath smooth curveto segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegCurvetoCubicSmooth extends SVGPathSeg
+{
+	/** The X-coordinate of the second point of the curve. @since 0.1 */
+	protected double x;
+	
+	/** The Y-coordinate of the second point of the curve. @since 0.1 */
+	protected double y;
+	
+	/** The x-coordinate of the second control point. @since 0.1 */
+	protected double x2;
+	
+	/** The y-coordinate of the second control point. @since 0.1 */
+	protected double y2;
+	
+	
+	/**
+	 * The main constructor.
+	 * @param x The X-coordinate of the second point of the curve.
+	 * @param y The Y-coordinate of the second point of the curve.
+	 * @param x2 The x-coordinate of the second control point.
+	 * @param y2 The y-coordinate of the second control point.
+	 * @param isRelative isRelative True: the path segment is relative, false it is absolute.
+	 */
+	public SVGPathSegCurvetoCubicSmooth(double x, double y, double x2, double y2, boolean isRelative)
+	{
+		super(isRelative);
+		
+		this.x = x;
+		this.y = y;
+		this.x2 = x2;
+		this.y2 = y2;
+	}
+
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append((isRelative() ? "s" : "S"));//$NON-NLS-1$//$NON-NLS-2$
+		stringBuffer.append(' ');
+		stringBuffer.append(x2);
+		stringBuffer.append(' ');
+		stringBuffer.append(y2);
+		stringBuffer.append(' ');
+		stringBuffer.append(x);
+		stringBuffer.append(' ');
+		stringBuffer.append(y);
+		
+		return stringBuffer.toString();
+	}
+	
+	
+	/**
+	 * @return the x.
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		return x;
+	}
+
+	
+	/**
+	 * @return the y.
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		return y;
+	}
+
+	
+	/**
+	 * @return the x2.
+	 * @since 0.1
+	 */
+	public double getX2()
+	{
+		return x2;
+	}
+
+	
+	/**
+	 * @return the y2.
+	 * @since 0.1
+	 */
+	public double getY2()
+	{
+		return y2;
+	}
+
+	@Override
+	public PathSeg getType()
+	{
+		return isRelative() ? PathSeg.CURVETO_CUBIC_SMOOTH_REL : PathSeg.CURVETO_CUBIC_SMOOTH_ABS;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoQuadratic.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoQuadratic.java
new file mode 100644
index 0000000..41b0743
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoQuadratic.java
@@ -0,0 +1,123 @@
+package latexDraw.parsers.svg.elements.path;
+
+/**
+ * Defines the SVGPath quadratic curveto segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegCurvetoQuadratic extends SVGPathSeg
+{
+	/** The X-coordinate of the second point of the curve. @since 0.1 */
+	protected double x;
+	
+	/** The Y-coordinate of the second point of the curve. @since 0.1 */
+	protected double y;
+	
+	/** The x-coordinate of the first control point. @since 0.1 */
+	protected double x1;
+	
+	/** The y-coordinate of the first control point. @since 0.1 */
+	protected double y1;
+	
+	
+	/**
+	 * The main constructor.
+	 * @param x The X-coordinate of the second point of the curve.
+	 * @param y The Y-coordinate of the second point of the curve.
+	 * @param x1 The x-coordinate of the first control point.
+	 * @param y1 The y-coordinate of the first control point
+	 * @param isRelative isRelative True: the path segment is relative, false it is absolute.
+	 */
+	public SVGPathSegCurvetoQuadratic(double x, double y, double x1, double y1, boolean isRelative)
+	{
+		super(isRelative);
+		
+		this.x = x;
+		this.y = y;
+		this.x1 = x1;
+		this.y1 = y1;
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append((isRelative() ? "q" : "Q")); //$NON-NLS-1$ //$NON-NLS-2$
+		stringBuffer.append(' ');
+		stringBuffer.append(x1);
+		stringBuffer.append(' ');
+		stringBuffer.append(y1);
+		stringBuffer.append(' ');
+		stringBuffer.append(x);
+		stringBuffer.append(' ');
+		stringBuffer.append(y);
+		
+		return stringBuffer.toString();
+	}
+	
+	
+	
+	/**
+	 * @return the x.
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		return x;
+	}
+
+	
+	/**
+	 * @return the y.
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		return y;
+	}
+
+	
+	/**
+	 * @return the x1.
+	 * @since 0.1
+	 */
+	public double getX1()
+	{
+		return x1;
+	}
+
+	
+	/**
+	 * @return the y1.
+	 * @since 0.1
+	 */
+	public double getY1()
+	{
+		return y1;
+	}
+
+
+	@Override
+	public PathSeg getType()
+	{
+		return isRelative() ? PathSeg.CURVETO_QUADRATIC_REL : PathSeg.CURVETO_QUADRATIC_ABS;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoQuadraticSmooth.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoQuadraticSmooth.java
new file mode 100644
index 0000000..eb4b9a6
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegCurvetoQuadraticSmooth.java
@@ -0,0 +1,91 @@
+package latexDraw.parsers.svg.elements.path;
+
+/**
+ * Defines the SVGPath quadratic smooth curveto segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegCurvetoQuadraticSmooth extends SVGPathSeg
+{
+	/** The X-coordinate of the second point of the curve. @since 0.1 */
+	protected double x;
+	
+	/** The Y-coordinate of the second point of the curve. @since 0.1 */
+	protected double y;
+	
+	
+	/**
+	 * The main constructor.
+	 * @param x The X-coordinate of the second point of the curve.
+	 * @param y The Y-coordinate of the second point of the curve.
+	 * @param isRelative isRelative True: the path segment is relative, false it is absolute.
+	 */
+	public SVGPathSegCurvetoQuadraticSmooth(double x, double y, boolean isRelative)
+	{
+		super(isRelative);
+		
+		this.x = x;
+		this.y = y;
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append((isRelative() ? "t" : "T"));//$NON-NLS-1$//$NON-NLS-2$
+		stringBuffer.append(' ');
+		stringBuffer.append(x);
+		stringBuffer.append(' ');
+		stringBuffer.append(y);
+		
+		return stringBuffer.toString();
+	}
+	
+	
+	
+	@Override
+	public PathSeg getType()
+	{
+		return isRelative() ? PathSeg.CURVETO_QUADRATIC_SMOOTH_REL : PathSeg.CURVETO_QUADRATIC_SMOOTH_ABS;
+	}
+
+
+
+	/**
+	 * @return the x.
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		return x;
+	}
+
+
+
+	/**
+	 * @return the y.
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		return y;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegLineto.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegLineto.java
new file mode 100644
index 0000000..4210227
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegLineto.java
@@ -0,0 +1,102 @@
+package latexDraw.parsers.svg.elements.path;
+
+import java.awt.geom.Point2D;
+
+/**
+ * Defines the SVGPath lineto segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegLineto extends SVGPathSeg
+{
+	/** The X-coordinate of the second point of the line. @since 0.1 */
+	protected double x;
+	
+	/** The Y-coordinate of the second point of the line. @since 0.1 */
+	protected double y;
+
+	
+	/**
+	 * The main constructor.
+	 * @param x The X-coordinate of the second point of the line.
+	 * @param y The Y-coordinate of the second point of the line.
+	 * @param isRelative isRelative True: the path segment is relative, false it is absolute.
+	 */
+	public SVGPathSegLineto(double x, double y, boolean isRelative)
+	{
+		super(isRelative);
+		
+		this.x = x;
+		this.y = y;
+	}
+	
+	
+	
+	/**
+	 * @return the x.
+	 * @since 0.1
+	 */
+	public double getX()
+	{
+		return x;
+	}
+
+	
+	/**
+	 * @return the y.
+	 * @since 0.1
+	 */
+	public double getY()
+	{
+		return y;
+	}
+
+	
+	
+	/**
+	 * @return The position of the segment.
+	 * @since 0.1
+	 */
+	public Point2D getPoint()
+	{
+		return new Point2D.Double(x, y);
+	}
+	
+	
+
+	@Override
+	public PathSeg getType()
+	{
+		return isRelative() ? PathSeg.LINETO_REL : PathSeg.LINETO_ABS;
+	}
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append((isRelative() ? "l" : "L"));//$NON-NLS-1$//$NON-NLS-2$
+		stringBuffer.append(' ');
+		stringBuffer.append(x);
+		stringBuffer.append(' ');
+		stringBuffer.append(y);
+		
+		return stringBuffer.toString();
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegLinetoHorizontal.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegLinetoHorizontal.java
new file mode 100644
index 0000000..0821d48
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegLinetoHorizontal.java
@@ -0,0 +1,61 @@
+package latexDraw.parsers.svg.elements.path;
+
+/**
+ * Defines the SVGPath horizontal lineto segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegLinetoHorizontal extends SVGPathSegLineto
+{
+	/**
+	 * The main constructor.
+	 * @param x The X-coordinate of the second point of the line.
+	 * @param isRelative isRelative True: the path segment is relative, false it is absolute.
+	 */
+	public SVGPathSegLinetoHorizontal(double x, boolean isRelative)
+	{
+		super(x, x, isRelative);
+	}
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append((isRelative() ? "h" : "H"));//$NON-NLS-1$//$NON-NLS-2$
+		stringBuffer.append(' ');
+		stringBuffer.append(x);
+		
+		return stringBuffer.toString() ;
+	}
+	
+	
+	@Override
+	public PathSeg getType()
+	{
+		return isRelative() ? PathSeg.LINETO_HORIZONTAL_REL : PathSeg.LINETO_HORIZONTAL_ABS;
+	}
+
+	
+	@Override
+	public double getY()
+	{
+		return getX();
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegLinetoVertical.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegLinetoVertical.java
new file mode 100644
index 0000000..878492e
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegLinetoVertical.java
@@ -0,0 +1,63 @@
+package latexDraw.parsers.svg.elements.path;
+
+/**
+ * Defines the SVGPath vertical lineto segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegLinetoVertical extends SVGPathSegLineto
+{
+	/**
+	 * The main constructor.
+	 * @param y The Y-coordinate of the second point of the line.
+	 * @param isRelative isRelative True: the path segment is relative, false it is absolute.
+	 */
+	public SVGPathSegLinetoVertical(double y, boolean isRelative)
+	{
+		super(y, y, isRelative);
+	}
+
+
+	@Override
+	public PathSeg getType()
+	{
+		return isRelative() ? PathSeg.LINETO_VERTICAL_REL : PathSeg.LINETO_VERTICAL_ABS;
+	}
+
+
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append((isRelative() ? "v" : "V"));//$NON-NLS-1$//$NON-NLS-2$
+		stringBuffer.append(' ');
+		stringBuffer.append(y);
+		
+		return stringBuffer.toString();
+	}
+	
+	
+	
+	@Override
+	public double getX()
+	{
+		return getY();
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegList.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegList.java
new file mode 100644
index 0000000..a81df2b
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegList.java
@@ -0,0 +1,202 @@
+package latexDraw.parsers.svg.elements.path;
+
+import java.awt.geom.Point2D;
+import java.text.ParseException;
+import java.util.Vector;
+
+import latexDraw.parsers.svg.elements.path.SVGPathSeg.PathSeg;
+import latexDraw.parsers.svg.parsers.SVGPathHandler;
+import latexDraw.parsers.svg.parsers.SVGPathParser;
+
+/**
+ * Defines a list of SVGPath segments.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegList extends Vector<SVGPathSeg> implements SVGPathHandler
+{
+	private static final long	serialVersionUID	= 1L;
+
+	
+	/**
+	 * The constructor by default.
+	 * @since 0.1
+	 */
+	public SVGPathSegList()
+	{
+		super();
+	}
+	
+	
+	/**
+	 * This constructor creates some segment paths which will be created from given path parsing.
+	 * @param path The path to parse.
+	 * @throws IllegalArgumentException If the path is not valid.
+	 * @since 0.1
+	 */
+	public SVGPathSegList(String path)
+	{
+		this();
+		
+		addSVGSegPaths(path);
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer path = new StringBuffer();
+
+		for(SVGPathSeg seg : this)
+			if(seg!=null)
+			{
+				path.append(seg.toString());
+				path.append(' ');
+			}
+		
+		return path.toString();
+	}
+	
+	
+	
+	/**
+	 * Adds to the list some SVGSegPath which will be created from given path parsing.
+	 * @param path The path to parse.
+	 * @throws IllegalArgumentException If the path is not valid.
+	 * @since 0.1
+	 */
+	public void addSVGSegPaths(String path)
+	{
+		if(path==null)
+			return ;
+		
+		SVGPathParser pp = new SVGPathParser(path, this);
+		
+		try{ pp.parse(); }
+		catch(ParseException e) { throw new IllegalArgumentException(e.toString() + " But : \"" + path + "\" found."); }
+	}
+
+
+	
+	public void onPathSeg(SVGPathSeg pathSeg)
+	{
+		if(pathSeg!=null)
+			add(pathSeg);
+	}
+
+
+	/**
+	 * Returns the current point <b>with absolute values</b> at the end of the SVGPathSeg at the position <code>i</code>.
+	 * @param pos The position of the SVGPathSeg to compute the current point.
+	 * @return The current point <b>with absolute values</b>.
+	 * @since 0.1
+	 */
+	@SuppressWarnings("incomplete-switch")
+	public Point2D getCurrentPoint(int pos)
+	{
+		if(pos<0 || pos>=size())
+			return null;
+		
+		Point2D.Double pt = new Point2D.Double(), pt2;
+		SVGPathSeg p = elementAt(pos);
+			
+		switch(p.getType())
+		{
+			case LINETO_ABS:
+				pt.setLocation(((SVGPathSegLineto)p).getX(), ((SVGPathSegLineto)p).getY());
+				break;
+				
+			case MOVETO_ABS:
+				pt.setLocation(((SVGPathSegMoveto)p).getX(), ((SVGPathSegMoveto)p).getY());
+				break;
+				
+			case CLOSEPATH:
+				pt.setLocation(getInitialPoint(pos-1));
+				break;
+				
+			case ARC_ABS:
+				pt.setLocation(((SVGPathSegArc)p).getX(), ((SVGPathSegArc)p).getY());
+				break;
+				
+			case CURVETO_CUBIC_ABS:
+				pt.setLocation(((SVGPathSegCurvetoCubic)p).getX(), ((SVGPathSegCurvetoCubic)p).getY());
+				break;
+				
+			case CURVETO_CUBIC_SMOOTH_ABS:
+				pt.setLocation(((SVGPathSegCurvetoCubicSmooth)p).getX(), ((SVGPathSegCurvetoCubicSmooth)p).getY());
+				break;
+				
+			case CURVETO_QUADRATIC_ABS:
+				pt.setLocation(((SVGPathSegCurvetoQuadratic)p).getX(), ((SVGPathSegCurvetoQuadratic)p).getY());
+				break;
+				
+			case CURVETO_QUADRATIC_SMOOTH_ABS:
+				pt.setLocation(((SVGPathSegCurvetoQuadraticSmooth)p).getX(), ((SVGPathSegCurvetoQuadraticSmooth)p).getY());
+				break;
+				
+			case LINETO_HORIZONTAL_ABS:
+				pt2 = (Point2D.Double)getCurrentPoint(pos-1);
+				
+				if(pt2==null)
+					pt=null;
+				else
+					pt.setLocation(((SVGPathSegLinetoHorizontal)p).getX(), pt2.getY());
+			
+				break;
+				
+			case LINETO_VERTICAL_ABS:
+				pt2 = (Point2D.Double)getCurrentPoint(pos-1);
+				
+				if(pt2==null)
+					pt=null;
+				else
+					pt.setLocation(pt2.getX(), ((SVGPathSegLinetoVertical)p).getY());
+			
+				break;
+		}
+		
+		return pt;
+	}
+
+	
+
+	/**
+	 * Returns the initial point of the path containing the element at the position i.
+	 * @param pos The position the begin the research. 
+	 * @return The initial point of the path.
+	 * @since 0.1
+	 */
+	public Point2D getInitialPoint(int pos)
+	{
+		if(pos<0 || pos>=size())
+			return null;
+		
+		SVGPathSegMoveto m=null;
+		int i = pos;
+		
+		while(m==null && i>0)
+			if(elementAt(i).getType()==PathSeg.MOVETO_ABS)
+				m = (SVGPathSegMoveto)elementAt(i);
+			
+		if(m==null)
+			return null;
+		
+		return new Point2D.Double(m.getX(), m.getY());
+	}
+}
diff --git a/current/latexDraw/parsers/svg/elements/path/SVGPathSegMoveto.java b/current/latexDraw/parsers/svg/elements/path/SVGPathSegMoveto.java
new file mode 100644
index 0000000..98be95c
--- /dev/null
+++ b/current/latexDraw/parsers/svg/elements/path/SVGPathSegMoveto.java
@@ -0,0 +1,57 @@
+package latexDraw.parsers.svg.elements.path;
+
+/**
+ * Defines the SVGPath moveto segment.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathSegMoveto extends SVGPathSegLineto
+{
+	/**
+	 * The main constructor.
+	 * @param x The X-coordinate of the point to go.
+	 * @param y The Y-coordinate of the point to go.
+	 * @param isRelative
+	 */
+	public SVGPathSegMoveto(double x, double y, boolean isRelative)
+	{
+		super(x, y, isRelative);
+	}
+
+	
+	@Override
+	public String toString()
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append((isRelative() ? "m" : "M"));//$NON-NLS-1$//$NON-NLS-2$
+		stringBuffer.append(' ');
+		stringBuffer.append(x);
+		stringBuffer.append(' ');
+		stringBuffer.append(y);
+		
+		return stringBuffer.toString();
+	}
+	
+	
+	@Override
+	public PathSeg getType()
+	{
+		return isRelative() ? PathSeg.MOVETO_REL : PathSeg.MOVETO_ABS;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/parsers/AbstractSVGParser.java b/current/latexDraw/parsers/svg/parsers/AbstractSVGParser.java
new file mode 100644
index 0000000..029a71a
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/AbstractSVGParser.java
@@ -0,0 +1,84 @@
+package latexDraw.parsers.svg.parsers;
+
+import latexDraw.parsers.CodeParser;
+
+/**
+ * Defines a model for the SVG parsers.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.3<br>
+ * @since 2.0.0
+ */
+public abstract class AbstractSVGParser extends CodeParser
+{
+	/**
+	 * The constructor.
+	 * @param code The path to parse.
+	 */
+	public AbstractSVGParser(String code)
+	{
+		super(code);
+	}
+
+	
+	
+	@Override
+	public boolean isComment()
+	{
+		return false;
+	}
+	
+	
+	@Override
+	public boolean isWSP()
+	{
+    	int c = getChar();
+    	return c==0x20 || c==0x9 || c==0xD || c==0xA;
+	}
+	
+	
+	
+	@Override
+	public void skipWSP()
+	{
+    	while(!isEOC() && isWSP())
+    		nextChar();
+	}
+	
+	
+	
+	/**
+	 * Skips the useless characters and a possible comma.
+	 * @since 0.1
+	 */
+    public void skipWSPComma()
+	{
+    	skipWSP();
+    	
+    	if(getChar()==',')
+    	{
+    		nextChar();
+    		skipWSP();
+    	}
+	}
+    
+    
+	@Override
+	public String skipComment()
+	{
+		return null;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/parsers/CSSStyleHandler.java b/current/latexDraw/parsers/svg/parsers/CSSStyleHandler.java
new file mode 100644
index 0000000..8321ad9
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/CSSStyleHandler.java
@@ -0,0 +1,32 @@
+package latexDraw.parsers.svg.parsers;
+
+/**
+ * Defines the model of a CSS style handler.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public interface CSSStyleHandler
+{
+	/**
+	 * Actions to do when a CSS style is parsed.
+	 * @param name The name of the style.
+	 * @param value The value of the style.
+	 * @since 0.1
+	 */
+	public void onCSSStyle(String name, String value);
+}
diff --git a/current/latexDraw/parsers/svg/parsers/CSSStyleParser.java b/current/latexDraw/parsers/svg/parsers/CSSStyleParser.java
new file mode 100644
index 0000000..de208ed
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/CSSStyleParser.java
@@ -0,0 +1,97 @@
+package latexDraw.parsers.svg.parsers;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.css.AbstractCSSParser;
+
+
+/**
+ * Defines a parser that parses a SVG CSS style attribute.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ */
+public class CSSStyleParser extends AbstractCSSParser
+{
+	/** The handler which will manage actions to do when a CSS style is parsed. @since 0.1 */
+	protected CSSStyleHandler handler ;
+	
+	
+	/**
+	 * The constructor.
+	 * @param code The code to parse (must not be null).
+	 * @param handler The CSS style handler.
+	 * @since 0.1
+	 */
+	public CSSStyleParser(String code, CSSStyleHandler handler)
+	{
+		super(code);
+		
+		if(handler==null)
+			throw new IllegalArgumentException();
+		
+		this.handler = handler;
+	}
+
+	
+
+	@Override
+	public void parse() throws ParseException
+	{
+		StringBuffer name  = new StringBuffer();
+		StringBuffer value = new StringBuffer();
+		
+		skipWSPComments();
+		
+		while(!isEOC())
+		{
+			while(getChar()!=':' && !isWSP() && !isEOC() && !isComment())
+			{
+				name.append((char)getChar());
+				nextChar();
+			}
+			
+			skipWSPComments();
+			
+			if(name.length()==0 || isEOC() || getChar()!=':') 
+				throw new ParseException("Invalid CSS style definition.", getPosition());//$NON-NLS-1$
+			
+			nextChar();
+			skipWSPComments();
+			
+			while(getChar()!=';' && !isEOC() && !isComment())
+			{	
+				if(!isWSP())
+					value.append((char)getChar());
+				
+				nextChar();
+			}
+			
+			if(value.length()==0) throw new ParseException("value expected but not found.", getPosition());//$NON-NLS-1$
+			
+			handler.onCSSStyle(name.toString(), value.toString());
+			name.delete(0, name.length());
+			value.delete(0, value.length());
+			
+			skipWSPComments();
+			
+			if(!isEOC() && getChar()!=';') throw new ParseException("token ';' expected but not found.", getPosition());//$NON-NLS-1$
+			
+			nextChar();
+			skipWSPComments();
+		}//while
+	}
+}
diff --git a/current/latexDraw/parsers/svg/parsers/SVGLengthParser.java b/current/latexDraw/parsers/svg/parsers/SVGLengthParser.java
new file mode 100644
index 0000000..b1edb4a
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/SVGLengthParser.java
@@ -0,0 +1,177 @@
+package latexDraw.parsers.svg.parsers;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.SVGLength;
+import latexDraw.parsers.svg.SVGLength.LengthType;
+
+/**
+ * Defines a parser that parses SVG length code.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGLengthParser extends SVGNumberParser
+{
+
+	/**
+	 * The constructor.
+	 * @param code The code to parse.
+	 * @since 0.1
+	 */
+	public SVGLengthParser(String code)
+	{
+		super(code);
+	}
+
+	
+	
+	/**
+	 * Parses an SVG length.
+	 * @return An SVGLength.
+	 * @throws ParseException If a problem occurs or if not managed unit are parsed (%, em and ex).
+	 * @since 0.1
+	 */
+	public SVGLength parseLength() throws ParseException
+	{
+		double value = parseNumber(false);
+		LengthType lgthType;
+		String errorUnit = "Invalid unit", valueAsStr;//$NON-NLS-1$
+		
+		setPosition(0);
+		valueAsStr = parseNumberAsString(false);
+		skipWSP();
+		
+		switch(getChar())
+		{
+			case EOC:
+				lgthType = LengthType.NUMBER;
+				break;
+				
+			case 'p':
+				switch(nextChar())
+				{
+					case EOC:
+					default:
+						throw new ParseException(errorUnit, getPosition());
+						
+					case 't':
+						lgthType = LengthType.PT;
+						break;
+							
+					case 'x':
+						lgthType = LengthType.PX;
+						break;
+						
+					case 'c':
+						lgthType = LengthType.PC;
+						break;
+				}
+				
+				break;
+				
+			case '%':
+				throw new ParseException("Not yet managed: %", getPosition());//$NON-NLS-1$
+				
+			case 'c':
+				if(nextChar()=='m')
+					lgthType = LengthType.CM;
+				else
+					throw new ParseException(errorUnit, getPosition());
+				
+				break;
+				
+			case 'm':
+				if(nextChar()=='m')
+					lgthType = LengthType.MM;
+				else
+					throw new ParseException(errorUnit, getPosition());
+				break;
+				
+			case 'i':
+				if(nextChar()=='n')
+					lgthType = LengthType.IN;
+				else
+					throw new ParseException(errorUnit, getPosition());
+				break;
+				
+			case 'e':
+				switch(nextChar())
+				{
+					case EOC:
+					default:
+						throw new ParseException(errorUnit, getPosition());
+						
+					case 'm':
+						throw new ParseException("Not yet managed: em", getPosition());//$NON-NLS-1$
+						
+					case 'x':
+						throw new ParseException("Not yet managed: ex", getPosition());//$NON-NLS-1$
+				}
+				
+			default:
+				throw new ParseException(errorUnit, getPosition());
+		}
+		
+		return new SVGLength(UnitProcessor.toUserUnit(value, lgthType), lgthType, valueAsStr);
+	}
+	
+	
+	
+	/**
+	 * Parses an SVG coordinate.
+	 * @return An SVGLength.
+	 * @throws ParseException If a problem occurs or if not managed unit are parsed (%, em and ex).
+	 * @since 0.1
+	 */
+	public SVGLength parseCoordinate() throws ParseException
+	{
+		return parseLength();
+	}
+	
+	
+	
+	/**
+	 * Parses a number or a percentage (not yet managed).
+	 * @return An SVGLength.
+	 * @throws ParseException If a problem occurs or if a percentage is parsed.
+	 * @since 0.1
+	 */
+	public SVGLength parseNumberOrPercent() throws ParseException
+	{
+		double value = parseNumber(false);
+		LengthType type;
+		String valueAsStr;
+		
+		setPosition(0);
+		valueAsStr = parseNumberAsString(false);
+		skipWSP();
+		
+		switch(getChar())
+		{
+			default:
+			case EOC:
+				type = LengthType.NUMBER;
+				break;
+				
+			case '%':
+				throw new ParseException("Not yet managed: %", getPosition());//$NON-NLS-1$
+		}
+		
+		return new SVGLength(UnitProcessor.toUserUnit(value, type), type, valueAsStr);
+	}
+}
diff --git a/current/latexDraw/parsers/svg/parsers/SVGNumberParser.java b/current/latexDraw/parsers/svg/parsers/SVGNumberParser.java
new file mode 100644
index 0000000..311f73a
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/SVGNumberParser.java
@@ -0,0 +1,166 @@
+package latexDraw.parsers.svg.parsers;
+
+import java.text.ParseException;
+
+/**
+ * Defines a SVG number parser.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGNumberParser extends AbstractSVGParser
+{
+	/** 
+	 * The constructor.
+	 * @param code The code to parse.
+	 */
+	public SVGNumberParser(String code)
+	{
+		super(code);
+	}
+	
+	
+	
+	/**
+	 * Parses a flag (a boolean).
+	 * @return True or false.
+	 * @throws ParseException If an error occurs.
+	 * @since 0.1
+	 */
+	public boolean parseFlag() throws ParseException
+	{
+		skipWSP();
+		int c = getChar();
+		
+		if(c=='0' || c=='1')
+		{
+				boolean flag = c=='1' ? true : false;
+				
+				nextChar();
+				return flag;
+		}
+		
+		throw new ParseException("Flag expected.", getPosition());		//$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * Parses a number (a double).
+	 * @param unsigned True: the parsed number must be unsigned.
+	 * @return The parsed number as a string.
+	 * @throws ParseException If an error occurs or if the parsed number is signed and <code>unsigned</code> is true.
+	 * @since 0.1
+	 */
+	public String parseNumberAsString(boolean unsigned) throws ParseException
+	{
+		boolean again = true;
+		int c, start;
+		
+		skipWSP();
+		start = getPosition();
+		c = getChar();
+		
+		if(c=='-' || c=='+')// Reading the sign
+		{
+			if(unsigned)
+				throw new ParseException("Unsigned number expected.", getPosition());//$NON-NLS-1$
+			
+			c = nextChar();
+		}
+		
+		while(again && !isEOC()) // Reading the first part of the number.
+			if(c<48 || c>58)
+				again = false;
+			else
+				c = nextChar();
+		
+		if(c=='.')
+		{
+			c = nextChar();
+			again = true;
+			
+			while(again && !isEOC()) // Reading the second part of the number.
+				if(c<48 || c>58)
+					again = false;
+				else
+					c = nextChar();
+		}
+		
+		if(c=='E' || c=='e')// Reading the exponent.
+		{
+			c = nextChar();
+			again = true;
+			
+			if(c=='-' || c=='+')// Reading the sign
+				c = nextChar();
+			
+			while(again && !isEOC()) // Reading the exponent.
+				if(c<48 || c>58)
+					again = false;
+				else
+					c = nextChar();
+		}
+		
+		try {  Double.valueOf(getCode().substring(start, getPosition())); }
+		catch(NumberFormatException e) { throw new ParseException("Invalid number.", getPosition()); }//$NON-NLS-1$
+		
+		return getCode().substring(start, getPosition());
+	}
+
+	
+	
+	/**
+	 * Parses a number (a double).
+	 * @param unsigned True: the parsed number must be unsigned.
+	 * @return The parsed number.
+	 * @throws ParseException If an error occurs or if the parsed number is signed and <code>unsigned</code> is true.
+	 * @since 0.1
+	 */
+	public double parseNumber(boolean unsigned) throws ParseException
+	{
+		String number = parseNumberAsString(unsigned);
+		
+		try {  return Double.valueOf(number); }
+		catch(NumberFormatException e) { throw new ParseException("Invalid number.", getPosition()); }//$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * @return True if the current character is the beginning of a number.
+	 * @param unsigned True: the next number must not have a sign.
+	 * @since 0.1
+	 */
+	protected boolean isNumber(boolean unsigned)
+	{
+		int c = getChar();
+		
+		if(unsigned)
+			return c=='.' || (c>=48 && c<=57);
+		
+		return c=='-' || c=='+' || c=='.' || (c>=48 && c<=57);
+	}
+
+
+
+	@Override
+	public void parse() throws ParseException
+	{
+		// Nothing to do.
+	}
+}
diff --git a/current/latexDraw/parsers/svg/parsers/SVGPathHandler.java b/current/latexDraw/parsers/svg/parsers/SVGPathHandler.java
new file mode 100644
index 0000000..7b669cf
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/SVGPathHandler.java
@@ -0,0 +1,33 @@
+package latexDraw.parsers.svg.parsers;
+
+import latexDraw.parsers.svg.elements.path.SVGPathSeg;
+
+/**
+ * Defines the model of a SVGPath handler.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public interface SVGPathHandler
+{
+	/**
+	 * Actions to do when a SVGPath is parsed and created.
+	 * @param pathSeg The parsed SVGPath.
+	 * @since 0.1
+	 */
+	public void onPathSeg(SVGPathSeg pathSeg);
+}
diff --git a/current/latexDraw/parsers/svg/parsers/SVGPathParser.java b/current/latexDraw/parsers/svg/parsers/SVGPathParser.java
new file mode 100644
index 0000000..86d4987
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/SVGPathParser.java
@@ -0,0 +1,470 @@
+package latexDraw.parsers.svg.parsers;
+
+import java.text.ParseException;
+
+import latexDraw.parsers.svg.elements.path.*;
+
+/**
+ * Defines an SVGPath parser.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/20/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class SVGPathParser extends SVGNumberParser
+{
+	/** The handler of the SVGPath. @since 0.1 */
+	protected SVGPathHandler handler;
+	
+	
+	/**
+	 * The main constructor.
+	 * @param code The path to parse.
+	 * @param handler The handler of the path.
+	 */
+	public SVGPathParser(String code, SVGPathHandler handler)
+	{
+		super(code);
+		
+		this.handler = handler;
+	}
+	
+	
+
+	@Override
+	public void parse() throws ParseException
+	{
+		setPosition(0);
+		skipWSP();
+		
+		if(getChar()!='m' && getChar()!='M')// The first command must be a moveto command.
+			throw new ParseException("moveto command (m|M) expected.", getPosition());//$NON-NLS-1$
+		
+		parseMoveto(false);// If a relative moveto (m) appears as the first element of the path, then it is treated as a pair of absolute coordinates.
+
+		while(!isEOC())
+		{
+			skipWSP();
+			
+			switch(getChar())
+			{
+				case EOC:
+					break;
+					
+				case 'Z':
+				case 'z':
+					parseClosepath();
+					break;
+					
+				case 'm':
+					parseMoveto(true);
+					break;
+					
+				case 'M':
+					parseMoveto(false);
+					break;
+					
+				case 'l':
+					parseLineto(true);
+					break;
+					
+				case 'L':
+					parseLineto(false);
+					break;
+					
+				case 'h':
+					parseHorizontalLineto(true);
+					break;
+					
+				case 'H':
+					parseHorizontalLineto(false);
+					break;
+					
+				case 'v':
+					parseVerticalLineto(true);
+					break;
+					
+				case 'V':
+					parseVerticalLineto(false);
+					break;
+					
+				case 'a':
+					parseEllipticalArcto(true);
+					break;
+					
+				case 'A':
+					parseEllipticalArcto(false);
+					break;
+					
+				case 'c':
+					parseCurveto(true);
+					break;
+					
+				case 'C':
+					parseCurveto(false);
+					break;
+					
+				case 'q':
+					parseQuadraticBezierCurveto(true);
+					break;
+					
+				case 'Q':
+					parseQuadraticBezierCurveto(false);
+					break;
+					
+				case 't':
+					parseShorthandQuadraticBezierCurveto(true);
+					break;
+					
+				case 'T':
+					parseShorthandQuadraticBezierCurveto(false);
+					break;
+					
+				case 's':
+					parseShorthandCurveto(true);
+					break;
+					
+				case 'S':
+					parseShorthandCurveto(false);
+					break;
+					
+				default:
+					throw new ParseException("Invalid token:" + getChar(), getPosition());//$NON-NLS-1$
+			}
+		}
+	}
+	
+	
+	/**
+	 * Parses an SVGPath smooth curveto.
+	 * @param isRelative True if segment is relative.
+	 * @throws ParseException If a problem occurs.
+	 * @since 0.1
+	 */
+	protected void parseShorthandCurveto(boolean isRelative) throws ParseException
+	{
+		double x, y, x2, y2;
+		
+		nextChar();
+		skipWSP();
+		x2 = parseNumber(false);
+		skipWSPComma();
+		y2 = parseNumber(false);
+		skipWSPComma();
+		x = parseNumber(false);
+		skipWSPComma();
+		y = parseNumber(false);
+		skipWSPComma();
+		handler.onPathSeg(new SVGPathSegCurvetoCubicSmooth(x, y, x2, y2, isRelative));
+		
+		while(!isEOC() && isNumber(false))
+		{
+			x2 = parseNumber(false);
+			skipWSPComma();
+			y2 = parseNumber(false);
+			skipWSPComma();
+			x = parseNumber(false);
+			skipWSPComma();
+			y = parseNumber(false);
+			skipWSPComma();
+			handler.onPathSeg(new SVGPathSegCurvetoCubicSmooth(x, y, x2, y2, isRelative));
+		}
+		
+		nextChar();
+	}
+
+
+	
+	/**
+	 * Parses an SVGPath closepath.
+	 * @since 0.1
+	 */
+	protected void parseClosepath()
+	{
+		handler.onPathSeg(new SVGPathSegClosePath());
+		nextChar();
+	}
+
+
+	/**
+	 * Parses an SVGPath horizontal lineto.
+	 * @param isRelative True if segment is relative.
+	 * @throws ParseException If a problem occurs.
+	 * @since 0.1
+	 */
+	protected void parseHorizontalLineto(boolean isRelative) throws ParseException
+	{
+		double h;
+		
+		nextChar();
+		skipWSP();
+		h = parseNumber(false);
+		skipWSPComma();
+		handler.onPathSeg(new SVGPathSegLinetoHorizontal(h, isRelative));
+		
+		while(!isEOC() && isNumber(false))
+		{
+			h = parseNumber(false);
+			skipWSPComma();
+			handler.onPathSeg(new SVGPathSegLinetoHorizontal(h, isRelative));
+		}
+	}
+
+
+	/**
+	 * Parses an SVGPath vertical lineto.
+	 * @param isRelative True if segment is relative.
+	 * @throws ParseException If a problem occurs.
+	 * @since 0.1
+	 */
+	protected void parseVerticalLineto(boolean isRelative) throws ParseException
+	{
+		double v;
+		
+		nextChar();
+		skipWSP();
+		v = parseNumber(false);
+		skipWSPComma();
+		handler.onPathSeg(new SVGPathSegLinetoVertical(v, isRelative));
+		
+		while(!isEOC() && isNumber(false))
+		{
+			v = parseNumber(false);
+			skipWSPComma();
+			handler.onPathSeg(new SVGPathSegLinetoVertical(v, isRelative));
+		}
+	}
+
+
+	/**
+	 * Parses an SVGPath arc.
+	 * @param isRelative True if segment is relative.
+	 * @throws ParseException If a problem occurs.
+	 * @since 0.1
+	 */
+	protected void parseEllipticalArcto(boolean isRelative) throws ParseException
+	{
+		double x, y, rx, ry, angle;
+		boolean laf, sf;
+		
+		nextChar();
+		skipWSP();
+		rx = parseNumber(true);
+		skipWSPComma();
+		ry = parseNumber(true);
+		skipWSPComma();
+		angle = parseNumber(false);
+		skipWSPComma();
+		laf = parseFlag();
+		skipWSPComma();
+		sf = parseFlag();
+		skipWSPComma();
+		x = parseNumber(false);
+		skipWSPComma();
+		y = parseNumber(false);
+		skipWSPComma();
+		handler.onPathSeg(new SVGPathSegArc(x, y, rx, ry, angle, laf, sf, isRelative));
+		
+		while(!isEOC() && isNumber(true))
+		{
+			rx = parseNumber(true);
+			skipWSPComma();
+			ry = parseNumber(true);
+			skipWSPComma();
+			angle = parseNumber(false);
+			skipWSPComma();
+			laf = parseFlag();
+			skipWSPComma();
+			sf = parseFlag();
+			skipWSPComma();
+			x = parseNumber(false);
+			skipWSPComma();
+			y = parseNumber(false);
+			skipWSPComma();
+			handler.onPathSeg(new SVGPathSegArc(x, y, rx, ry, angle, laf, sf, isRelative));
+		}
+	}
+
+
+	/**
+	 * Parses an SVGPath curveto.
+	 * @param isRelative True if segment is relative.
+	 * @throws ParseException If a problem occurs.
+	 * @since 0.1
+	 */
+	protected void parseCurveto(boolean isRelative) throws ParseException
+	{
+		double x, y, x1, x2, y1, y2;
+		
+		nextChar();
+		skipWSP();
+		x1 = parseNumber(false);
+		skipWSPComma();
+		y1 = parseNumber(false);
+		skipWSPComma();
+		x2 = parseNumber(false);
+		skipWSPComma();
+		y2 = parseNumber(false);
+		skipWSPComma();
+		x = parseNumber(false);
+		skipWSPComma();
+		y = parseNumber(false);
+		skipWSPComma();
+		handler.onPathSeg(new SVGPathSegCurvetoCubic(x, y, x1, y1, x2, y2, isRelative));
+		
+		while(!isEOC() && isNumber(false))
+		{
+			x1 = parseNumber(false);
+			skipWSPComma();
+			y1 = parseNumber(false);
+			skipWSPComma();
+			x2 = parseNumber(false);
+			skipWSPComma();
+			y2 = parseNumber(false);
+			skipWSPComma();
+			x = parseNumber(false);
+			skipWSPComma();
+			y = parseNumber(false);
+			skipWSPComma();
+			handler.onPathSeg(new SVGPathSegCurvetoCubic(x, y, x1, y1, x2, y2, isRelative));
+		}
+	}
+
+
+	/**
+	 * Parses an SVGPath quadratic curveto.
+	 * @param isRelative True if segment is relative.
+	 * @throws ParseException If a problem occurs.
+	 * @since 0.1
+	 */
+	protected void parseQuadraticBezierCurveto(boolean isRelative) throws ParseException
+	{
+		double x, y, x1, y1;
+		
+		nextChar();
+		skipWSP();
+		x1 = parseNumber(false);
+		skipWSPComma();
+		y1 = parseNumber(false);
+		skipWSPComma();
+		x = parseNumber(false);
+		skipWSPComma();
+		y = parseNumber(false);
+		skipWSPComma();
+		handler.onPathSeg(new SVGPathSegCurvetoQuadratic(x, y, x1, y1, isRelative));
+		
+		while(!isEOC() && isNumber(false))
+		{
+			x1 = parseNumber(false);
+			skipWSPComma();
+			y1 = parseNumber(false);
+			skipWSPComma();
+			x = parseNumber(false);
+			skipWSPComma();
+			y = parseNumber(false);
+			skipWSPComma();
+			handler.onPathSeg(new SVGPathSegCurvetoQuadratic(x, y, x1, y1, isRelative));
+		}
+	}
+
+
+	/**
+	 * Parses an SVGPath quadratic smooth curveto.
+	 * @param isRelative True if segment is relative.
+	 * @throws ParseException If a problem occurs.
+	 * @since 0.1
+	 */
+	protected void parseShorthandQuadraticBezierCurveto(boolean isRelative) throws ParseException
+	{
+		double x, y;
+		
+		nextChar();
+		skipWSP();
+		x = parseNumber(false);
+		skipWSPComma();
+		y = parseNumber(false);
+		skipWSPComma();
+		handler.onPathSeg(new SVGPathSegCurvetoQuadraticSmooth(x, y, isRelative));
+		
+		while(!isEOC() && isNumber(false))
+		{
+			x = parseNumber(false);
+			skipWSPComma();
+			y = parseNumber(false);
+			skipWSPComma();
+			handler.onPathSeg(new SVGPathSegLineto(x, y, isRelative));
+		}
+	}
+
+
+	/**
+	 * Parses an SVGPath lineto.
+	 * @param isRelative True if segment is relative.
+	 * @throws ParseException If a problem occurs.
+	 * @since 0.1
+	 */
+	protected void parseLineto(boolean isRelative) throws ParseException
+	{
+		double x, y;
+		
+		nextChar();
+		skipWSP();
+		x = parseNumber(false);
+		skipWSPComma();
+		y = parseNumber(false);
+		skipWSPComma();
+		handler.onPathSeg(new SVGPathSegLineto(x, y, isRelative));
+		
+		while(!isEOC() && isNumber(false))
+		{
+			x = parseNumber(false);
+			skipWSPComma();
+			y = parseNumber(false);
+			skipWSPComma();
+			handler.onPathSeg(new SVGPathSegLineto(x, y, isRelative));
+		}
+	}
+	
+	
+	
+	/**
+	 * Parses an SVGPath moveto.
+	 * @param isRelative True if segment is relative.
+	 * @throws ParseException If a problem occurs.
+	 * @since 0.1
+	 */
+	protected void parseMoveto(boolean isRelative) throws ParseException
+	{
+		double x, y;
+		
+		nextChar();
+		skipWSP();
+		x = parseNumber(false);
+		skipWSPComma();
+		y = parseNumber(false);
+		skipWSPComma();
+		handler.onPathSeg(new SVGPathSegMoveto(x, y, isRelative));
+		
+		while(!isEOC() && isNumber(false))
+		{
+			x = parseNumber(false);
+			skipWSPComma();
+			y = parseNumber(false);
+			skipWSPComma();
+			handler.onPathSeg(new SVGPathSegLineto(x, y, isRelative));
+		}
+	}
+}
diff --git a/current/latexDraw/parsers/svg/parsers/SVGPointsParser.java b/current/latexDraw/parsers/svg/parsers/SVGPointsParser.java
new file mode 100644
index 0000000..9824907
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/SVGPointsParser.java
@@ -0,0 +1,159 @@
+package latexDraw.parsers.svg.parsers;
+
+import java.awt.geom.Point2D;
+import java.text.ParseException;
+import java.util.Vector;
+
+/**
+ * Defines a parser that parses points from polygons and polylines.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 12/04/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.3<br>
+ * @since 2.0.3
+ */
+public class SVGPointsParser extends AbstractSVGParser
+{
+	/** The parsed points. */
+	protected Vector<Point2D> points;
+	
+	
+	/**
+	 * Creates and initialises the parser.
+	 * @param code The code to parse.
+	 * @since 2.0.3
+	 * @throws IllegalArgumentException If the given code is null.
+	 */
+	public SVGPointsParser(String code)
+	{
+		super(code);
+		
+		points = new Vector<Point2D>();
+	}
+
+
+	
+	/**
+	 * Parses the given code and return the parsed points or null.
+	 * @param code The code to parse.
+	 * @return The parsed points or null.
+	 * @since 2.0.3
+	 */
+	public static Vector<Point2D> getPoints(String code)
+	{
+		try {
+			SVGPointsParser pp = new SVGPointsParser(code);
+			pp.parse();
+			return pp.getPoints(); 
+		}
+		catch(Exception e) { return null; }
+	}
+	
+
+
+
+	@Override
+	public void parse() throws ParseException
+	{
+		double c1, c2;
+		
+		skipWSP();
+		
+		while(!isEOC())
+		{
+			c1 = readNumber();
+			skipWSPComma();
+			c2 = readNumber();
+			points.add(new Point2D.Double(c1, c2));
+			skipWSPComma();
+		}
+	}
+	
+	
+	
+	/**
+	 * Reads a number.
+	 * @return The read number.
+	 * @throws ParseException If the number is not valid.
+	 * @since 2.0.3
+	 */
+	public double readNumber() throws ParseException
+	{
+		double n;
+		boolean isNegative;
+		boolean isFractional = false;
+		boolean isFloating   = false;
+		StringBuffer strn    = new StringBuffer();
+		
+		skipWSP();
+		
+		if(getChar()=='-' || getChar()=='+') {
+			isNegative = getChar()=='-';
+			nextChar();
+		}
+		else isNegative = false;
+		
+		while(!isWSP() & getChar()!=',' && !isEOC()) {
+			switch(getChar()) {
+				case '0': case '1': case '2': case '3': case '4':
+				case '5': case '6': case '7': case '8': case '9':
+					break;
+					
+				case '.':
+					if(isFractional)
+						throw new ParseException("An unexpected dot was read: "+getCode(), getPosition());
+					
+					isFractional = true;
+					break;
+					
+				case 'e': case 'E':
+					if(isFloating)
+						throw new ParseException("An unexpected exponantial token was read: "+getCode(), getPosition());
+					
+					isFloating = true;
+					break;
+				
+				case '-': case '+':
+					if(!isFloating)
+						throw new ParseException("An unexpected sign was read: "+getCode(), getPosition());
+					
+					break;
+					
+				default:
+					throw new ParseException("The following character is not authorised:" + (char)getChar(), getPosition());
+			}
+			
+			strn.append((char)getChar());
+			nextChar();
+		}
+		
+		try { n = Double.valueOf(strn.toString()); }
+		catch(Exception e) 
+		{ throw new ParseException("Not able to parse to given number:" + strn.toString(), getPosition()); }
+		
+		return isNegative ? n*-1 : n;
+	}
+
+
+
+	/**
+	 * @return The points.
+	 * @since 2.0.3
+	 */
+	public Vector<Point2D> getPoints()
+	{
+		return points;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/parsers/URIReferenceParser.java b/current/latexDraw/parsers/svg/parsers/URIReferenceParser.java
new file mode 100644
index 0000000..8bd98a7
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/URIReferenceParser.java
@@ -0,0 +1,85 @@
+package latexDraw.parsers.svg.parsers;
+
+import java.text.ParseException;
+
+/**
+ * Defines a parser that parses URI references.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/21/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class URIReferenceParser extends AbstractSVGParser
+{
+	/** The parsed URI. */
+	protected String uri;
+	
+	
+	/**
+	 * Creates a parser.
+	 * @param code The code to parse.
+	 */
+	public URIReferenceParser(String code)
+	{
+		super(code);
+	}
+
+	
+	/**
+	 * Reads a URI reference string from an url(#ref) attribute - such as url(#id123) - returns the extracted reference (id123).
+	 * @return The parsed reference or an empty string if the format of the code is not valid (not "url(#ref)")
+	 * @since 0.1
+	 */
+	public String getURI()
+	{
+		String str = "";//$NON-NLS-1$
+		skipWSP();
+		
+		if(getChar()=='u' && nextChar()=='r' && nextChar()=='l' && nextChar()=='(')
+		{
+			nextChar();
+			skipWSP();
+			
+			if(getChar()=='#')
+			{
+				while(nextChar()!=')' && !isEOC())
+					str += (char)getChar();
+				
+				if(getChar()!=')')
+					str = "";//$NON-NLS-1$
+			}
+		}
+		
+		return str;
+	}
+
+
+	@Override
+	public void parse() throws ParseException
+	{
+		uri = getURI();
+	}
+
+
+	/**
+	 * @return The parsed URI.
+	 * @since 2.0.3
+	 */
+	public String getUri()
+	{
+		return uri;
+	}
+}
diff --git a/current/latexDraw/parsers/svg/parsers/UnitProcessor.java b/current/latexDraw/parsers/svg/parsers/UnitProcessor.java
new file mode 100644
index 0000000..916c395
--- /dev/null
+++ b/current/latexDraw/parsers/svg/parsers/UnitProcessor.java
@@ -0,0 +1,81 @@
+package latexDraw.parsers.svg.parsers;
+
+import latexDraw.parsers.svg.SVGLength.LengthType;
+
+/**
+ * This processor manages and transforms value in different units.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 0.1<br>
+ * @since 0.1
+ */
+public class UnitProcessor
+{
+	/**
+	 * Transforms a value in the user unit (in pixels) according to the given unit (%, em and ex are not managed).
+	 * @param value The value to transform.
+	 * @param lgthType The type of the value.
+	 * @return The value in the user unit (in pixels).
+	 * @throws IllegalArgumentException If the given length type is not valid or not managed.
+	 * @since 0.1
+	 */
+	public static double toUserUnit(double value, LengthType lgthType)
+	{
+		if(lgthType==null)
+			throw new IllegalArgumentException();
+		
+		double userValue;
+		
+		switch(lgthType)
+		{
+			case CM:
+				userValue = value * 35.43307;
+				break;
+				
+			case IN:
+				userValue = value * 90.;
+				break;
+				
+			case MM:
+				userValue = value * 3.543307;
+				break;
+				
+			case PC:
+				userValue = value * 15.;
+				break;
+				
+			case PT:
+				userValue = value * 1.25;
+				break;
+				
+			case EM:
+			case EX:
+			case PERCENTAGE:
+				throw new IllegalArgumentException("Not yet managed.");//$NON-NLS-1$
+				
+			case NUMBER:
+			case PX:
+			case UNKNOWN:
+				userValue = value ;
+				break;
+				
+			default:
+				throw new IllegalArgumentException("Invalid length type.");//$NON-NLS-1$
+		}
+		
+		return userValue;
+	}
+}
diff --git a/current/latexDraw/psTricks/DviPsColors.java b/current/latexDraw/psTricks/DviPsColors.java
new file mode 100644
index 0000000..d2f1550
--- /dev/null
+++ b/current/latexDraw/psTricks/DviPsColors.java
@@ -0,0 +1,560 @@
+package latexDraw.psTricks;
+
+import java.awt.Color;
+import java.util.Hashtable;
+import java.util.Vector;
+
+/** 
+ * This class Defines colours used by pstricks.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 04/06/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class DviPsColors 
+{
+	public static final double MAX = 255.;
+	
+	public final static Color GREEN_YELLOW   = new Color(216,255, 79);
+	public final static Color YELLOW         = new Color(255,255,  0);
+	public final static Color GOLDEN_ROD     = new Color(255,229, 40);
+	public final static Color DANDELION      = new Color(255,181, 40);
+	public final static Color APRICOT        = new Color(255,173,122);
+	public final static Color PEACH          = new Color(216,127, 76);
+	public final static Color MELON          = new Color(255,137,127);
+	public final static Color YELLOW_ORANGE  = new Color(216,147,  0);
+	public final static Color ORANGE         = new Color(255, 99, 33);
+	public final static Color BURNT_ORANGE   = new Color(255,124,  0);
+	public final static Color BITTERSWEET    = new Color(193,  2,  0);
+	public final static Color RED_ORANGE     = new Color(255, 58, 33);
+	public final static Color MAHOGANY       = new Color(165,  0,  0);
+	public final static Color MAROON         = new Color(173,  0,  0);
+	public final static Color BRICKRED       = new Color(183,  0,  0);
+	public final static Color RED            = new Color(255,  0,  0);
+	public final static Color ORANGERED      = new Color(255,  0,127);
+	public final static Color RUBINERED      = new Color(255,  0,221);
+	public final static Color WILDSTRAWBERRY = new Color(255, 10,155);
+	public final static Color SALMON         = new Color(255,119,158);
+	public final static Color CARNATIONPINK  = new Color(255, 94,255);
+	public final static Color MAGENTA        = new Color(255,  0,255);
+	public final static Color VIOLETRED      = new Color(255, 48,255);
+	public final static Color RHODAMINE      = new Color(255, 45,255);
+	public final static Color MULBERRY       = new Color(163, 20,149);
+	public final static Color REDVIOLET      = new Color(150,  0,168);
+	public final static Color FUSHIA         = new Color(114,  2,234);
+	public final static Color LAVENDER       = new Color(255,132,255);
+	public final static Color THISTLE        = new Color(224,104,255);
+	public final static Color ORCHID         = new Color(173, 91,255);
+	public final static Color DARKORCHID     = new Color(153, 51,204);
+	public final static Color PURPLE         = new Color(140, 35,255);
+	public final static Color PLUM           = new Color(127,  0,255);
+	public final static Color VIOLET         = new Color( 53, 30,255);
+	public final static Color ROYALPURPLE    = new Color( 63, 25,255);
+	public final static Color BLUEVIOLET     = new Color( 25, 12,244);
+	public final static Color PERIWINKLE     = new Color(109,114,255);
+	public final static Color CADETBLUE      = new Color(140, 35,255);
+	public final static Color CORNFLOWERBLUE = new Color( 89,221,255);
+	public final static Color MIDNIGHTBLUE   = new Color(  0,112,145);
+	public final static Color NAVYBLUE       = new Color( 15,117,255);
+	public final static Color ROYALBLUE      = new Color(  0,127,255);
+	public final static Color BLUE           = new Color(  0,  0,255);
+	public final static Color CERULEAN       = new Color( 15,226,255);
+	public final static Color CYAN           = new Color(  0,255,255);
+	public final static Color PROCESSBLUE    = new Color( 10,255,255);
+	public final static Color SKYBLUE        = new Color( 96,255,224);
+	public final static Color TURQUOISE      = new Color( 38,255,204);
+	public final static Color TEALBLUE       = new Color( 30,249,163);
+	public final static Color AQUAMARINE     = new Color( 45,255,178);
+	public final static Color BLUEGREEN      = new Color( 38,255,170);
+	public final static Color EMERALD        = new Color(  0,255,127);
+	public final static Color JUNGLEGREEN    = new Color(  2,255,122);
+	public final static Color SEAGREEN       = new Color( 79,255,127);
+	public final static Color GREEN          = new Color(  0,255,  0);
+	public final static Color FORESTGREEN    = new Color(  0,224,  0);
+	public final static Color PINEGREEN      = new Color(  0,191, 40);
+	public final static Color LIMEGREEN      = new Color(127,255,  0);
+	public final static Color YELLOWGREEN    = new Color(142,255, 66);
+	public final static Color SPRINGGREEN    = new Color(188,255, 61);
+	public final static Color OLIVEGREEN     = new Color(  0,153,  0);
+	public final static Color RAWSIENNA      = new Color(140,  0,  0);
+	public final static Color SEPIA          = new Color( 76,  0,  0);
+	public final static Color BROWN          = new Color(102,  0,  0);
+	public final static Color TAN            = new Color(219,147,112);
+	public final static Color GRAY           = new Color(127,127,127);
+	public final static Color BLACK          = new Color(  0,  0,  0);
+	public final static Color WHITE          = new Color(255,255,255);
+	public final static Color PINK           = new Color(255,192,203);
+	public final static Color OLIVE          = new Color(0.5f, 0.5f, 0f);
+	
+	
+	public final static String N_GREEN_YELLOW   = "GreenYellow"; //$NON-NLS-1$
+	public final static String N_YELLOW         = "Yellow"; //$NON-NLS-1$
+	public final static String N_GOLDEN_ROD     = "Goldenrod"; //$NON-NLS-1$
+	public final static String N_DANDELION      = "Dandelion"; //$NON-NLS-1$
+	public final static String N_APRICOT        = "Apricot"; //$NON-NLS-1$
+	public final static String N_PEACH          = "Peach"; //$NON-NLS-1$
+	public final static String N_MELON          = "Melon"; //$NON-NLS-1$
+	public final static String N_YELLOW_ORANGE  = "YellowOrange"; //$NON-NLS-1$
+	public final static String N_ORANGE         = "Orange"; //$NON-NLS-1$
+	public final static String N_BURNT_ORANGE   = "BurntOrange"; //$NON-NLS-1$
+	public final static String N_BITTERSWEET    = "Bittersweet"; //$NON-NLS-1$
+	public final static String N_RED_ORANGE     = "RedOrange"; //$NON-NLS-1$
+	public final static String N_MAHOGANY       = "Mahogany"; //$NON-NLS-1$
+	public final static String N_MAROON         = "Maroon"; //$NON-NLS-1$
+	public final static String N_BRICKRED       = "BrickRed"; //$NON-NLS-1$
+	public final static String N_RED            = "Red"; //$NON-NLS-1$
+	public final static String N_ORANGERED      = "OrangeRed"; //$NON-NLS-1$
+	public final static String N_RUBINERED      = "RubineRed"; //$NON-NLS-1$
+	public final static String N_WILDSTRAWBERRY = "WildStrawberry"; //$NON-NLS-1$
+	public final static String N_SALMON         = "Salmon"; //$NON-NLS-1$
+	public final static String N_CARNATIONPINK  = "CarnationPink"; //$NON-NLS-1$
+	public final static String N_MAGENTA        = "Magenta"; //$NON-NLS-1$
+	public final static String N_VIOLETRED      = "VioletRed"; //$NON-NLS-1$
+	public final static String N_RHODAMINE      = "Rhodamine"; //$NON-NLS-1$
+	public final static String N_MULBERRY       = "Mulberry"; //$NON-NLS-1$
+	public final static String N_REDVIOLET      = "RedViolet"; //$NON-NLS-1$
+	public final static String N_FUSHIA         = "Fuchsia"; //$NON-NLS-1$
+	public final static String N_LAVENDER       = "Lavender"; //$NON-NLS-1$
+	public final static String N_THISTLE        = "Thistle"; //$NON-NLS-1$
+	public final static String N_ORCHID         = "Orchid"; //$NON-NLS-1$
+	public final static String N_DARKORCHID     = "DarkOrchid"; //$NON-NLS-1$
+	public final static String N_PURPLE         = "Purple"; //$NON-NLS-1$
+	public final static String N_PLUM           = "Plum"; //$NON-NLS-1$
+	public final static String N_VIOLET         = "Violet"; //$NON-NLS-1$
+	public final static String N_ROYALPURPLE    = "RoyalPurple"; //$NON-NLS-1$
+	public final static String N_BLUEVIOLET     = "BlueViolet"; //$NON-NLS-1$
+	public final static String N_PERIWINKLE     = "Periwinkle"; //$NON-NLS-1$
+	public final static String N_CADETBLUE      = "CadetBlue"; //$NON-NLS-1$
+	public final static String N_CORNFLOWERBLUE = "CornflowerBlue"; //$NON-NLS-1$
+	public final static String N_MIDNIGHTBLUE   = "MidnightBlue"; //$NON-NLS-1$
+	public final static String N_NAVYBLUE       = "NavyBlue"; //$NON-NLS-1$
+	public final static String N_ROYALBLUE      = "RoyalBlue"; //$NON-NLS-1$
+	public final static String N_BLUE           = "Blue"; //$NON-NLS-1$
+	public final static String N_CERULEAN       = "Cerulean"; //$NON-NLS-1$
+	public final static String N_CYAN           = "Cyan"; //$NON-NLS-1$
+	public final static String N_PROCESSBLUE    = "ProcessBlue"; //$NON-NLS-1$
+	public final static String N_SKYBLUE        = "SkyBlue"; //$NON-NLS-1$
+	public final static String N_TURQUOISE      = "Turquoise"; //$NON-NLS-1$
+	public final static String N_TEALBLUE       = "TealBlue"; //$NON-NLS-1$
+	public final static String N_AQUAMARINE     = "Aquamarine"; //$NON-NLS-1$
+	public final static String N_BLUEGREEN      = "BlueGreen"; //$NON-NLS-1$
+	public final static String N_EMERALD        = "Emerald"; //$NON-NLS-1$
+	public final static String N_JUNGLEGREEN    = "JungleGreen"; //$NON-NLS-1$
+	public final static String N_SEAGREEN       = "SeaGreen"; //$NON-NLS-1$
+	public final static String N_GREEN          = "Green"; //$NON-NLS-1$
+	public final static String N_FORESTGREEN    = "ForestGreen"; //$NON-NLS-1$
+	public final static String N_PINEGREEN      = "PineGreen"; //$NON-NLS-1$
+	public final static String N_LIMEGREEN      = "LimeGreen"; //$NON-NLS-1$
+	public final static String N_YELLOWGREEN    = "YellowGreen"; //$NON-NLS-1$
+	public final static String N_SPRINGGREEN    = "SpringGreen"; //$NON-NLS-1$
+	public final static String N_OLIVEGREEN     = "OliveGreen"; //$NON-NLS-1$
+	public final static String N_RAWSIENNA      = "RawSienna"; //$NON-NLS-1$
+	public final static String N_SEPIA          = "Sepia"; //$NON-NLS-1$
+	public final static String N_BROWN          = "Brown"; //$NON-NLS-1$
+	public final static String N_TAN            = "Tan"; //$NON-NLS-1$
+	public final static String N_GRAY           = "Gray"; //$NON-NLS-1$
+	public final static String N_BLACK          = "Black"; //$NON-NLS-1$
+	public final static String N_WHITE          = "White"; //$NON-NLS-1$
+	
+	public final static String N_CYAN_2         = "cyan"; //$NON-NLS-1$
+	public final static String N_GRAY_2         = "gray"; //$NON-NLS-1$
+	public final static String N_BLACK_2        = "black"; //$NON-NLS-1$
+	public final static String N_WHITE_2        = "white"; //$NON-NLS-1$
+	public final static String N_YELLOW_2       = "yellow"; //$NON-NLS-1$
+	public final static String N_VIOLET_2       = "violet"; //$NON-NLS-1$
+	public final static String N_BLUE_2         = "blue"; //$NON-NLS-1$
+	public final static String N_PURPLE_2       = "purple"; //$NON-NLS-1$
+	public final static String N_RED_2          = "red"; //$NON-NLS-1$
+	public final static String N_ORANGE_2       = "orange"; //$NON-NLS-1$
+	public final static String N_GREEN_2        = "green"; //$NON-NLS-1$
+	public final static String N_MAGENTA_2      = "magenta"; //$NON-NLS-1$
+	public final static String N_BROWN_2        = "brown"; //$NON-NLS-1$
+	public final static String N_DARK_GRAY      = "darkgray"; //$NON-NLS-1$
+	public final static String N_LIGHT_GRAY     = "lightgray"; //$NON-NLS-1$
+	public final static String N_PINK     		= "pink"; //$NON-NLS-1$
+	public final static String N_OLIVE			= "olive"; //$NON-NLS-1$
+	
+	/** The colours defined by the user. */
+	protected final static Vector<Color> usercolors 	 = new Vector<Color>();
+	
+	/** The name of the colours defined by the user. */
+	protected final static Vector<String> userNamecolors = new Vector<String>();
+	
+	protected final static Hashtable<String, Color> colourHT = new Hashtable<String, Color>();
+	
+	protected final static Hashtable<Color, String> nameColourHT = new Hashtable<Color, String>();
+	
+	
+	
+	/**
+	 * Creates the hashTable {@link #nameColourHT}. 
+	 * @since 1.9.2
+	 */
+	private static void createColourHashTable()
+	{
+		colourHT.clear();
+		colourHT.put(N_OLIVE, OLIVE);
+		colourHT.put(N_CYAN_2, CYAN);
+		colourHT.put(N_GRAY_2, GRAY);
+		colourHT.put(N_BLACK_2, BLACK);
+		colourHT.put(N_WHITE_2, WHITE);
+		colourHT.put(N_YELLOW_2, YELLOW);
+		colourHT.put(N_VIOLET_2, VIOLET);
+		colourHT.put(N_BLUE_2, BLUE);
+		colourHT.put(N_PURPLE_2, PURPLE);
+		colourHT.put(N_RED_2, RED);
+		colourHT.put(N_ORANGE_2, ORANGE);
+		colourHT.put(N_GREEN_2, GREEN);
+		colourHT.put(N_MAGENTA_2, MAGENTA);
+		colourHT.put(N_BROWN_2, BROWN);
+		colourHT.put(N_PINK, PINK);
+		colourHT.put(N_GRAY, GRAY);
+		colourHT.put(N_BLACK, BLACK);
+		colourHT.put(N_WHITE, WHITE);
+		colourHT.put(N_RED, RED);
+		colourHT.put(N_GREEN, GREEN);
+		colourHT.put(N_BLUE, BLUE);
+		colourHT.put(N_VIOLET, VIOLET);
+		colourHT.put(N_ORANGE, ORANGE);
+		colourHT.put(N_PURPLE, PURPLE);
+		colourHT.put(N_DARK_GRAY, Color.DARK_GRAY);
+		colourHT.put(N_LIGHT_GRAY, Color.LIGHT_GRAY);
+		colourHT.put(N_PINK, PINK);
+		colourHT.put(N_GREEN_YELLOW, GREEN_YELLOW);
+		colourHT.put(N_YELLOW, YELLOW);
+		colourHT.put(N_GOLDEN_ROD, GOLDEN_ROD);
+		colourHT.put(N_DANDELION, DANDELION);
+		colourHT.put(N_APRICOT, APRICOT);
+		colourHT.put(N_PEACH, PEACH);
+		colourHT.put(N_MELON, MELON);
+		colourHT.put(N_YELLOW_ORANGE, YELLOW_ORANGE);
+		colourHT.put(N_BURNT_ORANGE, BURNT_ORANGE);
+		colourHT.put(N_BITTERSWEET, BITTERSWEET);
+		colourHT.put(N_RED_ORANGE, RED_ORANGE);
+		colourHT.put(N_MAHOGANY, MAHOGANY);
+		colourHT.put(N_MAROON, MAROON);
+		colourHT.put(N_BRICKRED, BRICKRED);
+		colourHT.put(N_ORANGERED, ORANGERED);
+		colourHT.put(N_RUBINERED, RUBINERED);
+		colourHT.put(N_WILDSTRAWBERRY, WILDSTRAWBERRY);
+		colourHT.put(N_SALMON, SALMON);
+		colourHT.put(N_CARNATIONPINK, CARNATIONPINK);
+		colourHT.put(N_MAGENTA, MAGENTA);
+		colourHT.put(N_VIOLETRED, VIOLETRED);
+		colourHT.put(N_RHODAMINE, RHODAMINE);
+		colourHT.put(N_MULBERRY, MULBERRY);
+		colourHT.put(N_REDVIOLET, REDVIOLET);
+		colourHT.put(N_FUSHIA, FUSHIA);
+		colourHT.put(N_LAVENDER, LAVENDER);
+		colourHT.put(N_THISTLE, THISTLE);
+		colourHT.put(N_ORCHID, ORCHID);
+		colourHT.put(N_DARKORCHID, DARKORCHID);
+		colourHT.put(N_PLUM, PLUM);
+		colourHT.put(N_ROYALPURPLE, ROYALPURPLE);
+		colourHT.put(N_BLUEVIOLET, BLUEVIOLET);
+		colourHT.put(N_PERIWINKLE, PERIWINKLE);
+		colourHT.put(N_CADETBLUE, CADETBLUE);
+		colourHT.put(N_CORNFLOWERBLUE, CORNFLOWERBLUE);
+		colourHT.put(N_MIDNIGHTBLUE, MIDNIGHTBLUE);
+		colourHT.put(N_NAVYBLUE, NAVYBLUE);
+		colourHT.put(N_ROYALBLUE, ROYALBLUE);
+		colourHT.put(N_CERULEAN, CERULEAN);
+		colourHT.put(N_CYAN, CYAN);
+		colourHT.put(N_PROCESSBLUE, PROCESSBLUE);
+		colourHT.put(N_SKYBLUE, SKYBLUE);
+		colourHT.put(N_TURQUOISE, TURQUOISE);
+		colourHT.put(N_TEALBLUE, TEALBLUE);
+		colourHT.put(N_AQUAMARINE, AQUAMARINE);
+		colourHT.put(N_BLUEGREEN, BLUEGREEN);
+		colourHT.put(N_EMERALD, EMERALD);
+		colourHT.put(N_JUNGLEGREEN, JUNGLEGREEN);
+		colourHT.put(N_SEAGREEN, SEAGREEN);
+		colourHT.put(N_FORESTGREEN, FORESTGREEN);
+		colourHT.put(N_PINEGREEN, PINEGREEN);
+		colourHT.put(N_LIMEGREEN, LIMEGREEN);
+		colourHT.put(N_YELLOWGREEN, YELLOWGREEN);
+		colourHT.put(N_SPRINGGREEN, SPRINGGREEN);
+		colourHT.put(N_OLIVEGREEN, OLIVEGREEN);
+		colourHT.put(N_RAWSIENNA, RAWSIENNA);
+		colourHT.put(N_SEPIA, SEPIA);
+		colourHT.put(N_BROWN, BROWN);
+		colourHT.put(N_TAN, TAN);
+	}
+	
+	
+	
+	/**
+	 * Creates the hashTable {@link #colourHT}.
+	 * @since 1.9.2
+	 */
+	private static void createNameColourHashTable()
+	{
+		nameColourHT.clear();
+		nameColourHT.put(OLIVE, N_OLIVE);
+		nameColourHT.put(GRAY, N_GRAY_2);
+		nameColourHT.put(BLACK, N_BLACK_2);
+		nameColourHT.put(WHITE, N_WHITE_2);
+		nameColourHT.put(RED, N_RED_2);
+		nameColourHT.put(GREEN, N_GREEN_2);
+		nameColourHT.put(BLUE, N_BLUE_2);
+		nameColourHT.put(VIOLET, N_VIOLET_2);
+		nameColourHT.put(ORANGE, N_ORANGE_2);
+		nameColourHT.put(PURPLE, N_PURPLE_2);
+		nameColourHT.put(Color.DARK_GRAY, N_DARK_GRAY);
+		nameColourHT.put(Color.LIGHT_GRAY, N_LIGHT_GRAY);
+		nameColourHT.put(PINK, N_PINK);
+		nameColourHT.put(GREEN_YELLOW, N_GREEN_YELLOW);
+		nameColourHT.put(YELLOW, N_YELLOW_2);
+		nameColourHT.put(GOLDEN_ROD, N_GOLDEN_ROD);
+		nameColourHT.put(DANDELION, N_DANDELION);
+		nameColourHT.put(APRICOT, N_APRICOT);
+		nameColourHT.put(PEACH, N_PEACH);
+		nameColourHT.put(MELON, N_MELON);
+		nameColourHT.put(YELLOW_ORANGE, N_YELLOW_ORANGE);
+		nameColourHT.put(BURNT_ORANGE, N_BURNT_ORANGE);
+		nameColourHT.put(BITTERSWEET, N_BITTERSWEET);
+		nameColourHT.put(RED_ORANGE, N_RED_ORANGE);
+		nameColourHT.put(MAHOGANY, N_MAHOGANY);
+		nameColourHT.put(MAROON, N_MAROON);
+		nameColourHT.put(BRICKRED, N_BRICKRED);
+		nameColourHT.put(ORANGERED, N_ORANGERED);
+		nameColourHT.put(RUBINERED, N_RUBINERED);
+		nameColourHT.put(WILDSTRAWBERRY, N_WILDSTRAWBERRY);
+		nameColourHT.put(SALMON, N_SALMON);
+		nameColourHT.put(CARNATIONPINK, N_CARNATIONPINK);
+		nameColourHT.put(MAGENTA, N_MAGENTA_2);
+		nameColourHT.put(VIOLETRED, N_VIOLETRED);
+		nameColourHT.put(RHODAMINE, N_RHODAMINE);
+		nameColourHT.put(MULBERRY, N_MULBERRY);
+		nameColourHT.put(REDVIOLET, N_REDVIOLET);
+		nameColourHT.put(FUSHIA, N_FUSHIA);
+		nameColourHT.put(LAVENDER, N_LAVENDER);
+		nameColourHT.put(THISTLE, N_THISTLE);
+		nameColourHT.put(ORCHID, N_ORCHID);
+		nameColourHT.put(DARKORCHID, N_DARKORCHID);
+		nameColourHT.put(PLUM, N_PLUM);
+		nameColourHT.put(ROYALPURPLE, N_ROYALPURPLE);
+		nameColourHT.put(BLUEVIOLET, N_BLUEVIOLET);
+		nameColourHT.put(PERIWINKLE, N_PERIWINKLE);
+		nameColourHT.put(CADETBLUE, N_CADETBLUE);
+		nameColourHT.put(CORNFLOWERBLUE ,N_CORNFLOWERBLUE);
+		nameColourHT.put(MIDNIGHTBLUE, N_MIDNIGHTBLUE);
+		nameColourHT.put(NAVYBLUE, N_NAVYBLUE);
+		nameColourHT.put(ROYALBLUE, N_ROYALBLUE);
+		nameColourHT.put(CERULEAN, N_CERULEAN);
+		nameColourHT.put(CYAN, N_CYAN_2);
+		nameColourHT.put(PROCESSBLUE, N_PROCESSBLUE);
+		nameColourHT.put(SKYBLUE, N_SKYBLUE);
+		nameColourHT.put(TURQUOISE, N_TURQUOISE);
+		nameColourHT.put(TEALBLUE, N_TEALBLUE);
+		nameColourHT.put(AQUAMARINE, N_AQUAMARINE);
+		nameColourHT.put(BLUEGREEN, N_BLUEGREEN);
+		nameColourHT.put(EMERALD, N_EMERALD);
+		nameColourHT.put(JUNGLEGREEN, N_JUNGLEGREEN);
+		nameColourHT.put(SEAGREEN, N_SEAGREEN);
+		nameColourHT.put(FORESTGREEN, N_FORESTGREEN);
+		nameColourHT.put(PINEGREEN, N_PINEGREEN);
+		nameColourHT.put(LIMEGREEN, N_LIMEGREEN);
+		nameColourHT.put(YELLOWGREEN, N_YELLOWGREEN);
+		nameColourHT.put(SPRINGGREEN, N_SPRINGGREEN);
+		nameColourHT.put(OLIVEGREEN, N_OLIVEGREEN);
+		nameColourHT.put(RAWSIENNA, N_RAWSIENNA);
+		nameColourHT.put(SEPIA, N_SEPIA);
+		nameColourHT.put(BROWN, N_BROWN_2);
+		nameColourHT.put(TAN, N_TAN);
+	}
+	
+	
+	static
+	{
+		createColourHashTable();
+		createNameColourHashTable();
+	}
+	
+	
+	/**
+	 * Allows to get the name of  a given colour.
+	 * @param c The colour that we want the name .
+	 * @return The name of the colour : null if it can not be found.
+	 */
+	public static String getColourName(Color c)
+	{
+		if(c==null)
+			return null;
+		
+		String name = nameColourHT.get(c);
+		
+		if(name!=null)
+			return name;
+		
+		boolean found = false;
+		int i=0, size = usercolors.size();
+		
+		while(!found && i<size)
+			found = c.equals(usercolors.elementAt(i++));
+		
+		if(found) return userNamecolors.elementAt(i-1);
+		
+		return null;
+	}
+
+	
+	
+	
+	/**
+	 * Allows to get a colour with its name. 
+	 * @param name The name of the wanted colour.
+	 * @return The colour, null if the name is invalid of do not correspond at any colour.
+	 */
+	public static Color getColour(String name)
+	{
+		if(name==null || name.length()==0) return null;
+		
+		Color c = colourHT.get(name);
+		
+		if(c!=null)
+			return c;
+		
+		boolean found = false;
+		int i=0, size = usercolors.size();
+		
+		while(!found && i<size)
+			found = name.equals(userNamecolors.elementAt(i++));
+		
+		if(found) return usercolors.elementAt(i-1);
+		
+		return null;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to add a colour defined by the user.
+	 * @param c The colour to add.
+	 * @param name The name of this colour.
+	 */
+	public static void addUserColour(Color c, String name)
+	{
+		boolean exist = false;
+		int i=0, size = userNamecolors.size();
+		
+		while(!exist && i<size)
+		{
+			exist = name.equals(userNamecolors.elementAt(i));
+			i++;
+		}
+		
+		if(exist)
+		{
+			userNamecolors.removeElementAt(i-1);
+			usercolors.removeElementAt(i-1);
+		}
+		usercolors.add(c);
+		userNamecolors.add(name);
+	}
+
+	
+	
+	
+	/**
+	 * Allows to search colours in a code.
+	 * @param codeToAnalyse The code to analyse.
+	 * @return The code of the definition of all the found colours.
+	 */
+	public static String getUserColoursCode(String codeToAnalyse)
+	{
+		String code = "";//$NON-NLS-1$
+		int i=0, size = usercolors.size();
+		
+		if(codeToAnalyse!=null)
+			while(i<usercolors.size())
+				if(!codeToAnalyse.contains(userNamecolors.elementAt(i)))
+				{
+					userNamecolors.remove(i);
+					usercolors.remove(i);
+				}
+				else
+					code+=DviPsColors.getUsercolourCode(i++);
+		else
+			for(i=0; i<size; i++)
+				code+=DviPsColors.getUsercolourCode(i);
+			
+		return code;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the PSTricks code of a given colour.
+	 * @param indice The position of the colour in the vector of the user's colour.
+	 * @return The code of the colour.
+	 */
+	public static String getUsercolourCode(int indice)
+	{
+		if(indice<0 || indice>usercolors.size()) return null;
+		
+		Color c = usercolors.elementAt(indice);
+		return "\\definecolor{"+userNamecolors.elementAt(indice)+"}{rgb}{" //$NON-NLS-1$ //$NON-NLS-2$
+				+ c.getRed()/MAX + ',' + c.getGreen()/MAX +',' + c.getBlue()/MAX + "}\n"; //$NON-NLS-1$
+	}
+	
+	
+	
+	
+	/**
+	 * Converts a CMYK colour to a RGB one.
+	 * @param c The c level between 0 and 1.
+	 * @param m The m level between 0 and 1.
+	 * @param y The y level between 0 and 1.
+	 * @param k The k level between 0 and 1.
+	 * @return The corresponding RBG colour.
+	 * @since 2.0.0
+	 */
+	public static Color CMYK2RGB(double c, double m, double y, double k)
+	{
+		if(c < 0 || c > 1)
+			throw new IllegalArgumentException(String.valueOf(c));
+		
+		if(m < 0 || m > 1)
+			throw new IllegalArgumentException(String.valueOf(m));
+		
+		if(y < 0 || y > 1)
+			throw new IllegalArgumentException(String.valueOf(y));
+		
+		if(k < 0 || k > 1)
+			throw new IllegalArgumentException(String.valueOf(k));
+		
+		return new Color((float)(1 - (c * (1 - k) + k)), (float)(1-(m*(1-k)+k)), (float)(1-(y*(1-k)+k)));
+	}
+
+
+
+
+	/**
+	 * Converts a gray colour in an RBG one.
+	 * @param g The gray level between 0 an 1.
+	 * @return The corresponding RBG colour. 
+	 * @since 2.0.0
+	 */
+    public static Color gray2RBG(double g)
+	{
+		if(g < 0 || g > 1)
+			throw new IllegalArgumentException(String.valueOf(g));
+		
+		return new Color((float)g, (float)g, (float)g);
+	} 
+}
diff --git a/current/latexDraw/psTricks/PSTricksConstants.java b/current/latexDraw/psTricks/PSTricksConstants.java
new file mode 100644
index 0000000..8a0b69b
--- /dev/null
+++ b/current/latexDraw/psTricks/PSTricksConstants.java
@@ -0,0 +1,595 @@
+package latexDraw.psTricks;
+
+import java.awt.Color;
+import java.awt.geom.Point2D;
+
+
+
+/** 
+ * This class contains several constants of pstricks<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 06/06/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class PSTricksConstants
+{
+    /** The size in centimetres of an inch */
+    public static final double INCH_VAL_CM = 2.54;
+    
+    /** A inch is 72 postscript points */
+    public static final double INCH_VAL_PT = 72;
+    
+    /** A point is INCH_VAL_PT/INCH_VAL_CM postscript points */
+    public static final double CM_VAL_PT = INCH_VAL_PT/INCH_VAL_CM;
+    
+    /** For psaxes, the Ox value by default. */
+	public static final int DEFAULT_OX = 0;
+	
+	/** For psaxes, the Oy value by default. */
+	public static final int DEFAULT_OY = 0;
+	
+	/** For psaxes, the dx value by default. */
+	public static final int DEFAULT_DX = 1;
+	
+	/** For psaxes, the dy value by default. */
+	public static final int DEFAULT_DY = 1;
+	
+	/** The distance between each X label in cm (Dx). */
+	public static final double DEFAULT_DIST_X_LABEL = 0./CM_VAL_PT;
+	
+	/** The distance between each Y label in cm (Dy). */
+	public static final double DEFAULT_DIST_Y_LABEL = 0./CM_VAL_PT;
+	
+	/** For psaxes, the showorigin value by default. */
+	public static final boolean DEFAULT_SHOW_ORIGIN = true;
+	
+	/** The default size of the ticks in cm. */
+	public static final double DEFAULT_TICKS_SIZE = 3./CM_VAL_PT;
+	
+	/** The text to display when all the labels must be displayed. */
+	public static final String TOKEN_LABELS_DISPLAYED_ALL 	= "all"; //$NON-NLS-1$
+	
+	/** The text to display when only the X labels must be displayed. */
+	public static final String TOKEN_LABELS_DISPLAYED_X 	= "x"; //$NON-NLS-1$
+	
+	/** The text to display when only the Y labels must be displayed. */
+	public static final String TOKEN_LABELS_DISPLAYED_Y 	= "y";//$NON-NLS-1$
+	
+	/** The text to display when no labels must be displayed. */
+	public static final String TOKEN_LABELS_DISPLAYED_NON 	= "none";//$NON-NLS-1$
+	
+	/** The token when the ticks must be fully shown. */
+	public static final String TOKEN_TICKS_STYLE_FULL 	= "full";//$NON-NLS-1$
+	
+	/** The token when the ticks only the top of them must be shown. */
+	public static final String TOKEN_TICKS_STYLE_TOP	= "top";//$NON-NLS-1$
+	
+	/** The token when the ticks only the bottom of them must be shown. */
+	public static final String TOKEN_TICKS_STYLE_BOTTOM = "bottom";//$NON-NLS-1$
+	
+	/** The text to display when the axes have the axes shape. */
+	public static final String TOKEN_AXES_STYLE_AXES 	= "axes";//$NON-NLS-1$
+	
+	/** The text to display when the axes have the frame shape. */
+	public static final String TOKEN_AXES_STYLE_FRAME 	= "frame";//$NON-NLS-1$
+	
+	/** The text to display when the axes must not be shown. */
+	public static final String TOKEN_AXES_STYLE_NONE 	= "none";//$NON-NLS-1$
+	
+	public static final String DEFAULT_AXES_STYLE = TOKEN_AXES_STYLE_AXES;
+	
+	public static final String DEFAULT_TICKS_STYLE = TOKEN_TICKS_STYLE_FULL;
+	
+	public static final String DEFAULT_LABELS_DISPLAYED = TOKEN_LABELS_DISPLAYED_ALL;
+	
+	public static final String DEFAULT_TICKS_DISPLAYED = TOKEN_LABELS_DISPLAYED_ALL;
+	
+	/** The first colour of a gradient by default. */
+	public static final Color DEFAULT_GRADIENT_START_COLOR = new Color(0, (int)(.1*255), (int)(.95*255));
+	
+	/** The second color of a gradient by default. */
+	public static final Color DEFAULT_GRADIENT_END_COLOR   = new Color(0, 255, 255);
+	
+	/** The position of the midpoint, as a fraction of the distance from
+		top to bottom. Should be between 0 and 1. */
+	public static final double DEFAULT_GRADIENT_MID_POINT = .9;
+	
+	/** The number of lines. More lines means finer gradation. */
+	public static final int DEFAULT_GRADIENT_LINES = 500;
+	
+	/** The angle of the gradient in degree. */
+	public static final double DEFAULT_GRADIENT_ANGLE = 0;
+	
+	/** The value by default of a missing coordinate : (5,) */
+	public static final int DEFAULT_VALUE_MISSING_COORDINATE = 1;
+	
+	public static final String TOKEN_PUT_ANGLE_0   = "U";//$NON-NLS-1$
+	public static final String TOKEN_PUT_ANGLE_90  = "L";//$NON-NLS-1$
+	public static final String TOKEN_PUT_ANGLE_180 = "D";//$NON-NLS-1$
+	public static final String TOKEN_PUT_ANGLE_270 = "R";//$NON-NLS-1$
+	public static final String TOKEN_PUT_ANGLE_0_STAR	= "N";//$NON-NLS-1$
+	public static final String TOKEN_PUT_ANGLE_90_STAR	= "W";//$NON-NLS-1$
+	public static final String TOKEN_PUT_ANGLE_180_STAR	= "S";//$NON-NLS-1$
+	public static final String TOKEN_PUT_ANGLE_270_STAR	= "E";//$NON-NLS-1$
+	
+	public static final char TOKEN_RPUT_TOP 	= 't';
+	public static final char TOKEN_RPUT_BOTTOM 	= 'b';
+	public static final char TOKEN_RPUT_BASE 	= 'B';
+	public static final char TOKEN_RPUT_LEFT 	= 'l';
+	public static final char TOKEN_RPUT_RIGHT 	= 'r';
+	
+	public static final char TOKEN_UPUT_DOWN 	= 'd';
+	public static final char TOKEN_UPUT_UP	 	= 'u';
+	public static final char TOKEN_UPUT_RIGHT 	= 'r';
+	public static final char TOKEN_UPUT_LEFT 	= 'l';
+	
+	public static final double DEFAULT_UPUT_DOWN_ANGLE 	= 270;
+	public static final double DEFAULT_UPUT_UP_ANGLE 	=  90;
+	public static final double DEFAULT_UPUT_RIGHT_ANGLE =   0;
+	public static final double DEFAULT_UPUT_LEFT_ANGLE 	= 180;
+	public static final double DEFAULT_UPUT_DOWN_LEFT_ANGLE 	= 225;
+	public static final double DEFAULT_UPUT_UP_LEFT_ANGLE 		= 135;
+	public static final double DEFAULT_UPUT_DOWN_RIGHT_ANGLE 	= 315;
+	public static final double DEFAULT_UPUT_UP_RIGHT_ANGLE		=  45;
+	
+	public static final String COMMAND_TEXT_LARGE = "\\large ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_TINY     = "\\tiny ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_SCRIPT   = "\\scriptsize ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_FOOTNOTE = "\\footnotesize ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_SMALL  = "\\small ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_NORMAL = "\\normalsize ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_LARGE1 = "\\large ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_LARGE2 = "\\Large ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_LARGE3 =  "\\LARGE ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_HUGE1 =  "\\huge ";//$NON-NLS-1$
+	
+	public static final String COMMAND_TEXT_HUGE2 =  "\\Huge ";//$NON-NLS-1$
+	
+	
+	/** gangle is the angle of rotation of a diamond and a triangle
+	 * around their centre. */
+	public static final double DEFAULT_GANGLE = 0;
+	
+	public static final String TOKEN_COLOR_TYPE_NAMED = "named"; //$NON-NLS-1$
+	
+	public static final String TOKEN_COLOR_TYPE_CMYK = "cmyk"; //$NON-NLS-1$
+	
+	public static final String TOKEN_COLOR_TYPE_HSB = "hsb"; //$NON-NLS-1$
+	
+	public static final String TOKEN_COLOR_TYPE_GRAY = "gray"; //$NON-NLS-1$
+	
+	public static final String TOKEN_COLOR_TYPE_RGB = "rgb"; //$NON-NLS-1$
+	
+	/** The token of the parameters : fillstyle = none */
+	public static final String TOKEN_FILL_NONE = "none";//$NON-NLS-1$
+	
+	/** The token of the parameters : fillstyle = gradient */
+	public static final String TOKEN_FILL_GRADIENT = "gradient";//$NON-NLS-1$
+	
+	/** The token of the parameters : fillstyle = solid */
+	public static final String TOKEN_FILL_SOLID = "solid";//$NON-NLS-1$
+	
+	/** The token of the parameters : fillstyle = vlines */
+	public static final String TOKEN_FILL_VLINES = "vlines";//$NON-NLS-1$
+	
+	/** The token of the parameters : fillstyle = vlines* */
+	public static final String TOKEN_FILL_VLINES_F = "vlines*";//$NON-NLS-1$
+	
+	/** The token of the parameters : fillstyle = hlines */
+	public static final String TOKEN_FILL_HLINES = "hlines";//$NON-NLS-1$
+	
+	/** The token of the parameters : fillstyle = hlines* */
+	public static final String TOKEN_FILL_HLINES_F = "hlines*";//$NON-NLS-1$
+	
+	/** The token of the parameters : fillstyle = crosshatch */
+	public static final String TOKEN_FILL_CROSSHATCH = "crosshatch";//$NON-NLS-1$
+	
+	/** The token of the parameters : fillstyle = crosshatch* */
+	public static final String TOKEN_FILL_CROSSHATCH_F = "crosshatch*";//$NON-NLS-1$
+	
+	/** The token of the parameters : cornersize = relative */
+	public static final String TOKEN_RELATIVE = "relative";//$NON-NLS-1$
+	
+	/** The token of the parameters : cornersize = absolute */
+	public static final String TOKEN_ABSOLUTE = "absolute";//$NON-NLS-1$
+	
+	/** The token of the postscript point unit of length */
+	public static final String TOKEN_PS_PT = "pt";//$NON-NLS-1$
+	
+	/** The token of the unit of length : centimeter */
+	public static final String TOKEN_CM = "cm";//$NON-NLS-1$
+	
+	/** The token of the unit of length : millimeter */
+	public static final String TOKEN_MM = "mm";//$NON-NLS-1$
+	
+	/** The token of the unit of length : inch */
+	public static final String TOKEN_INCH = "in";//$NON-NLS-1$
+	
+	/** The style which draw a o and aplus */
+	public static final String OPLUS_STYLE      = "oplus"; //$NON-NLS-1$
+	
+	/** The style which draw a o and a cross */
+	public static final String OTIMES_STYLE     = "otimes"; //$NON-NLS-1$
+	
+	/** The style which draw a plus */
+	public static final String PLUS_STYLE       = "+"; //$NON-NLS-1$
+	
+	/** The style which draw an asterisk */
+	public static final String ASTERISK_STYLE   = "asterisk"; //$NON-NLS-1$
+	
+	/** The style which draw a triangle */
+	public static final String TRIANGLE_STYLE   = "triangle"; //$NON-NLS-1$
+	
+	/** The style which draw a square */
+	public static final String SQUARE_STYLE     = "square"; //$NON-NLS-1$
+	
+	/** The style which draw a diamond */
+	public static final String DIAMOND_STYLE    = "diamond"; //$NON-NLS-1$
+	
+	/** The style which draw a pentagon */
+	public static final String PENTAGON_STYLE   = "pentagon"; //$NON-NLS-1$
+	
+	/** The style which draw a o */
+	public static final String O_STYLE          = "o"; //$NON-NLS-1$
+	
+	/** The style which draw a dot */
+	public static final String DOT_STYLE        = "dot"; //$NON-NLS-1$
+	
+	/** The style which draw a cross */
+	public static final String X_STYLE          = "x"; //$NON-NLS-1$
+	
+	/** The style which draw a vertical bar */
+	public static final String BAR_STYLE        = "|"; //$NON-NLS-1$
+	
+	/** The style which draw a full triangle */
+	public static final String FTRIANGLE_STYLE  = "triangle*"; //$NON-NLS-1$
+	
+	/** The style which draw a full square */
+	public static final String FSQUARE_STYLE    = "square*"; //$NON-NLS-1$
+	
+	/** The style which draw a full diamond */
+	public static final String FDIAMOND_STYLE   = "diamond*"; //$NON-NLS-1$
+	
+	/** The style which draw a full pentagon */
+	public static final String FPENTAGON_STYLE  = "pentagon*"; //$NON-NLS-1$
+	
+	/** Is the special coor activated by default */
+	public static final boolean DEFAULT_SPECIAL_COOR = false;
+	
+	/** Is the unit of length is rad by default */
+	public static final boolean DEFAULT_ON_RADIANS = false;
+	
+	/** The angle in degrees by default */
+	public static final double DEFAULT_DEGREES = 360;
+	
+	/** The width of the line by default (in cm) */
+	public static final double DEFAULT_LINE_WIDTH = 0.8/CM_VAL_PT;
+	
+	/** Is points are displayed by default */
+	public static final boolean DEFAULT_SHOW_POINTS = false;
+	
+	/** The radius of arcs drawn at the corner of lines by default (in pt) **/
+	public static final double DEFAULT_LINE_ARC = 0;
+	
+	/** The radius of rounded corners by default (between 0 and 1)<br>
+	 *  The radius is compute with :<br>
+	 *  radius = min(width, height)*1.5*frameArc **/
+	public static final double DEFAULT_FRAME_ARC = 0;
+	
+	/** Is the corner size relative by default (if not, it's absolute)<br>
+	 * If cornersize is relative, then the framearc parameter determines
+	 * the radius of the rounded corners for \psframe. If
+ 	 * cornersize is absolute, then the linearc parameter determines the
+	 * radius of the rounded corners for \psframe.*/
+	public static final boolean DEFAULT_CORNER_SIZE_RELATIVE = true;
+	
+	/** The value of arcsepA by default (in pt)*/
+	public static final double DEFAULT_ARC_SEP_A = 0;
+	
+	/** The value of arcsepB by default (in pt)*/
+	public static final double DEFAULT_ARC_SEP_B = 0;
+	
+	public static final double DEFAULT_ARC_SEP = 0;
+	
+	/** The curvature parameters control the curvature of a parabola */
+	public static final double DEFAULT_CURVATURE_NUM1 = 1;
+	
+	/** The curvature parameters control the curvature of a parabola */
+	public static final double DEFAULT_CRUVATURE_NUM2 = 0.1;
+	
+	/** The curvature parameters control the curvature of a parabola */
+	public static final double DEFAULT_CRUVATURE_NUM3 = 0;
+	
+	/** The type of the dot by default */
+	public static final String DEFAULT_DOT_STYLE = DOT_STYLE;
+	
+	/** The scale of the dot by default */
+	public static final double DEFAULT_DOT_SCALE1 = 1;
+	
+	/** The scale of the dot by default */
+	public static final double DEFAULT_DOT_SCALE2 = 1;
+	
+	/** The angle of the dot by default */
+	public static final double DEFAULT_DOT_ANGLE = 0;
+	
+	/** The width of the main lines of the grid by default in cm */
+	public static final double DEFAULT_GRID_WIDTH = 0.8/CM_VAL_PT;
+	
+	/** The size of the labels of a grid by default */
+	public static final double DEFAULT_GRID_LABEL = 10;
+	
+	/** The size of the sub-grid lines of a grid by default in cm */
+	public static final double DEFAULT_SUB_GRID_WIDTH = 0.4/CM_VAL_PT;
+	
+	/** The colour of the sub grid by default */
+	public static final Color DEFAULT_SUB_GRID_COLOR = Color.GRAY;
+	
+	/** The dimensions of the figure are with reference to the inner boundary. */
+	public static final String BORDERS_INSIDE = "outer"; //$NON-NLS-1$
+
+	/** The dimensions of the figure are with reference to the outter boundary. */
+	public static final String BORDERS_OUTSIDE = "inner"; //$NON-NLS-1$
+
+	/** The dimensions of the figure are with reference to the middle boundary. */
+	public static final String BORDERS_MIDDLE = "middle"; //$NON-NLS-1$
+	
+	/** The position of the borders by default */
+	public static final String DEFAULT_BORDERS_POS = BORDERS_INSIDE;
+	
+	/** The colour of the double boundary of the figure by default */
+	public static final Color DEFAULT_DOUBLE_COLOR = Color.WHITE;
+	
+	/** The colour of the hatching of the figure by default */
+	public static final Color DEFAULT_HATCHING_COLOR = Color.BLACK;
+	
+	/** The colour of the interior of the figure by default */
+	public static final Color DEFAULT_INTERIOR_COLOR = Color.WHITE;
+	
+	/** The colour of the borders of the figure by default */
+	public static final Color DEFAULT_LINE_COLOR = Color.BLACK;
+	
+	/** The colour of the labels by default */
+	public static final Color DEFAULT_LABELGRIDCOLOR = Color.BLACK;
+	
+	/** The colour of the grid by default */
+	public static final Color DEFAULT_GRIDCOLOR = Color.BLACK;
+	
+	/** The number of division in a sub-grid by default */
+	public static final int DEFAULT_SUBGRIDDIV = 5;
+	
+	/** The number of dots in a line of the grid by default */
+	public static final int DEFAULT_GRIDDOTS = 0;
+	
+	/** The number of dots in a line of the sub-grid by default */
+	public static final int DEFAULT_SUBGRIDDOTS = 0;
+	
+	/** The unit by default in cm */
+	public static final double DEFAULT_UNIT = 1;
+	
+	public static final int DEFAULT_PLOT_POINTS = 50;
+	
+	/** The origin of the coordinate system by default */
+	public static final Point2D.Double DEFAULT_ORIGIN = new Point2D.Double(0,0);
+	
+	/** Is the axes swept by default */
+	public static final boolean DEFAULT_SWAP_AXES = false;
+	
+	/** The line(s) of the figure are dotted */
+	public static final String LINE_DOTTED_STYLE = "dotted"; //$NON-NLS-1$
+
+	/** The line(s) of the figure are dashed */
+	public static final String LINE_DASHED_STYLE = "dashed"; //$NON-NLS-1$
+
+	/** The line(s) of the figure have no style */
+	public static final String LINE_NONE_STYLE = "none"; //$NON-NLS-1$
+	
+	/** The style of the lines by default */
+	public static final String DEFAULT_LINE_STYLE = LINE_NONE_STYLE;
+	
+	/** The black-white dash pattern for the dashed line style (in cm) */
+	public static final double DEFAULT_DASH_BLACK = 5./CM_VAL_PT;
+	
+	/** The black-white dash pattern for the dashed line style (in cm) */
+	public static final double DEFAULT_DASH_WHITE = 3./CM_VAL_PT;
+	
+	/** The distance between dots in the dotted line style (in cm) */
+	public static final double DEFAULT_DOT_STEP = 3./CM_VAL_PT;
+	
+	/** A positive value draws a border of width DEFAULT_BORDER. */
+	public static final double DEFAULT_BORDER = 0.;
+	
+	/** The colour by default of the border */
+	public static final Color DEFAULT_BORDER_COLOR = Color.WHITE;
+	
+	/** Is a double line by default */
+	public static final boolean DEFAULT_DOUBLE_LINE = false;
+	
+	/** The width of the separation between the double lines */
+	public static final double DEFAULT_DOUBLE_SEP = (1.25/(DEFAULT_LINE_WIDTH*CM_VAL_PT))/CM_VAL_PT;
+	
+	/** Is there shadow by default */
+	public static final boolean DEFAULT_SHADOW = false;
+	
+	/** The size of the shadow by default in cm */
+	public static final double DEFAULT_SHADOW_SIZE = 3/CM_VAL_PT;
+	
+	/** The angle of the shadow by default in degrees */
+	public static final double DEFAULT_SHADOW_ANGLE = -45;
+	
+	/** The colour of the shadow by default */
+	public static final Color DEFAULT_SHADOW_COLOR = Color.DARK_GRAY;
+	
+	/** The type of the fill by default */
+	public static final String DEFAULT_FILL_STYLE = "none"; //$NON-NLS-1$
+	
+	/** The colour of the filling */
+	public static final Color DEFAULT_FILL_COLOR = Color.WHITE;
+	
+	/** The width of the hatching in cm */
+	public static final double DEFAULT_HATCH_WIDTH = 0.8/CM_VAL_PT;
+	
+	/** The separation between the lines of the hatching in cm */
+	public static final double DEFAULT_HATCH_SEP = 4/CM_VAL_PT;
+	
+	/** The angle of the hatching by default */
+	public static final double DEFAULT_HATCH_ANGLE = 45;
+	
+	public static final String NONEARROW_STYLE = "-"; //$NON-NLS-1$
+	public static final String LARROW_STYLE    = "<"; //$NON-NLS-1$
+	public static final String RARROW_STYLE    = ">"; //$NON-NLS-1$
+	public static final String DLARROW_STYLE   = "<<";//$NON-NLS-1$
+	public static final String DRARROW_STYLE   = ">>";//$NON-NLS-1$
+	public static final String BAREND_STYLE   = "|*";//$NON-NLS-1$
+	public static final String BARIN_STYLE     = "|";//$NON-NLS-1$
+	public static final String LSBRACKET_STYLE = "[";//$NON-NLS-1$
+	public static final String RSBRACKET_STYLE = "]";//$NON-NLS-1$
+	public static final String LRBRACKET_STYLE = "(";//$NON-NLS-1$
+	public static final String RRBRACKET_STYLE = ")";//$NON-NLS-1$
+	public static final String CIRCLEEND_STYLE = "o";//$NON-NLS-1$
+	public static final String CIRCLEIN_STYLE  = "oo";//$NON-NLS-1$
+	public static final String DISKEND_STYLE   = "*";//$NON-NLS-1$
+	public static final String DISKIN_STYLE    = "**";//$NON-NLS-1$
+	public static final String ROUNDEND_STYLE  = "c";//$NON-NLS-1$
+	public static final String ROUNDIN_STYLE   = "cc";//$NON-NLS-1$
+	public static final String SQUAREEND_STYLE = "C";//$NON-NLS-1$
+	
+	/** The style of the arrow by default */
+	public static final String DEFAULT_ARROW_STYLE = NONEARROW_STYLE;
+
+	/** Width of arrowheads, in cm */
+	public static final double DEFAULT_ARROW_SIZE_DIM = 1.5/CM_VAL_PT;
+	
+	/** Width of arrowheads */
+	public static final double DEFAULT_ARROW_SIZE_NUM = 2.;	
+	
+	/** The length of the arrowhead by default*/
+	public static final double DEFAULT_ARROW_LENGTH = 1.4;
+	
+	/** The inset of the arrowhead by default */
+	public static final double DEFAULT_ARROW_INSET = 0.4;
+	
+	/** The width of a t-bar,in cm */
+	public static final double DEFAULT_ARROW_TBARSIZE_DIM = 2/CM_VAL_PT;
+	
+	/** The width of a t-bar */
+	public static final double DEFAULT_ARROW_TBARSIZE_NUM = 5;
+	
+	/** The height of a square bracket */
+	public static final double DEFAULT_ARROW_BRACKET_LGTH = 0.15;
+
+	/** The height of a round bracket */
+	public static final double DEFAULT_ARROW_RBRACKET_LGTH = 0.15;
+	
+	/** The diameter of a circle in cm */
+	public static final double DEFAULT_ARROW_DOTSIZE_DIM = 2/CM_VAL_PT;
+	
+	/** The diameter of a circle */
+	public static final double DEFAULT_ARROW_DOTSIZE_NUM = 2; 
+	
+	/** The scale of the arrowhead */
+	public static final double DEFAULT_ARROW_SCALE1 = 1;
+	
+	/** The scale of the arrowhead */
+	public static final double DEFAULT_ARROW_SCALE2 = 1;
+	
+	/** The value by default of labelsep of the command uput (in cm)*/
+	public static final double DEFAULT_LABEL_SEP = 5/CM_VAL_PT;
+	
+	/** Distance between each side of a frame and the enclosed box (in cm). */
+	public static final double DEFAULT_FRAME_SEP = 3/CM_VAL_PT;
+	
+	/** When true, the box that is produced is the size of the frame or
+		whatever that is drawn around the object. */
+	public static final boolean DEFAULT_BOX_SEP = true;
+	
+	
+	
+	/**
+	 * Allows to know if the new style is valid
+	 * @param newStyle The style which must be checked
+	 * @return True if the style is valid
+	 */
+	public static boolean isValidDotStyle(String newStyle)
+	{
+		if(newStyle==null)
+			return false;
+		
+		return newStyle.equals(OPLUS_STYLE) || newStyle.equals(DOT_STYLE)
+				|| newStyle.equals(OTIMES_STYLE) || newStyle.equals(O_STYLE)
+				|| newStyle.equals(X_STYLE)
+				|| newStyle.equals(FTRIANGLE_STYLE) || newStyle.equals(FSQUARE_STYLE)
+				|| newStyle.equals(FPENTAGON_STYLE) || newStyle.equals(FDIAMOND_STYLE)
+				|| newStyle.equals(TRIANGLE_STYLE) || newStyle.equals(PENTAGON_STYLE)
+				|| newStyle.equals(PLUS_STYLE) || newStyle.equals(SQUARE_STYLE)
+				|| newStyle.equals(BAR_STYLE) || newStyle.equals(DIAMOND_STYLE)
+				|| newStyle.equals(ASTERISK_STYLE);
+	}
+	
+	
+	
+
+	/**
+	 * Allows to know if the kind of filling is valid or not.
+	 * @param style The style to check.
+	 * @return True is the style is valid.
+	 */
+	public static boolean isValidFillStyle(String style)
+	{
+		if(style==null)
+			return false;
+		
+		return style.equals(TOKEN_FILL_NONE) || style.equals(TOKEN_FILL_HLINES)
+				|| style.equals(TOKEN_FILL_HLINES_F) || style.equals(TOKEN_FILL_CROSSHATCH)
+				|| style.equals(TOKEN_FILL_CROSSHATCH_F) || style.equals(TOKEN_FILL_VLINES)
+				|| style.equals(TOKEN_FILL_VLINES_F) || style.equals(TOKEN_FILL_GRADIENT) || style.equals(TOKEN_FILL_SOLID);
+	}
+
+	
+	
+	
+	/**
+	 * Allows to check if the style is possible
+	 * @param style The style to check
+	 * @return True if the style is valid
+	 */
+	public static boolean isValidArrowStyle(String style)
+	{
+		if(style==null)
+			return false;
+		
+		if( style.equals(NONEARROW_STYLE) || style.equals(RARROW_STYLE)    || 
+			style.equals(RRBRACKET_STYLE) || style.equals(RSBRACKET_STYLE) ||
+			style.equals(LARROW_STYLE)    || style.equals(LRBRACKET_STYLE) || 
+			style.equals(LSBRACKET_STYLE) || style.equals(SQUAREEND_STYLE) || 
+			style.equals(ROUNDIN_STYLE)   || style.equals(ROUNDEND_STYLE)  || 
+			style.equals(BARIN_STYLE)     || style.equals(CIRCLEEND_STYLE) ||
+			style.equals(CIRCLEIN_STYLE)  || style.equals(DISKEND_STYLE)   ||
+			style.equals(DLARROW_STYLE)  || style.equals(DRARROW_STYLE)   ||
+			style.equals(DISKIN_STYLE)    || style.equals(BAREND_STYLE))
+			return true;
+		
+		return false;
+	}
+}
diff --git a/current/latexDraw/ui/CodePanel.java b/current/latexDraw/ui/CodePanel.java
new file mode 100644
index 0000000..eb22b82
--- /dev/null
+++ b/current/latexDraw/ui/CodePanel.java
@@ -0,0 +1,789 @@
+package latexDraw.ui;
+
+import java.awt.BorderLayout;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.ClipboardOwner;
+import java.awt.datatransfer.StringSelection;
+import java.awt.datatransfer.Transferable;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.ObjectInputStream;
+
+import javax.swing.*;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.codeEditorPane.AbstractCodeEditorPane;
+import latexDraw.ui.codeEditorPane.PSTricksEditorPane;
+import latexDraw.ui.components.CloseButton;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/** 
+ * Defines the panel which contains the code generated from the drawing.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 06/03/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class CodePanel extends JPanel implements ActionListener, ClipboardOwner
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The comments of the user */
+	private String comments;
+	
+	/** The label of the drawing */
+	private String label;
+	
+	/** The caption of the drawing */
+	private String caption;
+	
+	/** The main frame of the program */
+	private LaTeXDrawFrame mainFrame;
+	
+	/** The token of the position of the drawing */
+	private String positionVertToken;
+	
+	/** The horizontal position of the drawing */
+	private String positionHoriToken;
+	
+	/** The latex packages needed for the compilation of the drawing. */
+	protected String documentPackages;
+	
+	
+	public static final String TOKEN_HORI_CENTER_START = "\\begin{center}\n"; //$NON-NLS-1$
+	
+	public static final String TOKEN_HORI_CENTER_END = "\\end{center}\n"; //$NON-NLS-1$
+	
+	public static final String TOKEN_HORI_VERT_DEFAULT = ""; //$NON-NLS-1$
+	
+	public static final boolean DEFAULT_ISONFLOATSPAGE = false;
+	
+	public static final String TOKEN_VERT_TOP = "t"; //$NON-NLS-1$
+	
+	public static final String TOKEN_VERT_BOTTOM = "b"; //$NON-NLS-1$
+	
+	public static final String TOKEN_VERT_FLOATS_PAGE = "p"; //$NON-NLS-1$
+	
+	public static final String TOKEN_VERT_HERE = "h"; //$NON-NLS-1$
+	
+	public static final String TOKEN_VERT_HERE_HERE = "H"; //$NON-NLS-1$
+	
+	/** Defines the number of characters added at the beginning
+	 * of each lines of the comments (these characters are "% ")*/
+	public static final int LGTH_START_LINE_COMMENT = 2;
+	
+	/** The label of the button reload */
+	public static final String LABEL_RELOAD = LaTeXDrawLang.getOthersString("CodePanel.reload"); //$NON-NLS-1$
+	
+	/** The label of the check-box autoUpdate */
+	public static final String LABEL_AUTO_UPDATE = LaTeXDrawLang.getOthersString("CodePanel.autoUpdate"); //$NON-NLS-1$
+	
+	/** Allows to know if the code must be update in real time by default */
+	public static final boolean DEFAULT_AUTO_UPDATE = true;
+	
+	/** The label of the button buttonCopySel */
+	public static final String LABEL_COPY_SELECTION_CODE = LaTeXDrawLang.getOthersString("CodePanel.copySel"); //$NON-NLS-1$
+	
+	/** The label of the button which copy all the text in the clipboard */
+	public static final String LABEL_COPY_ALL = LaTeXDrawLang.getOthersString("CodePanel.copyAll"); //$NON-NLS-1$
+	
+	public static final String LABEL_COPY_SELECTED_FIG = "Select code of selected figures"; //$NON-NLS-1$
+	
+	/** This button allows the user to copy the selected text in the clipboard */
+	protected JButton buttonCopySel;
+	
+	/** Allows to know if the user wants to update in real time the code or not */
+	protected JCheckBox autoUpdateCB;
+	
+	/** This button allows the user to update the code */
+	protected JButton reloadButton;
+	
+	/** Allows to add comments to the code */
+	protected JButton commentsButton;
+	
+	protected AbstractCodeEditorPane editor;
+	
+	
+	
+	
+	
+	/** The constructor by default */
+	public CodePanel(LaTeXDrawFrame parent)
+	{
+		mainFrame = parent;
+		
+		positionHoriToken = TOKEN_HORI_VERT_DEFAULT;
+		label   = "";//$NON-NLS-1$
+		caption = "";//$NON-NLS-1$
+		positionVertToken = "";//$NON-NLS-1$
+		editor  = new PSTricksEditorPane(this);   
+		
+		JScrollPane scroller = new JScrollPane(); 
+		JViewport vp = scroller.getViewport(); 
+	 	vp.add(editor); 
+		
+		JToolBar toolbar = new JToolBar("Code toolbar"); //$NON-NLS-1$
+		toolbar.setFloatable(false);
+		
+		autoUpdateCB = new JCheckBox(LABEL_AUTO_UPDATE);
+		autoUpdateCB.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+		autoUpdateCB.setToolTipText(LaTeXDrawLang.getOthersString("CodePanel.tip")); //$NON-NLS-1$
+		autoUpdateCB.setActionCommand(LABEL_AUTO_UPDATE);
+		autoUpdateCB.setSelected(DEFAULT_AUTO_UPDATE);
+		toolbar.add(autoUpdateCB);
+		autoUpdateCB.addActionListener(this);
+		
+		reloadButton = new JButton(LaTeXDrawResources.reloadIcon);
+		reloadButton.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+		reloadButton.setToolTipText(LaTeXDrawLang.getOthersString("CodePanel.updateCode")); //$NON-NLS-1$
+		reloadButton.setActionCommand(LABEL_RELOAD);
+		reloadButton.setEnabled(!DEFAULT_AUTO_UPDATE);
+		toolbar.add(reloadButton);
+		reloadButton.addActionListener(this);
+		
+		commentsButton = new JButton(LaTeXDrawResources.commentIcon);
+		commentsButton.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+		commentsButton.setToolTipText(LaTeXDrawLang.getOthersString("CodePanel.addComment")); //$NON-NLS-1$
+		commentsButton.setActionCommand(LaTeXDrawResources.LABEL_COMMENTS);
+		commentsButton.addActionListener(mainFrame);
+		toolbar.add(commentsButton);
+		
+		JButton but = new JButton(LaTeXDrawResources.copyIcon);
+		but.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+		but.setToolTipText(LABEL_COPY_ALL);
+		but.setActionCommand(LABEL_COPY_ALL);
+		toolbar.add(but);
+		but.addActionListener(this);
+		
+		buttonCopySel = new JButton(LaTeXDrawResources.copySelIcon);
+		buttonCopySel.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+		buttonCopySel.setToolTipText(LABEL_COPY_SELECTION_CODE);
+		buttonCopySel.setActionCommand(LABEL_COPY_SELECTION_CODE);
+		buttonCopySel.setEnabled(false);
+		toolbar.add(buttonCopySel);
+		buttonCopySel.addActionListener(this);
+		
+		JToolBar toolbar2 = new JToolBar();
+		toolbar2.setFloatable(false);
+		CloseButton closeB = new CloseButton(this);
+		closeB.addActionListener(mainFrame);
+		closeB.setActionCommand(LaTeXDrawResources.LABEL_DISPLAY_CODE_PANEL);
+		toolbar2.add(closeB);
+		
+		JPanel p = new JPanel();
+		p.setLayout(new BorderLayout());
+		p.add(toolbar2,BorderLayout.EAST);
+		p.add(toolbar,BorderLayout.WEST);
+		setLayout(new BorderLayout());
+		add(p, BorderLayout.NORTH);
+		add(scroller, BorderLayout.CENTER);
+		
+		comments = "";//$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * Allows to get the comments without any characters like "%"
+	 * at the start of each lines. (these characters are used like comment symbol by LaTeX).
+	 * @return The code without LaTeX comment symbol '%'
+	 */
+	public String getCommentsWithoutTag()
+	{
+		if(comments!=null)
+		{
+			int i=0, j=0, lgth = comments.length();
+			char buffer[] = new char[lgth];
+			boolean eol = true;
+			
+			while(i<lgth)
+			{
+				if(eol && comments.charAt(i)=='%') 
+				{
+					i+=LGTH_START_LINE_COMMENT;
+					eol = false;
+				}
+				else
+				{
+					if(comments.charAt(i)=='\n')
+						eol = true;
+					
+					buffer[j++] = comments.charAt(i);
+					i++;
+				}
+			}
+			
+			String str = String.valueOf(buffer, 0, j);
+			
+			if(str.length()>1)
+				return str.substring(0, str.length()-System.getProperty("line.separator").length());//$NON-NLS-1$
+			return str;
+		}
+		return null;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the comments of the code
+	 * @return The comments of the code
+	 */
+	public String getComments()
+	{
+		return comments;
+	}
+	
+	
+	
+	
+	/**
+	 * Empty the panel.
+	 */
+	public void setEmpty()
+	{
+		comments=""; //$NON-NLS-1$
+		editor.setEmpty(); 
+	}
+	
+	
+	
+	
+	/**
+	 * Allow to set the comments of the code
+	 * @param newComments The new comments of the code
+	 */
+	public void setComments(String newComments)
+	{
+		if(newComments!=null && newComments.length()>0)
+		{
+			int i, j=0, lgth = newComments.length();
+			char buffer[] = new char[lgth*3];
+			boolean eol = true;
+			
+			for(i=0; i<newComments.length(); i++)
+			{
+				if(eol)
+				{
+					buffer[j++] = '%';
+					buffer[j++] = ' ';
+					eol = false;
+				}
+				
+				if(newComments.charAt(i)=='\n')
+					eol = true;
+				
+				buffer[j++] = newComments.charAt(i);
+			}
+			
+			comments = String.valueOf(buffer, 0, j);
+			comments+=System.getProperty("line.separator");//$NON-NLS-1$ 
+		}
+		else comments = ""; //$NON-NLS-1$
+	}
+	
+	
+	
+	
+	
+	
+	
+	
+	/**
+	 * Allows to define if the text must be display or not
+	 * @param display True : the text must be display
+	 */
+	public void setTextDisplayable(boolean display)
+	{
+		if(display)
+			editor.updateText();
+		else 
+			editor.setText(""); //$NON-NLS-1$
+	}
+
+
+
+	private void readObject(@SuppressWarnings("unused") ObjectInputStream ois)
+	{
+		/* Nothing to do. */
+	}
+
+
+
+
+	public void actionPerformed(ActionEvent e) 
+	{
+		Object o = e.getSource();
+	
+		if(o instanceof JButton || o instanceof JCheckBox || o instanceof JMenuItem)
+		{
+			String l = ((AbstractButton)o).getActionCommand();
+			
+			if(l.equals(LABEL_RELOAD))
+			{
+				mainFrame.getDrawPanel().updateCode();
+				mainFrame.setStatusBarText(LaTeXDrawLang.getOthersString("CodePanel.reloadText")); //$NON-NLS-1$
+				mainFrame.requestFocus();
+				return ;
+			}
+			
+			if(l.equals(LABEL_AUTO_UPDATE))
+			{
+				if(o instanceof JCheckBoxMenuItem)
+					autoUpdateCB.setSelected(mainFrame.menuBar.getMenuAutoUpdate().isSelected());
+				else
+					mainFrame.menuBar.getMenuAutoUpdate().setSelected(autoUpdateCB.isSelected());
+				
+				mainFrame.getDrawPanel().setIsModified(true);
+				updateAutoUpdateComponents();
+				mainFrame.requestFocus();
+				return ;
+			}
+			
+			if(l.equals(LABEL_COPY_ALL))
+			{
+				mainFrame.getDrawPanel().updateCode();
+				String text = getText();
+				
+				if(text!=null && !text.equals("")) //$NON-NLS-1$
+					copyTextToClipBoard(text);
+				
+				buttonCopySel.setEnabled(false);
+				mainFrame.setStatusBarText(LaTeXDrawLang.getOthersString("CodePanel.copiedText")); //$NON-NLS-1$
+				mainFrame.requestFocus();
+				return ;
+			}
+			
+			if(l.equals(LABEL_COPY_SELECTION_CODE))
+			{
+				mainFrame.setStatusBarText(LaTeXDrawLang.getOthersString("CodePanel.copiedSelText")); //$NON-NLS-1$
+				String text = editor.getSelectedText();
+				
+				if(text!=null && !text.equals("")) //$NON-NLS-1$
+					copyTextToClipBoard(text);
+				
+				buttonCopySel.setEnabled(false);
+				mainFrame.requestFocus();
+				return ;
+			}
+			
+			if(l.equals(LABEL_COPY_SELECTED_FIG))
+			{
+				String code = mainFrame.getDrawPanel().getDraw().getCodeSelection();
+				
+				if(code!=null && code.length()>0)
+				{
+					mainFrame.setStatusBarText(LaTeXDrawLang.getOthersString("CodePanel.copiedSelText")); //$NON-NLS-1$
+					copyTextToClipBoard(code);
+				}
+
+				mainFrame.requestFocus();
+				return ;
+			}
+		} // if(o instanceof JButton)
+	}
+
+	
+	
+	
+	
+	/**
+	 * Allows to copy a text in the clipboard
+	 * @param text The text to copy
+	 */
+	public void copyTextToClipBoard(String text)
+	{
+		Clipboard cb = getToolkit().getSystemClipboard();
+		cb.setContents(new StringSelection(text), this);
+	}
+	
+	
+	
+	
+	
+
+	/**
+	 * Allows to know if the code must be update in real time or not
+	 * @return True if the code must be update in real time
+	 */
+	public boolean isInAutoUpdate()
+	{
+		return autoUpdateCB.isSelected();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set if the code panel must be displayed
+	 * @param isIn If true, the code panel must be displayed
+	 */
+	public void setIsInAutoUpdate(boolean isIn)
+	{
+		if(isIn!=isInAutoUpdate())
+			mainFrame.getDrawPanel().setIsModified(true);
+			
+		autoUpdateCB.setSelected(isIn);
+		updateAutoUpdateComponents();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update components which depends of the checkbox "autoUpdateCB"
+	 */
+	protected void updateAutoUpdateComponents()
+	{
+		if(autoUpdateCB.isSelected())
+		{
+			mainFrame.menuBar.getMenuReloadCode().setEnabled(false);
+			reloadButton.setEnabled(false);
+			mainFrame.getDrawPanel().updateCode();
+		}
+		else
+		{
+			reloadButton.setEnabled(true);
+			mainFrame.menuBar.getMenuReloadCode().setEnabled(true);
+		}
+		
+	}
+	
+	
+	
+	/**
+	 * Allows to get the text of the editor
+	 * @return The text of the editor
+	 */
+	public String getText()
+	{
+		return editor.getText();
+	}
+
+
+
+
+	/**
+	 * @return Returns the caption.
+	 */
+	public String getCaption()
+	{
+		return caption;
+	}
+
+
+
+
+	/**
+	 * @param caption The caption to set.
+	 */
+	public void setCaption(String caption)
+	{
+		this.caption = caption;
+	}
+
+
+
+
+	/**
+	 * @return Returns the label.
+	 */
+	public String getLabel()
+	{
+		return label;
+	}
+
+
+
+
+	/**
+	 * @param label The label to set.
+	 */
+	public void setLabel(String label)
+	{
+		this.label = label;
+	}
+
+
+
+
+	/**
+	 * @return Returns the positionVertToken.
+	 */
+	public String getPositionVertToken()
+	{
+		return positionVertToken;
+	}
+
+
+
+
+	/**
+	 * @param positionToken The positionVertToken to set.
+	 */
+	public void setPositionVertToken(String positionToken)
+	{
+		if(positionToken.equals(TOKEN_VERT_BOTTOM) ||
+			positionToken.equals(TOKEN_VERT_FLOATS_PAGE) || positionToken.equals(TOKEN_VERT_HERE) ||
+			positionToken.equals(TOKEN_VERT_HERE_HERE) || positionToken.equals(TOKEN_VERT_TOP))
+			positionVertToken = positionToken;
+		else
+			positionVertToken = TOKEN_HORI_VERT_DEFAULT;
+	}
+
+
+
+
+
+
+	/**
+	 * @return Returns the positionHoriToken.
+	 */
+	public String getPositionHoriToken()
+	{
+		return positionHoriToken;
+	}
+
+
+
+
+	/**
+	 * @param positionHori The positionHoriToken to set.
+	 */
+	public void setPositionHoriToken(String positionHori)
+	{
+		positionHoriToken = positionHori;
+	}
+
+
+
+
+	public void lostOwnership(Clipboard cb, Transferable t)
+	{
+		/*
+		 * No code required.
+		 */
+	}
+
+
+
+
+	
+	/**
+	 * Actions to do when a new project is created.
+	 * @since 1.9
+	 */
+	public void newProject()
+	{
+		positionHoriToken = TOKEN_HORI_VERT_DEFAULT;
+		positionVertToken = TOKEN_HORI_VERT_DEFAULT;
+		label 	= "";//$NON-NLS-1$
+		caption = "";//$NON-NLS-1$
+	}
+
+
+
+	/**
+	 * @return the mainFrame.
+	 * @since 1.9
+	 */
+	public LaTeXDrawFrame getMainFrame()
+	{
+		return mainFrame;
+	}
+
+
+
+	/**
+	 * @return the buttonCopySel.
+	 * @since 2.0.0
+	 */
+	public JButton getButtonCopySel()
+	{
+		return buttonCopySel;
+	}
+
+
+
+	/**
+	 * Set the beginning of the code generated.
+	 * @param SW The top right point.
+	 * @param NE The bottom left point.
+	 * @param pixelsPerCm The definition level of the drawing.
+	 * @param origin The origin point of the system of coordinates.
+	 */
+	public void setStart(LaTeXDrawPoint2D SW, LaTeXDrawPoint2D NE, int pixelsPerCm, LaTeXDrawPoint2D origin)
+	{
+		editor.setStart(SW, NE, pixelsPerCm, origin);
+	}
+
+
+
+	/**
+	 * Set the body (between the beginning and the end) of the code.
+	 * @param code The new code.
+	 */
+	public void setBody(String code)
+	{
+		editor.setBody(code);
+	}
+
+	
+	public AbstractCodeEditorPane getEditor() {
+		return editor;
+	}
+
+
+	/**
+	 * Update the text of the panel.
+	 */
+	public void updateText()
+	{
+		editor.updateText();
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Sets the XML element "meta" with the parameters of the code panel.
+	 * @param document The XML document.
+	 * @param meta The Element to fill.
+	 * @throws IllegalArgumentException If meta or document is null.
+	 * @since 2.0.0
+	 */
+	public void getXMLMetadata(Document document, Element meta)
+	{
+		if(document==null || meta==null)
+			throw new IllegalArgumentException();
+		
+		if(documentPackages!=null && documentPackages.length()!=0) {
+			Element cap = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_LATEX_INCLUDES);
+			cap.appendChild(document.createCDATASection(documentPackages));
+			meta.appendChild(cap);
+		}
+		
+        if(caption!=null && caption.length()!=0)
+        {
+        	Element cap = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_CAPTION);
+        	cap.appendChild(document.createCDATASection(caption));
+        	meta.appendChild(cap);
+        }
+        
+        if(label!=null && label.length()!=0)
+        {
+        	Element lab = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_LABEL);
+        	lab.appendChild(document.createCDATASection(label));
+        	meta.appendChild(lab);
+        }
+        
+        if(positionHoriToken!=null && positionHoriToken.length()!=0)
+        {
+        	Element tok = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_POSITION_HORIZ);
+        	tok.appendChild(document.createTextNode(positionHoriToken));
+        	meta.appendChild(tok);
+        }
+        
+        if(positionVertToken!=null && positionVertToken.length()!=0)
+        {
+        	Element tok = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_POSITION_VERT);
+        	tok.appendChild(document.createTextNode(positionVertToken));
+        	meta.appendChild(tok);
+        }
+        
+        if(comments!=null && comments.length()!=0)
+        {
+        	Element comm = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_COMMENTS);
+        	comm.appendChild(document.createCDATASection(getCommentsWithoutTag()));
+        	meta.appendChild(comm);
+        }
+        
+        Element auto = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_AUTO_UPDATE);
+        auto.appendChild(document.createTextNode(String.valueOf(isInAutoUpdate())));
+    	meta.appendChild(auto);
+	}
+
+
+
+	/**
+	 * Sets the latexdraw parameters from the <code>metadata</code> SVG tag.
+	 * @param nl The list of the parameters.
+	 * @since 2.0.0
+	 */
+	public void setXMLMetadata(NodeList nl)
+	{
+		if(nl==null)
+			return ;
+		
+		Node n;
+		String name;
+		
+		for(int i=0, size = nl.getLength(); i<size; i++)
+		{
+			n = nl.item(i);
+			
+			if(n!=null && LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI.equals(n.getNamespaceURI()))
+			{
+				name = n.getNodeName();
+				
+				try
+				{
+					if(name.endsWith(LaTeXDrawNamespace.XML_LATEX_INCLUDES))
+						setDocumentPackages(n.getTextContent());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_CAPTION))
+						setCaption(n.getTextContent());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_LABEL))
+						setLabel(n.getTextContent());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_POSITION_HORIZ))
+						setPositionHoriToken(n.getTextContent());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_POSITION_VERT))
+						setPositionVertToken(n.getTextContent());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_COMMENTS))
+						setComments(n.getTextContent());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_AUTO_UPDATE))
+					{
+						boolean is = Boolean.valueOf(n.getTextContent()).booleanValue();
+						
+						setIsInAutoUpdate(is);
+						mainFrame.getLMenuBar().getMenuAutoUpdate().setSelected(is);
+					}
+				}
+				catch(Exception e) { System.out.println(name + ": invalid value."); }//$NON-NLS-1$
+			}
+		}
+	}
+
+
+
+	public String getDocumentPackages() {
+		return documentPackages;
+	}
+
+
+
+	public void setDocumentPackages(String documentPackages) {
+		if(documentPackages!=null)
+			this.documentPackages = documentPackages;
+	}
+}
diff --git a/current/latexDraw/ui/DrawContainer.java b/current/latexDraw/ui/DrawContainer.java
new file mode 100644
index 0000000..dcdd695
--- /dev/null
+++ b/current/latexDraw/ui/DrawContainer.java
@@ -0,0 +1,3259 @@
+package latexDraw.ui;
+
+import java.awt.*;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.RenderedImage;
+import java.awt.print.PageFormat;
+import java.awt.print.Printable;
+import java.awt.print.PrinterException;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.OutputStreamWriter;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.Locale;
+import java.util.Vector;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.plugins.bmp.BMPImageWriteParam;
+import javax.imageio.plugins.jpeg.JPEGImageWriteParam;
+import javax.imageio.stream.ImageOutputStream;
+import javax.swing.JComponent;
+import javax.swing.JViewport;
+import javax.swing.Scrollable;
+import javax.swing.SwingConstants;
+
+import latexDraw.figures.*;
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.filters.PSFilter;
+import latexDraw.filters.TeXFilter;
+import latexDraw.parsers.svg.SVGAttributes;
+import latexDraw.parsers.svg.SVGDocument;
+import latexDraw.parsers.svg.SVGElements;
+import latexDraw.parsers.svg.elements.SVGMetadataElement;
+import latexDraw.psTricks.DviPsColors;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.ui.components.XScale;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+import latexDraw.util.LaTeXDrawException;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.StreamExecReader;
+import latexDraw.util.UndoRedoManager;
+import net.sourceforge.jiu.codecs.CodecMode;
+import net.sourceforge.jiu.codecs.PNMCodec;
+import net.sourceforge.jiu.gui.awt.BufferedRGB24Image;
+
+import org.sourceforge.jlibeps.epsgraphics.EpsGraphics2D;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public final class DrawContainer extends JComponent implements Scrollable, Printable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Correspond to the figures of the drawing */
+	private Vector<Figure> figures;
+	
+	/** The parent of the DrawContainer (a @see DrawPanel) */
+	private transient DrawPanel parentPanel;
+	
+	/** Allow to adjust (and to see) the complete borders of the drawing.<br>
+	 * @see #bordersReal for more informations */
+	private DrawBorders bordersComplete;
+	
+	/** Define the real borders of the drawing: <br>
+	 * It's different from @see bordersComplete because bordersComplete considers the thickness,
+	 * the double borders, ... of the figures ; whereas bordersReal just consider the coordinates
+	 * of the figures (Useful for the code generation, because bordersComplete is not adapted for that.
+	 */
+	private DrawBorders bordersReal;
+	
+	/** Allow to know if the user want or not to display to borders of the drawing */
+	private boolean drawBorders;
+
+	/** Correspond to the @see Figure selected by the user */
+	private Draw selected;
+	
+	/** Allows to know if the user want to adjust automatically the borders
+	 * of the drawing */
+	private boolean autoAdjustement;
+	
+	/** Allows to know if the menu "selection" is selected */
+	private boolean inSelection;
+	
+	/** Corresponds to the number of pixels per centimetre */
+	private int pixelsPerCm;
+	
+	/** The unit used to measure the number of pixels per cm */
+	private String unitForPixelsPerCm;
+
+	/** Allows to know if the drawing has been modified */
+	private boolean isModified;
+	
+	/** The value of the antialiasing (cf. RenderingHints.VALUE_ANTIALIAS_ON/OFF) */
+	private transient Object antiAliasingValue;
+	
+	/** The value of the rendering (cf. RenderingHints.VALUE_RENDER_QUALITY/SPEED) */
+	private transient Object renderingValue;
+	
+	/** The value of the colour rendering (cf. RenderingHints.VALUE_COLOR_RENDER_QUALITY/SPEED) */
+	private transient Object colorRenderingValue;
+	
+	/** The value of the alpha-interpolation ( cf. RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY/SPEED */
+	private transient Object alphaInterpolValue;
+	
+	/** The value by default of the anti-aliasing */
+	public static final Object DEFAULT_ANTIALIASING_VAL = RenderingHints.VALUE_ANTIALIAS_ON;
+	
+	/** The value by default of the rendering */
+	public static final Object DEFAULT_RENDERING_VAL    = RenderingHints.VALUE_RENDER_QUALITY;
+	
+	/** The value by default of the colour rendering */
+	public static final Object DEFAULT_COLORRENDER_VAL  = RenderingHints.VALUE_COLOR_RENDER_QUALITY;
+	
+	/** The value by default of the alpha-interpolation */
+	public static final Object DEFAULT_ALPHAINTER_VAL   = RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY;
+	
+	/** The value we add to the zoom when to user click on a zoom button */
+	public static final double DEFAULT_ADD_ZOOM = 0.25;
+	
+	/** The number by default of pixels per cm */
+	public static final int DEFAULT_PIXPERCM = 50;
+	
+	/** The zoom by default (100%) */
+	public static final double DEFAULT_ZOOM = 1.;
+	
+	/** The biggest zoom we can do */
+	public static final double MAX_ZOOM = 4.5;
+	
+	/** The smallest zoom we can do */
+	public static final double MIN_ZOOM = 0.25;	
+	
+	/** Corresponds to a possible value of whichCodeOutput attribute. @since 2.0.0 */
+	public static final short CODE_PSTRICKS = 0;
+	   
+    /** Contains to figure copied or cut */
+    protected Draw copiedFigure;
+	
+	/** The zoom : MIN_ZOOM<=zoom<=MAX_ZOOM */
+	private double zoom;
+	
+	/** Define if the figure must be rotated. */
+	private boolean onRotation;
+	
+	/** Define the code that will be generated. @since 2.0.0 */
+	protected short whichCodeOutput;
+	
+	/** The grid of the panel. @since 2.0.0 */
+	protected MagneticGrid grid;
+	
+	
+	
+	
+	/**
+	 * The constructor by default.
+	 */
+	public DrawContainer()
+	{
+		this(false);
+	}
+	
+	
+	
+	
+	/**
+	 * The constructor by default.
+	 * @param displayBorders Allow to know if the borders of the drawing.
+	 * must be displayed
+	 */
+	public DrawContainer(boolean displayBorders)
+	{
+		setWhichCodeOutput(CODE_PSTRICKS);
+		onRotation = false;
+		zoom = DEFAULT_ZOOM;
+		drawBorders = displayBorders;
+		selected = new Draw(false, false);
+		figures = new Vector<Figure>();
+		pixelsPerCm = DEFAULT_PIXPERCM;
+		inSelection = true;
+		setIsModified(false);
+		renderingValue      = DEFAULT_RENDERING_VAL;
+		alphaInterpolValue  = DEFAULT_ALPHAINTER_VAL;
+		colorRenderingValue = DEFAULT_COLORRENDER_VAL;
+		antiAliasingValue   = DEFAULT_ANTIALIASING_VAL;
+		setDoubleBuffered(true);
+		
+		grid = new MagneticGrid(getWidth(), getHeight(), pixelsPerCm, zoom);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to delete a given figure of the drawing
+	 * @param f The figure to remove
+	 */
+	public void deleteFigure(Figure f, UndoRedoManager manager)
+	{
+		if(f!=null && figures.contains(f))
+		{
+			if(manager!=null)
+				manager.add(UndoRedoManager.LABEL_DEL, figures.indexOf(f), f);
+			
+			figures.remove(f);
+			selected.removeFigure(f);
+			parentPanel.updateDraw(true);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set if figures must be in rotation or not
+	 * @param on True : the figures must be in rotation	
+	 */
+	public void setOnRotation(boolean on)
+	{
+		onRotation = on;
+		if(!selected.isEmpty())
+		{
+			selected.setOnRotation(on);
+			repaint();
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to know if figures are in rotation or not
+	 * @return True : figures are in rotation
+	 */
+	public boolean isOnRotation()
+	{
+		return onRotation;
+	}
+	
+	
+	
+	/**
+	 * Allows to know if a a figure is selected
+	 * @return True if a figure is selected
+	 */
+	public boolean isAFigureSelected()
+	{
+		return !selected.isEmpty();
+	}
+	
+	
+	
+	/**
+	 * Allows to get the vector containing the figures
+	 * @return The vector containing the figures
+	 */
+	public Vector<Figure> getFigures()
+	{
+		return figures;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to put some figures f1 behind the figure f2
+	 * @param f1 The drawing to put behind f2
+	 * @param f2 The figure to put in front of f1
+	 */
+	public void putBehind(Draw f1, Figure f2)
+	{
+		if(f1==f2 || f1==null || f2==null || f1.isEmpty())
+			return ;
+		
+		try
+		{
+			int i, size = f1.size();
+			int[] oldId = new int[size], id = new int[size];
+			Figure f;
+
+			for(i=size-1; i>=0; i--)
+			{
+				f = f1.getFigureAt(i);
+				oldId[i] = figures.indexOf(f);
+				putBehind(f, f2);
+				id[i] = figures.indexOf(f);
+			}
+			
+			UndoRedoManager manager = parentPanel.getFrameParent().getUndoManager();
+			manager.add(UndoRedoManager.LABEL_CHANGE_DISPOSITION, id, oldId, false);
+			parentPanel.getFrameParent().updateUndoRedo();
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to put the figure f1 behind the figure f2
+	 * @param f1 The figure to put behind f2
+	 * @param f2 The figure to put in front of f1
+	 */
+	public void putBehind(Figure f1, Figure f2)
+	{
+		if(f1==f2 || f1==null || f2==null) 
+			return;
+		
+		try
+		{
+			if(!figures.contains(f1) || !figures.contains(f2))
+				throw new IllegalArgumentException();
+
+			int id1 = figures.indexOf(f1), id2 = figures.indexOf(f2);
+			
+			if(id1>=id2)
+			{
+				figures.remove(f1);
+				figures.add(id2, f1);
+				
+				repaint();
+			}
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	/**
+	 * Allows to put some figures f1 in front of the figure f2
+	 * @param f1 The drawing to put in front of f2
+	 * @param f2 The figure to put behind f1
+	 */
+	public void putInFrontOf(Draw f1, Figure f2)
+	{
+		if(f1==f2 || f1==null || f2==null || f1.isEmpty())
+			return ;
+		
+		try
+		{
+			int i, size = f1.size();
+			int[] oldId = new int[size], id = new int[size];
+			
+			for(i=0; i<size; i++)
+				oldId[i] = figures.indexOf(f1.getFigureAt(i));
+			
+			for(i=0; i<size; i++)
+				putBehind(f2, f1.getFigureAt(i));
+			
+			for(i=0; i<size; i++)
+				id[i] = figures.indexOf(f1.getFigureAt(i));
+		
+
+			UndoRedoManager manager = parentPanel.getFrameParent().getUndoManager();
+			manager.add(UndoRedoManager.LABEL_CHANGE_DISPOSITION, id, oldId, false);
+			parentPanel.getFrameParent().updateUndoRedo();
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to put the selected figure in the background
+	 */
+	public void selectedInBackground()
+	{
+		try
+		{
+			if(selected!=null && !selected.isEmpty()) 
+			{
+				int i, size = selected.size();
+				int[] oldId = new int[size], id = new int[size];
+				
+				for(i=size-1; i>=0; i--)
+				{
+					Figure f = selected.getFigureAt(i);
+					if(figures.contains(f))
+					{
+						oldId[i] = figures.indexOf(f);
+						figures.remove(f);
+						figures.add(0, f);
+						id[i] = 0;
+						repaint();
+					}
+					else throw new LaTeXDrawException(LaTeXDrawException.INCORRECT_VALUE);
+				}
+				
+				UndoRedoManager manager = parentPanel.getFrameParent().getUndoManager();
+				manager.add(UndoRedoManager.LABEL_CHANGE_DISPOSITION, id, oldId, false);
+				parentPanel.getFrameParent().updateUndoRedo();
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	/**
+	 * Allows to put the selected figure in the foreground
+	 */
+	public void selectedInForeground()
+	{
+		try
+		{
+			if(selected!=null && !selected.isEmpty()) 
+			{
+				int i, size = selected.size();
+				int[] oldId = new int[size], id = new int[size];
+				
+				for(i=0; i<size; i++)
+				{
+					Figure f = selected.getFigureAt(i);
+					if(figures.contains(f))
+					{
+						oldId[i] = figures.indexOf(f);
+						figures.remove(f);
+						figures.add(f);
+						repaint();
+						id[i] = figures.indexOf(f);
+					}
+					else throw new LaTeXDrawException(LaTeXDrawException.INCORRECT_VALUE);
+					
+					UndoRedoManager manager = parentPanel.getFrameParent().getUndoManager();
+					manager.add(UndoRedoManager.LABEL_CHANGE_DISPOSITION, id, oldId, false);
+					parentPanel.getFrameParent().updateUndoRedo();
+				}
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to zoom in the drawing (up to 450%)
+	 */
+	public void zoomIn()
+	{
+		if(zoom+DEFAULT_ADD_ZOOM<=MAX_ZOOM)
+		{
+			zoom+=DEFAULT_ADD_ZOOM;
+			grid.setZoom(zoom);
+			updatePreferredSize();
+			repaint();
+			revalidate();
+			setIsModified(true);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Set the zoom.
+	 * @param z The new zoom.
+	 */
+	public void setZoom(double z)
+	{
+		if(z<=MAX_ZOOM && z>=MIN_ZOOM)
+		{
+			zoom=z;
+			grid.setZoom(z);
+			repaint();
+			updatePreferredSize();
+			revalidate();
+			setIsModified(true);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to zoom out the drawing (up to 25%).
+	 */
+	public void zoomOut()
+	{
+		if(zoom-DEFAULT_ADD_ZOOM>=MIN_ZOOM)
+		{
+			zoom-=DEFAULT_ADD_ZOOM;
+			grid.setZoom(zoom);
+			repaint();
+			updatePreferredSize();
+			revalidate();
+			setIsModified(true);
+		}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to set the zoom to default.
+	 */
+	public void zoomDefault()
+	{
+		if(zoom!=DEFAULT_ZOOM)
+		{
+			zoom = DEFAULT_ZOOM;
+			grid.setZoom(zoom);
+			repaint();
+			updatePreferredSize();
+			revalidate();
+			setIsModified(true);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the current zoom.
+	 * @return The zoom.
+	 */
+	public double getZoom()
+	{
+		return zoom;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the value of the anti-aliasing by default.
+	 */
+	public void setAntiAliasByDefault()
+	{
+		antiAliasingValue = DEFAULT_ANTIALIASING_VAL;
+	}
+	
+
+	
+	/**
+	 * Allows to set the value of the colour rendering by default.
+	 */
+	public void setRenderingcolorByDefault()
+	{
+		colorRenderingValue = DEFAULT_COLORRENDER_VAL;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the value of the rendering by default.
+	 */
+	public void setRenderingByDefault()
+	{
+		renderingValue = DEFAULT_RENDERING_VAL;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the value of the alpha interpolation by default.
+	 */
+	public void setAlphaInterByDefault()
+	{
+		alphaInterpolValue = DEFAULT_ALPHAINTER_VAL;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the value of the anti-aliasing value
+	 * @param useAntiAlias True : anti-aliasing must be used
+	 */
+	public void setAntiAliasingValue(boolean useAntiAlias)
+	{
+		if(useAntiAlias)
+			  antiAliasingValue = RenderingHints.VALUE_ANTIALIAS_ON;
+		else  antiAliasingValue = RenderingHints.VALUE_ANTIALIAS_OFF;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the value of the colour rendering value
+	 * @param useRenderCol True : colour rendering must be of quality
+	 */
+	public void setRenderingcolorValue(boolean useRenderCol)
+	{
+		if(useRenderCol)
+			  colorRenderingValue = RenderingHints.VALUE_COLOR_RENDER_QUALITY;
+		else  colorRenderingValue = RenderingHints.VALUE_COLOR_RENDER_SPEED;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the value of the rendering value
+	 * @param useRender True : rendering must be of quality
+	 */
+	public void setRenderingValue(boolean useRender)
+	{
+		if(useRender)
+			  renderingValue = RenderingHints.VALUE_RENDER_QUALITY;
+		else  renderingValue = RenderingHints.VALUE_RENDER_SPEED;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the value of the anti-aliasing value
+	 * @param useAlphaInter True : anti-aliasing must be used
+	 */
+	public void setAlphaInterValue(boolean useAlphaInter)
+	{
+		if(useAlphaInter)
+			  alphaInterpolValue = RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY;
+		else  alphaInterpolValue = RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the anti-aliasing value
+	 * @return The anti-aliasing value
+	 */
+	public Object getAntiAliasingValue()
+	{
+		return antiAliasingValue;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the alpha-interpolation value
+	 * @return The alpha-interpolation value
+	 */
+	public Object getAlphaInterValue()
+	{
+		return alphaInterpolValue;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the colour rendering value
+	 * @return The colour rendering value
+	 */
+	public Object getColorRenderValue()
+	{
+		return colorRenderingValue;
+	}
+	
+	
+	/**
+	 * Allows to get the rendering value
+	 * @return The rendering value
+	 */
+	public Object getRenderingValue()
+	{
+		return renderingValue;
+	}
+	
+	
+	
+	/**
+	 * Allows to add a figure to the vector of figures
+	 * @param f The figure to add
+	 */
+	public void addFigure(Figure f, UndoRedoManager manager) 
+	{
+		if(figures.add(f))
+			setIsModified(true);
+		
+		if(manager!=null)
+			manager.add(UndoRedoManager.LABEL_CREATE, figures.size()-1, null);
+	}
+
+	
+
+	/**
+	 * Allows to copy a drawContainer is the current drawContainer
+	 * @param draw The drawContainer to copy
+	 */
+	public void copy(DrawContainer draw)
+	{
+		try
+		{
+			if(figures!=null)
+				figures.clear();
+			
+			figures = draw.figures;
+			for(int i=0, size=figures.size(); i<size; i++)
+				figures.elementAt(i).setSelected(false);
+			
+			pixelsPerCm     = draw.pixelsPerCm;
+			selected        = draw.selected;
+			autoAdjustement = draw.autoAdjustement;
+			inSelection     = draw.inSelection;
+
+			if(draw.bordersComplete!=null)
+			{
+				bordersComplete = (DrawBorders) draw.bordersComplete.clone();
+				bordersComplete.setSelected(!draw.autoAdjustement && draw.inSelection);
+			}
+			if(draw.bordersReal!=null)
+				bordersReal = (DrawBorders)draw.bordersReal.clone();
+			
+			setZoom(draw.zoom);
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	public void newDrawing()
+	{
+		figures.clear();
+		pixelsPerCm = 50;
+		selected    = new Draw(false, false);
+		inSelection = true;
+		setIsModified(false);
+		onRotation = false;
+		bordersComplete = null;
+		bordersReal = null;
+		grid.reInitGrid();
+		setZoom(DEFAULT_ZOOM);
+	}
+	
+
+	
+	public void defineSelected(LaTeXDrawRectangle bound, boolean isShiftOn, boolean isCtrlOn)
+	{
+		if(bound==null)
+			return ;
+		
+		Rectangle2D.Double r = (Rectangle2D.Double)bound.createShape2D();
+		
+		if((!isShiftOn && !isCtrlOn) || (isShiftOn && isCtrlOn))
+		{
+			selected.onRelease();
+			selected = new Draw(false, false);
+
+				for(Figure f : figures)
+					if(f!=null && f.intersected(r))
+						selected.addFigure(f);
+		}
+		else
+			if(isCtrlOn)
+			{
+				for(Figure f : figures)
+					if(f!=null && f.intersected(r) && !selected.contains(f))
+						selected.addFigure(f);
+			
+				if(selected.size()>1)
+					selected.getFigureAt(0).setSelected(false);
+			}
+			else
+				for(Figure f : figures)
+					if(f!=null && f.intersected(r) && selected.contains(f))
+					{
+						f.setSelected(false);
+						selected.removeFigure(f);
+					}
+		
+		selected.setSelected(true);
+		selected.setOnRotation(isOnRotation());
+	}
+	
+	
+	
+	/**
+	 * Defines the borders of the drawing.
+	 */
+	public void updateBorders()
+	{
+		int i, size = figures.size();
+		Figure f;
+
+		try
+		{
+			if(size>0)
+			{
+				f = figures.firstElement();				
+				
+				// We must define the entire borders (considering the double boundary, the thickness,...)
+				// and the real borders (consider only the real coordinates of the figures).
+				LaTeXDrawPoint2D NWpt = f.getTheNWBoundPoint();
+				LaTeXDrawPoint2D SEpt = f.getTheSEBoundPoint();
+				LaTeXDrawPoint2D NWptReal = (LaTeXDrawPoint2D)f.getTheNWRotatedPoint().clone();
+				LaTeXDrawPoint2D SEptReal = (LaTeXDrawPoint2D)f.getTheSERotatedPoint().clone();
+				
+				for(i=1; i<size; i++)
+				{
+					f = figures.elementAt(i);
+					LaTeXDrawPoint2D curNWpt = f.getTheNWBoundPoint();
+					LaTeXDrawPoint2D curSEpt = f.getTheSEBoundPoint();
+					LaTeXDrawPoint2D curNWptReal = f.getTheNWRotatedPoint();
+					LaTeXDrawPoint2D curSEptReal = f.getTheSERotatedPoint();
+					
+					if(curNWpt.x<NWpt.x) 
+						NWpt.x = curNWpt.x;
+					if(curNWpt.y<NWpt.y) 
+						NWpt.y = curNWpt.y;
+					if(curSEpt.x>SEpt.x) 
+						SEpt.x = curSEpt.x;
+					if(curSEpt.y>SEpt.y) 
+						SEpt.y = curSEpt.y;
+					
+					if(curNWptReal.x<NWptReal.x) 
+						NWptReal.x = curNWptReal.x;
+					if(curNWptReal.y<NWptReal.y) 
+						NWptReal.y = curNWptReal.y;
+					if(curSEptReal.x>SEptReal.x) 
+						SEptReal.x = curSEptReal.x;
+					if(curSEptReal.y>SEptReal.y) 
+						SEptReal.y = curSEptReal.y;
+				}
+				
+				if(bordersReal==null)
+					bordersReal = new DrawBorders(NWptReal, SEptReal, true, false, false);
+				else
+				{
+					bordersReal.setFirstPoint(NWptReal);
+					bordersReal.setLastPoint(SEptReal);
+				}
+					
+				if(bordersComplete==null)
+				{ 
+					bordersComplete = new DrawBorders(NWpt, SEpt, autoAdjustement, inSelection, false);
+					boolean state = parentPanel.getFrameParent().isAutoAdjustBorders();
+					bordersComplete.setSelected(!state && inSelection);
+					autoAdjustement = state;
+				}
+				else 
+				{
+					LaTeXDrawPoint2D NW = bordersComplete.getTheNWPoint();
+					LaTeXDrawPoint2D SE = bordersComplete.getTheSEPoint();
+					
+					if(!autoAdjustement)
+					{
+						if(NW.x>NWpt.x)
+							if(NW.y>NWpt.y)
+								 bordersComplete.setFirstPoint(NWpt);
+							else bordersComplete.setFirstPoint(new LaTeXDrawPoint2D(NWpt.x, NW.y));
+						else
+							if(NW.y>NWpt.y)
+								bordersComplete.setFirstPoint(new LaTeXDrawPoint2D(NW.x, NWpt.y));	
+						if(SE.x<SEpt.x)
+							if(SE.y<SEpt.y)
+								bordersComplete.setLastPoint(SEpt);
+							else bordersComplete.setLastPoint(new LaTeXDrawPoint2D(SEpt.x, SE.y));
+						else
+							if(SE.y<SEpt.y)
+								bordersComplete.setLastPoint(new LaTeXDrawPoint2D(SE.x, SEpt.y));				
+				
+					} // if(!autoAdjustement)
+					else
+					{
+						bordersComplete.setFirstPoint(NWpt);
+						bordersComplete.setLastPoint(SEpt);
+					}
+				} // else if(borders==null)*/
+			} // if(size>0)
+			else
+			{
+				if(bordersComplete!=null)
+				{
+					bordersComplete.setFirstPoint(0, 0);
+					bordersComplete.setLastPoint(0, 0);
+				}
+				
+				if(bordersReal!=null)
+				{
+					bordersReal.setFirstPoint(0, 0);
+					bordersReal.setLastPoint(0, 0);
+				}
+			}
+		
+		}catch(Exception e) { e.printStackTrace(); }
+	}
+
+
+	/**
+	 * This method allows the user to delete the selected figure
+	 */
+	public void deleteSelection(UndoRedoManager manager)
+	{
+		if(figures!=null && !selected.isEmpty())
+		{
+			int i, size = selected.size();
+			int[] id = new int[size];
+			
+			for(i=0; i<size; i++)
+				id[i] = figures.indexOf(selected.getFigureAt(i));
+				
+			for(i=0; i<size;i++)
+			{
+				Figure f = selected.getFigureAt(i);
+				figures.remove(f);
+			}
+
+			manager.add(UndoRedoManager.LABEL_DEL, id, selected, false);
+
+			selected = new Draw(false, false);
+			selected.setOnRotation(isOnRotation());
+			setIsModified(true);
+		}
+			
+	}
+
+	
+	
+
+	/**
+	 * Allow the display or to hide the borders of the drawing
+	 * @param display Allow to know if the user want to display the borders
+	 * of the drawing
+	 */
+	public void displayBorders(boolean display)
+	{
+		drawBorders = display;
+		
+		if(autoAdjustement)
+			updateBorders();
+		
+		if(bordersComplete!=null)
+			bordersComplete.setSelected(!autoAdjustement && inSelection);
+		
+		repaint();
+	}
+
+	
+	
+	
+	public String getLatexDocument()
+	{
+		String packages		= getParentPanel().getCodePanel().getDocumentPackages();
+		String eol 			= System.getProperty("line.separator");//$NON-NLS-1$
+		StringBuffer doc 	= new StringBuffer();
+		parentPanel.updateCode();
+		String code 		= parentPanel.getCodePanel().getEditor().getCode(false, false);
+		LaTeXDrawPoint2D se = bordersComplete.getTheSEPoint();
+
+		if(packages==null)
+			packages = "";
+		
+		doc.append("\\documentclass{article}").append(eol).append("\\pagestyle{empty}").append(eol).append(packages).append(eol).append(
+			"\\usepackage[left=0cm,top=0.1cm,right=0cm,nohead,nofoot,paperwidth=").append(
+			se.x/pixelsPerCm).append("cm,paperheight=").append(
+			se.y/pixelsPerCm+0.3).append("cm]{geometry}").append(
+			eol).append("\\usepackage[usenames,dvipsnames]{pstricks}").append(//$NON-NLS-1$//$NON-NLS-2$
+			eol).append("\\usepackage{pstricks-add}").append(eol).append("\\usepackage{epsfig}").append(//$NON-NLS-1$//$NON-NLS-2$
+			eol).append("\\usepackage{pst-grad}").append(eol).append("\\usepackage{pst-plot}").append(eol).append(//$NON-NLS-1$//$NON-NLS-2$
+			 "\\begin{document}").append(eol).append(
+			"\\addtolength{\\oddsidemargin}{-0.2in}").append(eol).append("\\addtolength{\\evensidemargin}{-0.2in}").append(
+			eol).append(code).append(eol).append("\\end{document}");//$NON-NLS-1$//$NON-NLS-2$
+
+		return doc.toString();
+	}
+	
+	
+	
+	public File createLatexFile(String pathExportTex)
+	{
+		if(pathExportTex==null)
+			return null;
+		
+		try {
+			String doc 				= getLatexDocument();
+			FileOutputStream fos   	= new FileOutputStream(pathExportTex);
+			OutputStreamWriter osw 	= new OutputStreamWriter(fos);
+			
+			osw.append(doc);
+			osw.flush();
+			osw.close();
+			fos.flush();
+			fos.close();
+			
+			return new File(pathExportTex);
+		}
+		catch(Exception e) { return null; }
+	}
+	
+	
+	private void showErrorDialogLatexCompilation(String log) {
+		String text = log==null || log.length()==0 ? "Check the path of your latex distribution in your preferences." : log;
+		ExceptionFrameDialog dialog = new ExceptionFrameDialog(new IllegalAccessException(text));
+		
+		dialog.setTitle("Document not created");
+		dialog.setInfoLabel("The document cannot be created.");
+		dialog.getEditor().setText(text);
+		dialog.getEditor().setCaretPosition(0);
+		dialog.setVisible(true);
+	}
+	
+	
+	
+	/**
+	 * Create a .ps file that corresponds to the compiled latex document containing
+	 * the pstricks drawing.
+	 * @param latexDistribPath The path locating latex.
+	 * @param pathExportPs The path of the .ps file to create (MUST ends with .ps).
+	 * @param tmpDir The temporary folder that will be used to contain temp files.
+	 * If null, a new temp folder is created.
+	 * @return The create file or null.
+	 * @throws IllegalArgumentException If a problem occurs.
+	 * @since 2.1
+	 */
+	private File createPSFile(String latexDistribPath, String pathExportPs, File tmpDir) {
+		if(latexDistribPath==null)
+			return null;
+		
+		String dirBin   = parentPanel.getFrameParent().getPathDistribLatex();
+		String sep		= System.getProperty("file.separator");	//$NON-NLS-1$
+		File tmpDir2	= tmpDir==null ? createTempDir() : tmpDir;
+		
+		if(tmpDir2==null) {
+			System.err.println("Cannot create a temporary folder.");
+			return null;
+		}
+		
+		String path		= tmpDir2 + sep + "latexdrawTmp" + System.currentTimeMillis();	//$NON-NLS-1$
+		File texFile    = createLatexFile(path + TeXFilter.TEX_EXTENSION);
+		String log;
+		File finalPS;
+		LaTeXDrawPoint2D nw = bordersComplete.getTheNWPoint(), se = bordersComplete.getTheSEPoint();
+		float dec		= 0.2f;
+		
+		if(texFile==null || !texFile.exists())
+			return null;
+
+		String[] paramsLatex = new String[] {dirBin+"latex", "--interaction=nonstopmode", "--output-directory=" + tmpDir,//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+											texFile.getAbsolutePath()};
+		String[] paramsDvi = new String[] {dirBin+"dvips", "-N", "-T", ((se.x-nw.x)/pixelsPerCm+dec)+"cm,"+((se.y-nw.y)/pixelsPerCm+dec)+"cm",
+											path+".dvi", "-o", pathExportPs};
+		dirBin = dirBin==null ? "" : dirBin.endsWith(sep) || dirBin.length()==0 ? dirBin : dirBin + sep;
+		log    = execute(paramsLatex);
+		log   += execute(paramsDvi);
+		
+		texFile.delete();
+		new File(path + ".dvi").delete();					//$NON-NLS-1$
+		new File(path + ".log").delete();					//$NON-NLS-1$
+		new File(path + ".aux").delete();					//$NON-NLS-1$
+		
+		finalPS = new File(pathExportPs);
+		
+		if(!finalPS.exists()) {
+			showErrorDialogLatexCompilation(log);
+			finalPS = null;
+		}
+		
+		if(tmpDir==null)
+			tmpDir2.delete();
+		
+		return finalPS;
+	}
+	
+	
+	/**
+	 * Create a .ps file that corresponds to the compiled latex document containing
+	 * the pstricks drawing.
+	 * @param latexDistribPath The path locating latex.
+	 * @param pathExportPs The path of the .ps file to create (MUST ends with .ps).
+	 * @return The create file or null.
+	 * @throws IllegalArgumentException If a problem occurs.
+	 * @since 2.1
+	 */
+	public File createPSFile(String latexDistribPath, String pathExportPs){
+		return createPSFile(latexDistribPath, pathExportPs, null);
+	}
+	
+	
+	
+	/**
+	 * Creates a temporary directory that will be used to contains temporary latex files.
+	 * The created folder will have restricted access: only the user can access the folder.
+	 * @return The created folder or null.
+	 */
+	private File createTempDir() {
+		String pathTmp  = System.getProperty("java.io.tmpdir");	//$NON-NLS-1$
+		String sep		= System.getProperty("file.separator");	//$NON-NLS-1$
+		String path		= pathTmp + (pathTmp.endsWith(sep) ? "" : sep) + "latexdrawTmp" + System.currentTimeMillis();
+		File tmpDir		= new File(path);
+		boolean ok		= tmpDir.mkdir();
+		
+
+		tmpDir.setReadable(false, false);// Rights are removed for everybody.
+		tmpDir.setReadable(true, true); // They are added to the owner only.
+		tmpDir.setWritable(false, false);// same thing here.
+		tmpDir.setWritable(true, true);
+		
+		return ok ? tmpDir : null;
+	}
+	
+	
+	
+	/**
+	 * Create a .pdf file that corresponds to the compiled latex document containing
+	 * the pstricks drawing.
+	 * @param latexDistribPath The path locating latex.
+	 * @param pathExportPdf The path of the .pdf file to create (MUST ends with .pdf).
+	 * @return The create file or null.
+	 * @throws IllegalArgumentException If a problem occurs.
+	 * @since 2.1
+	 */
+	public File createPDFFile(String latexDistribPath, String pathExportPdf)
+	{
+		if(pathExportPdf==null)
+			return null;
+		
+		String dirBin   = parentPanel.getFrameParent().getPathDistribLatex();
+		String sep		= System.getProperty("file.separator");	//$NON-NLS-1$
+		File tmpDir		= createTempDir();
+		
+		if(tmpDir==null) {
+			System.err.println("Cannot create a temporary folder.");
+			return null;
+		}
+		
+		String path		= tmpDir.getAbsolutePath() + sep + "latexdrawTmp" + System.currentTimeMillis();//$NON-NLS-1$
+		File psFile 	= createPSFile(latexDistribPath, path + PSFilter.PS_EXTENSION, tmpDir);
+		String log;
+		File pdfFile;
+		
+		if(psFile==null)
+			return null;
+		
+		dirBin  = dirBin==null ? "" : dirBin.endsWith(sep) || dirBin.length()==0 ? dirBin : dirBin + sep;
+		log 	= execute(new String[] {dirBin + "ps2pdf", psFile.getAbsolutePath(), pathExportPdf});
+		pdfFile = new File(pathExportPdf);
+		psFile.delete();
+		
+		if(!pdfFile.exists()) {
+			showErrorDialogLatexCompilation(log);
+			pdfFile = null;
+		}
+		
+		tmpDir.delete();
+				
+		return pdfFile;
+	}
+	
+	
+	
+	/**
+	 * Allows to export the drawing as a eps file
+	 * @param file The new eps file
+	 */	
+	public void exportAsEPS(File file) 
+	{
+		try
+		{
+			if(bordersComplete==null)
+				updateBorders();
+			
+			LaTeXDrawPoint2D NW = bordersComplete.getTheNWPoint(), SE = bordersComplete.getTheSEPoint();	
+			int dec = 5;	
+			FileOutputStream finalImage = new FileOutputStream(file);
+			EpsGraphics2D g = new EpsGraphics2D("LaTeXDraw",  //$NON-NLS-1$
+					finalImage, (int)(NW.x-dec), (int)(NW.y-dec), (int)(SE.x+dec), (int)(SE.y+dec));
+			
+			selected.setSelected(false);
+			paintFigures(g, false, false);
+			g.flush();
+			g.close();
+			finalImage.close();
+			
+			selected.setSelected(true);
+		}
+		catch(Exception e)
+		{ 
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to export the drawing as a PPM file
+	 * @param file The new PPM file
+	 */
+	public void exportAsPPMFile(File file)
+	{
+		BufferedImage bufImage = createRenderedImage();
+		
+		if(bufImage==null)
+			return ;
+		
+		try 
+		{
+			PNMCodec codec = new PNMCodec();
+			codec.setFile(file.getAbsolutePath(), CodecMode.SAVE);
+			BufferedRGB24Image img = new BufferedRGB24Image(bufImage);
+			codec.setImage(img); 
+			codec.process();
+			
+			codec.close();
+			bufImage.flush();
+			
+			bufImage = null;
+			img   = null;
+			codec = null;
+	    }
+		catch(Exception e) 
+	    {
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+	    }
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to export the drawing as a bmp file
+	 * @param file The new bmp file
+	 */
+	public void exportAsBMP(File file)
+	{
+		RenderedImage rendImage = createRenderedImage();
+		
+		if(rendImage==null)
+			return ;
+		
+		try 
+		{
+			ImageWriteParam iwparam = new BMPImageWriteParam();
+			iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+			ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
+			ImageOutputStream ios = ImageIO.createImageOutputStream(file);
+			iw.setOutput(ios);
+			
+			iw.write(null, new IIOImage(rendImage, null, null), iwparam);
+			iw.dispose();
+			ios.close();
+	    }
+		catch(Exception e) 
+	    {
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+	    }
+	}
+	
+	
+
+	
+	/**
+	 * Allows to export the drawing as a png file
+	 * @param file The new png file
+	 */
+	public void exportAsPNG(File file)
+	{
+		RenderedImage rendImage = createRenderedImage();
+		
+		if(rendImage==null)
+			return ;
+		
+		try { ImageIO.write(rendImage, "png", file); } //$NON-NLS-1$
+		catch(IOException e) 
+	    {
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+	    }
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to export the drawing as a jpg file.
+	 * @param file The new jpg file.
+	 * @param compressionRate The compression rate of the pictures.
+	 */
+	public void exportAsJPG(File file, float compressionRate)
+	{
+		RenderedImage rendImage = createRenderedImage();
+		
+		if(rendImage==null)
+			return ;
+		
+		try 
+		{
+			ImageWriteParam iwparam = new JPEGImageWriteParam(Locale.getDefault());
+			iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+			iwparam.setCompressionQuality(compressionRate);
+			ImageWriter iw = ImageIO.getImageWritersByFormatName("jpg").next();//$NON-NLS-1$
+			ImageOutputStream ios = ImageIO.createImageOutputStream(file);
+			iw.setOutput(ios);
+			
+			iw.write(null, new IIOImage(rendImage, null, null), iwparam);
+			iw.dispose();
+			ios.close();
+	    }
+		catch(IOException e) 
+	    {
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+	    }
+	}
+	
+	
+	
+	
+	public BufferedImage createRenderedImage()
+	{
+		try 
+		{// Creation of the first buffer : the drawing and the empty white space
+			if(bordersComplete==null) 
+				updateBorders();
+			
+			LaTeXDrawPoint2D NW = bordersComplete.getTheNWPoint(), SE = bordersComplete.getTheSEPoint();
+
+			double dec = 5.;
+			double width = Math.abs(NW.x - SE.x)+dec;
+			double height = Math.abs(NW.y - SE.y)+dec;
+
+			BufferedImage bufferImage = new BufferedImage(
+					(int)(SE.x+dec), (int)(SE.y+dec), BufferedImage.TYPE_INT_RGB);
+			Graphics2D graphic = bufferImage.createGraphics();
+					
+			graphic.setColor(Color.WHITE);
+			graphic.fillRect(0, 0, (int)(SE.x+dec), (int)(SE.y+dec));
+
+			Draw selection = getSelected();
+			isSelection(false);
+			
+			paintFigures(graphic, false, false);
+			
+			setSelected(selection);
+			
+			// To delete the empty whitespace, we do a translation to
+			// the North-West point of the drawing (dec : to avoid to cut
+			// the start of some figures, we let a few white space around
+			// the drawing.
+			AffineTransform aff = new AffineTransform();
+			aff.translate(-NW.x+dec, -NW.y+dec);
+			
+			BufferedImage bufferImage2 = new BufferedImage(
+					(int)(width+dec), (int)(height+dec), BufferedImage.TYPE_INT_RGB);
+			Graphics2D graphic2 = bufferImage2.createGraphics();
+			graphic2.setColor(Color.WHITE);
+			graphic2.fillRect(0, 0, (int)(width+dec), (int)(height+dec));
+			
+			// We add quality to the drawing
+			graphic2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+			graphic2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+			graphic2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
+									  RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+			graphic2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, 
+									  RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+			graphic2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, 
+									  RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+			
+			// We draw the new picture
+			graphic2.drawImage(bufferImage, aff, null);
+			
+			graphic.dispose();
+			graphic2.dispose();
+			bufferImage.flush();
+			graphic      = null;
+			graphic2	 = null;
+			bufferImage	 = null;
+			
+			return bufferImage2;
+		}
+		catch(Exception e)
+		{ 
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+			return null;
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * This method allows to know if the project has been
+	 * modified or not
+	 * @return true if the project has been modified
+	 */
+	public boolean isModified()
+	{
+		return isModified;
+	}
+	
+	
+	
+	
+	/**
+	 * This method allow to set the variable "selected" to null
+	 * if the user doesn't want to select a figure.
+	 * @param is false : the user doesn't want to select a figure
+	 */
+	public void isSelection(boolean is)
+	{
+		try
+		{
+			inSelection = is;
+			
+			if(bordersComplete!=null)
+			{
+				bordersComplete.setSelected(is && !parentPanel.getFrameParent().isAutoAdjustBorders());
+				repaint();
+			}
+				
+			if(!is && !selected.isEmpty())
+			{
+				selected.setSelected(false);			
+				selected = new Draw(false, false);
+				selected.setOnRotation(isOnRotation());
+				repaint();
+			}
+		}
+		catch(Exception e) 
+		{ 
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	public boolean onClick(Point pt, MouseEvent e)
+	{
+		if(pt==null)
+			return false;
+		
+		if(!autoAdjustement && !figures.isEmpty())
+		{
+			bordersComplete.setSelected(true);
+			
+			if(drawBorders && bordersComplete.isIn(pt))
+			{
+				selected.setSelected(false);
+				selected.clear();
+				bordersComplete.onClick(pt);
+				return false;
+			}
+			bordersComplete.onDelimitorRelease();
+		}
+		
+		boolean isIn = false;
+		int size = figures.size(), i=size-1;
+		
+		try
+		{
+			while(i>=0 && !isIn)
+				if(figures.elementAt(i).isIn(pt))
+					isIn = true;
+				else i--;
+			
+			if(e.getModifiers()==InputEvent.CTRL_MASK+InputEvent.BUTTON1_MASK)
+			{
+				if(isIn)
+				{
+					Figure f = figures.elementAt(i);
+					
+					if(!selected.contains(f))//Don't add twice the same figure.
+					{
+						selected.addFigure(f);
+						selected.setSelected(true);
+					}
+					return true;
+				}
+				return false;
+			}
+			
+			if(e.getModifiers()==InputEvent.SHIFT_MASK+InputEvent.BUTTON1_MASK)
+			{
+				if(isIn)
+				{
+					Figure f = figures.elementAt(i);
+					
+					if(selected.contains(f))
+					{
+						f.setSelected(false);
+						selected.removeFigure(f);
+						selected.setSelected(true);
+					}
+					return true;
+				}
+				return false;
+			}
+			
+			if(isIn)
+			{
+				if(selected!=null && selected.contains(figures.elementAt(i)))
+				{
+					selected.setSelected(true);
+					selected.onClick(pt);
+					return true;
+				}
+				
+				if(selected!=null)
+					selected.setSelected(false);
+				
+				selected = new Draw(false, false);
+				selected.setOnRotation(isOnRotation());
+				selected.addFigure(figures.elementAt(i));
+				selected.setSelected(true);
+				return true;
+			}
+			
+			if(selected!=null && selected.size()>1 && selected.isIn(pt))
+			{
+				selected.setSelected(true);
+				selected.onClick(pt);
+				return true;
+			}
+			
+			if(selected!=null)
+			{
+				selected.setSelected(false);
+				selected.clear();
+			}
+			
+			selected = new Draw(false, false);
+			
+			return false;
+		}
+		catch(Exception ex)
+		{ 
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+			return false;
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the boolean autoAdjustement
+	 * @param state It's new state
+	 */
+	public void setAutoAdjustement(boolean state)
+	{
+		if(state!=autoAdjustement)
+		{
+			autoAdjustement = state;
+			setIsModified(true);
+		}
+		
+		if(bordersComplete!=null)
+			if(autoAdjustement)
+			{
+				updateBorders();
+				bordersComplete.setSelected(false);
+			}
+			else
+				bordersComplete.setSelected(inSelection);
+		
+		updateDraw();
+	}
+
+
+	
+	
+	/**
+	 * Allows to set the new selected figure
+	 * @param newSelected The new selected figure
+	 */
+	public void setSelected(Figure newSelected)
+	{
+		if(!selected.isEmpty())
+			selected.setSelected(false);
+
+		if(newSelected instanceof Draw && !((Draw)newSelected).isDrawFigures())
+			selected = (Draw) newSelected;
+		else
+		{
+			selected = new Draw(false,false);
+			
+			if(newSelected!=null)
+				selected.addFigure(newSelected);
+		}
+		
+		selected.setSelected(true);
+		selected.setOnRotation(isOnRotation());
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the variable isModified
+	 * @param state The new state of isModified
+	 */
+	public void setIsModified(boolean state)
+	{
+		isModified = state;
+		
+		if(parentPanel!=null && parentPanel.frameParent!=null)
+			parentPanel.frameParent.setTitle();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the parent of this container
+	 * @param p The new parent
+	 */
+	public void setParentPanel(DrawPanel p)
+	{
+		parentPanel = p;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the number of pixels per centimetre
+	 * @param pPerCm The new number of pixels per centimetre
+	 */
+	public void setPixelsPerCm(int pPerCm)
+	{
+		if(this.pixelsPerCm!=pPerCm)
+		{
+			pixelsPerCm = pPerCm;
+			setIsModified(true);
+			grid.setPixelsPerCm(pPerCm);
+		}
+	}
+
+
+	
+	
+	public void paintFigures(Graphics g, boolean withZoom, boolean withGrid)
+	{
+	   	if(g==null || figures==null) return;
+
+		Graphics2D g2 = (Graphics2D) g;
+		g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antiAliasingValue);
+		g2.setRenderingHint(RenderingHints.KEY_RENDERING, renderingValue);
+		g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, alphaInterpolValue);
+		g2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, colorRenderingValue);
+		
+    	try
+    	{
+    		if(isGridDisplayed() && withGrid)
+    		{
+	    		if(grid.getHeight()!=getHeight())
+	    			grid.setHeight(getHeight());
+	    		
+	    		if(grid.getWidth()!=getWidth())
+	    			grid.setWidth(getWidth());
+	    		
+	    		grid.paint(g2);
+    		}
+    		
+			if(withZoom)
+				g2.scale(getZoom(), getZoom());
+			
+	    	int size = figures.size(), i;
+	    	Figure currentFigure = parentPanel.getCurrentFigure();
+	    	
+	    	for(i = 0; i<size; i++)
+	    		figures.elementAt(i).draw(g2, antiAliasingValue, renderingValue, alphaInterpolValue, colorRenderingValue);   	
+	    	
+	    	if(currentFigure != null)
+	    		currentFigure.draw(g2, antiAliasingValue, renderingValue, alphaInterpolValue, colorRenderingValue);
+    	}
+    	catch(Exception e)
+    	{ 
+    		e.printStackTrace(); 
+    		ExceptionFrameDialog.showExceptionDialog(e);
+    	}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to display all the figures of the drawing
+	 */
+    @Override
+	public void paintComponent(Graphics g)
+    {   	
+    	super.paintComponents(g);
+    	
+    	g.setColor(Color.WHITE);
+    	g.fillRect(0, 0, getWidth(), getHeight());
+    	
+    	paintFigures(g, true, true);
+    		
+    	try
+    	{
+    		Graphics2D g2 = (Graphics2D) g;
+    		int size = figures.size();
+    		
+    		g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antiAliasingValue);
+    		g2.setRenderingHint(RenderingHints.KEY_RENDERING, renderingValue);
+    		g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, alphaInterpolValue);
+    		g2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, colorRenderingValue);
+    		
+	    	if(parentPanel.getBordersSelection()!=null)
+	    		parentPanel.getBordersSelection().draw(g2, antiAliasingValue, renderingValue, alphaInterpolValue, colorRenderingValue);
+	    	
+	    	if(selected!=null && !selected.isEmpty())
+	    		selected.draw(g2, antiAliasingValue, renderingValue, alphaInterpolValue, colorRenderingValue);
+
+	    	if(drawBorders && size>0)
+	    	{ 
+	    		if(bordersComplete==null)
+	    			updateBorders();
+	    		
+	    		bordersComplete.draw(g2, antiAliasingValue, renderingValue, alphaInterpolValue, colorRenderingValue);
+	    	}
+    	}
+    	catch(Exception e) { e.printStackTrace(); }
+    	
+    	g.dispose();
+    }
+    
+    
+    
+    
+    /**
+	 * Allows to access to the borders (the axes) of the drawing;<br>
+	 * see bordersReal for more informations.
+	 * @return The complete borders of the drawing
+	 */
+	public DrawBorders getCompleteBorders()
+	{
+		return bordersComplete;
+	}
+
+	
+	
+	
+    /**
+	 * Allows to access to the real borders of the drawing;<br>
+	 * see bordersReal for more informations.
+	 * @return The real borders of the drawing
+	 */
+	public DrawBorders getRealBorders()
+	{
+		return bordersReal;
+	}
+
+	
+	
+	
+	/**
+     * Allows to get the pstricks code of the drawing.
+     * @return the pstricks code.
+     */
+	public String getPSTricksCode()
+    {
+    	int i, size = figures.size();
+    	String code = ""; //$NON-NLS-1$
+    	
+    	try
+    	{
+	    	for(i=0; i<size; i++)
+	    	{
+	    		Figure f = figures.elementAt(i);
+	    		code += f.getCodePSTricks(bordersReal, pixelsPerCm) + "\n"; //$NON-NLS-1$
+	    	}
+    	}
+    	catch(Exception e)
+    	{ 
+    		e.printStackTrace(); 
+    		ExceptionFrameDialog.showExceptionDialog(e);
+    	}
+    	     	
+    	return DviPsColors.getUserColoursCode(code) + code;
+    }
+    
+    
+    
+    
+    
+    /**
+	 * Allows to get the number of figures
+	 * @return The number of figures
+	 */
+	public int getNbFigures()
+	{
+		if(figures==null) return 0;
+		return figures.size();
+	}
+
+
+	
+	
+	/**
+	 * Allows to get the number of pixels per centimetre
+	 * @return The number of pixels per centimetre
+	 */
+	public int getPixelsPerCm() 
+	{
+		return pixelsPerCm;
+	}
+
+	
+	
+
+	/**
+	 * Allows to get the selected figure (if there is a one)
+	 * @return The selected figures or null
+	 */
+	public Draw getSelected()
+	{
+		return selected;
+	}
+
+
+	
+	
+	/**
+	 * Allows to get the most top right point of the drawing (North-East point).
+	 * see bordersReal for more informations.
+	 * @return The top right point of the drawing
+	 * @throws Exception 
+	 */	
+	public LaTeXDrawPoint2D getTheCompleteNEPoint() throws Exception
+	{
+		if(bordersComplete==null)
+			updateBorders();
+		
+		return bordersComplete.getTheNEPoint();
+	}
+
+
+	
+	
+	/**
+	 * Allows to get the real top right point of the drawing (North-East point).
+	 * see bordersReal for more informations.
+	 * @return The top right point of the drawing
+	 * @throws Exception 
+	 */	
+	public LaTeXDrawPoint2D getTheRealNEPoint() throws Exception
+	{
+		if(bordersReal==null)
+			updateBorders();
+		
+		return bordersReal.getTheNEPoint();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the most bottom left point of the drawing (South-West point).
+	 * see bordersReal for more informations.
+	 * @return The bottom left point of the drawing
+	 * @throws Exception 
+	 */
+	public LaTeXDrawPoint2D getTheCompleteSWPoint() throws Exception
+	{
+		if(bordersComplete==null)
+			updateBorders();
+		
+		return bordersComplete.getTheSWPoint();
+	}
+
+
+	
+	
+	/**
+	 * Allows to get the real bottom left point of the drawing (South-West point).
+	 * see bordersReal for more informations.
+	 * @return The bottom left point of the drawing
+	 * @throws Exception 
+	 */
+	public LaTeXDrawPoint2D getTheRealSWPoint() throws Exception
+	{
+		if(bordersReal==null)
+			updateBorders();
+		
+		return bordersReal.getTheSWPoint();
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to update the drawing
+	 */
+	public void updateDraw()
+	{	
+		updateBorders();	
+		updatePreferredSize();
+		repaint();
+		revalidate(); 	
+	}
+	
+	
+	
+	
+	/**
+     * Allows to update the dimensions of the drawing (needed for
+     * the scrollers)
+     */
+	public void updatePreferredSize()
+	{ 
+			if(bordersComplete==null)
+				setPreferredSize(new Dimension(0, 0));
+			else
+			{
+				try
+				{
+					setPreferredSize(new Dimension(
+								 (int) ((bordersComplete.getTheSEPoint().x+10)*zoom), 
+								 (int) ((bordersComplete.getTheSEPoint().y+10)*zoom)));
+				}
+				catch(Exception e) 
+				{ 
+					e.printStackTrace(); 
+					ExceptionFrameDialog.showExceptionDialog(e);
+				}
+			}
+	}
+	
+
+	
+	
+	/**
+	 * Allows to print the drawing
+	 */
+	public int print(Graphics g, PageFormat pformat, int pageIndex) throws PrinterException 
+	{
+		if (pageIndex >= 1) return Printable.NO_SUCH_PAGE;
+		
+		Graphics2D g2 = (Graphics2D)g;
+		
+		if(bordersComplete==null)
+			updateBorders();
+		
+		try
+		{ 
+			LaTeXDrawPoint2D SE = bordersComplete.getTheSEPoint(); 
+			
+			g2.translate(pformat.getImageableX(), pformat.getImageableY());
+			g2.translate(pformat.getImageableWidth()/2, pformat.getImageableHeight()/2);
+			
+			// Id the drawing is to big for the page, we resize the drawing
+			double scale = Math.min( pformat.getImageableWidth()/SE.x, pformat.getImageableHeight()/SE.y);
+			
+			 if(scale<1.0) // We resize the drawing
+				 g2.scale(scale, scale);
+			 
+			g2.translate(-SE.x/2.0, -SE.y/2.0);
+			g2.dispose();
+			paintFigures(g2, false, false);
+		}
+		catch(Exception e) 
+		{ 
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		
+		return Printable.PAGE_EXISTS;
+	}
+
+	
+	
+	public Dimension getPreferredScrollableViewportSize()
+	{	return new Dimension(-100, 100);  }
+	
+
+	
+	public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) 
+	{
+        return (orientation == SwingConstants.VERTICAL) ? visibleRect.height : visibleRect.width;
+	}
+	
+	
+	
+	public boolean getScrollableTracksViewportHeight()
+	{
+		return getParent() instanceof JViewport ? ((JViewport)getParent()).getHeight() > getPreferredSize().height : false;
+	}
+	
+
+	public boolean getScrollableTracksViewportWidth()
+	{
+		return getParent() instanceof JViewport ? ((JViewport)getParent()).getWidth() > getPreferredSize().width : false;
+	}
+	
+
+	
+	public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)  
+	{
+		return 4;
+	}
+
+
+
+
+	/**
+	 * Allows to copy the selected figure
+	 */
+	public void copy() 
+	{
+		try
+		{
+			if(!selected.isEmpty())
+			{
+				copiedFigure = (Draw) selected.clone();
+				parentPanel.getFrameParent().setMenuPaste(true);
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+
+
+
+	/**
+	 * Allows to paste a copied or a cut figure
+	 */
+	public void paste()
+	{
+		try
+		{
+			if(copiedFigure!=null)
+			{
+				int i, size =  copiedFigure.size();
+				double gap = parentPanel.isGridMagnetic() ? grid.getMagneticGridGap() : 10;
+				selected.setSelected(false);
+				selected.clear();
+				
+				for(i=0; i<size;i++)
+					copiedFigure.getFigureAt(i).shift(gap, gap);
+				
+				Draw f = (Draw) copiedFigure.clone();				
+				
+				for(i=0; i<size; i++)
+					addFigure(copiedFigure.getFigureAt(i), parentPanel.getFrameParent().getUndoManager());
+				
+				copiedFigure.updateBorders();
+				setSelected(copiedFigure);
+				copiedFigure.setSelected(true);
+				parentPanel.getFrameParent().setSelection(true);
+				parentPanel.getFrameParent().setExportAsMenu(!figures.isEmpty());
+				copiedFigure = f;
+				
+			}
+			else
+				parentPanel.getFrameParent().setMenuPaste(false);
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+
+
+
+	/**
+	 * Allows to cut the selected figure
+	 */
+	public void cut() 
+	{
+		try
+		{
+			if(selected!=null && !selected.isEmpty())
+			{		
+				copiedFigure = (Draw) selected.clone();
+				Draw cloneUndo = (Draw) selected.clone();
+				int[] id = new int[selected.size()];
+				
+				for(int i=0, size=selected.size(); i<size; i++)
+				{
+					id[i] = figures.indexOf(selected.getFigureAt(i));
+					if(id[i]<0)
+						throw new IndexOutOfBoundsException();
+				}
+
+				parentPanel.getFrameParent().getUndoManager().add(UndoRedoManager.LABEL_DEL, id, cloneUndo, false);
+				parentPanel.getFrameParent().updateUndoRedo();
+				
+				for(int i=0; i<selected.size();)
+					deleteFigure(selected.getFigureAt(i), null);
+				
+				parentPanel.getFrameParent().setMenuCopy(false);
+				parentPanel.getFrameParent().setSelection(false);
+				parentPanel.getFrameParent().setMenuPaste(true);
+				parentPanel.getFrameParent().setExportAsMenu(!figures.isEmpty());
+				selected.clear();
+				parentPanel.updateDraw(true);
+				setIsModified(true);
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	@SuppressWarnings("unchecked") 
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0)//$NON-NLS-1$
+		{
+			int nbFigures = ois.readInt(), i;
+			figures = new Vector<Figure>();
+			for(i=0; i<nbFigures; i++)
+				try
+				{
+					Figure f = (Figure)ois.readObject();
+					figures.add(f);
+				}
+				catch(Exception e)
+				{  
+					System.out.println("A figure cannot be read !"); //$NON-NLS-1$ 
+				}
+		}
+		else
+		try { figures = (Vector<Figure>) ois.readObject(); }
+		catch(Exception e)
+		{ 
+			System.out.println("A figure cannot be read !"); //$NON-NLS-1$ 
+		}
+		
+		bordersComplete = (DrawBorders) ois.readObject();
+		drawBorders = ois.readBoolean();
+		autoAdjustement = ois.readBoolean();
+		inSelection = ois.readBoolean();
+		pixelsPerCm = ois.readInt();
+		zoom = ois.readDouble();
+		onRotation = ois.readBoolean();
+		
+		if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.5")>=0)//$NON-NLS-1$
+		{
+			unitForPixelsPerCm = (String)ois.readObject();
+			bordersReal = (DrawBorders)ois.readObject();
+			
+			boolean is18 = LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0;//$NON-NLS-1$
+			boolean is17 = LaTeXDrawFrame.getVersionOfFile().compareTo("1.7")>=0;//$NON-NLS-1$
+			
+			for(Figure f : figures)// We have to update the value which were not is pixels in the former releases.
+			{
+				if(is17)
+					f.setShadowSize(f.getShadowSize()*pixelsPerCm);
+				
+				if(is18)
+					f.setHatchingSep(f.getHatchingSep()*pixelsPerCm);
+				
+				if(f instanceof Arrowable)
+				{
+					ArrowHead ah1 = ((Arrowable)f).getArrowHead1();
+					ArrowHead ah2 = ((Arrowable)f).getArrowHead2();
+					
+					if(ah1!=null)
+					{
+						ah1.setFigure(f);
+						ah1.setDotSizeDim(ah1.getDotSizeDim()*pixelsPerCm);
+						ah1.setTBarSizeDim(ah1.getTBarSizeDim()*pixelsPerCm);
+						ah1.setArrowSizeDim(ah1.getArrowSizeDim()*pixelsPerCm);
+					}
+					
+					if(ah2!=null)
+					{
+						ah2.setFigure(f);
+						ah2.setDotSizeDim(ah2.getDotSizeDim()*pixelsPerCm);
+						ah2.setTBarSizeDim(ah2.getTBarSizeDim()*pixelsPerCm);
+						ah2.setArrowSizeDim(ah2.getArrowSizeDim()*pixelsPerCm);
+					}
+				}
+				
+				if(f instanceof Axe)
+					((Axe)f).setTicksSize(((Axe)f).getTicksSize()*pixelsPerCm);
+				
+				if(f instanceof Grid)
+				{
+					((Grid)f).setGridWidth(((Grid)f).getGridWidth()*pixelsPerCm);
+					((Grid)f).setSubGridWidth(((Grid)f).getSubGridWidth()*pixelsPerCm);
+				}
+			}
+		}
+		else
+		{
+			unitForPixelsPerCm = XScale.DEFAULT_UNIT;
+			updateBorders();
+		}
+		
+		grid = new MagneticGrid(getWidth(), getHeight(), pixelsPerCm, zoom);
+		isModified = false;
+		copiedFigure = null;	
+		selected = new Draw(false, false);	
+		setZoom(zoom);
+		setPixelsPerCm(pixelsPerCm);
+	}
+
+
+
+
+	/**
+	 * Allows to join the selected figures
+	 * @param undoManager The undo/redo manager
+	 */
+	public void joinSelection(UndoRedoManager undoManager)
+	{
+		try
+		{
+			if(selected!=null && !selected.isEmpty())
+			{
+				int size = selected.size(), i, min;
+				
+				if(size<2)
+					return ;
+				
+				Figure f;
+				int[] id = new int[size];
+				Draw d   = new Draw(true, true);
+				Hashtable<Integer, Figure> table = new Hashtable<Integer, Figure>();
+				
+				for(i=0; i<size; i++) {
+					id[i] = figures.indexOf(selected.getFigureAt(i));
+					table.put(id[i], figures.elementAt(id[i]));
+				}
+				
+				Arrays.sort(id);
+				min = id[0];
+				
+				for(i=0; i<id.length; i++) {
+					f = table.get(id[i]);
+					d.addFigure(f);
+					figures.remove(f);
+				}
+				
+				if(undoManager!=null)
+					undoManager.add(UndoRedoManager.LABEL_JOIN, id, null, false);
+					
+				d.setDrawFigures(true);
+				d.setSelected(false);
+				d.changeMeter();
+				figures.add(min, d);
+				selected.clear();
+				setSelected(d);
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+
+
+
+	/**
+	 * Allows to join the figures of the selected drawing
+	 * @param undoManager The undo/redo manager
+	 */
+	public void separateSelection(UndoRedoManager undoManager)
+	{
+		try
+		{
+			if(selected!=null && !selected.isEmpty())
+			{
+				Draw d = (Draw)selected.getFigureAt(0);
+				int i, size = d.size(), index = figures.indexOf(d);			
+				
+				if(undoManager!=null)
+					undoManager.add(UndoRedoManager.LABEL_SEPARATE, index, d.clone());
+				
+				deleteFigure(d, null);
+				selected.clear();
+				Figure f;
+				for(i=size-1; i>=0; i--)
+				{
+					f = d.getFigureAt(i);
+					figures.add(index, f);
+					selected.addFigure(f, 0);
+				}
+	
+				selected.updateBorders();
+				selected.setSelected(true);
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+	
+
+	
+	/**
+	 * Creates a thumbnail from the given selection in the given file.
+	 * @param templateFile The file of the future thumbnail.
+	 * @param selection The drawing the export.
+	 * @return True if the creation is successful
+	 * @since 1.9.2
+	 */
+	public boolean createTemplateThumbnail(File templateFile, Draw selection)
+	{
+		try
+		{
+			BufferedImage bufferImage;
+			LaTeXDrawPoint2D SE = selection.getTheSEBoundPoint();
+			LaTeXDrawPoint2D NW = selection.getTheNWBoundPoint();
+			double dec=8;
+			double width = Math.abs(SE.x-NW.x)+2*dec, height = Math.abs(SE.y-NW.y)+2*dec, maxSize = 20;
+		
+			bufferImage = new BufferedImage((int)width, (int)height, BufferedImage.TYPE_INT_RGB);
+			
+			Graphics2D graphic = bufferImage.createGraphics();
+			double scale = Math.min(maxSize/width,maxSize/height);
+			graphic.setColor(Color.WHITE);
+			graphic.fillRect(0, 0, (int)width, (int)height);	
+			graphic.scale(scale, scale);
+			graphic.translate(-NW.x+dec, -NW.y+dec);
+			
+			boolean formerIsSelected 		= selection.isSelected();
+			boolean formerMustDrawFigures 	= selection.isDrawFigures();
+			
+			selection.setSelected(false);
+			selection.setDrawFigures(true);
+			selection.draw(graphic, antiAliasingValue, renderingValue, alphaInterpolValue, colorRenderingValue);
+			selection.setDrawFigures(formerMustDrawFigures);
+			selection.setSelected(formerIsSelected);			
+			
+			AffineTransform aff = new AffineTransform();
+			aff.translate(0, 0);
+			
+			BufferedImage bufferImage2 = new BufferedImage((int)maxSize, (int)maxSize, BufferedImage.TYPE_INT_ARGB);
+			
+			Graphics2D graphic2 = bufferImage2.createGraphics();
+			graphic2.setColor(Color.WHITE);
+			graphic2.fillRect(0, 0, (int)maxSize, (int)maxSize);
+			graphic2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
+			graphic2.setRenderingHint(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
+			graphic2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
+									  RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+			graphic2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+			graphic2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+			
+			// We draw the template
+			graphic2.drawImage(bufferImage, aff, null);
+	
+			// We create the png file with the second picture
+			ImageWriteParam iwparam = new JPEGImageWriteParam(Locale.getDefault());
+			iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+			iwparam.setCompressionQuality(1);
+			ImageWriter iw = ImageIO.getImageWritersByFormatName("png").next();//$NON-NLS-1$
+			ImageOutputStream ios = ImageIO.createImageOutputStream(templateFile);
+			iw.setOutput(ios);
+			
+			iw.write(null, new IIOImage(bufferImage2, null, null), iwparam);
+			
+			iw.dispose();
+			ios.close();
+			graphic.dispose();
+			graphic2.dispose();
+			bufferImage.flush();
+			bufferImage2.flush();
+			ios			 = null;
+			iw			 = null;
+			graphic      = null;
+			graphic2     = null;
+			bufferImage  = null;
+			bufferImage2 = null;
+			
+			return true;
+		}
+		catch(Exception e) { return false; }
+	}
+	
+
+
+	/**
+	 * @return Returns the unitForPixelsPerCm.
+	 */
+	public String getUnitForPixelsPerCm()
+	{
+		return unitForPixelsPerCm;
+	}
+
+
+
+
+	/**
+	 * @param unitForPixelsPerCm The unitForPixelsPerCm to set.
+	 */
+	public void setUnitForPixelsPerCm(String unitForPixelsPerCm)
+	{
+		if(unitForPixelsPerCm!=null && !unitForPixelsPerCm.equals(this.unitForPixelsPerCm))
+		{
+			this.unitForPixelsPerCm = unitForPixelsPerCm;
+			
+			if(!grid.isPersonalGrid())
+				if(isUnitInCm())
+					grid.setType(MagneticGrid.TYPE_CM);
+				else
+					grid.setType(MagneticGrid.TYPE_INCH);
+		}
+	}
+
+	
+
+	
+	/**
+	 * Allows to insert a picture into the drawing
+	 * @param undoManager The undo/redo manager
+	 * @param path The path of the picture
+	 * @return True is the picture is inserted
+	 */
+	public boolean insertPicture(UndoRedoManager undoManager, String path)
+	{
+		try
+		{
+			addFigure(new Picture(true, new LaTeXDrawPoint2D(50,50), path), undoManager);
+			return true;
+		}
+		catch(Exception e) { return false; }
+	}
+
+
+
+	/**
+	 * @return the isGridDisplay
+	 */
+	public boolean isGridDisplayed()
+	{
+		return grid.isGridDisplayed();
+	}
+
+
+
+
+	@Override
+	public void setSize(int x, int y)
+	{
+		super.setSize(x, y);
+	}
+	
+	
+	
+	/**
+	 * @return True is the unit of length is the centimetre.
+	 */
+	public boolean isUnitInCm()
+	{
+		return unitForPixelsPerCm.equals(XScale.LABEL_CM);
+	}
+
+
+
+
+	/**
+	 * @return the personalGridGap.
+	 */
+	public int getPersonalGridGap()
+	{
+		return grid.getPersoInterval();
+	}
+
+
+
+
+	/**
+	 * @param personalGridGap the personalGridGap to set.
+	 * @throws IllegalArgumentException If lesser than 2.
+	 */
+	public void setPersonalGridGap(int personalGridGap)
+	{
+		grid.setPersoInterval(personalGridGap);
+		repaint();
+	}
+
+
+
+	/**
+	 * @return True if a classic grid is displayed.
+	 */
+	public boolean isClassicGridDrawn()
+	{
+		return !grid.isPersonalGrid();
+	}
+
+
+
+	/**
+	 * @param isClassicGridDrawn the isClassicGridDrawn to set.
+	 */
+	public void setClassicGridDrawn(boolean isClassicGridDrawn)
+	{
+		grid.setType(isClassicGridDrawn ? isUnitInCm() ? MagneticGrid.TYPE_CM : MagneticGrid.TYPE_INCH : MagneticGrid.TYPE_PERSONAL);
+	}
+
+	
+
+	/**
+	 * Rotate the selected figures with a defined angle.
+	 * @param angle The angle of rotation in radian.
+	 */
+	public void rotateSelection(double angle)
+	{
+		if(selected!=null && !selected.isEmpty())
+		{
+			try
+			{
+				Draw clone = (Draw)selected.clone();
+				int[] id = new int[selected.size()];
+				
+				for(int i=0, size=selected.size(); i<size; i++)
+				{
+					id[i] = figures.indexOf(selected.getFigureAt(i));
+					if(id[i]<0)
+						throw new IndexOutOfBoundsException();
+				}
+				
+				UndoRedoManager manager = parentPanel.getFrameParent().getUndoManager();
+				manager.add(UndoRedoManager.LABEL_TRANSFORM, id, clone, false);
+				parentPanel.getFrameParent().updateUndoRedo();
+			}
+			catch(Exception e)
+			{
+				e.printStackTrace();
+				ExceptionFrameDialog.showExceptionDialog(e);
+			}
+			
+			selected.rotate(selected.getGravityCenter(), angle);
+			
+			if(parentPanel.isGridMagnetic())
+				parentPanel.updateSelectionToGrid();
+			
+			parentPanel.updateDraw(true);
+			parentPanel.setIsModified(true);
+		}
+	}
+
+
+
+
+	/**
+	 * Return horizontally the selected figures.
+	 */
+	public void mirrorHorizontal()
+	{
+		try
+		{
+			if(selected!=null && !selected.isEmpty()) 
+			{
+				Draw clone = (Draw)selected.clone();
+				int[] id = new int[selected.size()];
+				
+				for(int i=0, size=selected.size(); i<size; i++)
+				{
+					id[i] = figures.indexOf(selected.getFigureAt(i));
+					if(id[i]<0)
+						throw new IndexOutOfBoundsException();
+				}
+				
+				UndoRedoManager manager = parentPanel.getFrameParent().getUndoManager();
+				manager.add(UndoRedoManager.LABEL_TRANSFORM, id, clone, false);
+				parentPanel.getFrameParent().updateUndoRedo();
+				selected.mirrorHorizontal(selected.getGravityCenter());
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		
+		parentPanel.updateDraw(true);
+		parentPanel.setIsModified(true);
+	}
+
+
+
+	/**
+	 * Return vertically the selected figures.
+	 */
+	public void mirrorVertical()
+	{
+		try
+		{
+			if(selected!=null && !selected.isEmpty()) 
+			{
+				Draw clone = (Draw)selected.clone();
+				int[] id = new int[selected.size()];
+				
+				for(int i=0, size=selected.size(); i<size; i++)
+				{
+					id[i] = figures.indexOf(selected.getFigureAt(i));
+					if(id[i]<0)
+						throw new IndexOutOfBoundsException();
+				}
+				
+				UndoRedoManager manager = parentPanel.getFrameParent().getUndoManager();
+				manager.add(UndoRedoManager.LABEL_TRANSFORM, id, clone, false);
+				parentPanel.getFrameParent().updateUndoRedo();
+				selected.mirrorVertical(selected.getGravityCenter());
+			}
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		
+		parentPanel.updateDraw(true);
+		parentPanel.setIsModified(true);
+	}
+
+
+
+
+	/**
+	 * @return the autoAdjustement.
+	 * @since 1.8
+	 */
+	public boolean isAutoAdjustement()
+	{
+		return autoAdjustement;
+	}
+
+
+
+	/**
+	 * Select all the figures of the current drawing.
+	 * @since 1.9
+	 */
+	public void selectAll()
+	{
+		if(figures.isEmpty())
+			return ;
+		
+		Draw selection = new Draw(false, false);
+		
+		for(Figure f : figures)
+			if(f!=null)
+				selection.addFigure(f);
+		
+		selection.setSelected(true);
+		setSelected(selection);
+		parentPanel.updateDraw(false);
+	}
+	
+	
+	
+	
+	/**
+	 * Recentre all the figures.
+	 */
+	public void recenterFigures()
+	{
+		if(figures==null) return ;
+		double xMin=Double.MAX_VALUE, yMin = Double.MAX_VALUE;
+		double dec = 20;
+		
+		for(Figure f : figures)
+			if(f!=null)
+			{
+				LaTeXDrawPoint2D NW = f.getTheNWBoundPoint();
+				if(NW.x<xMin) xMin = NW.x;
+				if(NW.y<yMin) yMin = NW.y;
+			}
+		
+		if(xMin>=dec && yMin>=dec) return ; // Already centred
+		
+		double shiftX = 0, shiftY = 0;
+		
+		if(xMin<dec)
+		{
+			shiftX = Math.abs(xMin)+dec;
+			if(yMin<dec)
+				shiftY = Math.abs(yMin)+dec;
+		}
+		else shiftY = Math.abs(yMin)+dec;
+		
+		for(Figure f : figures)
+			if(f!=null)
+				f.shift(shiftX, shiftY);
+		
+		if(selected!=null)
+			selected.updateBorders();
+		
+		if(((float)shiftX)!=0f || ((float)shiftY)!=0f)
+			setIsModified(true);
+	}
+
+
+	
+	/**
+	 * Select the first figure if no or several figures are selected; select the next figure if a single
+	 * figure is selected.
+	 * @since 1.9
+	 */
+	public void selectNextFigure()
+	{
+		if(figures.isEmpty())
+			return ;
+		
+		int id = 0;
+		Figure f2;
+		
+		if(selected==null)
+			selected = new Draw(false, false);
+		
+		if(selected.size()>1)
+			selected.clear();
+		
+		
+		if(selected.size()==1)
+		{
+			Figure f1 = selected.getFigureAt(0);
+			id = figures.indexOf(f1);
+			
+			if(id==-1)
+				return ;
+			
+			if(id==figures.size()-1)
+				id = 0;
+			else 
+				id++;
+			
+			selected.removeFigure(f1);
+
+			f1.setSelected(false);
+		}
+		
+		f2 = figures.elementAt(id);
+		selected.addFigure(f2);
+		selected.setSelected(true);
+		repaint();
+		parentPanel.frameParent.setSelection(true);
+	}
+
+
+
+
+	/**
+	 * @return the whichCodeOutput.
+	 * @since 2.0.0
+	 */
+	public short getWhichCodeOutput()
+	{
+		return whichCodeOutput;
+	}
+
+
+
+
+	/**
+	 * @param whichCodeOutput the whichCodeOutput to set.
+	 * @exception IllegalArgumentException If the given code is not valid.
+	 * @since 2.0.0
+	 */
+	public void setWhichCodeOutput(short whichCodeOutput)
+	{
+		if(whichCodeOutput!= CODE_PSTRICKS)
+			throw new IllegalArgumentException(String.valueOf(whichCodeOutput));
+		
+		this.whichCodeOutput = whichCodeOutput;
+	}
+	
+	
+	
+	
+	/**
+	 * @return The code of the drawing in the language specified by the attribute whichCodeOutput.
+	 * @since 2.0.0
+	 */
+	public String getCode()
+	{
+		switch(whichCodeOutput)
+		{
+			case CODE_PSTRICKS:
+				return getPSTricksCode();
+				
+			default:
+				throw new IllegalArgumentException(String.valueOf(whichCodeOutput));
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Define an Element containing the XML attributes of a LaTeXDraw DrawContainer.
+	 * @param document The XML document.
+	 * @param meta The meta data to complete.
+	 * @throws IllegalArgumentException If meta or document is null.
+	 * @since 2.0.0
+	 */
+	public void getXMLMetadata(SVGDocument document, Element meta)
+	{
+		if(document==null || meta==null)
+			throw new IllegalArgumentException();
+		
+        Element elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_DRAW_BORDERS);
+
+        elt.appendChild(document.createTextNode(String.valueOf(drawBorders)));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_AUTO_ADJUST);
+        elt.appendChild(document.createTextNode(String.valueOf(isAutoAdjustement())));
+        meta.appendChild(elt);
+        
+        if(!isAutoAdjustement() && bordersComplete!=null)
+        {// We have to save the dimension of the borders.
+        	LaTeXDrawPoint2D pt = bordersComplete.getTheNWPoint();
+        	
+        	elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_BORDER);
+        	elt.setAttribute(SVGAttributes.SVG_X, 	   String.valueOf(pt.x));
+        	elt.setAttribute(SVGAttributes.SVG_Y, 	   String.valueOf(pt.y));
+        	elt.setAttribute(SVGAttributes.SVG_HEIGHT, String.valueOf(bordersComplete.getHeight()));
+        	elt.setAttribute(SVGAttributes.SVG_WIDTH,  String.valueOf(bordersComplete.getWidth()));
+        	meta.appendChild(elt);
+        }
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_PPC);
+        elt.appendChild(document.createTextNode(String.valueOf(getPixelsPerCm())));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_ZOOM);
+        elt.appendChild(document.createTextNode(String.valueOf(getZoom())));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_UNIT);
+        elt.appendChild(document.createTextNode(getUnitForPixelsPerCm()));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_CLASSIC_GRID);
+        elt.appendChild(document.createTextNode(String.valueOf(isClassicGridDrawn())));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_GRID_GAP);
+        elt.appendChild(document.createTextNode(String.valueOf(getPersonalGridGap())));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_CODE);
+        elt.appendChild(document.createTextNode(String.valueOf(getWhichCodeOutput())));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_DISPLAY_GRID);
+        elt.appendChild(document.createTextNode(String.valueOf(isGridDisplayed())));
+        meta.appendChild(elt);
+	}
+	
+	
+
+
+	/**
+	 * @return The code of the selected figures.
+	 * @since 2.0.0
+	 */
+	public String getCodeSelection()
+	{
+		if(selected==null || selected.isEmpty())
+			return null;
+		
+		String code = "";//$NON-NLS-1$
+		String lineSep = System.getProperty("line.separator");//$NON-NLS-1$
+		
+		switch(getWhichCodeOutput())
+		{
+			case CODE_PSTRICKS:
+				for(Figure f : selected.getFigures())
+					code += f.getCodePSTricks(bordersReal, pixelsPerCm) + lineSep;
+				
+				code = DviPsColors.getUserColoursCode(code) + code; 
+				break;
+				
+			default:
+				return null;
+		}
+		
+		return code;
+	}
+	
+	
+
+	public void open(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		readObject(ois);
+	}
+
+
+	
+	/**
+	 * Align the selected figures.
+	 * @param alignCode The type of the alignment:
+	 * <ul>
+	 * <li>0: Align the selected figures to the figure on the left</li>
+	 * <li>1: Align the selected figures to the figure on the right</li>
+	 * <li>2: Align the selected figures to the figure on the top</li>
+	 * <li>3: Align the selected figures to the figure on the bottom</li>
+	 * <li>4: Align vertically the selected figures to the figure in the middle</li>
+	 * <li>5: Align horizontally the selected figures to the figure in the middle</li>
+	 * </ul>
+	 * @since 2.0.0
+	 */
+	public void align(int alignCode)
+	{
+		if(selected==null || selected.size()<2)
+			return ;
+		
+		try
+		{
+			int[] id = new int[selected.size()];
+			int i, size;
+			Draw clone = (Draw)selected.clone();
+			UndoRedoManager manager = parentPanel.getFrameParent().getUndoManager();
+			
+			for(i=0, size=selected.size(); i<size; i++)
+			{
+				id[i] = figures.indexOf(selected.getFigureAt(i));
+				
+				if(id[i]<0)
+					throw new IndexOutOfBoundsException();
+			}
+			
+			switch(alignCode)
+			{
+				case 0:
+					selected.alignLeft();
+					break;
+					
+				case 1:
+					selected.alignRight();
+					break;
+					
+				case 2:
+					selected.alignTop();
+					break;
+					
+				case 3:
+					selected.alignBottom();
+					break;
+					
+				case 4:
+					selected.alignMiddleVertically();
+					break;
+					
+				case 5:
+					selected.alignMiddleHorizontally();
+					break;
+					
+				default:
+					throw new IllegalArgumentException("Invalid alignment code: " + alignCode); //$NON-NLS-1$
+			}
+			
+			manager.add(UndoRedoManager.LABEL_ALIGN, id, clone, false);
+			parentPanel.getFrameParent().updateUndoRedo();
+			parentPanel.setIsModified(true);
+		}
+		catch(CloneNotSupportedException e) { e.printStackTrace(); }
+	}
+	
+	
+
+	/**
+	 * Distributes the selected figures.
+	 * @param distribCode The type of distribution:
+	 * <ul>
+	 * <li>0: distributes vertically at equal distance between the bottom sides of the selected figures</li>
+	 * <li>1: distributes vertically at equal distance between the middle of the selected figures</li>
+	 * <li>2: distributes vertically at equal distance between the top sides of the selected figures</li>
+	 * <li>3: distributes horizontally at equal distance between the selected figures</li>
+	 * <li>4: distributes vertically at equal distance between the left sides of the selected figures</li>
+	 * <li>5: distributes vertically at equal distance between the middle of the selected figures</li>
+	 * <li>6: distributes vertically at equal distance between the right sides of the selected figures</li>
+	 * <li>7: distributes vertically at equal distance between the selected figures</li>
+	 * </ul>
+	 * @since 2.0.0
+	 */
+	public void distribute(int distribCode)
+	{
+		if(selected==null || selected.size()<2)
+			return ;
+		
+		try
+		{
+			int[] id = new int[selected.size()];
+			int i, size;
+			Draw clone = (Draw)selected.clone();
+			UndoRedoManager manager = parentPanel.getFrameParent().getUndoManager();
+			
+			for(i=0, size=selected.size(); i<size; i++)
+			{
+				id[i] = figures.indexOf(selected.getFigureAt(i));
+				
+				if(id[i]<0)
+					throw new IndexOutOfBoundsException();
+			}
+			
+			switch(distribCode)
+			{
+				case 0:
+					selected.distributeVertBottom();
+					break;
+					
+				case 1:
+					selected.distributeVertMiddle();
+					break;
+					
+				case 2: 
+					selected.distributeVertTop();
+					break;
+					
+				case 3:
+					selected.distributeVertEqual();
+					break;
+					
+				case 4:
+					selected.distributeHorizLeft();
+					break;
+					
+				case 5:
+					selected.distributeHorizMiddle();
+					break;
+					
+				case 6:
+					selected.distributeHorizRight();
+					break;
+					
+				case 7:
+					selected.distributeHorizEqual();
+					break;
+					
+				default:
+					throw new IllegalArgumentException("Invalid distribution code: " + distribCode); //$NON-NLS-1$
+			}
+			
+			manager.add(UndoRedoManager.LABEL_DISTRIB, id, clone, false);
+			parentPanel.getFrameParent().updateUndoRedo();
+			parentPanel.setIsModified(true);
+		}
+		catch(CloneNotSupportedException e) { e.printStackTrace(); }
+	}
+	
+	
+
+	/**
+	 * Sets the latexdraw parameters from the <code>metadata</code> SVG tag.
+	 * @param meta The tag source of the parameters.
+	 * @since 2.0.0
+	 */
+	public void setXMLMetadata(SVGMetadataElement meta)
+	{
+		if(meta==null)
+			return ;
+		
+		Node n;
+		String name;
+		int i = 0, size;
+		boolean displayGrid = false;
+		NodeList nl = meta.getElementsByTagNameNS(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI, SVGElements.SVG_METADATA);
+		
+		if(nl==null || nl.getLength()==0)
+			return;
+		
+		nl = nl.item(0).getChildNodes();
+		
+		for(i=0, size=nl.getLength(); i<size; i++)//analysis of the parameters. 
+		{
+			n = nl.item(i);
+			
+			if(n!=null && LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI.equals(n.getNamespaceURI()))
+			{
+				name = n.getNodeName();
+				
+				try
+				{
+					if(name.endsWith(LaTeXDrawNamespace.XML_AUTO_ADJUST))
+					{
+						boolean is = Boolean.valueOf(n.getTextContent()).booleanValue();
+						
+						if(bordersComplete==null)
+							bordersComplete = new DrawBorders(false);
+						
+						setAutoAdjustement(is);
+						parentPanel.getFrameParent().getLMenuBar().getAutoAdjustBorders().setSelected(is);
+					}
+					else if(name.endsWith(LaTeXDrawNamespace.XML_BORDER))
+					{
+						NamedNodeMap nnm = n.getAttributes();
+						double x = Double.valueOf(nnm.getNamedItem(SVGAttributes.SVG_X).getNodeValue()).doubleValue();
+						double y = Double.valueOf(nnm.getNamedItem(SVGAttributes.SVG_Y).getNodeValue()).doubleValue();
+						double w = Double.valueOf(nnm.getNamedItem(SVGAttributes.SVG_WIDTH).getNodeValue()).doubleValue();
+						double h = Double.valueOf(nnm.getNamedItem(SVGAttributes.SVG_HEIGHT).getNodeValue()).doubleValue();
+						
+						if(bordersComplete==null)
+							bordersComplete = new DrawBorders(false);
+						
+						bordersComplete.setFirstPoint(x, y);
+						bordersComplete.setLastPoint(x+w, y+h);
+					}
+					else if(name.endsWith(LaTeXDrawNamespace.XML_PPC))
+						setPixelsPerCm(Double.valueOf(n.getTextContent()).intValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_ZOOM))
+						setZoom(Double.valueOf(n.getTextContent()).doubleValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_UNIT))
+						setUnitForPixelsPerCm(n.getTextContent());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_CLASSIC_GRID))
+						setClassicGridDrawn(Boolean.valueOf(n.getTextContent()).booleanValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_GRID_GAP))
+						setPersonalGridGap(Double.valueOf(n.getTextContent()).intValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_CODE))
+						setWhichCodeOutput(Double.valueOf(n.getTextContent()).shortValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_DISPLAY_GRID))
+						displayGrid = Boolean.valueOf(n.getTextContent()).booleanValue();
+				}
+				catch(Exception e) { System.out.println(name + ": invalid value."); } //$NON-NLS-1$
+			}
+		}
+		
+		setGridDisplayed(displayGrid);
+		parentPanel.setXMLMetadata(nl);
+		parentPanel.frameParent.setXMLMetadata(nl);
+		parentPanel.codePanel.setXMLMetadata(nl);
+	}
+
+	
+	
+	/**
+	 * Sets if the grid must be displayed and updates the menu.
+	 * @param displayed
+	 * @since 2.0.0
+	 */
+	public void setGridDisplayed(boolean displayed)
+	{
+		grid.setGridDisplayed(displayed);
+		parentPanel.frameParent.menuBar.setGridDisplayed(displayed, isClassicGridDrawn());
+	}
+
+	
+	/**
+	 * @return the grid
+	 * @since 2.0.0
+	 */
+	public MagneticGrid getGrid()
+	{
+		return grid;
+	}
+
+
+	/**
+	 * @return the parentPanel.
+	 * @since 2.0.0
+	 */
+	public DrawPanel getParentPanel()
+	{
+		return parentPanel;
+	}
+
+
+
+	/**
+	 * @return the drawBorders.
+	 * @since 2.0.0
+	 */
+	public boolean isDrawBorders()
+	{
+		return drawBorders;
+	}
+
+
+
+	/**
+	 * @param drawBorders the drawBorders to set.
+	 * @since 2.0.0
+	 */
+	public void setDrawBorders(boolean drawBorders)
+	{
+		this.drawBorders = drawBorders;
+	}
+	
+	
+	
+	private static String execute(String[] cmd) {
+		if(cmd==null || cmd.length==0)
+			return null;
+		
+		try {
+			Runtime runtime = Runtime.getRuntime();
+			Process process = runtime.exec(cmd);// Command launched
+			
+			StreamExecReader err = new StreamExecReader(process.getErrorStream());// Catch the error log
+			StreamExecReader inp = new StreamExecReader(process.getInputStream());// Catch the log
+			
+			err.start();
+			inp.start();
+			
+			process.waitFor();// Waiting for the end of the process.
+			
+			return err.getLog();
+		} catch(Exception e) { return ""; }
+	}
+}
diff --git a/current/latexDraw/ui/DrawPanel.java b/current/latexDraw/ui/DrawPanel.java
new file mode 100644
index 0000000..b2c7efb
--- /dev/null
+++ b/current/latexDraw/ui/DrawPanel.java
@@ -0,0 +1,2021 @@
+package latexDraw.ui;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Cursor;
+import java.awt.Point;
+import java.awt.event.*;
+import java.awt.geom.Arc2D;
+import java.io.File;
+import java.io.ObjectInputStream;
+
+import javax.swing.*;
+
+import latexDraw.figures.*;
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+import latexDraw.util.LaTeXDrawCursor;
+import latexDraw.util.LaTeXDrawNamespace;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+import latexDraw.util.UndoRedoManager;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/** 
+ * 
+ * This class defines the panel which contains the drawing which is used to generate the psTricks code.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public final class DrawPanel extends JScrollPane implements MouseListener, MouseMotionListener, ActionListener, MouseWheelListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Contains all figures of the current project */
+	protected DrawContainer draw;
+	
+	/** Correspond to the codepanel of the program */
+	protected CodePanel codePanel;
+	
+	/** Correspond to the current figure in drawing */
+	protected Figure currentFigure;
+	
+	/** The former position of the cursor. Useful for 
+	 * figure shifting */
+	protected Point formerPoint;
+	
+	/** The frame parent of the drawPanel @see LaTeXDrawFrame */
+	protected LaTeXDrawFrame frameParent;
+	
+	/** The pop-up menu which allows to do some actions about general
+	 * Functions (draw a figure, select a figure,...) */
+	protected JPopupMenu popupGeneral;
+    
+    /** This pop-up menu allows the user to do some actions about
+     * the selected figure (delete, properties, ...) */
+    protected JPopupMenu popupFigure;
+    
+    /** If not null, it represents a figure before being moved */
+    protected Draw cloneForDragged;
+
+    protected LaTeXDrawRectangle bordersSelection;
+    
+    private JRadioButtonMenuItem menuLine;
+    private JRadioButtonMenuItem menuDot;
+    private JRadioButtonMenuItem menuRect;
+    private JRadioButtonMenuItem menuCircle;
+    private JRadioButtonMenuItem menuEllipse;
+    private JRadioButtonMenuItem menuSquare;
+    private JRadioButtonMenuItem menuRhombus;
+    private JRadioButtonMenuItem menuPoly;
+    private JRadioButtonMenuItem menuArc;
+    private JRadioButtonMenuItem menuWedge;
+    private JRadioButtonMenuItem menuTriangle;
+    private JRadioButtonMenuItem menuSelect;
+    private JRadioButtonMenuItem menuText;
+    private JRadioButtonMenuItem menuPointsAkin;
+    private JRadioButtonMenuItem menuGrid;
+    private JRadioButtonMenuItem menuAxes;
+    private JRadioButtonMenuItem menuChord;
+    private JRadioButtonMenuItem menuBezier;
+    private JRadioButtonMenuItem menuClosedBezier;
+    private JRadioButtonMenuItem menuJoinedLines;
+    private JMenuItem menuDel;
+    private JMenuItem menuProperties;
+    private JMenuItem menuJoin;
+    private JMenuItem menuSeparate;
+    public JMenuItem menuUpdateToGrid;
+    private JCheckBoxMenuItem menuRotate;
+
+	
+    /** Allows to know if the user must select a figure to put
+     * the selected figure behind the clicked figure */
+    private boolean onWaitingClicDispositionBehind;
+    
+    /** Allows to know if the user must select a figure to put
+     * the selected figure in front of the clicked figure */
+    private boolean onWaitingClicDispositionFront;
+    
+    /** This field allows to know if the last selection was empty or not (useful to the method onDragged). */
+    private transient boolean formerSelectionEmpty = true;
+    
+	public static final String LABEL_UPDATE_TO_GRID = LaTeXDrawLang.getString1_9("DrawPanel.0"); //$NON-NLS-1$
+    
+    public static final String ACTION_CMD_UPDATETOGRID = "updToGrid";//$NON-NLS-1$
+    
+	
+    
+	/**
+	 * The second constructor
+	 * @param d The drawing of the project (compulsory in order to
+	 * call the super-constructor of the @see JScrollPane class to use
+	 * elevator
+	 */
+	public DrawPanel(DrawContainer d, CodePanel codePanel, LaTeXDrawFrame parent) 
+	{
+    	super(d);	    	
+    	
+    	d.getGrid().setMagnetic(false);
+    	bordersSelection = null;
+    	cloneForDragged = null;
+    	frameParent = parent;
+    	this.codePanel = codePanel;
+    	currentFigure = null;
+    	draw = d;
+    	draw.setParentPanel(this);
+		draw.addMouseListener(this);
+		draw.addMouseMotionListener(this);
+		addMouseWheelListener(this);
+		draw.updatePreferredSize(); 
+		draw.revalidate(); 
+		onWaitingClicDispositionBehind = false;
+		onWaitingClicDispositionFront = false;
+		createPopupGeneral();
+		createPopupFigure();
+		setDoubleBuffered(true);
+    }
+	
+	
+	
+	public boolean isOnRotation()
+	{
+		return draw.isOnRotation();
+	}
+	
+	
+	
+	public void setOnRotation(boolean on)
+	{
+		draw.setOnRotation(on);
+		menuRotate.setSelected(on);
+	}
+	
+	
+	
+	/**
+	 * Allows to put the selected figure in the background
+	 */
+	public void selectedInBackground()
+	{
+		draw.selectedInBackground();
+		if(codePanel.isInAutoUpdate())
+			updateCode();
+	}
+	
+	
+	
+	/**
+	 * Allows to put the selected figure in the foreground
+	 */
+	public void selectedInForeground()
+	{
+		draw.selectedInForeground();
+		if(codePanel.isInAutoUpdate())	
+			updateCode();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to zoom in the drawing (up to 450%)
+	 */
+	public void zoomIn()
+	{
+		draw.zoomIn();
+	}
+	
+	
+	
+	/**
+	 * Allows to zoom out the drawing (up to 25%)
+	 */
+	public void zoomOut()
+	{
+		draw.zoomOut();
+	}
+	
+	
+	
+	/**
+	 * Allows to set the zoom to default
+	 */
+	public void zoomDefault()
+	{
+		draw.zoomDefault();
+	}
+	
+	
+	
+	/**
+	 * Allows to get the current zoom
+	 * @return The zoom
+	 */
+	public double getZoom()
+	{
+		return draw.getZoom();
+	}
+		
+	
+	/**
+	 * Allows to create the pop-up menu which concern a selected figure
+	 */
+	private void createPopupFigure()
+	{
+		popupFigure  = new JPopupMenu();
+		
+		menuDel =  new JMenuItem(LaTeXDrawResources.LABEL_DELETE, LaTeXDrawResources.delIcon);
+		menuDel.setActionCommand(LaTeXDrawResources.LABEL_DELETE);
+		menuDel.addActionListener(frameParent.menusListener);
+		popupFigure.add(menuDel);
+		
+		popupFigure.addSeparator();
+		
+		menuProperties =  new JMenuItem(LaTeXDrawResources.LABEL_FIGURE_PROPERTIES, LaTeXDrawResources.propertiesIcon);
+		menuProperties.setActionCommand(LaTeXDrawResources.LABEL_FIGURE_PROPERTIES);
+		menuProperties.addActionListener(frameParent.menusListener);
+		popupFigure.add(menuProperties);
+		
+		popupFigure.addSeparator();
+		
+		JMenuItem menu2 =  new JMenuItem(LaTeXDrawResources.LABEL_FOREGROUND, LaTeXDrawResources.foregroundIcon);
+		menu2.setActionCommand(LaTeXDrawResources.LABEL_FOREGROUND);
+		menu2.addActionListener(frameParent);
+		popupFigure.add(menu2);
+		
+		menu2 =  new JMenuItem(LaTeXDrawResources.LABEL_BACKGROUND, LaTeXDrawResources.backgroundIcon);
+		menu2.setActionCommand(LaTeXDrawResources.LABEL_BACKGROUND);
+		menu2.addActionListener(frameParent);
+		popupFigure.add(menu2);
+
+		menu2 = new JMenuItem(LaTeXDrawResources.LABEL_FRONT_SEL, LaTeXDrawResources.inFrontOfSelIcon);
+		menu2.setActionCommand(LaTeXDrawResources.LABEL_FRONT_SEL);
+		menu2.addActionListener(frameParent);
+		popupFigure.add(menu2);
+		
+		menu2 =  new JMenuItem(LaTeXDrawResources.LABEL_BEHIND_SEL, LaTeXDrawResources.behindSelIcon);
+		menu2.setActionCommand(LaTeXDrawResources.LABEL_BEHIND_SEL);
+		menu2.addActionListener(frameParent);
+		popupFigure.add(menu2);
+		
+		popupFigure.addSeparator();
+		
+		menuJoin =  new JMenuItem(LaTeXDrawResources.LABEL_JOIN, LaTeXDrawResources.joinIcon);
+		menuJoin.setActionCommand(LaTeXDrawResources.LABEL_JOIN);
+		menuJoin.addActionListener(frameParent);
+		popupFigure.add(menuJoin);
+		
+		menuSeparate =  new JMenuItem(LaTeXDrawResources.LABEL_SEPARATE, LaTeXDrawResources.separateIcon);
+		menuSeparate.setActionCommand(LaTeXDrawResources.LABEL_SEPARATE);
+		menuSeparate.addActionListener(frameParent);
+		popupFigure.add(menuSeparate);	
+		
+		popupFigure.addSeparator();
+		
+		menuRotate =  new JCheckBoxMenuItem(LaTeXDrawResources.LABEL_ROTATE, LaTeXDrawResources.rotateIcon);
+		menuRotate.setActionCommand(LaTeXDrawResources.LABEL_ROTATE);
+		menuRotate.addActionListener(frameParent);
+		popupFigure.add(menuRotate);	
+		
+		popupFigure.addSeparator();
+		
+		menuUpdateToGrid =  new JMenuItem(LABEL_UPDATE_TO_GRID, LaTeXDrawResources.emptyIcon);
+		menuUpdateToGrid.setActionCommand(ACTION_CMD_UPDATETOGRID);
+		menuUpdateToGrid.addActionListener(this);
+		popupFigure.add(menuUpdateToGrid);	
+		
+		popupFigure.addSeparator();
+		
+		menu2 =  new JMenuItem(LaTeXDrawResources.LABEL_TEMPLATE_EXPORT, LaTeXDrawResources.emptyIcon);
+		menu2.setActionCommand(LaTeXDrawResources.LABEL_TEMPLATE_EXPORT);
+		menu2.addActionListener(frameParent.menusListener);
+		popupFigure.add(menu2);	
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to create a pop-up menu concerning general actions
+	 */
+	private void createPopupGeneral()
+	{
+		ButtonGroup drawGroup = new ButtonGroup();		
+		popupGeneral = new JPopupMenu();
+		
+		menuSelect = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_SELECT_FIGURE, LaTeXDrawResources.selectIcon);
+		menuSelect.setActionCommand(LaTeXDrawResources.LABEL_SELECT_FIGURE);
+		menuSelect.addActionListener(frameParent.menusListener);
+		menuSelect.setSelected(true);
+		popupGeneral.add(menuSelect);
+		drawGroup.add(menuSelect);
+		
+		popupGeneral.addSeparator();
+		
+		menuLine = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_LINE, LaTeXDrawResources.lineIcon);
+		menuLine.setActionCommand(LaTeXDrawResources.LABEL_LINE);
+		menuLine.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuLine);
+		drawGroup.add(menuLine);
+		
+		menuJoinedLines = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_JOINED_LINES, LaTeXDrawResources.joinedLinesIcon);
+		menuJoinedLines.setActionCommand(LaTeXDrawResources.LABEL_JOINED_LINES);
+		menuJoinedLines.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuJoinedLines);
+		drawGroup.add(menuJoinedLines);
+		
+		menuPoly = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_POLY, LaTeXDrawResources.polygonIcon);
+		menuPoly.setActionCommand(LaTeXDrawResources.LABEL_POLY);
+		menuPoly.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuPoly);
+		drawGroup.add(menuPoly);
+		
+		menuDot = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_DOT, LaTeXDrawResources.dotIcon);
+		menuDot.setActionCommand(LaTeXDrawResources.LABEL_DOT);
+		menuDot.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuDot);
+		drawGroup.add(menuDot);
+		
+		menuRect = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_RECT, LaTeXDrawResources.rectIcon);
+		menuRect.setActionCommand(LaTeXDrawResources.LABEL_RECT);
+		menuRect.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuRect);
+		drawGroup.add(menuRect);
+		
+		menuSquare = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_SQUARE, LaTeXDrawResources.squareIcon);
+		menuSquare.setActionCommand(LaTeXDrawResources.LABEL_SQUARE);
+		menuSquare.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuSquare);
+		drawGroup.add(menuSquare);
+		
+		menuRhombus = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_RHOMBUS, LaTeXDrawResources.rhombusIcon);
+		menuRhombus.setActionCommand(LaTeXDrawResources.LABEL_RHOMBUS);
+		menuRhombus.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuRhombus);
+		drawGroup.add(menuRhombus);
+		
+		menuTriangle = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_TRIANGLE, LaTeXDrawResources.triangleIcon);
+		menuTriangle.setActionCommand(LaTeXDrawResources.LABEL_TRIANGLE);
+		menuTriangle.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuTriangle);
+		drawGroup.add(menuTriangle);
+		
+		menuEllipse = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_ELLIPSE, LaTeXDrawResources.ellipseIcon);
+		menuEllipse.setActionCommand(LaTeXDrawResources.LABEL_ELLIPSE);
+		menuEllipse.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuEllipse);
+		drawGroup.add(menuEllipse);
+		
+		menuCircle = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_CIRCLE, LaTeXDrawResources.circleIcon);
+		menuCircle.setActionCommand(LaTeXDrawResources.LABEL_CIRCLE);
+		menuCircle.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuCircle);
+		drawGroup.add(menuCircle);
+		
+		menuArc = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_ARC, LaTeXDrawResources.arcIcon);
+		menuArc.setActionCommand(LaTeXDrawResources.LABEL_ARC);
+		menuArc.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuArc);
+		drawGroup.add(menuArc);
+		
+		menuChord = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_CHORD, LaTeXDrawResources.chordIcon);
+		menuChord.setActionCommand(LaTeXDrawResources.LABEL_CHORD);
+		menuChord.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuChord);
+		drawGroup.add(menuChord);
+		
+		menuWedge = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_WEDGE, LaTeXDrawResources.wedgeIcon);
+		menuWedge.setActionCommand(LaTeXDrawResources.LABEL_WEDGE);
+		menuWedge.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuWedge);
+		drawGroup.add(menuWedge);
+		
+		menuGrid = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_GRID, LaTeXDrawResources.gridIcon);
+		menuGrid.setActionCommand(LaTeXDrawResources.LABEL_GRID);
+		menuGrid.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuGrid);
+		drawGroup.add(menuGrid);
+		
+		menuAxes = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_AXES, LaTeXDrawResources.axesIcon);
+		menuAxes.setActionCommand(LaTeXDrawResources.LABEL_AXES);
+		menuAxes.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuAxes);
+		drawGroup.add(menuAxes);
+		
+		menuBezier = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_BEZIER_CURVE, LaTeXDrawResources.bezierCurveIcon);
+		menuBezier.setActionCommand(LaTeXDrawResources.LABEL_BEZIER_CURVE);
+		menuBezier.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuBezier);
+		drawGroup.add(menuBezier);
+		
+		menuClosedBezier = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE, LaTeXDrawResources.closedBezierIcon);
+		menuClosedBezier.setActionCommand(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE);
+		menuClosedBezier.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuClosedBezier);
+		drawGroup.add(menuClosedBezier);
+		
+		menuPointsAkin = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_POINTS_AKIN, LaTeXDrawResources.pointsAkinIcon);
+		menuPointsAkin.setActionCommand(LaTeXDrawResources.LABEL_POINTS_AKIN);
+		menuPointsAkin.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuPointsAkin);
+		drawGroup.add(menuPointsAkin);
+		
+		menuText = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_TEXT, LaTeXDrawResources.textIcon);
+		menuText.setActionCommand(LaTeXDrawResources.LABEL_TEXT);
+		menuText.addActionListener(frameParent.menusListener);
+		popupGeneral.add(menuText);
+		drawGroup.add(menuText);	
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to select a menu in the general pop-up
+	 * @param select The label of the new selected menu
+	 */
+	public void setMenuSelectedPopupGeneral(String select, boolean state) 
+	{
+		int i=0, size = popupGeneral.getComponentCount();
+		boolean found = false;
+		Component c=null;
+		
+		while(!found && i<size)
+		{
+			 c = popupGeneral.getComponent(i);
+			
+			if(c instanceof JMenuItem)
+			{
+				if(((JMenuItem)c).getActionCommand().equals(select)) 
+					 found = true;
+				else i++;
+			}
+			else i++;
+		}
+		
+		if(found && c!=null) 
+			((JMenuItem)c).setSelected(state);
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to get the frame parent of the panel
+	 * @return The LaTeXDrawFrame frame parent
+	 */
+	public LaTeXDrawFrame getFrameParent()
+	{
+		return frameParent;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the attribute drawing with an another
+	 * @param d The new drawing
+	 */
+	public void setDraw(DrawContainer d)
+	{
+		draw.copy(d);
+		updateDraw(true);
+	}
+	
+	
+	
+	/**
+	 * Allows to get the drawing
+	 * @return The drawing
+	 */
+	public DrawContainer getDraw()
+	{
+		return draw;
+	}
+	
+	
+	
+	/**
+	 * Exports the drawing as a picture.
+	 * @param file The new picture to create.
+	 * @param format The extension of the picture to create.
+	 * @param compressionRate The compression rate for jpg pictures.
+	 */
+	public void exportAsPicture(File file, String format, float compressionRate) 
+	{
+		if(format.equals(LaTeXDrawResources.LABEL_EXPORT_JPG))
+			  draw.exportAsJPG(file, compressionRate);
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_EPS))	
+			draw.exportAsEPS(file);
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_PNG))	
+			draw.exportAsPNG(file);
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_BMP))	
+			draw.exportAsBMP(file);
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_PPM))	
+			draw.exportAsPPMFile(file);
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_PDF_LATEX))	
+			draw.createPDFFile(frameParent.getPathDistribLatex(), file.getPath());
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_EPS_LATEX))	
+			draw.createPSFile(frameParent.getPathDistribLatex(), file.getPath());
+		else throw new IllegalArgumentException(format);
+	}
+	
+		
+		
+	
+		
+	/**
+	 * Allows to set the variable isModified
+	 * @param state The new state of isModified
+	 */
+	public void setIsModified(boolean state)
+	{
+		draw.setIsModified(state);
+	}
+		
+
+		
+		
+	
+	/**
+	 * Allows to get the number of pixels per centimetre
+	 * @return The number of pixels per centimetre
+	 */
+	public int getPixelsPerCm()
+	{
+		return draw.getPixelsPerCm();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the number of pixels per centimetre
+	 * @param pPerCm The new number of pixels per centimetre
+	 */
+	public void setPixelsPerCm(int pPerCm)
+	{
+		draw.setPixelsPerCm(pPerCm);
+		if(codePanel.isInAutoUpdate())
+			updateCode();
+	}
+
+	
+	
+	
+	/**
+	 * Allows to set the value of the attribute
+	 * onWaitingClicDispositionFront
+	 * @param state Its new state
+	 */
+	public void setOnWaitingClicDispositionFront(boolean state)
+	{
+		onWaitingClicDispositionFront = state;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the value of the attribute
+	 * onWaitingClicDispositionBehind
+	 * @param state Its new state
+	 */
+	public void setOnWaitingClicDispositionBehind(boolean state)
+	{
+		onWaitingClicDispositionBehind = state;
+	}
+	
+	
+
+
+	/**
+	 * Allows to set the boolean autoAdjustement in the drawing
+	 */
+	public void setAutoAdjustement(boolean state)
+	{
+		draw.setAutoAdjustement(state);
+	}
+
+
+
+	/**
+	 * This method allows the user to delete the selected figure
+	 * in the drawing.
+	 * @return The new number of figures
+	 */
+	public int deleteSelection()
+	{		
+		try
+		{
+			draw.deleteSelection(frameParent.getUndoManager());
+			frameParent.updateUndoRedo();
+			updateDraw(true);
+			return draw.getNbFigures();
+			
+		}catch(Exception ex) 
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+
+		return 0;
+	}
+
+
+
+	/**
+	 * Allow the display or to hide the borders of the drawing
+	 * 
+	 * @param display Allow to know if the user want to display the borders
+	 * of the drawing.
+	 */
+	public void displayBorders(boolean display)
+	{
+		draw.displayBorders(display);
+	}
+
+	
+	
+	
+	/**
+	 * Allows to know if the program is in figure selection
+	 * @param is Return true if the program is in figure selection
+	 */
+	public void isSelection(boolean is)
+	{
+		draw.isSelection(is);
+	}
+
+	
+	
+	/**
+	 * Allows to know if the grid must be displayed
+	 * @return True if the grid must be displayed
+	 */
+	public boolean isGridDisplayed()
+	{
+		return draw.isGridDisplayed();
+	}
+	
+	
+	
+	/**
+	 * This method allows to know if the project has been
+	 * modified or not
+	 * @return true if the project has been modified
+	 */
+	public boolean isModified()
+	{		
+		return draw.isModified();
+	}
+	
+	
+	
+	
+
+	/**
+	 * Allows to get the current figure in drawing
+	 * @return The current figure in drawing
+	 */
+	public Figure getCurrentFigure()
+	{
+		return currentFigure;
+	}
+ 
+	
+	
+	
+	public LaTeXDrawRectangle getBordersSelection()
+	{
+		return bordersSelection; 
+	}
+	
+	
+	
+	/**
+	 * Allows to create a new project.
+	 */
+	public void newProject()
+	{
+		currentFigure=null;
+		formerPoint=null;
+		formerSelectionEmpty = true;
+		draw.newDrawing();
+		updateDraw(true);
+	}
+	
+	
+
+    /**
+     * Actions to do on a mouse left button pressed
+     * @param e The event
+     */
+    public void mousePressedLeftButton(MouseEvent e)
+    {
+    	// these actions are managed is mouse clicked
+    	if(onWaitingClicDispositionBehind || onWaitingClicDispositionFront)
+    		return;
+    	
+    	Point point = e.getPoint(); 
+    	
+    	// We must put the point in the user's view : rescale the point
+    	point.x/=draw.getZoom();
+    	point.y/=draw.getZoom();
+    	
+    	formerPoint = draw.getGrid().getTransformedPointToGrid(point, true);
+    	
+    	String currentChoice = frameParent.getCurrentChoice();
+
+    	// If the user wants to draw a line.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_LINE))
+	    { 	    		
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new Line(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), true);   
+	    }
+    	else
+    	// If the user wants to draw a rectangle.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_RECT))
+	    {     		   		
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new LaTeXDrawRectangle(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), 
+											new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), true);	
+	    }
+    	else
+    	// If the user wants to draw a square.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_SQUARE))
+	    {     		 
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new Square(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y),
+				    				new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), true);	    		
+	    }
+    	else
+    	// If the user wants to draw a rhombus.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_RHOMBUS))
+	    {     		  	
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new Rhombus(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y),
+			    				new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), true);	    		
+	    }
+    	else
+    	// If the user wants to draw a triangle.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_TRIANGLE))
+	    {     		  	
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new Triangle(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y),
+			    				new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), true);	    		
+	    }
+    	else
+    	// If the user wants to draw a circle.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_CIRCLE))
+	    {     		  	
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new Circle(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y),
+			    				new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), true);	    		
+	    }	    	
+    	else
+    	// If the user wants to draw a circle.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_ELLIPSE))
+	    {     		  
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new Ellipse(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y),
+				    				new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), true);	    		
+	    }
+    	else
+//    	 If the user wants to draw an arc.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_ARC))
+	    {     		 
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new Arc(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), Arc2D.OPEN, true);	    		
+	    }
+    	else
+//   	 If the user wants to draw a chord.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_CHORD))
+	    {     		  	
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new Arc(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), Arc2D.CHORD, true);	    		
+	    }
+    	else
+//   	 If the user wants to draw a wedge.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_WEDGE))
+	    {     		  	
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		currentFigure = new Arc(new LaTeXDrawPoint2D(point.x, point.y), new LaTeXDrawPoint2D(point.x, point.y), Arc2D.PIE, true);	    		
+	    }
+    	else
+    	// If the user wants to draw a dot.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_DOT))
+	    {     		
+	    	point = draw.getGrid().getTransformedPointToGrid(point, true);
+	    	currentFigure = new Dot(new LaTeXDrawPoint2D(point.x, point.y), frameParent.genDotS, frameParent.genDotSize, true);
+	    	
+	    	setCurrentFigureGeneralValues();
+			draw.addFigure(currentFigure, frameParent.getUndoManager());
+			currentFigure = null;
+			updateDraw(true);
+			frameParent.updateUndoRedo();
+			frameParent.setExportAsMenu(true);
+	    }
+    	else
+//    	 If the user wants to draw akin points.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_POINTS_AKIN))
+	    {     		
+        	point = draw.getGrid().getTransformedPointToGrid(point, true);
+			currentFigure = new AkinPoints(new LaTeXDrawPoint2D(point.x, point.y), true);
+			updateDraw(false);	
+	    }
+    	
+    	if(currentFigure!=null)
+    	{
+    		setCurrentFigureGeneralValues();
+    		return ;
+    	}
+
+    	// If the user wants to select a figure.
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_SELECT_FIGURE))
+    	{ 
+    		try
+    		{
+	    		boolean in = draw.onClick(point, e);
+	    		DrawBorders db = draw.getCompleteBorders();
+	    		
+	    		if(db!=null && db.isSelected() && db.isADelimitorSelected())
+	    			return ;
+
+	    		Draw selection = draw.getSelected();
+	    		int mod = e.getModifiers();
+	    		
+	    		if((selection!=null && selection.isEmpty()) || 
+	    			mod==InputEvent.CTRL_MASK+InputEvent.BUTTON1_MASK || mod==InputEvent.SHIFT_MASK+InputEvent.BUTTON1_MASK)
+	    		{
+		    		frameParent.setSelection(selection!=null && !selection.isEmpty());
+		    		bordersSelection = new LaTeXDrawRectangle(new LaTeXDrawPoint2D(point.x, point.y),
+			    											new LaTeXDrawPoint2D(point.x, point.y), false);
+		    		bordersSelection.setLineStyle(PSTricksConstants.LINE_DASHED_STYLE);
+		    		bordersSelection.setLinesColor(Color.GRAY);
+		    		bordersSelection.setThickness(1);
+	    		}
+	    		else
+	    			if(!in)
+	    				draw.setSelected(null);
+	    			else 
+    				{
+	    				frameParent.setSelection(true);
+	    				
+	    				if(selection!=null)
+	    				{
+	    					selection.setOnRotation(draw.isOnRotation());
+	    					if(draw.isOnRotation())
+	    						selection.beginRotation();
+	    				}
+    				}
+
+	    		if(selection!=null && !selection.isEmpty())
+	    		{
+	    			Figure f;
+	    			if(selection.size()==1)
+	    				f = selection.getFigureAt(0);
+	    			else
+	    				f = selection;
+	    			
+	    			if(f.isDelimitorSelected())
+	    			{
+	    				int delimitorOrient = f.getSelectedDelimitorOrientation();
+	    				
+	    				switch(delimitorOrient)
+	    				{
+	    					case Figure.DELIMITOR_ORIENTATION_EAST:
+	    						frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR));
+	    					break;
+	    					
+	    					case Figure.DELIMITOR_ORIENTATION_WEST:
+	    						frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR));
+	    						break;
+	    						
+	    					case Figure.DELIMITOR_ORIENTATION_SOUTH:
+	    						frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR));
+	    						break;
+	    						
+	    					case Figure.DELIMITOR_ORIENTATION_NORTH:
+	    						frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR));
+	    						break;
+	    						
+	    					case Figure.DELIMITOR_ORIENTATION_NW:
+	    						frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.NW_RESIZE_CURSOR));
+	    						break;
+	    						
+	    					case Figure.DELIMITOR_ORIENTATION_NE:
+	    						frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.NE_RESIZE_CURSOR));
+	    						break;
+	    						
+	    					case Figure.DELIMITOR_ORIENTATION_SE:
+	    						frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR));
+	    						break;
+	    						
+	    					case Figure.DELIMITOR_ORIENTATION_SW:
+	    						frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.SW_RESIZE_CURSOR));
+	    						break;
+	    						
+	    					case Figure.DELIMITOR_ROTATION:
+	    						frameParent.setCursor(LaTeXDrawCursor.ROTATE_CURSOR);
+	    						break;
+	    						
+    						default:
+    							frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
+	    				}
+	    			}
+	    			else
+	    				frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
+	    		}
+	    		
+	    		repaint();
+    		}catch(Exception ex) 
+    		{
+    			ex.printStackTrace(); 
+    			ExceptionFrameDialog.showExceptionDialog(ex);
+    		}
+    		return;
+    	}
+    }
+
+
+    
+
+    /**
+     * Set the general parameters to the current figure in creation.
+     * @since 1.9.1
+     */
+    protected void setCurrentFigureGeneralValues()
+	{
+    	if(currentFigure!=null)
+    	{
+    		currentFigure.setLinesColor(frameParent.genLineCB.getColor());
+    		currentFigure.setInteriorColor(frameParent.genInteriorCB.getColor());
+    		currentFigure.setThickness(frameParent.genThickness);
+    		
+    		if(currentFigure.canBeFilled())
+    			currentFigure.setIsFilled(frameParent.genIsFilled);
+    		
+    		if(currentFigure.canBeHatched())
+    		{
+    			currentFigure.setHatchingStyle(frameParent.genHatchS);
+    			currentFigure.setHatchingColor(frameParent.genHatchCB.getColor());
+    			currentFigure.setGradientStartColor(frameParent.genGradientStartCB.getColor());
+    			currentFigure.setGradientEndColor(frameParent.genGradientEndCB.getColor());
+    		}
+    		
+    		if(currentFigure.isBordersMovable())
+    			currentFigure.setBordersPosition(frameParent.genBordPosS);
+    		
+    		if(currentFigure.isDoubleBoundaryable())
+    		{
+    			currentFigure.setHasDoubleBoundary(frameParent.genHasDbleBord);
+    			currentFigure.setDoubleColor(frameParent.genDbleBordCB.getColor());
+    		}
+    		
+    		if(currentFigure.isDashableOrDotable())
+    			currentFigure.setLineStyle(frameParent.genLineStyleS);
+    		
+    		if(currentFigure.canHaveShadow())
+    		{
+    			currentFigure.setShadowColor(frameParent.genShadowCB.getColor());
+    			currentFigure.setHasShadow(frameParent.genHasShadow);
+    		}
+    		
+    		if(currentFigure.canHaveArrow())
+    		{
+    			((Arrowable)currentFigure).setArrow1Style(frameParent.genLeftArrS);
+    			((Arrowable)currentFigure).setArrow2Style(((Arrowable)currentFigure).hasTwoLeftArrows() ?
+    												ArrowHead.invertArrowStyle(frameParent.genRightArrS) : frameParent.genRightArrS);
+    		}
+    	}
+	}
+
+
+
+	/** 
+     * Define the actions that it must be realised by a click of the mouse.
+     * @param e The event
+     */
+	public void mouseClicked(MouseEvent e) 
+	{
+		try
+		{
+			frameParent.requestFocus();
+			
+	    	switch(e.getButton())
+		    {
+			    case MouseEvent.BUTTON1 :   	
+			    			mouseClickedLeftButton(e);
+			    			break;
+				
+			    case MouseEvent.BUTTON2 : 
+			    			break;
+		
+			    case MouseEvent.BUTTON3 : 
+							mouseClickedRightButton(e);    
+							break;
+					
+			    default : break;
+		    } // switch
+		}catch(Exception ex)
+		{
+			ex.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+    	e.consume();
+	}
+
+
+	
+	
+	
+    /** 
+     * Defines the actions that it must be realised by a left click
+     * of the mouse.
+     * @param e Corresponds to the click of the mouse
+     */
+	public void mouseClickedLeftButton(MouseEvent e)
+    {
+		Point point = e.getPoint();
+		point.x/=draw.getZoom();
+		point.y/=draw.getZoom();
+		String currentChoice = frameParent.getCurrentChoice();
+		
+		if(onWaitingClicDispositionBehind)
+		{
+			onWaitingClicDispositionBehind = false;
+			frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+			
+			Draw listSelected = draw.getSelected();
+			boolean thereIsOne =  draw.onClick(point, e);
+			
+			if(thereIsOne && !listSelected.contains(draw.getSelected().getFigureAt(0)))
+			{
+				draw.getSelected().setSelected(false);
+				listSelected.setSelected(true);
+				draw.putBehind(listSelected, draw.getSelected().getFigureAt(0));		
+				draw.setSelected(listSelected);
+				frameParent.setIsModified(true);
+				updateDraw(true);
+			}
+			else
+			{
+				draw.isSelection(false);
+				frameParent.setSelection(false);
+				draw.repaint();
+			}
+			return;
+		}
+		if(onWaitingClicDispositionFront)
+		{
+			onWaitingClicDispositionFront = false;
+			frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+		
+			Draw listSelected = draw.getSelected();
+			boolean thereIsOne = draw.onClick(point, e);
+			if(thereIsOne && !listSelected.contains(draw.getSelected().getFigureAt(0)))
+			{
+				draw.getSelected().setSelected(false);
+				listSelected.setSelected(true);				
+				draw.putInFrontOf(listSelected, draw.getSelected().getFigureAt(0));				
+				draw.setSelected(listSelected);
+				frameParent.setIsModified(true);
+				updateDraw(true);
+			}
+			else
+			{
+				draw.isSelection(false);
+				frameParent.setSelection(false);
+				draw.repaint();
+			}
+			return;
+		}	
+		
+		// A double click = show the frame which allows to set the parameters of the figure or
+		// stop the creation of the current figure.
+		if(e.getClickCount()==2)
+		{
+			if(currentFigure!=null && (currentChoice.equals(LaTeXDrawResources.LABEL_POLY) ||
+				currentChoice.equals(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE) ||
+				currentChoice.equals(LaTeXDrawResources.LABEL_BEZIER_CURVE) ||
+				currentChoice.equals(LaTeXDrawResources.LABEL_JOINED_LINES)))
+			{
+				if(((LaTeXDrawPolygon)currentFigure).getNbPoints()>3 || 
+					((currentChoice.equals(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE) ||
+					currentChoice.equals(LaTeXDrawResources.LABEL_BEZIER_CURVE)) &&
+					((LaTeXDrawPolygon)currentFigure).getNbPoints()>2))
+				{
+					((LaTeXDrawPolygon)currentFigure).removePointAt(-1);
+					draw.addFigure(currentFigure,frameParent.getUndoManager());
+
+					updateDraw(true);
+					currentFigure = null;
+					
+					frameParent.updateUndoRedo();
+					frameParent.setExportAsMenu(true);
+				}
+				else 
+				{
+					currentFigure = null;
+					draw.repaint();
+				}
+			}
+			else
+				if(draw.getSelected()!=null && draw.getSelected().size()==1)
+					frameParent.showParamFrame(draw.getSelected().whereIsIt(point), false);
+			return ;
+		}
+		
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_POLY) ||
+			currentChoice.equals(LaTeXDrawResources.LABEL_JOINED_LINES))
+	    {     		//	 If the user wants to draw a polygon (menu polygon selected)
+		   	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		if(currentFigure==null)// We create of new polygon
+    		{
+    			if(currentChoice.equals(LaTeXDrawResources.LABEL_POLY))
+	    			currentFigure = new LaTeXDrawPolygon(new LaTeXDrawPoint2D(point.x, point.y), 
+														 new LaTeXDrawPoint2D(point.x, point.y), true);	
+    			else currentFigure = new JoinedLines(new LaTeXDrawPoint2D(point.x, point.y), 
+												     new LaTeXDrawPoint2D(point.x, point.y), true);	
+    		}
+    		else // We add a point to the polygon
+	    		if(currentFigure.getClass().getSimpleName().equals("LaTeXDrawPolygon") ||//$NON-NLS-1$
+	    				currentFigure instanceof JoinedLines) 
+	    		{
+	    			((LaTeXDrawPolygon)currentFigure).setLastPoint(point);
+	    			((LaTeXDrawPolygon)currentFigure).addPoint(new LaTeXDrawPoint2D(point.x+1, point.y+1));
+	    		}
+
+    		draw.repaint();
+	    }else
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_TEXT))
+    	{
+		   	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		Figure f = new Text("", new LaTeXDrawPoint2D(point.x,point.y), true); //$NON-NLS-1$
+    		draw.addFigure(f, null);
+    		int size = draw.getNbFigures();
+    		frameParent.showParamFrame(f, true);
+    		
+    		if(size==draw.getNbFigures())
+    		{
+    			draw.deleteFigure(f, null);
+    			draw.addFigure(f, frameParent.getUndoManager());
+        		frameParent.updateUndoRedo();
+        		updateDraw(true);
+    		}
+    	}else
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_GRID))
+    	{
+		   	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		Figure f = new Grid(new LaTeXDrawPoint2D(point.x,point.y), true);
+    		draw.addFigure(f, null);
+    		int size = draw.getNbFigures();
+    		
+    		frameParent.showParamFrame(f, true);
+    		
+    		if(size==draw.getNbFigures())
+    		{
+    			draw.deleteFigure(f, null);
+    			draw.addFigure(f, frameParent.getUndoManager());
+        		frameParent.updateUndoRedo();
+        		updateDraw(true);
+    		}
+    	}
+    	else
+		if(currentChoice.equals(LaTeXDrawResources.LABEL_AXES))
+    	{
+		   	point = draw.getGrid().getTransformedPointToGrid(point, true);
+			Figure f = new Axe(new LaTeXDrawPoint2D(point.x,point.y), true);
+    		draw.addFigure(f, null);
+    		int size = draw.getNbFigures();
+    		
+    		frameParent.showParamFrame(f, true);
+    		
+    		if(size==draw.getNbFigures())
+    		{
+    			draw.deleteFigure(f, null);
+    			draw.addFigure(f, frameParent.getUndoManager());
+        		frameParent.updateUndoRedo();
+        		updateDraw(true);
+    		}
+    	}
+		else
+    	if(currentChoice.equals(LaTeXDrawResources.LABEL_BEZIER_CURVE) ||
+			currentChoice.equals(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE))
+	    { 	    	
+		   	point = draw.getGrid().getTransformedPointToGrid(point, true);
+    		if(currentFigure==null)
+	    		currentFigure = new BezierCurve(new LaTeXDrawPoint2D(point.x, point.y), 
+	    						new LaTeXDrawPoint2D(point.x, point.y), 
+			    						currentChoice.equals(LaTeXDrawResources.LABEL_BEZIER_CURVE), true);  
+    		else
+    		{
+    			((BezierCurve)currentFigure).setLastPoint(point);
+    			((BezierCurve)currentFigure).addPoint(new LaTeXDrawPoint2D(point.x, point.y));
+    		}
+	    }
+    	
+    	if(currentFigure!=null)
+    		setCurrentFigureGeneralValues();
+    }
+	
+	
+	
+	
+	
+    /** 
+     * Defines the actions that it must be realised by a right click
+     * of the mouse.
+     * @param e Corresponds to the click of the mouse
+     */
+	public void mouseClickedRightButton(MouseEvent e)
+    {
+		try
+		{
+			Point point = e.getPoint();
+			
+			if(currentFigure!=null)
+			{// If the user draw a polygon and if he do a right click, we
+				String currentChoice = frameParent.getCurrentChoice();
+				
+				// must stop the creation of the polygon
+				if(currentChoice.equals(LaTeXDrawResources.LABEL_POLY) ||
+					currentChoice.equals(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE) ||
+					currentChoice.equals(LaTeXDrawResources.LABEL_BEZIER_CURVE) ||
+					currentChoice.equals(LaTeXDrawResources.LABEL_JOINED_LINES)) 
+					if(((LaTeXDrawPolygon)currentFigure).getNbPoints()>2 || 
+						((currentChoice.equals(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE) ||
+						currentChoice.equals(LaTeXDrawResources.LABEL_BEZIER_CURVE)) &&
+						((LaTeXDrawPolygon)currentFigure).getNbPoints()>1))
+					{
+						draw.addFigure(currentFigure,frameParent.getUndoManager());
+	
+						updateDraw(true);
+						currentFigure = null;
+						
+						frameParent.updateUndoRedo();
+						frameParent.setExportAsMenu(true);
+					}
+					else 
+					{
+						currentFigure = null;
+						draw.repaint();
+					}
+			}
+			else
+			{// We must show a popup menu
+				int nbFiguresSelected = draw.getSelected().size();
+				
+				if(frameParent.getCurrentChoice().equals(LaTeXDrawResources.LABEL_SELECT_FIGURE) && nbFiguresSelected>0)	
+				{
+					menuProperties.setEnabled(nbFiguresSelected==1);
+					menuJoin.setEnabled(nbFiguresSelected>1);
+					menuSeparate.setEnabled(nbFiguresSelected==1 && draw.getSelected().getFigureAt(0) instanceof Draw);
+				    popupFigure.show(e.getComponent(), point.x, point.y);
+				}
+				else
+					popupGeneral.show(e.getComponent(), point.x, point.y);
+			}
+		}catch(Exception ex) 
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+    }
+	
+	
+
+
+    /**
+     * Actions to do on a mouse button pressed
+     * @param e The event
+     */
+	public void mousePressed(MouseEvent e) 
+	{
+		try
+		{
+			frameParent.requestFocus();
+
+	    	switch(e.getButton())
+		    {
+		    	case MouseEvent.BUTTON1 : mousePressedLeftButton(e);
+										  break;
+			
+		    	case MouseEvent.BUTTON2 : break;
+		    	case MouseEvent.BUTTON3 :
+		    		Draw selection = draw.getSelected();
+		    		
+		    		if(selection!=null && !selection.isEmpty())
+		    			frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
+		    		break;
+		    }
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+    	e.consume();
+	}
+
+
+	
+	
+    /**
+     * Actions to do when the mouse is released
+     * @param e The event
+     */
+	public void mouseReleased(MouseEvent e) 
+	{
+		try
+		{
+			Draw selection = draw.getSelected();
+	    	
+			frameParent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+			
+			if(bordersSelection != null)
+			{
+	    		int mod = e.getModifiers();
+				Point pt = e.getPoint();
+				
+		    	// We must put the point in the user's view : rescale the point
+		    	pt.x/=draw.getZoom();
+		    	pt.y/=draw.getZoom();
+	    		bordersSelection.setLastPoint(new LaTeXDrawPoint2D(pt.x, pt.y));
+	    		draw.defineSelected(bordersSelection, mod==InputEvent.SHIFT_MASK+InputEvent.BUTTON1_MASK, 
+	    				mod==InputEvent.CTRL_MASK+InputEvent.BUTTON1_MASK);
+	    		
+	    		if(!draw.getSelected().isEmpty() || formerSelectionEmpty != draw.getSelected().isEmpty())
+	    			frameParent.setSelection(!draw.getSelected().isEmpty());
+	    		
+	    		formerSelectionEmpty = draw.getSelected().isEmpty();
+	    		draw.repaint();
+	    		
+				bordersSelection=null;
+				formerPoint = null;
+				draw.repaint();
+				return ;
+			}
+			
+			if(selection!=null && selection.isOnRotation() && selection.isSelected())
+				selection.endRotation();
+			
+			DrawBorders db = draw.getCompleteBorders();
+			if(db!=null && db.isSelected() && db.isADelimitorSelected())
+			{
+				setIsModified(true);
+				db.onDelimitorRelease();
+				return ;
+			}
+			
+			if(currentFigure!=null && 
+				!currentFigure.getClass().getSimpleName().equals("LaTeXDrawPolygon") &&//$NON-NLS-1$
+				!(currentFigure instanceof JoinedLines) && !(currentFigure instanceof BezierCurve)) 
+			{
+				if(!currentFigure.getTheNWPoint().equals(currentFigure.getTheSEPoint(), 0.001))
+				{	
+					draw.addFigure(currentFigure, frameParent.getUndoManager());
+					frameParent.updateUndoRedo();
+					frameParent.setExportAsMenu(true);
+				}
+				
+				updateDraw(true);
+				currentFigure = null;
+				formerPoint = null;
+				return;
+			}
+
+			Draw listSelected = draw.getSelected();
+			if(!listSelected.isEmpty())
+			{
+				if(cloneForDragged!=null)
+				{
+					int[] id = new int[listSelected.size()];
+					for(int i=0, size=listSelected.size(); i<size; i++)
+					{
+						id[i] = draw.getFigures().indexOf(listSelected.getFigureAt(i));
+						if(id[i]<0)
+							throw new IndexOutOfBoundsException();
+					}
+
+					frameParent.getUndoManager().add(UndoRedoManager.LABEL_CHANGE_MOVE, id, cloneForDragged, false);
+					frameParent.updateUndoRedo();
+					cloneForDragged = null;
+				}
+				updateDraw(true);
+				listSelected.onDelimitorRelease(); 	
+				formerPoint = null;
+				return ;
+			}
+			
+			if(!draw.isAutoAdjustement() && draw.getCompleteBorders()!=null &&
+				draw.getCompleteBorders().isSelected())
+			{// fixing #1554162
+				updateDraw(true);
+				setIsModified(true);
+			}
+			
+		}catch(Exception ex) 
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		formerPoint = null;
+	}
+
+	
+	
+	
+	
+    /**
+     * Actions to do when the mouse is entered
+     * @param e The event
+     */
+	public void mouseEntered(MouseEvent e) 
+	{
+		/*
+		 * No action to do
+		 */
+	}
+
+	
+	
+
+	
+    /**
+     * Actions to do when the mouse is exited
+     * @param e The event
+     */	
+	public void mouseExited(MouseEvent e) 
+	{
+		/*
+		 * No action to do
+		 */
+	}
+
+
+	
+	
+	
+    /**
+     * Actions to do when the mouse is dragged
+     * @param e The event
+     */
+	public void mouseDragged(MouseEvent e) 
+	{
+		try
+		{	
+			Point pt = e.getPoint();
+	    	DrawBorders db = draw.getCompleteBorders();
+	    	
+			frameParent.requestFocus();
+	    	
+	    	// We must put the point in the user's view : rescale the point
+	    	pt.x/=draw.getZoom();
+	    	pt.y/=draw.getZoom();
+						
+			if(db!=null && db.isSelected() && db.isADelimitorSelected())
+			{
+				if(formerPoint!=null)
+					db.onDragged(formerPoint, pt);
+				
+				formerPoint = pt;	
+				draw.updateDraw();
+				return ;
+			}
+	    	
+	    	if(bordersSelection!=null)
+	    	{
+	    		int mod = e.getModifiers();
+	    		
+	    		bordersSelection.setLastPoint(new LaTeXDrawPoint2D(pt.x, pt.y));
+	    		draw.defineSelected(bordersSelection, mod==InputEvent.SHIFT_MASK+InputEvent.BUTTON1_MASK, 
+	    				mod==InputEvent.CTRL_MASK+InputEvent.BUTTON1_MASK);
+
+	    		formerSelectionEmpty = draw.getSelected().isEmpty();
+	    		draw.repaint();
+	    		return ;
+	    	}
+	    	
+	    	if(currentFigure!=null)
+	    	{
+	    		pt = draw.getGrid().getTransformedPointToGrid(pt, true);
+				// We must not draw out the desktop
+				if(pt.x>currentFigure.getThickness()/2 && pt.y>currentFigure.getThickness()/2)
+				{
+					if(currentFigure instanceof AkinPoints)
+						((AkinPoints)currentFigure).addPoint(new LaTeXDrawPoint2D(pt.x, pt.y));
+					else //We move the south-east point
+						currentFigure.setLastPoint(new LaTeXDrawPoint2D(pt.x, pt.y));
+					
+		    		draw.repaint();
+		    		setIsModified(true);
+				return;
+				}
+	    	}
+	    	
+	    	Draw selected = draw.getSelected();
+			if(!selected.isEmpty())
+			{// We must not draw out the desktop
+				pt = draw.getGrid().getTransformedPointToGrid(pt, true);
+				
+				if(pt.x>selected.getThickness()/2 && pt.y>selected.getThickness()/2)
+				{
+					if(formerPoint!=null)
+					{
+						if(cloneForDragged==null)
+							cloneForDragged = (Draw) selected.clone();
+
+						selected.onDragged(formerPoint, pt);
+						
+						if(selected.size()==1 && (selected.getFigureAt(0) instanceof Dot))
+							frameParent.setDotFieldValue(((Dot)selected.getFigureAt(0)).getWidth());
+						
+						getDraw().repaint();
+					}
+					formerPoint = pt;	
+					setIsModified(true);
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+
+	
+	
+    /**
+     * Actions to do when the mouse is moved
+     * @param e The event
+     */
+	public void mouseMoved(MouseEvent e) 
+	{
+		Point pt = e.getPoint();
+    	// We must put the point in the user's view : rescale the point
+    	pt.x/=draw.getZoom();
+    	pt.y/=draw.getZoom();
+					
+    	if(currentFigure!=null)
+    	{
+    		pt = draw.getGrid().getTransformedPointToGrid(pt, true);
+    		
+			// We must not draw out the desktop
+			if(pt.x>currentFigure.getThickness()/2 && pt.y>currentFigure.getThickness()/2)
+				if(currentFigure.getClass().getSimpleName().equals("LaTeXDrawPolygon") || //$NON-NLS-1$
+					currentFigure instanceof JoinedLines || currentFigure instanceof BezierCurve)
+				{
+		    		currentFigure.setLastPoint(new LaTeXDrawPoint2D(pt.x, pt.y));	
+					
+		    		if(currentFigure instanceof BezierCurve)
+		    			((BezierCurve)currentFigure).equilibrate();
+		    		
+		    		draw.repaint();
+		    		return ;
+				}
+    	}
+	}
+	
+	
+	
+	/**
+	 * Allows to update the drawing.
+	 * @param withCode If true, the code is updated (if in auto update).
+	 */
+	public void updateDraw(boolean withCode)
+	{	
+		frameParent.requestFocus();
+		draw.updateDraw();
+		
+		if(codePanel.isInAutoUpdate() && withCode)
+			updateCode();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update the code of the codepanel
+	 */
+	public void updateCode()
+	{
+		try
+		{
+			if(draw.getNbFigures()==0)
+				codePanel.setEmpty();
+			else
+			{	
+				codePanel.setStart(draw.getTheCompleteSWPoint(), draw.getTheCompleteNEPoint(), 
+									draw.getPixelsPerCm(), draw.getRealBorders().getOriginPoint());
+				codePanel.setBody(draw.getCode());
+			}	
+		}catch(Exception ex) 
+		{ 
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+		
+
+	/**
+	 * A drawPanel is not serializable
+	 */	
+	@SuppressWarnings("unused")
+	private void readObject(ObjectInputStream ois)
+	{		
+		/*
+		 * We don't read anything
+		 */
+	}
+
+
+
+
+	/**
+	 * Allows to copy the selected figure
+	 */
+	public void copy() 
+	{
+		draw.copy();
+	}
+
+
+
+	/**
+	 * Allows to paste a copied or a cut figure
+	 */
+	public void paste() 
+	{
+		draw.paste();
+		updateDraw(true);
+	}
+
+
+
+
+	/**
+	 * Allows to cut the selected figure
+	 */
+	public void cut() 
+	{
+		draw.cut();
+	}
+
+
+
+
+	/**
+	 * Allows to join the selected figures
+	 * @param undoManager The undo/redo manager
+	 */
+	public void joinSelection(UndoRedoManager undoManager)
+	{
+		draw.joinSelection(undoManager);
+		updateDraw(false);
+	}
+
+
+
+
+	/**
+	 * Allows to join the figures of the selected drawing
+	 * @param undoManager The undo/redo manager
+	 */
+	public void separateSelection(UndoRedoManager undoManager)
+	{
+		draw.separateSelection(undoManager);
+		updateDraw(true);
+	}
+
+
+	
+	/**
+	 * Allows to insert a picture into the drawing
+	 * @param undoManager The undo/redo manager
+	 * @param path The path of the picture
+	 * @return True is the picture is inserted
+	 */
+	public boolean insertPicture(UndoRedoManager undoManager, String path)
+	{
+		boolean state = draw.insertPicture(undoManager, path);
+		updateDraw(true);
+		
+		return state;
+	}
+	
+	
+	
+	/**
+	 * Allows to set if the grid must be displayed or not
+	 * @param isDisplay True : the grid must be displayed
+	 */
+	public void setIsGridDisplay(boolean isDisplay)
+	{
+		draw.getGrid().setGridDisplayed(isDisplay);
+		menuUpdateToGrid.setEnabled(isDisplay);
+		frameParent.menuBar.getUpdateToGridMenu().setEnabled(isDisplay);
+		updateDraw(false);
+	}
+
+
+
+	/**
+	 * @return the gridIsMagnetic.
+	 */
+	public boolean isGridMagnetic()
+	{
+		return draw.getGrid().isMagnetic();
+	}
+
+
+
+	/**
+	 * @param gridIsMagnetic the gridIsMagnetic to set.
+	 */
+	public void setGridIsMagnetic(boolean gridIsMagnetic)
+	{
+		if(gridIsMagnetic!=isGridMagnetic())
+			setIsModified(true);
+		
+		draw.getGrid().setMagnetic(gridIsMagnetic);
+		menuUpdateToGrid.setEnabled(true);
+	}
+	
+	
+	
+	/**
+	 * Move the horizontal scrollbar.
+	 * @since 1.9
+	 * @param add This value is added to the current position of the scollbar.
+	 */
+	public void moveHorizontalScrollbar(int add)
+	{
+		getHorizontalScrollBar().setValue(getHorizontalScrollBar().getValue()+add);
+	}
+	
+	
+	
+	/**
+	 * Move the vertical scrollbar.
+	 * @since 1.9
+	 * @param add This value is added to the current position of the scollbar.
+	 */
+	public void moveVerticalScrollbar(int add)
+	{
+		getVerticalScrollBar().setValue(getVerticalScrollBar().getValue()+add);
+	}
+
+
+
+	
+	/**
+	 * Move horizontally the selected figures.<br>
+	 * The increment is 1 pixel or, if the magnetic is activated, the gap of the
+	 * grid.
+	 * @since 1.9
+	 * @param direction The direction of the movement:<br>
+	 * <ul>
+	 * <li>1: the X-coordinates of the figures are increased;</li>
+	 * <li>-1: the X-coordinates of the figures are decreased.</li>
+	 * </ul>
+	 */
+	public void moveSelectedFiguresHorizontally(int direction)
+	{
+		try
+		{
+			if(direction!=-1 && direction!=1)
+				return;
+			
+			Draw selection = draw.getSelected();
+			
+			if(selection!=null && !selection.isEmpty())
+			{
+				double gap = draw.getGrid().isMagnetic() ? draw.getGrid().getMagneticGridGap() : 1.;
+				
+				if(direction==-1)
+					gap*=-1;
+				
+				selection.shift(gap, 0);
+				updateDraw(true);
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Move vertically the selected figures.<br>
+	 * The increment is 1 pixel or, if the magnetic is activated, the gap of the
+	 * grid.
+	 * @since 1.9
+	 * @param direction The direction of the movement:<br>
+	 * <ul>
+	 * <li>1: the Y-coordinates of the figures are increased;</li>
+	 * <li>-1: the Y-coordinates of the figures are decreased.</li>
+	 * </ul>
+	 */
+	public void moveSelectedFiguresVertically(int direction)
+	{
+		try
+		{
+			if(direction!=-1 && direction!=1)
+				return;
+			
+			Draw selection = draw.getSelected();
+			
+			if(selection!=null && !selection.isEmpty())
+			{
+				double gap = draw.getGrid().isMagnetic() ? draw.getGrid().getMagneticGridGap() : 1.;
+				
+				if(direction==-1)
+					gap*=-1;
+				
+				selection.shift(0, gap);
+				updateDraw(true);
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+
+	
+
+	/**
+	 * Update the selected figures of the drawing to the displayed grid.
+	 * @since 1.9
+	 */
+	public void updateSelectionToGrid()
+	{
+		Draw selection = draw.getSelected();
+		
+		if(selection!=null && !selection.isEmpty() && isGridMagnetic())
+		{
+			try
+			{
+				Figure clone = (Draw) selection.clone();
+				int[] id = new int[selection.size()];
+				
+				for(int i=0, size=selection.size(); i<size; i++)
+				{
+					id[i] = draw.getFigures().indexOf(selection.getFigureAt(i));
+					if(id[i]<0)
+						throw new IndexOutOfBoundsException();
+				}
+	
+				frameParent.getUndoManager().add(UndoRedoManager.LABEL_TRANSFORM, id, clone, false);
+				frameParent.updateUndoRedo();
+				selection.updateToGrid(draw.getGrid());
+				updateDraw(true);
+				
+			}catch(CloneNotSupportedException e)
+			{
+				e.printStackTrace();
+			}
+		}
+	}
+
+
+
+	/**
+	 * @since 1.9
+	 */
+	public void actionPerformed(ActionEvent e)
+	{
+		try
+		{
+	    	Object src = e.getSource();
+	
+	    	if(src instanceof JMenuItem)
+	    	{
+	    		AbstractButton ab = ((AbstractButton)src);
+	    		String label = ab.getActionCommand();
+	    		
+	    		if(label.equals(ACTION_CMD_UPDATETOGRID))
+	    		{
+	    			updateSelectionToGrid();
+	    			return ;
+	    		}
+	    		
+	    		return ;
+	    	}
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+
+	
+
+	/**
+	 * @since 1.9
+	 */
+	public void mouseWheelMoved(MouseWheelEvent e)
+	{
+		int mod = e.getModifiers();
+	
+		if(mod==InputEvent.CTRL_MASK)
+		{// ctrl+wheel = zoom in/out
+			int wheelRot = e.getWheelRotation();
+			boolean zoomed = false;
+			
+			if(wheelRot>0)
+			{
+				zoomOut();
+				zoomed = true;
+			}
+			else
+				if(wheelRot<0)
+				{
+					zoomIn();
+					zoomed = true;
+				}
+			
+			if(zoomed)
+			{
+				frameParent.getXScale().repaint();
+				frameParent.getYScale().repaint();
+				frameParent.getToolbar().getZoomField().setValue(getZoom()*100);
+			}
+			
+			return ;
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Sets the XML element "meta" with the parameters of the code panel.
+	 * @param document The XML document.
+	 * @param meta The Element to fill.
+	 * @throws IllegalArgumentException If document or meta is null.
+	 * @since 2.0.0
+	 */
+	public void getXMLMetadata(Document document, Element meta)
+	{
+		if(document==null || meta==null)
+			throw new IllegalArgumentException();
+		
+		Element magnet = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_MAGNETIC_GRID);
+		magnet.appendChild(document.createTextNode(String.valueOf(isGridMagnetic())));
+		meta.appendChild(magnet);
+	}
+
+
+
+	/**
+	 * Sets the latexdraw parameters from the <code>metadata</code> SVG tag.
+	 * @param nl The list of the parameters.
+	 * @since 2.0.0
+	 */
+	public void setXMLMetadata(NodeList nl) {
+		// Nothing to do.
+	}
+
+
+	/**
+	 * @return the codePanel.
+	 * @since 2.0.0
+	 */
+	public CodePanel getCodePanel()
+	{
+		return codePanel;
+	}
+}
diff --git a/current/latexDraw/ui/LaTeXDraw.java b/current/latexDraw/ui/LaTeXDraw.java
new file mode 100644
index 0000000..105892d
--- /dev/null
+++ b/current/latexDraw/ui/LaTeXDraw.java
@@ -0,0 +1,49 @@
+package latexDraw.ui;
+
+import latexDraw.lang.LaTeXDrawLang;
+
+
+/** 
+ * The main class of the project.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public final class LaTeXDraw 
+{
+	/** 
+	 * The main function.
+	 * @param args The parameters given during the call of the program.
+	 */
+    public static void main(String[] args) 
+    {	
+         
+	    try 
+	    {	// Create the frame of the application.
+	    	LaTeXDrawFrame frame = new LaTeXDrawFrame(args, true);
+	    	
+	    	if(!System.getProperty("os.name").equals("Linux"))//$NON-NLS-1$//$NON-NLS-2$
+	    		frame.setVisible(true);
+	    	
+	    }catch(NoClassDefFoundError ex) 
+	    {		
+	    	System.err.println(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.83"));//$NON-NLS-1$
+	    	System.err.println("One or several files are missing; reinstall LaTeXDraw to fix it."); //$NON-NLS-1$
+	    	ex.printStackTrace(); 
+	    	System.exit(-1);
+		}
+    }
+ }
diff --git a/current/latexDraw/ui/LaTeXDrawFrame.java b/current/latexDraw/ui/LaTeXDrawFrame.java
new file mode 100644
index 0000000..902edfb
--- /dev/null
+++ b/current/latexDraw/ui/LaTeXDrawFrame.java
@@ -0,0 +1,4838 @@
+package latexDraw.ui;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.print.PrinterJob;
+import java.io.*;
+import java.net.URL;
+import java.util.Vector;
+
+import javax.print.*;
+import javax.print.attribute.HashPrintRequestAttributeSet;
+import javax.print.attribute.PrintRequestAttributeSet;
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+
+import latexDraw.figures.*;
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.filters.*;
+import latexDraw.generators.svg.SVGDocumentGenerator;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.parsers.pstricks.PSTricksParser;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.components.*;
+import latexDraw.ui.components.progressbars.PSTProgressBarManager;
+import latexDraw.ui.components.progressbars.SVGProgressBarManager;
+import latexDraw.ui.dialog.*;
+import latexDraw.ui.listeners.MenusListener;
+import latexDraw.ui.listeners.RecentFilesListener;
+import latexDraw.ui.listeners.ShortcutsListener;
+import latexDraw.ui.listeners.ToolbarListener;
+import latexDraw.util.*;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/** 
+ * This class contains all the elements of the graphic interface.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2009 Arnaud BLOUIN<br>
+ * <br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ * <br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 07/01/09<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.3<br>
+ */
+public final class LaTeXDrawFrame extends JFrame implements ActionListener, ItemListener, ChangeListener, WindowStateListener
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** The version of the application */
+	public final static String VERSION   = "2.0.4";//$NON-NLS-1$
+	
+	public final static String VERSION_STABILITY = ""; //$NON-NLS-1$
+	
+	/** To change if update is needed or not. */
+	public static final boolean WITH_UPDATE = true;
+	
+	public static final Insets INSET_BUTTON = new Insets(1,1,1,1);
+	
+	/** The path by default */
+	public static final String DEFAULT_PATH = System.getProperty("user.home");//$NON-NLS-1$
+	
+	protected ShortcutsFrame shortcutsFrame;
+	
+	protected PSTProgressBarManager progressbarPST = null;
+	
+	protected SVGProgressBarManager progressbarSVG = null;
+	
+	protected transient MenusListener menusListener;
+	
+	protected transient RecentFilesListener recentFilesListener;
+	
+	private String latexIncludes = null;
+	
+	private String pathDistribLatex = null;
+	
+	/** The path of the location of the LaTeX editor. */
+	private String pathTexEditor = null;
+	
+	/** This frame allows the user to insert PSTricks code in the drawing. */
+	private InsertPSTricksCodeFrame insertCodeFrame;
+	
+	/** The panel containing the generated code*/
+	protected CodePanel codePanel;
+	
+	/** The panel containing the drawing made by the user*/
+	protected DrawPanel drawPanel;
+	
+	/** The toolbar of the application*/
+	protected LToolbar toolbar;
+	
+	/** The progress bar for the parsing */
+	protected JProgressBar progressBar;
+	
+	/** The button stop for the parsing */
+	protected JButton stopButton;
+	
+	/** The menu bar of the application */
+	protected LMenuBar menuBar;
+	
+	/** The identifier of the build */
+	private static final String ID_BUILD = "20090917";//$NON-NLS-1$
+	
+	/** Allows to realize undo and redo */
+	protected transient UndoRedoManager undoManager;
+	
+	/** This frame allows to set the parameters of a line */
+	private ParametersLineFrame paramLineFrame;
+	
+	/** This frame allows to set the parameters of axes. */
+	private ParametersAxeFrame paramAxesFrame;
+	
+	/** This frame allows to set the parameters of a circle */
+	private ParametersCircleSquareFrame paramCircleFrame;
+	
+	/** This frame allows to set the parameters of an ellipse */
+	private ParametersEllipseRectangleFrame paramEllipseFrame;
+	
+	/** This frame allows to set the parameters of a Bézier curve */
+	private ParametersBezierCurveFrame paramBezierCurveFrame;
+	
+	/** This frame allows to set the parameters of akin points */
+	private ParametersAkinPointsFrame paramAkinPointsFrame;
+	
+	/** This frame allows to set the parameters of a dot */
+	private ParametersDotFrame paramDotFrame;
+	
+	/** This frame allows to set the parameters of a text */
+	private ParametersTextFrame paramTextFrame;
+	
+	/** This frame allows to set the parameters of a triangle */
+	private ParametersTriangleFrame paramTriangleFrame;
+	
+//	/** This frame allows to set the parameters of a drawing */
+//	private ParametersDrawFrame paramDrawFrame;
+	
+	/** This frame allows to set the parameters of a grid */
+	private ParametersGridFrame paramGridFrame;
+
+	/** This frame allows to set the parameters of a rhombus */
+	private ParametersRhombusFrame paramRhombusFrame;
+	
+	/** This frame allows to set the parameters of an arc */
+	private ParametersArcFrame paramArcFrame;
+	
+	/** This frame allows to set the parameters of a polygon */
+	private ParametersPolygonJoinedLinesFrame paramPolygonFrame;
+	
+	/** This frame allows to set the parameters of several joined lines */
+	private ParametersPolygonJoinedLinesFrame paramJoinedLinesFrame;
+	
+	/** This frame allows the user to add comments to his drawing */
+	private AddCommentsFrame addCommentsFrame;	
+	
+	/** This frame allows to set the parameters of the drawing (not the
+	 * Figure.Draw */
+	private DrawPropertiesFrame drawPropertiesFrame;
+	
+	/** Allows to display a frame displaying the LaTeXDraw help */
+	private JFrame helpFrame;
+	
+	/** The current file of the project */
+	private File currentFile;	
+
+	/** The path used on open/save actions */
+	private static String pathOpen = DEFAULT_PATH;
+	
+	/** The path used on exportation actions */
+	private static String pathExport = DEFAULT_PATH;
+	
+	/** The frame which allows to convert pictures */
+	public final static BatchConvertFrame convertFrame;
+	
+	/** Allows to know if the program must check new version */
+	private boolean checkNewVersion;
+	
+    /** The About LaTeXDraw box */
+    protected JFrame aboutTeXDraw;
+    
+    /** This frame allows the user to set his preferences */
+    private PreferencesFrame preferencesFrame;
+    
+    /** Correspond to the current choice of the user (draw a line, ...). */
+    private static String currentChoice;
+    
+    /** Corresponds to the name of the current project */
+    private String projectName;
+    
+    /** The fileChooser used to save projects. */
+    private JFileChooser fileChooserSave;
+
+    /** The fileChooser used to open projects. @since 2.0.0 */
+    private JFileChooser fileChooserOpen;
+    
+    /** The PictureChooser for 'insert picture' actions */
+    private PictureChooser fileChooserPicture;
+    
+    /** The fileChooser for save/open actions */
+    private ExportDialog fileChooserExport;
+    
+    /** The PictureChooser for import actions */
+    private PictureChooser fileChooserImport;
+    
+	/** Allows to know if by default the grid must be displayed */
+	public static final boolean DEFAULT_DISPLAY_GRID = true;
+	
+	/** Allows to know if by default the XScale must be displayed */
+	public static final boolean DEFAULT_DISPLAY_XSCALE = true;
+	
+	/** Allows to know if by default the YScaleC must be displayed */
+	public static final boolean DEFAULT_DISPLAY_YSCALE = true;
+	
+	/** Allows to know if by default the codePane must be displayed */
+	public static final boolean DEFAULT_DISPLAY_CODEPANEL = true;
+	
+	/** Allows to know if by default the borders of the drawing  must be displayed */
+	public static final boolean DEFAULT_DISPLAY_BORDERS = false;
+	
+	/** Allows to know if by default the program must check new version on start-up */
+	public static final boolean DEFAULT_CHECK_VERSION = true;
+	
+	/** The splitpane of the program */
+	protected JSplitPane splitPane;
+	
+	/** The field which allows to change the thickness of figures */
+	private JSpinner thicknessField;
+	
+	/** Allows to set the colour of the borders of a figure */
+	private ColorButton buttonBordersColor;
+	
+	/** Allows the attribute "filled" in Figure class */
+	private JCheckBox filledCheckBox;
+	
+	/** Set/unset a shadow to a figure. */
+	private JCheckBox shadowCheckBox;
+	
+	/** Allows have double boundaries on a figure */
+	private JCheckBox dbleBoundCheckBox;
+	
+	/** Allows to set the colour of the interior of a figure */
+	private ColorButton buttonInteriorColor;
+	
+	/** Allows to set the colour of the shadow of a figure */
+	private ColorButton buttonShadowColor;
+	
+	/** Allows to change the colour of the hatch */
+	private ColorButton buttonHatchColor;
+	
+	/** Contains buttons allowing to rotate figures. */
+	private ListJToggleButton rotationButtons;
+	
+	/** Contains the buttons allowing to return figures (mirrors). */
+	private ListJToggleButton mirrorButtons;
+	
+	private ListJToggleButton alignButtons;
+	
+	private ListJToggleButton distribButtons;
+	
+	/** Allows to select the type of the dot */
+	private LaTeXDrawComboBox dotChoice;
+	
+	/** Allows to select the position of the borders of the figure (if possible) */
+	private LaTeXDrawComboBox bordersPositionChoice;
+	
+	/** Allows to change the colour of the space between the double boundaries */
+	private ColorButton buttonDbleBoundColor;
+	
+	/** This button allows to join several figures */
+	private JButton joinButton;
+	
+	/** This button allows to separate several figures */
+	private JButton separateButton;
+	
+	/** Allows to change the style of the left-end of the line */
+	private LaTeXDrawComboBox lineArrowLChoice;
+	
+	/** Allows to change the style of the right-end of the line */
+	private LaTeXDrawComboBox lineArrowRChoice;
+	
+	/** Allows to change the style of the line */
+	private LaTeXDrawComboBox lineChoice;
+	
+	/** Allows to change the style of hatch */
+	private LaTeXDrawComboBox hatchChoice;
+	
+	/** Allows to choose the first colour of a gradient. */
+	private ColorButton buttonGradientStartC;
+	
+	/** Allows to choose the second colour of a gradient. */
+	private ColorButton buttonGradientEndC;
+	
+	/** The former location of the divider location (used to show or hide the codepanel) */
+	private int formerDividerLocation;
+	
+	private ListJToggleButton locationButtons;
+	
+	/** The version of the LaTeXDraw file loaded */
+	private static String versionOfFile = "";//$NON-NLS-1$
+	
+	/** The X-scale of the drawing */
+	private XScale xScale;
+	
+	/** The Y-scale of the drawing */	
+	private YScale yScale;
+
+	/** This label is behind the field thickness in the paramsToolbar */
+	private JLabel labelThickness;
+	
+	/** The older version of java that this program can used */
+	public static final String  VERSION_MIN = "1.5"; //$NON-NLS-1$
+	
+	/** This attribute is used to save the value of the "updateCode" checkBox
+	 * of the code panel when we hide to code panel (we disactivate the auto-update when to code panel is hidden */
+	private boolean formerIsInAutoUpdate;
+
+	/** The status-bar of the frame */
+	private JTextField statusBar;
+
+	/** The look and feel of the program. */
+	private static String lookAndFeel;
+
+	protected transient ShortcutsListener shortcutsListener;
+	
+	protected JToggleButton rotateButton;
+	
+	/* Save of the general parameters. */
+	protected ColorButton genGradientEndCB;
+	protected ColorButton genGradientStartCB;
+	protected ColorButton genLineCB;
+	protected ColorButton genInteriorCB;
+	protected ColorButton genDbleBordCB;
+	protected ColorButton genHatchCB;
+	protected ColorButton genShadowCB;
+	protected Color genGradientEndC;
+	protected Color genGradientStartC;
+	protected Color genLineC;
+	protected Color genInteriorC;
+	protected Color genDbleC;
+	protected Color genHatchC;
+	protected Color genShadowC;
+	protected float genThickness;
+	protected float genDotSize;
+	protected boolean genIsFilled;
+	protected boolean genHasDbleBord;
+	protected boolean genHasShadow;
+	protected String genHatchS;
+	protected String genDotS;
+	protected String genLineStyleS;
+	protected String genLeftArrS;
+	protected String genRightArrS;
+	protected String genBordPosS;
+	protected ListJToggleButton genColorL;
+	
+	protected JSpinner dotSizeField;
+	protected JLabel labelDotSize;
+	
+	/** The position of the divider in ]0,1[. @since 2.0.0 */
+	protected double dividerPosition;
+	
+	
+	static
+	{
+		LaTeXDrawPath.checkDirectories();
+		
+		try
+		{
+			lookAndFeel = PreferencesFrame.readTheme();
+     		UIManager.setLookAndFeel(lookAndFeel);
+		}
+		catch(Exception ex) { /* Dommage ! */ }
+		
+		convertFrame = new BatchConvertFrame();
+	}
+	
+	
+	
+	/** The constructor by default. */
+	public LaTeXDrawFrame(String[] args, boolean splash)
+	{
+		dividerPosition = 0.8;
+		
+		SplashScreen splashScreen = new SplashScreen(lookAndFeel);
+
+		if(splash)
+			splashScreen.setVisible(true);
+		
+		try
+		{
+			splashScreen.addToProgressBar(5);
+			statusBar = new JTextField("");//$NON-NLS-1$
+			statusBar.setEditable(false);
+			
+			progressBar = new JProgressBar();
+			progressBar.setMaximumSize(new Dimension(300, 20));
+			progressBar.setPreferredSize(new Dimension(300, 20));
+			progressBar.setVisible(false);
+			
+			menusListener = new MenusListener(this);
+			
+			splashScreen.addToProgressBar(15);
+			setIconImage(LaTeXDrawResources.latexdrawIcon.getImage());
+			
+			checkNewVersion = DEFAULT_CHECK_VERSION && WITH_UPDATE;
+	     	codePanel  = new CodePanel(this);
+	     	codePanel.setVisible(DEFAULT_DISPLAY_CODEPANEL);
+	     	splashScreen.addToProgressBar(5);
+	     	DrawContainer draw = new DrawContainer(DEFAULT_DISPLAY_BORDERS);
+	     	splashScreen.addToProgressBar(10);
+	     	drawPanel  = new DrawPanel(draw, codePanel, this);
+	     	splashScreen.addToProgressBar(5);
+	     	
+	        JPanel paramsToolbar = new JPanel(new FlowLayout(FlowLayout.LEFT));	
+	     	JPanel p= new JPanel();
+	     	
+			projectName       = null;
+			fileChooserSave   = null;
+			fileChooserExport = null;
+			currentFile       = null;		
+			
+			splashScreen.addToProgressBar(5);
+			menuBar = new LMenuBar(this);
+			splashScreen.addToProgressBar(10);
+			createToolbar();
+			splashScreen.addToProgressBar(10);
+			
+	     	undoManager = new UndoRedoManager(draw.getFigures(), draw, this);
+	     	splashScreen.addToProgressBar(5);
+	
+	     	yScale = new YScale(drawPanel, xScale);
+	     	yScale.setVisible(DEFAULT_DISPLAY_YSCALE);
+	     	xScale = new XScale(drawPanel, yScale);
+	     	yScale.setXScale(xScale);
+	     	xScale.setVisible(DEFAULT_DISPLAY_XSCALE);
+	     	
+	     	p.setLayout(new BorderLayout());
+	     	p.add(yScale, BorderLayout.WEST);
+	     	p.add(xScale, BorderLayout.NORTH);
+	     	p.add(drawPanel, BorderLayout.CENTER);
+	        setJMenuBar(menuBar);
+	        updateUndoRedo();
+	        splashScreen.addToProgressBar(10);
+	
+	    	splitPane =  new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, p, codePanel);
+	    	splitPane.setContinuousLayout(true); 
+	     	splitPane.setOneTouchExpandable(true); 
+	     	splitPane.setDividerSize(6);
+	     	
+	        getContentPane().setLayout(new BorderLayout());
+	        getContentPane().add(toolbar, BorderLayout.NORTH);
+	     	getContentPane().add(splitPane, BorderLayout.CENTER);
+	     	
+			addCommentsFrame = new AddCommentsFrame(this);
+			
+	     	SpinnerModel model = new SpinnerNumberModel(Figure.DEFAULT_THICKNESS,0.1,1000,0.1);
+	     	thicknessField = new JSpinner(model);
+	     	thicknessField.setEditor(new JSpinner.NumberEditor(thicknessField, "0.0"));//$NON-NLS-1$
+			thicknessField.addChangeListener(this);
+	     	thicknessField.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.65")); //$NON-NLS-1$
+	     	thicknessField.setName(LaTeXDrawResources.NAME_THICKNESS_FIELD);
+	     	thicknessField.setMaximumSize(new Dimension(55, 30));
+	     	thicknessField.setMinimumSize(new Dimension(55, 30));
+	     	thicknessField.setPreferredSize(new Dimension(55, 30));
+	     	
+	     	model = new SpinnerNumberModel(Dot.DEFAULT_WIDTH,0.1,1000,0.1);
+	     	dotSizeField = new JSpinner(model);
+	     	dotSizeField.setEditor(new JSpinner.NumberEditor(dotSizeField, "0.0"));//$NON-NLS-1$
+	     	dotSizeField.addChangeListener(this);
+	     	dotSizeField.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.0")); //$NON-NLS-1$
+	     	dotSizeField.setName(LaTeXDrawResources.NAME_DOT_SIZE_FIELD);
+	     	dotSizeField.setMaximumSize(new Dimension(55, 30));
+	     	dotSizeField.setMinimumSize(new Dimension(55, 30));
+	     	dotSizeField.setPreferredSize(new Dimension(55, 30));
+	     	labelDotSize = new JLabel(LaTeXDrawResources.dotStyleNoneIcon);
+	     	
+	     	buttonBordersColor = new ColorButton(LaTeXDrawResources.LABEL_COLOR_BUTTON, new ButtonIcon(Color.BLACK));
+	     	buttonBordersColor.setMargin(INSET_BUTTON);
+	     	buttonBordersColor.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.66")); //$NON-NLS-1$
+	     	buttonBordersColor.setActionCommand(LaTeXDrawResources.LABEL_COLOR_BUTTON);
+	     	buttonBordersColor.addActionListener(this);
+	     	genLineCB = new ColorButton(LaTeXDrawResources.LABEL_COLOR_BUTTON, new ButtonIcon(Color.BLACK));
+	     	genLineCB.setMargin(INSET_BUTTON);
+	     	genLineCB.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.66")); //$NON-NLS-1$
+	     	genLineCB.setActionCommand(LaTeXDrawResources.LABEL_COLOR_BUTTON);
+	     	genLineCB.addActionListener(this);
+	     	
+	     	filledCheckBox = new JCheckBox(LaTeXDrawResources.LABEL_FILLED_CHECKBOX);
+	     	filledCheckBox.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+	     	filledCheckBox.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.67")); //$NON-NLS-1$
+	     	filledCheckBox.setActionCommand(LaTeXDrawResources.LABEL_FILLED_CHECKBOX);
+	     	filledCheckBox.addActionListener(this);
+	     	
+	     	buttonInteriorColor = new ColorButton(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON, new ButtonIcon(Figure.DEFAULT_INTERIOR_COL));
+	     	buttonInteriorColor.setMargin(INSET_BUTTON);
+	     	buttonInteriorColor.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.68")); //$NON-NLS-1$
+	     	buttonInteriorColor.setActionCommand(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON);
+	     	buttonInteriorColor.addActionListener(this);
+	     	genInteriorCB = new ColorButton(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON, new ButtonIcon(Figure.DEFAULT_INTERIOR_COL));
+	     	genInteriorCB.setMargin(INSET_BUTTON);
+	     	genInteriorCB.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.68")); //$NON-NLS-1$
+	     	genInteriorCB.setActionCommand(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON);
+	     	genInteriorCB.addActionListener(this);
+	     	
+	     	buttonHatchColor = new ColorButton(LaTeXDrawResources.LABEL_COLOR_HATCH, new ButtonIcon(Figure.DEFAULT_BORDERS_COL));
+	     	buttonHatchColor.setMargin(INSET_BUTTON);
+	     	buttonHatchColor.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.69")); //$NON-NLS-1$
+	     	buttonHatchColor.setActionCommand(LaTeXDrawResources.LABEL_COLOR_HATCH);
+	     	buttonHatchColor.addActionListener(this);
+	     	genHatchCB = new ColorButton(LaTeXDrawResources.LABEL_COLOR_HATCH, new ButtonIcon(Figure.DEFAULT_BORDERS_COL));
+	     	genHatchCB.setMargin(INSET_BUTTON);
+	     	genHatchCB.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.69")); //$NON-NLS-1$
+	     	genHatchCB.setActionCommand(LaTeXDrawResources.LABEL_COLOR_HATCH);
+	     	genHatchCB.addActionListener(this);
+	     	
+	     	dotChoice = Dot.createDotStyleChoice();
+	     	dotChoice.setName(LaTeXDrawResources.CHOICE_DOT_NAME);
+	     	dotChoice.addItemListener(this);
+	     	dotChoice.setPreferredSize(new Dimension(55,30));
+	     	dotChoice.setMaximumSize(new Dimension(55,30));
+	     	
+	     	lineChoice = Figure.createStyleLineChoice();
+	     	lineChoice.setName(LaTeXDrawResources.CHOICE_LINE_NAME);
+	     	lineChoice.addItemListener(this);
+	     	lineChoice.setPreferredSize(new Dimension(70,30));
+	     	lineChoice.setMaximumSize(new Dimension(70,30));
+	     	
+	     	hatchChoice = Figure.createFillChoice();
+	     	hatchChoice.addItemListener(this);
+	     	hatchChoice.setPreferredSize(new Dimension(65,30));
+	     	hatchChoice.setMaximumSize(new Dimension(65,30));
+	     	
+	     	lineArrowLChoice = ArrowHead.createLeftArrowStyleList();
+	     	lineArrowLChoice.setName(LaTeXDrawResources.CHOICE_ARROW_LEFT_NAME);
+	     	lineArrowLChoice.addItemListener(this);
+	     	lineArrowLChoice.setPreferredSize(new Dimension(80,30));
+	     	lineArrowLChoice.setMaximumSize(new Dimension(80,30));
+	     	
+	     	lineArrowRChoice = ArrowHead.createRightArrowStyleList();
+	     	lineArrowRChoice.setName(LaTeXDrawResources.CHOICE_ARROW_RIGHT_NAME);
+	     	lineArrowRChoice.addItemListener(this); 
+	     	lineArrowRChoice.setPreferredSize(new Dimension(80,30));
+	     	lineArrowRChoice.setMaximumSize(new Dimension(80,30));
+	        splashScreen.addToProgressBar(5);
+	        JButton buttonImageForeground = new JButton(LaTeXDrawResources.foregroundIcon);
+	        buttonImageForeground.setMargin(INSET_BUTTON);
+	        buttonImageForeground.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.70")); //$NON-NLS-1$
+	        buttonImageForeground.addActionListener(this);
+	        buttonImageForeground.setActionCommand(LaTeXDrawResources.LABEL_FOREGROUND);
+	        
+	        JButton buttonImageBackground = new JButton(LaTeXDrawResources.backgroundIcon);
+	        buttonImageBackground.setMargin(INSET_BUTTON);
+	        buttonImageBackground.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.71")); //$NON-NLS-1$
+	        buttonImageBackground.addActionListener(this);
+	        buttonImageBackground.setActionCommand(LaTeXDrawResources.LABEL_BACKGROUND);
+	     	
+	        JButton buttonImageFront = new JButton(LaTeXDrawResources.inFrontOfSelIcon);
+	        buttonImageFront.setMargin(INSET_BUTTON);
+	     	buttonImageFront.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.72")); //$NON-NLS-1$
+	     	buttonImageFront.addActionListener(this);
+	     	buttonImageFront.setActionCommand(LaTeXDrawResources.LABEL_FRONT_SEL);
+
+	     	JButton buttonImageBehind = new JButton(LaTeXDrawResources.behindSelIcon);
+	     	buttonImageBehind.setMargin(INSET_BUTTON);
+	        buttonImageBehind.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.73")); //$NON-NLS-1$
+	        buttonImageBehind.addActionListener(this);
+	        buttonImageBehind.setActionCommand(LaTeXDrawResources.LABEL_BEHIND_SEL);
+	     	
+	        rotationButtons = new ListJToggleButton(this, LaTeXDrawResources.rotateIcon, ListJToggleButton.LOCATION_NORTH);
+	        rotationButtons.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.2")); //$NON-NLS-1$
+	        
+	        rotateButton = new JToggleButton(LaTeXDrawResources.rotateIcon);
+	     	rotateButton.setMargin(INSET_BUTTON);
+	     	rotateButton.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.74")); //$NON-NLS-1$
+	     	rotateButton.addActionListener(this);
+	     	rotateButton.setActionCommand(LaTeXDrawResources.LABEL_ROTATE);
+	     	
+	     	JButton rotate90Button = new JButton(LaTeXDrawResources.rotate90Icon);
+	     	rotate90Button.setMargin(INSET_BUTTON);
+	     	rotate90Button.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.3")); //$NON-NLS-1$
+	     	rotate90Button.addActionListener(this);
+	     	rotate90Button.setActionCommand(LaTeXDrawResources.LABEL_ROTATE_90);
+	     	
+	     	JButton rotate180Button = new JButton(LaTeXDrawResources.rotate180Icon);
+	     	rotate180Button.setMargin(INSET_BUTTON);
+	     	rotate180Button.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.4")); //$NON-NLS-1$
+	     	rotate180Button.addActionListener(this);
+	     	rotate180Button.setActionCommand(LaTeXDrawResources.LABEL_ROTATE_180);
+	     	
+	     	JButton rotate270Button = new JButton(LaTeXDrawResources.rotate270Icon);
+	     	rotate270Button.setMargin(INSET_BUTTON);
+	     	rotate270Button.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.5")); //$NON-NLS-1$
+	     	rotate270Button.addActionListener(this);
+	     	rotate270Button.setActionCommand(LaTeXDrawResources.LABEL_ROTATE_270);
+	     	
+	     	rotationButtons.addComponent(rotateButton);
+	     	rotationButtons.addComponent(rotate90Button);
+	     	rotationButtons.addComponent(rotate180Button);
+	     	rotationButtons.addComponent(rotate270Button);
+	     	rotationButtons.addSeparator();
+	     	
+	     	mirrorButtons = new ListJToggleButton(this, LaTeXDrawResources.mirrorHIcon, ListJToggleButton.LOCATION_NORTH);
+	     	mirrorButtons.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.6")); //$NON-NLS-1$
+	     	
+	     	JButton button = new JButton(LaTeXDrawResources.mirrorHIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.7")); //$NON-NLS-1$
+	     	button.addActionListener(this);
+	     	button.setActionCommand(LaTeXDrawResources.LABEL_MIRROR_H);
+	     	mirrorButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.mirrorVIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.8")); //$NON-NLS-1$
+	     	button.addActionListener(this);
+	     	button.setActionCommand(LaTeXDrawResources.LABEL_MIRROR_V);
+	        splashScreen.addToProgressBar(5);
+	     	mirrorButtons.addComponent(button);
+	     	mirrorButtons.addSeparator();
+	     	
+	     	alignButtons = new ListJToggleButton(this, LaTeXDrawResources.alignLeftIcon, ListJToggleButton.LOCATION_NORTH);
+	     	alignButtons.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.1")); //$NON-NLS-1$
+	     	ToolbarListener tl = new ToolbarListener(this);
+	     	
+	     	button = new JButton(LaTeXDrawResources.alignLeftIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.2")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_ALIGN_LEFT);
+	     	alignButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.alignRightIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.3")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_ALIGN_RIGHT);
+	     	alignButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.alignTopIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.4")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_ALIGN_TOP);
+	     	alignButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.alignBottomIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.5")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_ALIGN_BOTTOM);
+	     	alignButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.alignMiddleHorizIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.6")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_ALIGN_MIDDLE_H);
+	     	alignButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.alignMiddleVertIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.7")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_ALIGN_MIDDLE_V);
+	     	alignButtons.addComponent(button);
+	     	alignButtons.addSeparator();
+	     	
+	     	distribButtons = new ListJToggleButton(this, LaTeXDrawResources.distVertBottomIcon, ListJToggleButton.LOCATION_NORTH);
+	     	distribButtons.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.8")); //$NON-NLS-1$
+	     	
+	     	button = new JButton(LaTeXDrawResources.distVertBottomIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.9")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_DISTRIB_V_BOTTOM);
+	     	distribButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.distVertEqualIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.10")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_DISTRIB_V_EQ);
+	     	distribButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.distVertMiddleIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.11")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_DISTRIB_V_MID);
+	     	distribButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.distVertTopIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.12")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_DISTRIB_V_TOP);
+	     	distribButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.distHorizLeftIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.13")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_DISTRIB_H_LEFT);
+	     	distribButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.distHorizEqualIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.14")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_DISTRIB_H_EQ);
+	     	distribButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.distHorizMiddleIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.15")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_DISTRIB_H_MID);
+	     	distribButtons.addComponent(button);
+	     	
+	     	button = new JButton(LaTeXDrawResources.distHorizRightIcon);
+	     	button.setMargin(INSET_BUTTON);
+	     	button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.16")); //$NON-NLS-1$
+	     	button.addActionListener(tl);
+	     	button.setActionCommand(ToolbarListener.LABEL_DISTRIB_H_RIGHT);
+	     	distribButtons.addComponent(button);
+	     	
+	     	joinButton = new JButton(LaTeXDrawResources.joinIcon);
+	     	joinButton.setMargin(INSET_BUTTON);
+	     	joinButton.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.75")); //$NON-NLS-1$
+	     	joinButton.addActionListener(this);
+	     	joinButton.setActionCommand(LaTeXDrawResources.LABEL_JOIN);
+	        
+	        separateButton = new JButton(LaTeXDrawResources.separateIcon);
+	        separateButton.setMargin(INSET_BUTTON);
+	        separateButton.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.76")); //$NON-NLS-1$
+	        separateButton.addActionListener(this);
+	        separateButton.setActionCommand(LaTeXDrawResources.LABEL_SEPARATE);
+	     	
+	        bordersPositionChoice = Figure.createBordersPositionChoice();
+	        bordersPositionChoice.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.77")); //$NON-NLS-1$
+	        bordersPositionChoice.addItemListener(this);
+	        bordersPositionChoice.setPreferredSize(new Dimension(45,30));
+	        bordersPositionChoice.setMaximumSize(new Dimension(45,30));
+	        
+	        dbleBoundCheckBox = new JCheckBox(LaTeXDrawResources.LABEL_DBLE_BOUND_CHECKBOX);
+	        dbleBoundCheckBox.setMargin(INSET_BUTTON);
+	        dbleBoundCheckBox.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.78")); //$NON-NLS-1$
+	        dbleBoundCheckBox.setActionCommand(LaTeXDrawResources.LABEL_DBLE_BOUND_CHECKBOX);
+	        dbleBoundCheckBox.addActionListener(this);
+	     	
+	        buttonDbleBoundColor = new ColorButton(LaTeXDrawResources.LABEL_DBLE_BOUND_CHECKBOX, new ButtonIcon(Figure.DEFAULT_DOUBLE_COLOR));
+	        buttonDbleBoundColor.setMargin(INSET_BUTTON);
+	        buttonDbleBoundColor.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.79")); //$NON-NLS-1$
+	        buttonDbleBoundColor.setActionCommand(LaTeXDrawResources.LABEL_COLOR_DBLE_BOUND);
+	        buttonDbleBoundColor.addActionListener(this);
+	        genDbleBordCB = new ColorButton(LaTeXDrawResources.LABEL_DBLE_BOUND_CHECKBOX, new ButtonIcon(Figure.DEFAULT_DOUBLE_COLOR));
+	        genDbleBordCB.setMargin(INSET_BUTTON);
+	        genDbleBordCB.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.79")); //$NON-NLS-1$
+	        genDbleBordCB.setActionCommand(LaTeXDrawResources.LABEL_COLOR_DBLE_BOUND);
+	        genDbleBordCB.addActionListener(this);
+
+	        stopButton = new JButton(LaTeXDrawResources.stopIcon);
+	        stopButton.setMargin(INSET_BUTTON);
+	        stopButton.setActionCommand(LaTeXDrawResources.LABEL_STOP);
+	        stopButton.addActionListener(this);
+	        stopButton.setName(LaTeXDrawResources.LABEL_STOP);
+	        stopButton.setToolTipText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.9")); //$NON-NLS-1$
+	        stopButton.setVisible(false);
+	        
+	        shadowCheckBox = new JCheckBox(LaTeXDrawResources.LABEL_SHADOW_CHECKBOX);
+	        shadowCheckBox.setMargin(INSET_BUTTON);
+	        shadowCheckBox.setToolTipText(LaTeXDrawLang.getString1_7("LaTeXDrawFrame.4")); //$NON-NLS-1$
+	        shadowCheckBox.setActionCommand(LaTeXDrawResources.LABEL_SHADOW_CHECKBOX);
+	        shadowCheckBox.addActionListener(this); 
+	        
+	        buttonShadowColor = new ColorButton(LaTeXDrawResources.LABEL_COLOR_SHADOW, new ButtonIcon(Figure.DEFAULT_SHADOW_COLOR));
+	        buttonShadowColor.setMargin(INSET_BUTTON);
+	        buttonShadowColor.setToolTipText(LaTeXDrawLang.getString1_7("LaTeXDrawFrame.5")); //$NON-NLS-1$
+	        buttonShadowColor.setActionCommand(LaTeXDrawResources.NAME_COLOR_SHADOW);
+	        buttonShadowColor.addActionListener(this);
+	        genShadowCB = new ColorButton(LaTeXDrawResources.LABEL_COLOR_SHADOW, new ButtonIcon(Figure.DEFAULT_SHADOW_COLOR));
+	        genShadowCB.setMargin(INSET_BUTTON);
+	        genShadowCB.setToolTipText(LaTeXDrawLang.getString1_7("LaTeXDrawFrame.5")); //$NON-NLS-1$
+	        genShadowCB.setActionCommand(LaTeXDrawResources.NAME_COLOR_SHADOW);
+	        genShadowCB.addActionListener(this);
+	        
+     		labelThickness = new JLabel(LaTeXDrawResources.thicknessIcon); 
+     		locationButtons = new ListJToggleButton(this, LaTeXDrawResources.foregroundIcon, ListJToggleButton.LOCATION_NORTH);
+     		locationButtons.addComponent(buttonImageForeground);
+     		locationButtons.addComponent(buttonImageBackground);
+     		locationButtons.addComponent(buttonImageFront);
+     		locationButtons.addComponent(buttonImageBehind);
+     		locationButtons.addSeparator();
+     		locationButtons.setToolTipText(LaTeXDrawLang.getString1_7("LaTeXDrawFrame.6")); //$NON-NLS-1$
+     		
+	        buttonGradientStartC = new ColorButton(LaTeXDrawResources.LABEL_COLOR_GRADIENT_FIRST, new ButtonIcon(PSTricksConstants.DEFAULT_GRADIENT_START_COLOR)); 
+	        buttonGradientStartC.setMargin(INSET_BUTTON);
+	        buttonGradientStartC.setToolTipText(LaTeXDrawLang.getString1_7("LaTeXDrawFrame.7")); //$NON-NLS-1$
+	        buttonGradientStartC.setActionCommand(LaTeXDrawResources.LABEL_COLOR_GRADIENT_FIRST);
+	        buttonGradientStartC.addActionListener(this);
+	        genGradientStartCB = new ColorButton(LaTeXDrawResources.LABEL_COLOR_GRADIENT_FIRST, new ButtonIcon(PSTricksConstants.DEFAULT_GRADIENT_START_COLOR)); 
+	        genGradientStartCB.setMargin(INSET_BUTTON);
+	        genGradientStartCB.setToolTipText(LaTeXDrawLang.getString1_7("LaTeXDrawFrame.7")); //$NON-NLS-1$
+	        genGradientStartCB.setActionCommand(LaTeXDrawResources.LABEL_COLOR_GRADIENT_FIRST);
+	        genGradientStartCB.addActionListener(this);
+	        
+	        buttonGradientEndC = new ColorButton(LaTeXDrawResources.LABEL_COLOR_GRADIENT_SECOND, new ButtonIcon(PSTricksConstants.DEFAULT_GRADIENT_END_COLOR));
+	        buttonGradientEndC.setMargin(INSET_BUTTON);
+	        buttonGradientEndC.setToolTipText(LaTeXDrawLang.getString1_7("LaTeXDrawFrame.8")); //$NON-NLS-1$
+	        buttonGradientEndC.setActionCommand(LaTeXDrawResources.LABEL_COLOR_GRADIENT_SECOND);
+	        buttonGradientEndC.addActionListener(this);
+	        genGradientEndCB = new ColorButton(LaTeXDrawResources.LABEL_COLOR_GRADIENT_SECOND, new ButtonIcon(PSTricksConstants.DEFAULT_GRADIENT_END_COLOR));
+	        genGradientEndCB.setMargin(INSET_BUTTON);
+	        genGradientEndCB.setToolTipText(LaTeXDrawLang.getString1_7("LaTeXDrawFrame.8")); //$NON-NLS-1$
+	        genGradientEndCB.setActionCommand(LaTeXDrawResources.LABEL_COLOR_GRADIENT_SECOND);
+	        genGradientEndCB.addActionListener(this);
+	        splashScreen.addToProgressBar(5);
+	        
+			initializeGeneralFields();
+			genColorL = new ListJToggleButton(this, LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.17"), ListJToggleButton.LOCATION_NORTH); //$NON-NLS-1$
+			genColorL.addComponent(genLineCB);
+			genColorL.addComponent(genInteriorCB);
+			genColorL.addComponent(genHatchCB);
+			genColorL.addComponent(genDbleBordCB);
+			genColorL.addComponent(genShadowCB);
+			genColorL.addComponent(genGradientStartCB);
+			genColorL.addComponent(genGradientEndCB);
+			
+	     	paramsToolbar.add(progressBar);
+	     	paramsToolbar.add(stopButton);
+	    	paramsToolbar.add(rotationButtons);
+	    	paramsToolbar.add(locationButtons);
+	    	paramsToolbar.add(mirrorButtons);
+	    	paramsToolbar.add(alignButtons);
+	    	paramsToolbar.add(distribButtons);
+	    	paramsToolbar.add(joinButton);
+	    	paramsToolbar.add(separateButton);
+	        paramsToolbar.add(labelThickness);
+     		paramsToolbar.add(thicknessField);
+     		paramsToolbar.add(labelDotSize);
+     		paramsToolbar.add(dotSizeField);
+     		paramsToolbar.add(genColorL);
+     		paramsToolbar.add(buttonBordersColor);
+     		paramsToolbar.add(filledCheckBox);
+     		paramsToolbar.add(buttonInteriorColor);
+     		paramsToolbar.add(hatchChoice);
+     		paramsToolbar.add(buttonGradientStartC);
+     		paramsToolbar.add(buttonGradientEndC);
+     		paramsToolbar.add(buttonHatchColor);
+	     	paramsToolbar.add(dotChoice);
+	     	paramsToolbar.add(lineChoice);
+	     	paramsToolbar.add(lineArrowLChoice);
+	     	paramsToolbar.add(lineArrowRChoice);
+	     	paramsToolbar.add(bordersPositionChoice);
+	     	paramsToolbar.add(dbleBoundCheckBox);
+	     	paramsToolbar.add(buttonDbleBoundColor);
+	     	paramsToolbar.add(shadowCheckBox);
+	     	paramsToolbar.add(buttonShadowColor);
+	     	
+	     	JPanel southPanel = new JPanel();
+	     	southPanel.setLayout(new BorderLayout());
+	     	southPanel.add(paramsToolbar, BorderLayout.CENTER);  
+	     	southPanel.add(statusBar, BorderLayout.SOUTH);
+	     	getContentPane().add(southPanel, BorderLayout.SOUTH);
+	        splashScreen.addToProgressBar(5);
+	     	preferencesFrame = new PreferencesFrame(draw, this);
+	     	formerIsInAutoUpdate = preferencesFrame.isCodeInAutoUpdate();
+	     	convertFrame.setPathSelect(pathOpen);
+	     	convertFrame.setPathOutput(pathExport);
+	     	codePanel.setIsInAutoUpdate(formerIsInAutoUpdate);
+			recentFilesListener = new RecentFilesListener(preferencesFrame, this);
+			shortcutsListener = new ShortcutsListener(this);
+			addKeyListener(shortcutsListener);
+
+	     	drawPanel.isSelection(false);
+	     	setTitle(LaTeXDrawResources.LABEL_APP);
+	     	setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+	     	
+	     	addWindowListener(
+	                new WindowAdapter() 
+	                {
+						@Override
+						public void windowClosing(WindowEvent e) 
+	                    {
+	                    	onWindowClosing();
+	                    }
+	                });  
+	     	
+	     	setCurrentChoice(LaTeXDrawResources.LABEL_SELECT_FIGURE);
+	     	setSelection(false);
+	     	
+	     	boolean fileIsOk = true;
+	     	/* Management of command line */
+	     	String fName = getFileName(args);
+	     	
+	     	if(args.length>1)
+     			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.81")); //$NON-NLS-1$
+	     	
+	     	if(fName!=null)
+	     		if(fName.toLowerCase().endsWith(TeXFilter.TEX_EXTENSION))
+	     			fileIsOk = importPSTricksFile(fName);
+	     		else 
+	     			fileIsOk = open(fName, false);
+	     	
+	     	menuBar.updateRecentFilesMenu();
+	     	drawPanel.setIsModified(false);
+	        splashScreen.addToProgressBar(5);
+	        
+	     	if(checkNewVersion && WITH_UPDATE)
+	     	{
+	     		VersionChecker vc = new VersionChecker(this);
+	     		vc.start();
+	     	}
+	     	
+			addWindowStateListener(this);
+	     	splashScreen.setVisible(false);	
+			setVisible(true);
+			updateSplitSeparatorPosition();
+			toolbar.getSliderDelimitor().setValue(Delimitor.getOpacity());
+	     	
+			if(!fileIsOk) {
+				projectName = null;
+				setTitle();
+				JOptionPane.showMessageDialog(this, LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.18"), //$NON-NLS-1$
+			 		    LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.86"), JOptionPane.WARNING_MESSAGE); //$NON-NLS-1$
+			}
+		}
+		catch(Exception e1) 
+		{
+			splashScreen.setVisible(false);
+			JOptionPane.showMessageDialog(this, LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.82") + //$NON-NLS-1$
+		 		    e1.toString(), LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.83"),  //$NON-NLS-1$
+		 		    JOptionPane.WARNING_MESSAGE); 
+			e1.printStackTrace(); 
+			LaTeXDrawFrame.this.windowClosed();
+		}
+	}
+	
+
+	
+	/**
+	 * deduces the filename that will be open, from the set of parameters.
+	 * @param args The parameters given to latexdraw.
+	 * @return The filename that will be open.
+	 * @since 2.0.2
+	 */
+	public static String getFileName(String[] args)
+	{
+		if(args==null || args.length==0)
+			return null;
+		
+		String name = args[0];
+		
+		if(args.length!=1)
+		{
+			File f = new File(name);
+			boolean ok = f.exists();
+			int i = 1;
+			
+			while(!ok && i<args.length)
+			{
+				name += " " + args[i];
+				i++;
+				f = new File(name);
+				ok = f.exists();
+			}
+			
+			f = null;
+			
+			if(!ok)
+				name = args[0];
+		}
+		
+		return name;
+	}
+	
+	
+	
+	/**
+	 * @return Returns the versionOfFile.
+	 */
+	public static String getVersionOfFile()
+	{
+		return versionOfFile;
+	}
+
+	
+	public static void setVersionOfFile(String v)
+	{
+		if(v!=null)
+			versionOfFile = v;
+	}
+
+
+	/**
+	 * Defines actions to do on window closing
+	 */
+	public void onWindowClosing()
+	{
+		getPreferencesFrame().writeXMLPreferences(false);
+		
+		try
+    	{
+	    	if(drawPanel.isModified())
+	    	{
+	    		int id = dialogConfirmSave();
+	    		
+	    		switch(id)
+	    		{
+	    			case JOptionPane.YES_OPTION : 
+	    				if(save(false))
+	    					LaTeXDrawFrame.this.windowClosed();
+	    				break;
+	    			case JOptionPane.NO_OPTION :  
+                        LaTeXDrawFrame.this.windowClosed();
+                        break;
+	    			case JOptionPane.CANCEL_OPTION : return;
+	    			default : return;
+	    		}              		
+	    	}
+	    	else LaTeXDrawFrame.this.windowClosed();
+    	}catch(Exception ex)
+    	{
+    		ex.printStackTrace(); 
+    		ExceptionFrameDialog.showExceptionDialog(ex);
+    	}
+	}
+	
+	
+
+	
+	/**
+	 * Allows to show the frame which allows to change the parameters of
+	 * a figure
+	 * @param f The figure we want to display its parameters
+	 */
+	public void showParamFrame(Figure f, boolean deleteOnCancel)
+	{
+		try
+		{
+			if(f==null)
+				return ;
+			
+			if(f instanceof BezierCurve)
+			{ 
+				if(paramBezierCurveFrame==null)
+					paramBezierCurveFrame = new ParametersBezierCurveFrame(this, drawPanel, true);
+				
+				paramBezierCurveFrame.setVisible(true, f, deleteOnCancel, false);
+			}else
+			if(f instanceof AkinPoints)
+			{
+				if(paramAkinPointsFrame==null)
+					paramAkinPointsFrame = new ParametersAkinPointsFrame(this, drawPanel, true);
+			
+				paramAkinPointsFrame.setVisible(true, f, deleteOnCancel, false);    			
+			}else
+			if(f instanceof Line)
+			{
+				if(paramLineFrame==null)
+					paramLineFrame = new ParametersLineFrame(this, drawPanel, true);
+			
+				paramLineFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof Arc)
+			{
+				if(paramArcFrame==null)
+					paramArcFrame = new ParametersArcFrame(this, drawPanel, true);
+	    		
+				paramArcFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof Axe)
+			{
+				if(paramAxesFrame==null)
+					paramAxesFrame = new ParametersAxeFrame(this, drawPanel, true);
+				
+				paramAxesFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof Circle || f instanceof Square)
+			{
+				if(paramCircleFrame==null)
+					paramCircleFrame = new ParametersCircleSquareFrame(this, drawPanel, true);
+	    		
+				paramCircleFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof Ellipse || f instanceof LaTeXDrawRectangle)
+			{
+				if(paramEllipseFrame==null)
+					paramEllipseFrame = new ParametersEllipseRectangleFrame(this, drawPanel, true);
+	    		
+				paramEllipseFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof Dot)
+			{
+				if(paramDotFrame==null)
+					paramDotFrame = new ParametersDotFrame(this, drawPanel, true);
+	    		
+				paramDotFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof Triangle)
+			{
+				if(paramTriangleFrame==null)
+					paramTriangleFrame = new ParametersTriangleFrame(this, drawPanel, true);
+	    		
+				paramTriangleFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof Rhombus)
+			{
+				if(paramRhombusFrame==null)
+					paramRhombusFrame = new ParametersRhombusFrame(this, drawPanel, true);
+	    		
+				paramRhombusFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof JoinedLines)
+			{
+				if(paramJoinedLinesFrame==null)
+					paramJoinedLinesFrame = new ParametersPolygonJoinedLinesFrame(this, drawPanel, false, true);
+	    		
+				paramJoinedLinesFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof LaTeXDrawPolygon)
+			{
+				if(paramPolygonFrame==null)
+					paramPolygonFrame = new ParametersPolygonJoinedLinesFrame(this, drawPanel, true, true);
+	    		
+				paramPolygonFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof Text)
+			{
+				if(paramTextFrame==null)
+					paramTextFrame = new ParametersTextFrame(this, drawPanel, true);
+				
+				paramTextFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+			else if(f instanceof Grid)
+			{ 
+				if(paramGridFrame==null)
+					paramGridFrame = new ParametersGridFrame(this, drawPanel, true);
+				
+				paramGridFrame.setVisible(true, f, deleteOnCancel, false);
+			}
+//			else if(f instanceof Draw)
+//			{ 
+//				if(paramDrawFrame==null)
+//					paramDrawFrame = new ParametersDrawFrame(this, drawPanel, true);
+//				
+//				paramDrawFrame.setVisible(true, f, deleteOnCancel, false);
+//			}
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+
+	
+	
+	/**
+	 * Allows to get the undo/redo manager
+	 * @return The undo/redo manager
+	 */
+	public UndoRedoManager getUndoManager()
+	{
+		return undoManager;
+	}
+	
+	
+	
+	/**
+	 * Allows to set the name of the application
+	 */
+	public void setTitle()
+	{
+		if(projectName==null)
+			  super.setTitle(LaTeXDrawResources.LABEL_APP);
+		else  super.setTitle(LaTeXDrawResources.LABEL_APP + " - " + projectName + (drawPanel.isModified() ? "*" : ""));//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+	}
+	
+	
+	
+	/**
+	 * Allows to update some fields when a figure is selected or not.
+	 * @param onSelection True : a figure is selected.
+	 */
+	public void setSelection(boolean onSelection)
+	{
+		Draw listSelected = drawPanel.getDraw().getSelected();
+		boolean empty = listSelected==null || listSelected.isEmpty();
+		
+		menuBar.getExportTemplateMenu().setEnabled(onSelection && !empty);
+		menuBar.getDeleteFigure().setEnabled(onSelection && !empty);
+		menuBar.getPropertiesFigureMenu().setEnabled(onSelection && !empty);
+		toolbar.getButtonImageProperties().setEnabled(onSelection && !empty);
+		toolbar.getButtonImageDel().setEnabled(onSelection && !empty);
+		locationButtons.setVisible(onSelection && !empty);
+		rotationButtons.setVisible(onSelection && !empty);
+		mirrorButtons.setVisible(onSelection && !empty);
+		alignButtons.setVisible(onSelection && listSelected!=null && listSelected.size()>1);
+		distribButtons.setVisible(onSelection && listSelected!=null && listSelected.size()>2);
+		menuBar.getCopyMenu().setEnabled(onSelection && !empty);
+		menuBar.getCutMenu().setEnabled(onSelection && !empty);
+		toolbar.getCopyCodeSelButton().setEnabled(onSelection && !empty);
+
+		if(onSelection && listSelected!=null && listSelected.size()==1 && listSelected.getFigureAt(0).isCustomizable() &&
+			!(listSelected.getFigureAt(0) instanceof Draw))
+		{
+			toolbar.getButtonImageProperties().setEnabled(true);
+			joinButton.setVisible(false);
+			buttonBordersColor.setVisible(true);
+			separateButton.setVisible(listSelected.getFigureAt(0) instanceof Draw ? true : false);
+			
+			Figure selected = listSelected.getFigureAt(0);
+			
+			if(selected != null)
+			{
+				if(selected instanceof Dot)
+				{
+					dotChoice.setVisible(true);
+					// A dot can always filled, or it cannot be filled.
+					filledCheckBox.setVisible(false);
+					buttonInteriorColor.setVisible(selected.canBeFilled());
+					labelDotSize.setVisible(true);
+					dotSizeField.setVisible(true);
+				}
+				else
+				{					
+					labelDotSize.setVisible(false);
+					dotSizeField.setVisible(false);
+					dotChoice.setVisible(false);
+					filledCheckBox.setVisible(selected.canBeFilled() && !selected.hasGradient());
+				} //else
+				
+				buttonInteriorColor.setVisible(selected.canBeFilled() && (selected.isFilled() || selected.hasShadow()) && 
+												!selected.hasGradient() && selected.shadowFillsShape());
+				lineArrowLChoice.setVisible(selected.canHaveArrow());
+				lineArrowRChoice.setVisible(selected.canHaveArrow());	
+				shadowCheckBox.setVisible(selected.canHaveShadow());
+				buttonShadowColor.setVisible(selected.hasShadow());
+				dbleBoundCheckBox.setVisible(selected.isDoubleBoundaryable());
+				buttonDbleBoundColor.setVisible(dbleBoundCheckBox.isSelected());
+				bordersPositionChoice.setVisible(selected.isBordersMovable());
+				labelThickness.setVisible(selected.isThicknessable());
+				thicknessField.setVisible(selected.isThicknessable());
+				lineChoice.setVisible(selected.isDashableOrDotable());
+				hatchChoice.setVisible(selected.canBeHatched());
+				buttonGradientEndC.setVisible(selected.canBeHatched() && selected.hasGradient());
+				buttonGradientStartC.setVisible(buttonGradientEndC.isVisible());
+				buttonHatchColor.setVisible(selected.canBeHatched() && selected.isHatched());
+			}
+			genColorL.setVisible(false);
+		}// if(onSelection)
+		else 		
+		{
+			if(listSelected!=null && (listSelected.size()!=1 || (!listSelected.getFigureAt(0).isCustomizable() &&
+					!(listSelected.getFigureAt(0) instanceof Draw))))
+			{
+				toolbar.getButtonImageProperties().setEnabled(false);
+				menuBar.getPropertiesFigureMenu().setEnabled(false);
+			}
+			
+			toolbar.getButtonImageProperties().setEnabled(false);
+			dbleBoundCheckBox.setVisible(true);
+			buttonDbleBoundColor.setVisible(false);
+			bordersPositionChoice.setVisible(true);
+			buttonBordersColor.setVisible(false);
+			labelThickness.setVisible(true);
+			buttonHatchColor.setVisible(false);
+			buttonInteriorColor.setVisible(false);
+			hatchChoice.setVisible(true);
+			buttonHatchColor.setVisible(false);
+			dotChoice.setVisible(true);
+			lineChoice.setVisible(true);
+			lineArrowLChoice.setVisible(true);
+			lineArrowRChoice.setVisible(true);
+			thicknessField.setVisible(true);
+			buttonShadowColor.setVisible(false);
+			shadowCheckBox.setVisible(true);
+			buttonGradientEndC.setVisible(false);
+			buttonGradientStartC.setVisible(false);
+			filledCheckBox.setVisible(true);
+			genColorL.setVisible(true);
+			dotSizeField.setVisible(true);
+			labelDotSize.setVisible(true);
+			
+			joinButton.setVisible(listSelected!=null && listSelected.size()>1);
+			separateButton.setVisible(listSelected!=null && listSelected.size()==1 && listSelected.getFigureAt(0) instanceof Draw);
+		}
+		
+		updateFrameFields();
+	}
+	
+	
+	
+    
+    /**
+	 * Initialises the toolbar of the application.
+	 */
+	private void createToolbar()
+	{
+		toolbar = new LToolbar(this);		
+ 		requestFocus();
+	}
+	
+	
+	
+	/**
+	 * Allows to get the path for open/save actions
+	 * @return The path for open/save actions
+	 */
+	public static String getPathExport()
+	{
+		return pathExport;
+	}
+	
+	
+
+	
+	/**
+	 * Allows to get the path for exportation actions
+	 * @return The path for exportation actions
+	 */
+	public static String getPathOpen()
+	{
+		return pathOpen;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the current choice of the user
+	 * @return The current choice of the user
+	 */
+	public String getCurrentChoice()
+	{
+		return currentChoice;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the codePanel
+	 * @return The codePanel
+	 */
+	public CodePanel getCodePanel()
+	{
+		return codePanel;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the drawPanel
+	 * @return The drawPanel
+	 */
+	public DrawPanel getDrawPanel()
+	{
+		return drawPanel;
+	}
+	
+	
+	
+	/**
+	 * Allows to set if the grid must be displayed.
+	 * @param display True : the grid must be displayed.
+	 * @param classicGrid Define if it is the classic grid which must be drawn (only if display=true).
+	 */
+	public void displayGrid(boolean display, boolean classicGrid)
+	{
+		if(display)
+		{
+			menuBar.getDisplayGrid().setSelected(classicGrid);
+			toolbar.getPersoGridGapField().setEnabled(!classicGrid);
+			menuBar.getDisplayPersoGrid().setSelected(!classicGrid);
+			drawPanel.draw.setClassicGridDrawn(classicGrid);
+		}
+		else
+		{
+			menuBar.getDisplayGrid().setSelected(false);
+			toolbar.getPersoGridGapField().setEnabled(false);
+			menuBar.getDisplayPersoGrid().setSelected(false);
+		}
+		
+		drawPanel.setIsGridDisplay(display);
+		drawPanel.setIsModified(true);
+	}
+	
+
+	
+	/**
+	 * Allows to set if the XScale must be displayed
+	 * @param display True : the XScale must be displayed
+	 */
+	public void displayXScale(boolean display)
+	{
+		menuBar.getDisplayXScale().setSelected(display);
+		xScale.setVisible(display);
+		
+		try {drawPanel.setIsModified(true);} 
+		catch (Exception e) 
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		
+		menuBar.getDisplayXScale().setSelected(display);
+	}
+	
+	
+	
+	/**
+	 * Allows to set if the YScale must be displayed
+	 * @param display True : the YScale must be displayed
+	 */
+	public void displayYScale(boolean display)
+	{
+		yScale.setVisible(display);
+		
+		try {drawPanel.setIsModified(true);} 
+		catch (Exception e) 
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		
+		menuBar.getDisplayYScale().setSelected(display);
+	}
+	
+
+	
+	
+	/**
+	 * Allows to set if the borders of the drawing must be displayed
+	 * @param display True : the borders of the drawing must be displayed
+	 */
+	public void displayBorders(boolean display)
+	{
+		try 
+		{
+			drawPanel.displayBorders(display);
+			menuBar.getDisplayBorders().setSelected(display);
+			toolbar.getButtonImageBorders().setSelected(display);
+			drawPanel.setIsModified(true);
+		}
+		catch (Exception e) 
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to set if the code panel must be displayed
+	 * @param display True: the code panel must be displayed
+	 */
+	public void displayCodePanel(boolean display)
+	{
+		if(display!=isCodePanelDisplayed())
+			drawPanel.setIsModified(true);
+		
+		menuBar.getDisplayCodePanel().setSelected(display);
+		toolbar.getCopyCodeButton().setVisible(!display);
+		
+		if(display)
+		{
+			codePanel.setVisible(true);
+			codePanel.setIsInAutoUpdate(formerIsInAutoUpdate);
+			splitPane.setDividerLocation(formerDividerLocation);
+		}
+		else
+		{
+			formerIsInAutoUpdate = codePanel.isInAutoUpdate();
+			codePanel.setIsInAutoUpdate(false);
+			formerDividerLocation = splitPane.getDividerLocation();	
+			codePanel.setVisible(false);
+		}
+		
+		splitPane.revalidate();
+	}
+	
+	
+	
+	/**
+	 * Allows to set the path for open/save actions
+	 * @param path The new path
+	 */
+	public void setPathOpen(String path)
+	{
+		pathOpen = path;
+		if(fileChooserSave!=null)
+			fileChooserSave.setCurrentDirectory(new File(path));
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the path for exportations actions
+	 * @param path The new path
+	 */
+	public void setPathExport(String path)
+	{
+		pathExport = path;
+		if(fileChooserExport!=null)
+			fileChooserExport.setCurrentDirectory(new File(path));
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set if the menu "paste" must be enable or not
+	 * @param mustBeEnable True : the menu "paste" must be activated
+	 */
+	public void setMenuPaste(boolean mustBeEnable)
+	{
+		getLMenuBar().getPasteMenu().setEnabled(mustBeEnable);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set if the menu "copy" must be enable or not
+	 * @param mustBeEnable True : the menu "copy" must be activated
+	 */
+	public void setMenuCopy(boolean mustBeEnable)
+	{
+		getLMenuBar().getCopyMenu().setEnabled(mustBeEnable);
+	}
+	
+	
+
+	
+	/**
+	 * Allows to set the selected field of the choice lineChoice
+	 * @param choice The new selected choice
+	 */
+	public void setLineChoice(String choice)
+	{
+		if(!Figure.isValidStyle(choice))
+			throw new IllegalArgumentException();
+		
+		lineChoice.removeItemListener(this);
+		lineChoice.setSelectedItem(choice);
+		lineChoice.addItemListener(this);
+	}
+	
+	
+	
+	/**
+	 * Allows to set the selected field of the choice <code>bordersPositionChoice</code>.
+	 * @param choice The new choice.
+	 * @since 1.9.1
+	 */
+	public void setBorderChoice(String choice)
+	{
+		bordersPositionChoice.removeItemListener(this);
+		bordersPositionChoice.setSelectedItem(choice);
+		bordersPositionChoice.addItemListener(this);
+	}
+	
+	
+	
+	/**
+	 * Allows to set the selected field of the choice <code>hatchChoice</code>.
+	 * @param choice The new choice.
+	 * @since 1.9.1
+	 */
+	public void setHatchChoice(String choice)
+	{
+		hatchChoice.removeItemListener(this);
+		hatchChoice.setSelectedItem(choice);
+		hatchChoice.addItemListener(this);
+	}
+	
+	
+	
+	/**
+	 * Allows to set the selected field of the choice lineArrowRChoice
+	 * @param choice The new selected choice
+	 */
+	public void setLineArrowRChoice(String choice)
+	{
+		if(!PSTricksConstants.isValidArrowStyle(choice))
+			throw new IllegalArgumentException();	
+		
+		lineArrowRChoice.removeItemListener(this);
+		lineArrowRChoice.setSelectedItem(choice);
+		lineArrowRChoice.addItemListener(this);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the selected field of the choice lineArrowLChoice
+	 * @param choice The new selected choice
+	 */
+	public void setLineArrowLChoice(String choice)
+	{
+		if(!PSTricksConstants.isValidArrowStyle(choice))
+			throw new IllegalArgumentException();		
+		
+		lineArrowLChoice.removeItemListener(this);
+		lineArrowLChoice.setSelectedItem(choice);
+		lineArrowLChoice.addItemListener(this);
+	}
+	
+	
+		
+	
+	/**
+	 * Allows to update the selected field in the Choice component
+	 * dotChoice
+	 * @param newChoice The choice which must be selected
+	 */
+	public void setDotChoice(String newChoice)
+	{
+		if(!PSTricksConstants.isValidDotStyle(newChoice))
+			throw new IllegalArgumentException();
+		
+		dotChoice.removeItemListener(this);
+		dotChoice.setSelectedItem(newChoice);
+		dotChoice.addItemListener(this);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the menu exportAs able or not
+	 * @param state It's new state
+	 */
+	public void setExportAsMenu(boolean state)
+	{
+		getLMenuBar().getExportAsMenu().setEnabled(state);
+		getToolbar().getButtonPdfExport().setEnabled(state);
+	}
+	
+	
+	
+	/**
+	 * Allows to set the value of the field thickness
+	 * @param thickness The new value of the field thickness
+	 */
+	public void setThicknessFieldValue(float thickness)
+	{
+		thicknessField.removeChangeListener(this);
+		thicknessField.setValue(Float.valueOf(thickness).doubleValue());
+		thicknessField.addChangeListener(this);
+	}
+	
+	
+	
+	public void setDotFieldValue(float width)
+	{
+		dotSizeField.removeChangeListener(this);
+		dotSizeField.setValue(Float.valueOf(width).doubleValue());
+		dotSizeField.addChangeListener(this);
+	}
+	
+	
+	/**
+	 * Allows to set the attribute "isModified" in the drawPanel
+	 * @param modified The new value of the attribute "isModified"
+	 */
+	public void setIsModified(boolean modified)
+	{
+		drawPanel.setIsModified(modified);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to reinitialise some buttons
+	 */
+	public void reinitializeButtons()
+	{
+		updateUndoRedo();
+		codePanel.newProject();
+		Delimitor.setOpacity(Delimitor.DEFAULT_OPACITY);
+		toolbar.getSliderDelimitor().setValue(Delimitor.DEFAULT_OPACITY);
+		toolbar.getPersoGridGapField().setValue(MagneticGrid.DEFAULT_PERSONAL_GRID_GAP);
+		menuBar.getDisplayGrid().setSelected(false);
+		menuBar.getDisplayPersoGrid().setSelected(false);
+		toolbar.getPersoGridGapField().setEnabled(false);
+		toolbar.getMagneticCB().setSelected(false);
+		rotationButtons.setSelected(false);
+		mirrorButtons.setSelected(false);
+		drawPanel.setOnRotation(false);
+		preferencesFrame.readXMLPreferences();
+		if(drawPropertiesFrame!=null)
+			drawPropertiesFrame.setProperties();
+		toolbar.getButtonImageSelect().setSelected(true);
+		menuBar.getMenuSelect().setSelected(true);
+		menuBar.getAutoAdjustBorders().setSelected(true);
+		drawPanel.setMenuSelectedPopupGeneral(menuBar.getMenuSelect().getActionCommand(),true);
+		rotateButton.setSelected(false);
+		drawPanel.setOnRotation(false);
+		setCurrentChoice(LaTeXDrawResources.LABEL_SELECT_FIGURE);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update buttons undo/redo
+	 * (change their titles, ...)
+	 */
+	public void updateUndoRedo()
+	{
+		if(undoManager.isEmptyRedo())
+		{
+			toolbar.getButtonImageRedo().setToolTipText(UndoRedoManager.EMPTY_REDO);
+			menuBar.getRedoMenu().setText(UndoRedoManager.EMPTY_REDO);
+		}
+		else
+		{
+			toolbar.getButtonImageRedo().setToolTipText(LaTeXDrawResources.LABEL_REDO +" " +undoManager.getTextNextRedo());//$NON-NLS-1$
+			menuBar.getRedoMenu().setText(LaTeXDrawResources.LABEL_REDO +" " +undoManager.getTextNextRedo());//$NON-NLS-1$
+		}
+		
+		if(undoManager.isEmptyUndo())
+		{
+			menuBar.getUndoMenu().setText(UndoRedoManager.EMPTY_UNDO);
+			toolbar.getButtonImageUndo().setToolTipText(UndoRedoManager.EMPTY_UNDO);
+		}
+		else
+		{
+			menuBar.getUndoMenu().setText(LaTeXDrawResources.LABEL_UNDO +" " +undoManager.getTextNextUndo());//$NON-NLS-1$
+			toolbar.getButtonImageUndo().setToolTipText(LaTeXDrawResources.LABEL_UNDO +" " +undoManager.getTextNextUndo());//$NON-NLS-1$
+		}
+		
+		menuBar.getUndoMenu().setEnabled(!undoManager.isEmptyUndo());
+		menuBar.getRedoMenu().setEnabled(!undoManager.isEmptyRedo());
+		toolbar.getButtonImageRedo().setEnabled(!undoManager.isEmptyRedo());
+		toolbar.getButtonImageUndo().setEnabled(!undoManager.isEmptyUndo());
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update fields of the frame : if a figure is selected, its parameters are updated, else general parameters are used
+	 * to set the fields.
+	 */
+	public void updateFrameFields()
+	{	
+		try
+		{
+			Draw listSelected = drawPanel.getDraw().getSelected();
+			
+			if(listSelected!=null && listSelected.size()==1)
+			{
+				Figure f = listSelected.getFigureAt(0);
+				
+				if(f!=null)
+				{
+					if(f instanceof Dot)
+					{
+						setDotFieldValue(((Dot)f).getWidth());
+						setDotChoice(((Dot)f).getCurrentStyle());
+						buttonInteriorColor.setVisible(f.canBeFilled());
+					}
+					else
+					{
+						if(f.canHaveArrow())
+						{
+		    				setLineArrowLChoice(((Arrowable)f).getArrow1Style());
+		    				setLineArrowRChoice(((Arrowable)f).hasTwoLeftArrows() ? 
+		    						ArrowHead.invertArrowStyle(((Arrowable)f).getArrow2Style()) : ((Arrowable)f).getArrow2Style());
+						}
+						
+						setThicknessFieldValue(f.getThickness());	
+						setLineChoice(f.getLineStyle());
+						filledCheckBox.setSelected(f.canBeFilled() && f.isFilled());
+					}
+					
+					buttonBordersColor.setColor(f.getLinesColor());
+					setHatchChoice(f.getHatchingStyle());
+					dbleBoundCheckBox.setSelected(f.isDoubleBoundaryable() && f.hasDoubleBoundary());
+					shadowCheckBox.setSelected(f.hasShadow());
+					updateFillCB();
+					
+					if(f.canHaveShadow())
+						buttonShadowColor.setColor(f.getShadowColor());
+					
+					if(f.canBeFilled())
+					{
+						buttonBordersColor.setColor(f.getLinesColor());
+						buttonInteriorColor.setColor(f.getInteriorColor());
+						buttonGradientEndC.setColor(f.getGradientEndColor());
+						buttonGradientStartC.setColor(f.getGradientStartColor());
+					}
+					
+					if(f.canBeHatched())
+						buttonHatchColor.setColor(f.getHatchingColor());
+					
+					if(f.isDoubleBoundaryable())
+						buttonDbleBoundColor.setColor(f.getDoubleColor());
+					
+					if(f.isBordersMovable())
+						setBorderChoice(f.getBordersPosition());
+				}//if
+			}
+			else 
+				if(listSelected!=null && listSelected.size()>1)
+				{// We try to identify the figures' attributes that are equals.
+					boolean ok;
+					int i, size = listSelected.size();
+					Color linesC = listSelected.getFigureAt(0).getLinesColor();
+					
+					for(i=0, ok=true; i<size && ok; i++)
+						if(listSelected.getFigureAt(i).isDoubleBoundaryable())
+							ok = false;
+					
+					if(!ok)
+					{
+						boolean hasDbleBound = listSelected.getFigureAt(i-1).hasDoubleBoundary();
+						
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).isDoubleBoundaryable() && 
+								listSelected.getFigureAt(i).hasDoubleBoundary()!=hasDbleBound)
+								ok = false;
+						
+						dbleBoundCheckBox.setSelected(ok ? hasDbleBound : genHasDbleBord);
+						
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).hasDoubleBoundary())
+								ok = false;
+						
+						if(!ok)
+						{
+							Color dbleC = listSelected.getFigureAt(i-1).getDoubleColor();
+							
+							for(i=0, ok=true; i<size && ok; i++)
+								if(listSelected.getFigureAt(i).hasDoubleBoundary() && 
+									!listSelected.getFigureAt(i).getDoubleColor().equals(dbleC))
+									ok = false;
+							
+							genDbleBordCB.setColor(ok ? dbleC : genDbleC);
+						}
+						else
+							genDbleBordCB.setColor(genDbleC);
+					}
+					else
+						dbleBoundCheckBox.setSelected(genHasDbleBord);
+					
+					for(i=0, ok=true; i<size && ok; i++)
+						if(listSelected.getFigureAt(i) instanceof Arrowable)
+							ok = false;
+					
+					if(!ok)
+					{
+						Arrowable arr = ((Arrowable)listSelected.getFigureAt(i-1));
+						String arrow1S = arr.getArrow1Style();
+						String arrow2S = arr.hasTwoLeftArrows() ? ArrowHead.invertArrowStyle(arr.getArrow2Style()) : arr.getArrow2Style();
+						boolean ok2 = true;
+						String str;
+						
+						for(i=0, ok=true; i<size; i++)
+							if(listSelected.getFigureAt(i) instanceof Arrowable)
+							{
+								Arrowable a = (Arrowable)listSelected.getFigureAt(i);
+								str = a.getArrow2Style();
+								
+								if(a.hasTwoLeftArrows())
+									str = ArrowHead.invertArrowStyle(str);
+								
+								if(!a.getArrow1Style().equals(arrow1S))
+									ok = false;
+								
+								if(!str.equals(arrow2S))
+									ok2 = false;
+							}
+						
+						setLineArrowLChoice(ok ? arrow1S : genLeftArrS);
+						setLineArrowRChoice(ok2 ? arrow2S : genRightArrS);
+					}
+					
+					for(i=0, ok=true; i<size && ok; i++)
+						if(listSelected.getFigureAt(i) instanceof Dot)
+							ok = false;
+				
+					if(!ok)
+					{
+						String dotStyle = ((Dot)listSelected.getFigureAt(i-1)).getCurrentStyle();
+						float width = ((Dot)listSelected.getFigureAt(i-1)).getWidth();
+						boolean ok2 = true;
+						
+						for(i=0, ok=true; i<size; i++)
+							if(listSelected.getFigureAt(i) instanceof Dot)
+							{
+								Dot d = (Dot)listSelected.getFigureAt(i);
+								
+								if(!d.getCurrentStyle().equals(dotStyle))
+									ok = false;
+							
+								if(d.getWidth()!=width)
+									ok2 = false;
+							}
+						
+						setDotChoice(ok ? dotStyle : genDotS);
+						setDotFieldValue(ok2 ? width : genDotSize);
+					}
+					else setLineChoice(genLineStyleS);
+					
+					for(i=0, ok=true; i<size && ok; i++)
+						if(listSelected.getFigureAt(i).isDashableOrDotable())
+							ok = false;
+				
+					if(!ok)
+					{
+						String lineStyle = listSelected.getFigureAt(i-1).getLineStyle();
+						
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).isDashableOrDotable() && 
+								!listSelected.getFigureAt(i).getLineStyle().equals(lineStyle))
+									ok = false;
+						
+						setLineChoice(ok ? lineStyle : genLineStyleS);
+					}
+					else setLineChoice(genLineStyleS);
+					
+					for(i=0, ok=true; i<size && ok; i++)
+						if(listSelected.getFigureAt(i).isBordersMovable())
+							ok = false;
+					
+					if(!ok)
+					{
+						String bordPos = listSelected.getFigureAt(i-1).getBordersPosition();
+					
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).isBordersMovable() && 
+								!listSelected.getFigureAt(i).getBordersPosition().equals(bordPos))
+									ok = false;
+						
+						setBorderChoice(ok ? bordPos : genBordPosS);
+					}
+					else setBorderChoice(genBordPosS);
+					
+					for(i=1; i<size && ok; i++)
+						if(!listSelected.getFigureAt(i).getLinesColor().equals(linesC))
+							ok = false;
+					
+					genLineCB.setColor(ok ? linesC : genLineC);
+					
+					for(i=0, ok=true; i<size && ok; i++)
+						if(listSelected.getFigureAt(i).isThicknessable())
+							ok = false;
+					
+					if(!ok)
+					{
+						Float thickness = listSelected.getFigureAt(i-1).getThickness();
+						
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).isThicknessable() && listSelected.getFigureAt(i).getThickness()!=thickness)
+								ok = false;
+					
+						setThicknessFieldValue(ok ? thickness : genThickness);
+					}
+					else setThicknessFieldValue(genThickness);
+					
+					for(i=0, ok=true; i<size && ok; i++)
+						if(listSelected.getFigureAt(i).canHaveShadow())
+							ok = false;
+					
+					if(!ok)
+					{
+						boolean hasShadow = listSelected.getFigureAt(i-1).hasShadow();
+						
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).canHaveShadow() && listSelected.getFigureAt(i).hasShadow()!=hasShadow)
+								ok = false;
+						
+						shadowCheckBox.setSelected(ok ? hasShadow : genHasShadow);
+						
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).hasShadow())
+								ok = false;
+						
+						if(!ok)
+						{
+							Color shadC = listSelected.getFigureAt(i-1).getShadowColor();
+							
+							for(i=0, ok=true; i<size && ok; i++)
+								if(listSelected.getFigureAt(i).hasShadow() && !listSelected.getFigureAt(i).getShadowColor().equals(shadC))
+									ok = false;
+							
+							genShadowCB.setColor(ok ? shadC : genShadowC);
+						}
+						else
+							genShadowCB.setColor(genShadowC);
+					}
+					else
+						shadowCheckBox.setSelected(genHasShadow);
+					
+					for(i=0, ok=true; i<size && ok; i++)
+						if(listSelected.getFigureAt(i).canBeFilled())
+							ok = false;
+					
+					if(!ok)
+					{
+						int j = i-1;
+						boolean isFilled = listSelected.getFigureAt(j).isFilled();
+						String hatchS = listSelected.getFigureAt(j).getHatchingStyle();
+						
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).canBeFilled() && listSelected.getFigureAt(i).isFilled()!=isFilled)
+								ok = false;
+						
+						filledCheckBox.setSelected(ok ? isFilled : genIsFilled);
+						
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).canBeFilled() && 
+								(listSelected.getFigureAt(i).hasGradient() || listSelected.getFigureAt(i).isHatched()) &&
+								!listSelected.getFigureAt(i).getHatchingStyle().equals(hatchS))
+								ok = false;
+						
+						setHatchChoice(ok ? hatchS : genHatchS);
+						
+						if(ok)
+							if(listSelected.getFigureAt(j).hasGradient())
+							{
+								Color gradEndC = listSelected.getFigureAt(j).getGradientEndColor();
+								Color gradStartC = listSelected.getFigureAt(j).getGradientStartColor();
+								boolean okEnd = true;
+								
+								for(i=0, ok=true; i<size; i++)
+									if(listSelected.getFigureAt(i).canBeHatched())
+									{
+										if(!listSelected.getFigureAt(i).getGradientEndColor().equals(gradEndC))
+											okEnd = false;
+										if(!listSelected.getFigureAt(i).getGradientStartColor().equals(gradStartC))
+											ok = false;
+									}
+								
+								genGradientStartCB.setColor(ok ? gradStartC : genGradientStartC);
+								genGradientEndCB.setColor(okEnd ? gradEndC : genGradientEndC);
+								genHatchCB.setColor(genHatchC);
+							}
+							else
+							{
+								Color hatchC = listSelected.getFigureAt(j).getHatchingColor();
+								
+								for(i=0, ok=true; i<size; i++)
+									if(listSelected.getFigureAt(i).canBeHatched() && 
+										!listSelected.getFigureAt(i).getHatchingColor().equals(hatchC))
+										ok = false;
+								
+								genGradientStartCB.setColor(genGradientStartC);
+								genGradientEndCB.setColor(genGradientEndC);
+								genHatchCB.setColor(ok ? hatchC : genHatchC);
+							}
+						else
+						{
+							genGradientStartCB.setColor(genGradientStartC);
+							genGradientEndCB.setColor(genGradientEndC);
+							genHatchCB.setColor(genHatchC);
+						}
+						
+						for(i=0, ok=true; i<size && ok; i++)
+							if(listSelected.getFigureAt(i).isFilled())
+								ok = false;
+						
+						if(!ok)
+						{
+							Color fillC = listSelected.getFigureAt(i-1).getInteriorColor();
+							
+							for(ok=true, i=0; i<size && ok; i++)
+								if(listSelected.getFigureAt(i).isFilled() && !listSelected.getFigureAt(i).getInteriorColor().equals(fillC) &&
+									!listSelected.getFigureAt(i).hasGradient())
+									ok = false;
+							
+							genInteriorCB.setColor(ok ? fillC : genInteriorC);
+						}
+						else genInteriorCB.setColor(genInteriorC);
+					}
+					else 
+					{
+						genInteriorCB.setColor(genInteriorC);
+						setHatchChoice(genHatchS);
+						filledCheckBox.setSelected(genIsFilled);
+						buttonGradientStartC.setColor(genGradientStartC);
+						buttonGradientEndC.setColor(genGradientEndC);
+						buttonHatchColor.setColor(genHatchC);
+					}
+				}
+				else// In this case, the general values are used.
+				{
+					setBorderChoice(genBordPosS);
+					setLineChoice(genLineStyleS);
+					setDotChoice(genDotS);
+					dbleBoundCheckBox.setSelected(genHasDbleBord);
+					shadowCheckBox.setSelected(genHasShadow);
+					setHatchChoice(genHatchS);
+					filledCheckBox.setSelected(genIsFilled);
+					setLineArrowLChoice(genLeftArrS);
+					setLineArrowRChoice(genRightArrS);
+					setThicknessFieldValue(genThickness);
+					genDbleBordCB.setColor(genDbleC);
+					genGradientEndCB.setColor(genGradientEndC);
+					genGradientStartCB.setColor(genGradientStartC);
+					genInteriorCB.setColor(genInteriorC);
+					genLineCB.setColor(genLineC);
+					genHatchCB.setColor(genHatchC);
+					genShadowCB.setColor(genShadowC);
+				}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to know if the user wants to auto adjust the 
+	 * borders of the drawing.
+	 * @return True if the user wants it
+	 */
+	public boolean isAutoAdjustBorders()
+	{
+		return getLMenuBar().getAutoAdjustBorders().isSelected();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to know if the X-scale must be displayed
+	 * @return True if the X-scale must be displayed
+	 */
+	public boolean isXScaleDisplayed()
+	{
+		return getLMenuBar().getDisplayXScale().isSelected();
+	}
+	
+	
+
+	/**
+	 * Allows to know if the Y-scale must be displayed
+	 * @return True if the Y-scale must be displayed
+	 */
+	public boolean isYScaleDisplayed()
+	{
+		return getLMenuBar().getDisplayYScale().isSelected();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to know if the the borders of the drawing must be displayed
+	 * @return True if the the borders of the drawing must be displayed
+	 */
+	public boolean isBordersDisplayed()
+	{
+		return getLMenuBar().getDisplayBorders().isSelected();
+	}
+	
+	
+	
+	/**
+	 * Allows to know if the codePanel must be displayed
+	 * @return True if the codePanel must be displayed
+	 */
+	public boolean isCodePanelDisplayed()
+	{
+		if(codePanel==null)
+			return false;
+		return codePanel.isVisible();
+	}
+	
+	
+	
+	
+	
+	public void actionPerformed(ActionEvent e) 
+	{ 
+    	Object src = e.getSource();
+
+    	if(src instanceof JMenuItem || src instanceof JButton || src instanceof JToggleButton || src instanceof JCheckBox)
+    	{
+    		AbstractButton ab = ((AbstractButton)src);
+    		String label = ab.getActionCommand();
+			Draw listSelected = drawPanel.getDraw().getSelected();
+			boolean ok = ab.isSelected();
+
+			try
+			{
+	    		if(label.equals(LaTeXDrawResources.LABEL_FILLED_CHECKBOX))
+	    		{
+					if(listSelected!=null && listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+								
+					if(listSelected!=null && listSelected.size()==1)
+					{
+						Figure selected = listSelected.getFigureAt(0);
+						selected.setIsFilled(ok && selected.canBeFilled());
+						buttonInteriorColor.setVisible(((ok && selected.canBeFilled()) || selected.hasShadow()));
+						buttonInteriorColor.setColor(selected.getInteriorColor());
+					}
+					else
+					{
+						genIsFilled = ok;
+						
+						if(listSelected!=null)
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable() && f.canBeFilled())
+									f.setIsFilled(ok);
+					}
+					
+					drawPanel.updateDraw(true);
+					drawPanel.setIsModified(true);
+					requestFocus();
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_DBLE_BOUND_CHECKBOX))
+	    		{
+					if(listSelected!=null && listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+								
+					if(listSelected!=null && listSelected.size()==1)
+					{
+						Figure selected = listSelected.getFigureAt(0);
+						selected.setHasDoubleBoundary(ok && selected.isDoubleBoundaryable());
+						buttonDbleBoundColor.setVisible(ok && selected.isDoubleBoundaryable());
+					}
+					else
+					{
+						genHasDbleBord = ok;
+						
+						if(listSelected!=null)
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable() && f.isDoubleBoundaryable())
+									f.setHasDoubleBoundary(ok);
+					}
+					
+					if(listSelected!=null) listSelected.updateBorders();
+					drawPanel.updateDraw(true);
+					drawPanel.setIsModified(true);
+					requestFocus();
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_SHADOW_CHECKBOX))
+	    		{
+					if(listSelected!=null && listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+					
+					if(listSelected!=null && listSelected.size()==1)
+					{
+						Figure selected = listSelected.getFigureAt(0);
+						selected.setHasShadow(ok && selected.canHaveShadow());
+						buttonShadowColor.setVisible(ok && selected.canHaveShadow());
+						buttonInteriorColor.setVisible((ok && selected.canHaveShadow() && 
+								selected.canBeFilled() && selected.shadowFillsShape() && 
+								!selected.hasGradient()) || (!ok && selected.isFilled()));
+						updateFillCB();
+					}
+					else
+					{
+						genHasShadow = ok;
+						
+						if(listSelected!=null)
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable() && f.canHaveShadow())
+									f.setHasShadow(ok);
+					}
+					
+					if(listSelected!=null) listSelected.updateBorders();
+					drawPanel.updateDraw(true);
+					drawPanel.setIsModified(true);
+					requestFocus();
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_ROTATE))
+	    		{	
+	    			drawPanel.setOnRotation(!drawPanel.isOnRotation());
+	    			rotateButton.setSelected(drawPanel.isOnRotation());
+	    			drawPanel.
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_MAGNETIC_CB))
+	    		{	
+	    			drawPanel.setGridIsMagnetic(toolbar.getMagneticCB().isSelected());
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.compareTo(LaTeXDrawResources.LABEL_COLOR_HATCH)==0)
+	    		{
+	    			 if(listSelected==null)
+	    				 return ;
+	    			 
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.34"), buttonHatchColor.getColor()); //$NON-NLS-1$
+
+					if(c!=null)
+					{
+						if(listSelected.size()>0)
+							addToUndoTransformation(listSelected);
+						
+						if(listSelected.size()==1)
+						{
+							buttonHatchColor.setColor(c);
+							listSelected.getFigureAt(0).setHatchingColor(c);
+						}
+						else
+						{
+							genHatchCB.setColor(c);
+							genHatchC = c;
+							
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable() && f.canBeHatched())
+									f.setHatchingColor(c);
+						}
+						
+						drawPanel.updateDraw(true);
+						drawPanel.setIsModified(true);
+					}
+					requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.compareTo(LaTeXDrawResources.LABEL_COLOR_GRADIENT_FIRST)==0)
+	    		{
+	    			 if(listSelected==null)
+	    				 return ;
+	    			 
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getString1_7("LaTeXDrawFrame.7"), buttonGradientStartC.getColor()); //$NON-NLS-1$
+
+					if(c!=null)
+					{
+						if(listSelected.size()>0)
+							addToUndoTransformation(listSelected);
+							
+						if(listSelected.size()==1)
+						{
+							buttonGradientStartC.setColor(c);
+							listSelected.getFigureAt(0).setGradientStartColor(c);
+						}
+						else
+						{
+							genGradientStartCB.setColor(c);
+							genGradientStartC = c;
+							
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable() && f.canBeHatched())
+									f.setGradientStartColor(c);
+						}
+						
+						drawPanel.updateDraw(true);
+						drawPanel.setIsModified(true);
+					}
+					
+					requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.compareTo(LaTeXDrawResources.LABEL_COLOR_GRADIENT_SECOND)==0)
+	    		{
+	    			 if(listSelected==null)
+	    				 return ;
+	    			 
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getString1_7("LaTeXDrawFrame.8"), buttonGradientEndC.getColor()); //$NON-NLS-1$
+					
+					if(c!=null)
+					{
+						if(listSelected.size()>0)
+							addToUndoTransformation(listSelected);
+						
+						if(listSelected.size()==1)
+						{
+							buttonGradientEndC.setColor(c);
+							listSelected.getFigureAt(0).setGradientEndColor(c);
+						}
+						else
+						{
+							genGradientEndCB.setColor(c);
+							genGradientEndC = c;
+							
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable() && f.canBeHatched())
+									f.setGradientEndColor(c);
+						}
+						
+						drawPanel.updateDraw(true);
+						drawPanel.setIsModified(true);
+					}
+					
+					requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.compareTo(LaTeXDrawResources.LABEL_COLOR_DBLE_BOUND)==0)
+	    		{
+	    			 if(listSelected==null)
+	    				 return ;
+	    			 
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.151"), buttonDbleBoundColor.getColor()); //$NON-NLS-1$
+					
+					if(c!=null)
+					{
+						if(listSelected.size()>0)
+							addToUndoTransformation(listSelected);
+						
+						if(listSelected.size()==1)
+						{
+							buttonDbleBoundColor.setColor(c);
+							Figure selected = listSelected.getFigureAt(0);
+							selected.setDoubleColor(c);
+						}
+						else
+						{
+							genDbleBordCB.setColor(c);
+							genDbleC = c;
+							
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable() && f.isDoubleBoundaryable())
+									f.setDoubleColor(c);
+						}
+						drawPanel.updateDraw(true);
+						drawPanel.setIsModified(true);
+					}
+					
+					requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.compareTo(LaTeXDrawResources.NAME_COLOR_SHADOW)==0)
+	    		{
+	    			 if(listSelected==null)
+	    				 return ;
+	    			 
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+								LaTeXDrawLang.getString1_7("LaTeXDrawFrame.9"), buttonShadowColor.getColor());  //$NON-NLS-1$
+					
+					if(c!=null)
+					{
+						if(listSelected.size()>0)
+							addToUndoTransformation(listSelected);
+						
+						if(listSelected.size()==1)
+						{
+							buttonShadowColor.setColor(c);
+							listSelected.getFigureAt(0).setShadowColor(c);
+						}
+						else
+						{
+							genShadowCB.setColor(c);
+							genShadowC = c;
+							
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable() && f.canHaveShadow())
+									f.setShadowColor(c);
+						}
+						
+						drawPanel.updateDraw(true);
+						drawPanel.setIsModified(true);
+					}
+					requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		 if(label.compareTo(LaTeXDrawResources.LABEL_COLOR_BUTTON)==0)
+	    		 {
+	    			 if(listSelected==null)
+	    				 return ;
+	    			 
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+									LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.36"), ((ColorButton)src).getColor()); //$NON-NLS-1$
+
+					if(listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+					
+					if(c!=null)
+					{
+						if(listSelected.size()==1)
+							listSelected.getFigureAt(0).setLinesColor(c);
+						else
+						{
+							genLineC = c;
+							
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable())
+									f.setLinesColor(c);
+						}
+						
+						drawPanel.updateDraw(true);
+						drawPanel.setIsModified(true);
+						((ColorButton)src).setColor(c);
+					}
+					
+					requestFocus();
+					return ;
+				 }
+	    		 
+	    		 
+	    		 if(label.compareTo(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON)==0)
+	    		 {
+	    			 if(listSelected==null)
+	    				 return ;
+	    			 
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+								LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.37"), ((ColorButton)src).getColor()); //$NON-NLS-1$
+						
+					if(c!=null)
+					{
+						if(listSelected.size()>0)
+							addToUndoTransformation(listSelected);
+							
+						if(listSelected.size()==1)
+							listSelected.getFigureAt(0).setInteriorColor(c);
+						else
+						{
+							genInteriorC = c;
+							
+							for(Figure f : listSelected.getFigures())
+								if(f.isCustomizable() && f.canBeFilled())
+									f.setInteriorColor(c);
+						}
+						
+						drawPanel.updateDraw(true);
+						drawPanel.setIsModified(true);
+						((ColorButton)src).setColor(c);
+					}
+					requestFocus();
+					return ;
+				 }
+	    		 
+	    		 if(label.equals(LaTeXDrawResources.LABEL_JOIN))
+	    		 {
+	    			 drawPanel.joinSelection(undoManager);
+	    			 updateUndoRedo();
+	    			 setSelection(true);
+	    			 setIsModified(true);
+	    			 setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.154")); //$NON-NLS-1$
+	    			 requestFocus();
+	    			 return;
+	    		 }
+	    		
+	    		 if(label.equals(LaTeXDrawResources.LABEL_SEPARATE))
+	    		 {
+	    			 drawPanel.separateSelection(undoManager);
+	    			 updateUndoRedo();
+	    			 setSelection(true);
+	    			 setIsModified(true);
+	    			 setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.155")); //$NON-NLS-1$
+	    			 requestFocus();
+	    			 return ;
+	    		 }
+	    		 
+	    		if(label.equals(LaTeXDrawResources.LABEL_BEHIND_SEL))
+	    		{
+	    			setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
+	    			drawPanel.setOnWaitingClicDispositionBehind(true);
+	    			requestFocus();
+	    			return;
+	    		}   	
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_FRONT_SEL))
+	    		{
+	    			setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
+	    			drawPanel.setOnWaitingClicDispositionFront(true);
+	    			requestFocus();
+	    			return;
+	    		}   	
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_BACKGROUND))
+	    		{
+	    			drawPanel.selectedInBackground();
+	    			setIsModified(true);
+	    			requestFocus();
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_FOREGROUND))
+	    		{
+	    			drawPanel.selectedInForeground();
+	    			setIsModified(true);
+	    			requestFocus();
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_ROTATE_90))
+	    		{
+	    			drawPanel.draw.rotateSelection(Math.PI/2.);
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_ROTATE_180))
+	    		{
+	    			drawPanel.draw.rotateSelection(Math.PI);
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_ROTATE_270))
+	    		{
+	    			drawPanel.draw.rotateSelection(3*Math.PI/2.);
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_MIRROR_H))
+	    		{
+	    			drawPanel.draw.mirrorHorizontal();
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_MIRROR_V))
+	    		{
+	    			drawPanel.draw.mirrorVertical();
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_TEX_EDITOR))
+	    		{
+	    			String title = LaTeXDrawLang.getString1_8("LaTeXDrawFrame.19"); //$NON-NLS-1$
+	    			
+	    			if(pathTexEditor==null || pathTexEditor.length()==0)
+	    				JOptionPane.showMessageDialog(this, LaTeXDrawLang.getString1_8("LaTeXDrawFrame.20"),  //$NON-NLS-1$
+	    			 		   						title, JOptionPane.WARNING_MESSAGE); 
+	    			else
+		    			try{Runtime.getRuntime().exec(pathTexEditor);}
+		    			catch(Exception ex)
+		    			{
+		    				JOptionPane.showMessageDialog(this, 
+	    			 		   "<html>"+LaTeXDrawLang.getString1_8("LaTeXDrawFrame.21")+"<br>"+//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+	    			 		   LaTeXDrawLang.getString1_8("LaTeXDrawFrame.22")+"</html>", //$NON-NLS-1$//$NON-NLS-2$
+	    			 		   title, JOptionPane.WARNING_MESSAGE); 
+		    			}
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_TEMPLATE_UPDATE))
+	    		{
+	    			menuBar.getMenuTemplate().updateTemplates();
+	    			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.160")); //$NON-NLS-1$
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_COMMENTS))
+	    		{
+    				addCommentsFrame.setVisible(true);
+	    			return;
+	    		}
+	    		
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_PREFERENCES))
+	    		{
+	    			if(!preferencesFrame.isVisible())
+	    				preferencesFrame.setVisible(true);
+	    			
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_INSERT_CODE))
+	    		{
+	    			if(insertCodeFrame==null)
+	    				insertCodeFrame = new InsertPSTricksCodeFrame(this);
+	    			
+	    			insertCodeFrame.setVisible(true);
+	    			requestFocus();
+	    			return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_DRAW_PROPERTIES))
+	    		{
+	    			if(drawPropertiesFrame==null)
+	    				drawPropertiesFrame = new DrawPropertiesFrame(this);
+	    			
+	    			drawPropertiesFrame.setVisible(true);
+					return ;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_HELP))
+	    		{
+	    			if(helpFrame==null)
+	    				createHelpFrame();
+	    			
+	    			if(helpFrame!=null)
+	    				helpFrame.setVisible(true);
+	    			
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_DISPLAY_GRID))
+	    		{
+	    			if(menuBar.getDisplayGrid().isSelected())
+	    			{
+	    				menuBar.getDisplayPersoGrid().setSelected(false);
+	    				toolbar.getPersoGridGapField().setEnabled(false);
+	    			}
+	    			
+	    			displayGrid(menuBar.getDisplayGrid().isSelected(), menuBar.getDisplayGrid().isSelected());
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_DISPLAY_PERSO_GRID))
+	    		{
+	    			if(menuBar.getDisplayPersoGrid().isSelected())
+	    			{
+	    				menuBar.getDisplayGrid().setSelected(false);
+	    				toolbar.getPersoGridGapField().setEnabled(true);
+	    			}
+	    			
+	    			displayGrid(menuBar.getDisplayPersoGrid().isSelected(), !menuBar.getDisplayPersoGrid().isSelected());
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_ABOUT))
+	    		{
+	    			if(aboutTeXDraw==null)
+	    				createAboutLaTeXDrawFrame();
+	    			
+	    			aboutTeXDraw.setVisible(true);
+		    		return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_DISPLAY_CODE_PANEL))
+	    		{
+	    			if(!(e.getSource() instanceof JCheckBoxMenuItem))
+	    				menuBar.getDisplayCodePanel().setSelected(!menuBar.getDisplayCodePanel().isSelected());
+	    			
+	    			displayCodePanel(menuBar.getDisplayCodePanel().isSelected());
+	    			requestFocus();
+	    			return;
+	    		}
+	    		
+	    		if(label.compareTo(LaTeXDrawResources.TEMPLATE_START_ACTION_CMD)>0)
+	    		{
+	    			String str = label.substring(LaTeXDrawResources.TEMPLATE_START_ACTION_CMD.length());
+	    			boolean fromShared = str.charAt(0)=='0' ? false : true;
+	    			String path;
+	    			String name = str.substring(1) + SVGFilter.SVG_EXTENSION;
+	    			
+	    			if(fromShared)
+	    				path = LaTeXDrawPath.PATH_TEMPLATES_SHARED==null ? null : LaTeXDrawPath.PATH_TEMPLATES_SHARED+File.separator+name;
+	    			else
+	    				path = LaTeXDrawPath.PATH_TEMPLATES_DIR_USER+File.separator+name;
+	    			
+	    			Draw template = SVGDocumentGenerator.toLatexdraw(new File(path), null, null);
+	    			
+	    			if(template!=null)
+	    			{
+		    			template.setDrawFigures(true);
+		    			template.setSelected(false);
+		    			
+		    			if(template.size()==0)
+		    				return ;
+		    			
+	    				drawPanel.getDraw().addFigure(template.size()>1 ? template : template.getFigureAt(0), undoManager);
+		    			updateUndoRedo();
+		    			drawPanel.updateDraw(true);
+	    			}
+	    			else
+	    			{
+	    				JOptionPane.showMessageDialog(this, 
+		    			 		   "<html>"+LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.19")+"<br>"+LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.20")+"</html>",//$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$//$NON-NLS-5$
+		    			 		   LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.21"), JOptionPane.WARNING_MESSAGE);  //$NON-NLS-1$
+	    			}
+	    			requestFocus();
+	    			return ;
+	    		}
+			}
+			catch(Exception ex)
+			{
+				ex.printStackTrace(); 
+				ExceptionFrameDialog.showExceptionDialog(ex);
+			}
+    	} // if(src instanceof JMenuItem || src instanceof JButton)
+	}
+	
+	
+	
+	
+	/**
+	 * To launch when the selected figures are transformed : add an undo.
+	 * @param listSelected THe list of the selected figures.
+	 * @since 1.9.1
+	 */
+	private void addToUndoTransformation(Draw listSelected)
+	{
+			try
+			{
+				Object clone = listSelected.clone();
+				Vector<Figure> figures = drawPanel.draw.getFigures();
+				int i, size = listSelected.size();
+				int[] id = new int[size];
+				
+				for(i=0; i<size; i++)
+					id[i] = figures.indexOf(listSelected.getFigureAt(i));
+				
+				undoManager.add(UndoRedoManager.LABEL_TRANSFORM, id, clone, false);
+				updateUndoRedo();
+				
+			}catch(CloneNotSupportedException e)
+			{
+				e.printStackTrace();
+				ExceptionFrameDialog.showExceptionDialog(e);
+			}
+	}
+
+
+	
+	/**
+	 * Allows to print the draw
+	 */
+	public void printDraw()
+	{
+		PrinterJob printJob = PrinterJob.getPrinterJob();
+		printJob.setPrintable(drawPanel.getDraw());
+
+		System.setProperty("sun.java2d.print.pipeline", "pdl");//$NON-NLS-1$ //$NON-NLS-2$
+
+		if (printJob.printDialog()) 
+		{
+			try 
+			{ 
+				setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.162")); //$NON-NLS-1$
+				printJob.print(); 
+				setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.163")); //$NON-NLS-1$
+			}
+			catch(Exception e) 
+			{ 
+				setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.164")); //$NON-NLS-1$
+				e.printStackTrace();
+				ExceptionFrameDialog.showExceptionDialog(e);
+			}
+		}
+	}
+	
+
+	
+	
+	/**
+	 * Allows to print the code generated.
+	 */
+	public void printCode()
+	{
+		drawPanel.updateCode();
+		
+		PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
+		DocFlavor flavor =  DocFlavor.BYTE_ARRAY.AUTOSENSE;
+		PrintService printService[] = PrintServiceLookup.lookupPrintServices(null, null);
+		PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
+		
+		if(printService!=null && printService.length!=0)
+		{
+			if(defaultService==null)
+				defaultService = printService[0];
+			
+			PrintService service = ServiceUI.printDialog(null, 200, 200, printService, defaultService, null, pras);
+			
+			if(service != null)
+			{
+				DocPrintJob job = service.createPrintJob();
+				Doc doc = new SimpleDoc(codePanel.getText().getBytes(), flavor, null);
+				
+				try { job.print(doc, pras); }
+				catch(PrintException ex) { JOptionPane.showMessageDialog(this, LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.22")); } //$NON-NLS-1$
+			}
+		}
+		else
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.23")); //$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * Allows to export the selected figures as a template in a file.
+	 */
+	public void exportAsTemplate()
+	{
+		int res;
+		String templateName = null;
+		boolean ok;
+		File file = null;
+		
+		setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.168")); //$NON-NLS-1$
+		
+		try
+		{
+			do
+			{
+				templateName = JOptionPane.showInputDialog(this, 
+						LaTeXDrawLang.getOthersString("DrawContainer.nameTemplate"));  //$NON-NLS-1$
+				
+				if(templateName==null || templateName.equals(""))//$NON-NLS-1$
+					ok = false;
+				else
+				{
+					file = new File(LaTeXDrawPath.PATH_TEMPLATES_DIR_USER + File.separator + templateName + SVGFilter.SVG_EXTENSION);
+				
+					if(!file.exists())
+						ok = true;
+					else
+					{
+						res = JOptionPane.showConfirmDialog(this, 
+								LaTeXDrawLang.getOthersString("DrawContainer.overwriteTemplate"), //$NON-NLS-1$
+								LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.42"), JOptionPane.YES_NO_OPTION); //$NON-NLS-1$
+					
+						ok = res==JOptionPane.YES_OPTION ? true : false;
+					}
+				}
+			}while(!ok);
+			
+			Draw selection = getDrawPanel().getDraw().getSelected();
+			
+			if(file!=null)
+				SVGDocumentGenerator.exportAsSVG(file.getPath(), selection);
+			else
+				templateName = null;
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		
+		if(templateName!=null)
+		{
+			menuBar.getMenuTemplate().addItem(templateName);
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.169")); //$NON-NLS-1$
+		}
+		else 
+			setStatusBarText("");//$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * Allows to insert several figures from PSTricks code into the current draw
+	 * @param code The code to parse and to convert in figures
+	 */
+	public void insertPSTricksCode(String code)
+	{
+		try
+		{
+			String code2 = code;
+			
+			if(code2!=null && code2.length()!=0)
+			{
+				if(PSTricksParser.containsBeginPSPicture(code2)==0)
+				{
+					String eol = System.getProperty("line.separator"); //$NON-NLS-1$
+					code2 = "\\begin{pspicture}(10,10)"+eol+code2+eol+"\\end{pspicture}";//$NON-NLS-1$ //$NON-NLS-2$
+				}
+				
+				if(progressbarPST==null)
+					progressbarPST = new PSTProgressBarManager(this);
+				
+				progressbarPST.setCodeToParse(code2);
+				progressbarPST.startProgressBar();
+			}
+		}catch (Exception e) 
+		{ 
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Imports a TeXFile.
+	 */
+	public void importPSTricksFile()
+	{
+		currentFile = null;
+		projectName = null;
+		setTitle();
+		try
+		{
+			if(fileChooserImport==null)	
+			{
+				fileChooserImport = new PictureChooser(this, LaTeXDrawLang.getString1_6("LaTeXDrawFrame.16"), //$NON-NLS-1$
+						false, LaTeXDrawLang.getString1_6("LaTeXDrawFrame.17")); //$NON-NLS-1$
+
+				JFileChooser fileChooser = fileChooserImport.getFileChooser();
+				if(pathExport!=null)
+					fileChooser.setCurrentDirectory(new File(pathExport));
+		 		fileChooser.setApproveButtonText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.199")); //$NON-NLS-1$
+		 		fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+		 		fileChooser.setAcceptAllFileFilterUsed(false);
+		 		fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+		 		fileChooser.addChoosableFileFilter(new TeXFilter());
+		 		fileChooser.setFileHidingEnabled(true);
+		 		fileChooser.setApproveButtonText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.171")); //$NON-NLS-1$
+		 		fileChooser.setMultiSelectionEnabled(false);
+			}
+			
+			File file = fileChooserImport.displayFrame();
+			
+			if(file==null) return;
+
+			importPSTricksFile(file.getAbsolutePath());
+			
+		}catch (Exception e) 
+		{ 
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to import a TeXFile with the filename given.
+	 */
+	public boolean importPSTricksFile(String path)
+	{
+		try
+		{
+			File file = new File(path);
+			
+			if(!file.exists() || !file.canRead() || !file.isFile())
+				return false;
+			
+			setStatusBarText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.15")); //$NON-NLS-1$
+	
+			reinitializeButtons();
+			preferencesFrame.addRecentFile(file.getAbsolutePath());
+			menuBar.updateRecentFilesMenu();
+			setIsModified(false);
+			newProject();
+			undoManager = new UndoRedoManager(drawPanel.getDraw().getFigures(), drawPanel.getDraw(), this);
+			updateUndoRedo();
+			
+			if(progressbarPST==null)
+				progressbarPST = new PSTProgressBarManager(this);
+			
+			progressbarPST.setFileToParse(file);
+			progressbarPST.startProgressBar();
+			
+			return true;
+		}
+		catch (Exception e) 
+		{ 
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+			return false;
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to export the pstricks code as a .tex file
+	 */
+	public void exportAsPsTricks()
+	{
+		setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.170")); //$NON-NLS-1$
+		
+		if(fileChooserExport==null)	
+			fileChooserExport = new ExportDialog(currentFile==null ? pathExport : currentFile.getPath()); 	
+		
+		fileChooserExport.removeChoosableFileFilter(fileChooserExport.getFileFilter());
+		fileChooserExport.setFileFilter(fileChooserExport.getAcceptAllFileFilter());
+		fileChooserExport.setFileFilter(new TeXFilter());
+		
+		if(currentFile==null)
+			fileChooserExport.setSelectedFile(null);
+		else
+		{
+			String fPath = currentFile.getPath();
+			
+			if(fPath.endsWith(SVGFilter.SVG_EXTENSION))
+				fPath = fPath.substring(0, fPath.indexOf(SVGFilter.SVG_EXTENSION));
+			
+			fileChooserExport.setSelectedFile(new File(fPath));
+		}
+		
+		
+		fileChooserExport.setDialogTitle(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.172"));    //$NON-NLS-1$
+
+		int res = fileChooserExport.showSaveDialog(this);
+		File file = fileChooserExport.getSelectedFile();
+		
+		if(res != JFileChooser.APPROVE_OPTION || file==null) 
+		{
+			setStatusBarText("");//$NON-NLS-1$
+			return;
+		}
+		
+		projectName = file.getName();
+		String ex = TeXFilter.TEX_EXTENSION;
+		int id = projectName.toLowerCase().indexOf(ex.toLowerCase());
+		
+		if(id ==-1)
+			file = new File(file.getPath() + TeXFilter.TEX_EXTENSION);
+			
+		if(file.exists())
+		{ 
+			int replace = JOptionPane.showConfirmDialog(this,
+  					LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.173"), //$NON-NLS-1$
+					LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.174"), JOptionPane.YES_NO_OPTION); //$NON-NLS-1$
+				
+			
+			if(replace == JOptionPane.NO_OPTION) 
+				return; // The user doesn't want to replace the file
+		}
+		
+		PrintWriter out=null;
+		
+		try // We export the code
+		{
+			FileWriter fw = new FileWriter(file);
+			BufferedWriter bw = new BufferedWriter(fw);
+			out  = new PrintWriter(bw);
+
+			drawPanel.updateCode();
+			out.println(codePanel.getText());
+			out.close();
+			bw.close();
+			fw.close();
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.175")); //$NON-NLS-1$
+		}
+		catch (Exception e) 
+		{ 
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.176")); //$NON-NLS-1$
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		
+		if(out!=null)
+			out.close();
+		setTitle();	
+	}
+	
+	
+	
+	
+	public void exportAsPicture(String format)
+	{
+		if(format==null)
+			return ;
+		
+		setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.177")); //$NON-NLS-1$
+		
+		if(fileChooserExport==null)	
+			fileChooserExport = new ExportDialog(currentFile==null ? pathExport : currentFile.getPath());
+		
+		fileChooserExport.removeChoosableFileFilter(fileChooserExport.getFileFilter());
+		fileChooserExport.setFileFilter(fileChooserExport.getAcceptAllFileFilter());
+		
+		if(format.equals(LaTeXDrawResources.LABEL_EXPORT_EPS))
+			fileChooserExport.setFileFilter(new EPSFilter());
+		else
+			if(format.equals(LaTeXDrawResources.LABEL_EXPORT_JPG))
+				fileChooserExport.setFileFilter(new JPGFilter());
+			else
+				if(format.equals(LaTeXDrawResources.LABEL_EXPORT_PNG))
+					fileChooserExport.setFileFilter(new PNGFilter());
+				else
+					if(format.equals(LaTeXDrawResources.LABEL_EXPORT_BMP))
+						fileChooserExport.setFileFilter(new BMPFilter());
+					else
+						if(format.equals(LaTeXDrawResources.LABEL_EXPORT_PPM))
+							fileChooserExport.setFileFilter(new PPMFilter());
+						else
+							if(format.equals(LaTeXDrawResources.LABEL_EXPORT_PDF_LATEX))
+								fileChooserExport.setFileFilter(new PDFFilter());
+							else
+								if(format.equals(LaTeXDrawResources.LABEL_EXPORT_EPS_LATEX))
+									fileChooserExport.setFileFilter(new PSFilter());
+								else
+									return ;
+		
+		if(currentFile==null)
+			fileChooserExport.setSelectedFile(null);
+		else
+		{
+			String fPath = currentFile.getPath();
+			
+			if(fPath.endsWith(SVGFilter.SVG_EXTENSION))
+				fPath = fPath.substring(0, fPath.indexOf(SVGFilter.SVG_EXTENSION));
+			
+			fileChooserExport.setSelectedFile(new File(fPath));
+		}
+		
+		fileChooserExport.setDialogTitle(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.179")+format+LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.183"));    	 //$NON-NLS-1$ //$NON-NLS-2$
+		
+		int response = fileChooserExport.showSaveDialog(this);
+		File file = fileChooserExport.getSelectedFile();
+		
+		if(response != JFileChooser.APPROVE_OPTION || file==null)
+			return;
+		
+		String name = file.getName(), ex;
+		
+		if(format.equals(LaTeXDrawResources.LABEL_EXPORT_EPS)) 
+			ex = LaTeXDrawResources.EPS_EXTENSION;
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_JPG)) 
+			ex = LaTeXDrawResources.JPG_EXTENSION;
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_BMP))
+			ex = LaTeXDrawResources.BMP_EXTENSION;
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_PNG))
+			ex = LaTeXDrawResources.PNG_EXTENSION;
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_PPM))
+			ex = LaTeXDrawResources.PPM_EXTENSION;
+		else if(format.equals(LaTeXDrawResources.LABEL_EXPORT_PDF_LATEX))
+			ex = PDFFilter.PDF_EXTENSION;
+		else
+			ex = PSFilter.PS_EXTENSION;
+		
+		int id = name.toLowerCase().indexOf(ex.toLowerCase());
+		
+		if(id ==-1)
+			file = new File(file.getPath() + ex);			
+			
+		if(file.exists())
+		{ 
+			int replace = JOptionPane.showConfirmDialog(this,
+  					LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.173"), //$NON-NLS-1$
+					LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.182")+format+LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.183"),  //$NON-NLS-1$ //$NON-NLS-2$
+					JOptionPane.YES_NO_OPTION);
+				
+			
+			if(replace == JOptionPane.NO_OPTION) 
+				return; // The user doesn't want to replace the file
+		}
+		
+		
+		try
+		{
+			int compressionRate = fileChooserExport.getCompressionRate();
+			drawPanel.exportAsPicture(file, format, compressionRate==-1 ? ExportDialog.DEFAULT_COMPRESSION_RATE :
+													1.f-compressionRate/100.f);
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.184")); //$NON-NLS-1$
+		}
+		catch(Exception e)
+		{
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.185")); //$NON-NLS-1$
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+    /** 
+     * Shutdown procedure when run as an application.
+     */
+    protected void windowClosed() 
+    {
+    	System.exit(0);
+    }
+
+
+    
+
+	public void stateChanged(ChangeEvent e)
+	{
+	   	Object src = e.getSource();
+	   	String name = ((Component)src).getName();   
+
+    	if(src instanceof JSpinner)
+    	{
+    		Draw selection = drawPanel.getDraw().getSelected();
+
+    		if(name.equals(LaTeXDrawResources.NAME_THICKNESS_FIELD))
+    		{
+    			float thick = Float.valueOf(thicknessField.getValue().toString()).floatValue();
+
+    			if(selection!=null && selection.size()==1)
+    				selection.getFigureAt(0).setThickness(thick);
+    			else
+    			{
+    				if(selection!=null)
+	    				for(Figure f : selection.getFigures())
+	    					if(f.isCustomizable() && f.isThicknessable())
+	    						f.setThickness(thick);
+
+    				genThickness = thick;
+    			}
+
+    			if(selection!=null) selection.updateBorders();
+				drawPanel.updateDraw(true);
+				drawPanel.setIsModified(true);
+				thicknessField.requestFocus();
+				
+    			return;
+    		}
+
+    		if(name.equals(LaTeXDrawResources.NAME_DOT_SIZE_FIELD))
+    		{
+    			float size = Float.valueOf(dotSizeField.getValue().toString()).floatValue();
+
+    			if(selection!=null && selection.size()==1 && selection.getFigureAt(0) instanceof Dot)
+    				((Dot)selection.getFigureAt(0)).setWidth(size);
+    			else
+    			{
+    				if(selection!=null)
+	    				for(Figure f : selection.getFigures())
+	    					if(f instanceof Dot)
+	    						((Dot)f).setWidth(size);
+
+    				genDotSize = size;
+    			}
+
+    			if(selection!=null) selection.updateBorders();
+				drawPanel.updateDraw(true);
+				drawPanel.setIsModified(true);
+				dotSizeField.requestFocus();
+				
+    			return;
+    		}
+    		
+    		if(name.equals(LaTeXDrawResources.LABEL_PERSO_GRID_GAP_FIELD))
+    		{
+    			drawPanel.getDraw().setPersonalGridGap(Integer.valueOf(toolbar.getPersoGridGapField().getValue().toString()).intValue());
+    			drawPanel.setIsModified(true);
+    			return ;
+    		}
+    		
+    		if(name.equals(LaTeXDrawResources.LABEL_ZOOM_CHANGE))
+    		{
+    			int zoom = Integer.MAX_VALUE;
+    				
+    			try { zoom = Double.valueOf(((JSpinner)src).getValue().toString()).intValue(); }
+    			catch(Exception ex) { ex.printStackTrace(); }
+    			
+    			if(zoom!=Integer.MAX_VALUE)
+    				drawPanel.getDraw().setZoom(zoom/100.);
+    			
+    			return ;
+    		}
+    		
+    		return ;
+    	}
+    	
+    	if(src instanceof JSlider)
+    	{
+    		JSlider slider = (JSlider)src;
+    		
+    		if(name.equals(LaTeXDrawResources.NAME_SLIDER_DELIMITOR))
+    		{
+    			if(Delimitor.getOpacity()!=slider.getValue())
+    			{
+	    			Delimitor.setOpacity(slider.getValue());
+	    			drawPanel.setIsModified(true);
+	    			drawPanel.draw.repaint();
+    			}
+    			
+    			return ;
+    		}
+    		return ;
+    	}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to save the current project in as an SVG picture.
+	 */
+	public boolean save(boolean saveAs)
+	{
+		if(!saveAs && !drawPanel.isModified())
+			return true;
+		
+		File file;
+		boolean addToRecent = false;
+		
+		// If the user want to "save as" or if he hasn't ever
+		// save his project, we display a dialog box in order to select a file
+		if(saveAs || currentFile==null)
+		{
+			if(fileChooserSave==null)		
+			{
+				fileChooserSave = new JFileChooser(pathOpen);		    	
+				fileChooserSave.setFileSelectionMode(JFileChooser.FILES_ONLY);		   	
+				fileChooserSave.setDialogTitle(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.188"));//$NON-NLS-1$
+				fileChooserSave.addChoosableFileFilter(new SVGFilter());
+				fileChooserSave.setMultiSelectionEnabled(false);
+			} 	
+	    	
+			fileChooserSave.setSelectedFile(currentFile);
+			int response = fileChooserSave.showSaveDialog(this);
+
+			if(response != JFileChooser.APPROVE_OPTION)
+				return false;
+			
+			file = fileChooserSave.getSelectedFile();
+			
+			if(file==null) 
+				return false;
+			
+			projectName = file.getName();
+			String ex = SVGFilter.SVG_EXTENSION;
+			int id = projectName.toLowerCase().indexOf(ex.toLowerCase());
+			
+			if(id ==-1)
+				file = new File(file.getPath() + SVGFilter.SVG_EXTENSION);			
+			else
+				projectName = projectName.substring(0, id);
+
+			if(file.exists())
+			{ 
+				int replace = JOptionPane.showConfirmDialog(this,
+	  					LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.173"), //$NON-NLS-1$
+						LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.188"), JOptionPane.YES_NO_OPTION); //$NON-NLS-1$
+						
+				if(replace == JOptionPane.NO_OPTION || replace == JOptionPane.CLOSED_OPTION)
+				{
+					projectName = null;
+					
+					return false;
+				}
+			}
+			
+			currentFile = file;
+			addToRecent = true;
+		}
+		else file = currentFile;
+		
+		
+		try
+		{
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.186")); //$NON-NLS-1$
+			SVGDocumentGenerator.exportAsSVG(file.getPath(), getDrawPanel().getDraw());
+			setTitle();
+			
+			if(addToRecent)
+			{
+				preferencesFrame.addRecentFile(file.getAbsolutePath());
+				menuBar.updateRecentFilesMenu();
+			}
+			
+			drawPanel.setIsModified(false);
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.191")); //$NON-NLS-1$
+		}catch(Exception e) 
+		{  
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.192"));//$NON-NLS-1$
+			e.printStackTrace(); 
+			JOptionPane.showMessageDialog(this, 
+		 		    LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.193") +e.toString(),  //$NON-NLS-1$
+		 		   LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.86"), JOptionPane.WARNING_MESSAGE);//$NON-NLS-1$
+		}
+
+		return true;
+	}
+	
+	
+	
+	
+	public void newProject()
+	{
+		try
+		{
+	    	if(drawPanel.isModified())
+	    		switch(JOptionPane.showConfirmDialog(this,
+						LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.156"), //$NON-NLS-1$
+						LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.110"),  //$NON-NLS-1$
+						JOptionPane.YES_NO_CANCEL_OPTION))
+				{
+	    			case JOptionPane.YES_OPTION:
+	    					boolean saved = save(false);
+	    					if(!saved) return;
+	    					break;
+	    			case JOptionPane.NO_OPTION:
+							break;
+					case JOptionPane.CANCEL_OPTION:
+							return;				
+				}
+
+	    	setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.197")); //$NON-NLS-1$
+	    	projectName = null;
+			setTitle();
+    		drawPanel.newProject();
+    		setZoom(DrawContainer.DEFAULT_ZOOM);
+        	undoManager = new UndoRedoManager(drawPanel.getDraw().getFigures(), drawPanel.getDraw(), this);
+			reinitializeButtons();
+			setSelection(false);
+			currentFile = null;
+			drawPanel.getDraw().setIsModified(false);
+			xScale.repaint();
+			yScale.repaint();
+			setExportAsMenu(false);
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.198")); //$NON-NLS-1$
+
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to load a saved project
+	 */
+	public boolean open(String fileName, boolean withDialog)
+	{
+		File file;
+		
+		if(fileName==null)
+		{
+			if(fileChooserOpen==null)	
+			{
+				fileChooserOpen = new JFileChooser(pathOpen);
+				fileChooserOpen.setFileSelectionMode(JFileChooser.FILES_ONLY);
+				fileChooserOpen.addChoosableFileFilter(new LaTeXDrawFilter());
+				fileChooserOpen.addChoosableFileFilter(new SVGFilter());
+				fileChooserOpen.setMultiSelectionEnabled(false);
+				fileChooserOpen.setDialogTitle(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.200")); //$NON-NLS-1$
+			}
+			
+			int id = fileChooserOpen.showOpenDialog(this);
+			
+			if(id != JFileChooser.APPROVE_OPTION)
+				return false;
+			
+			file = fileChooserOpen.getSelectedFile();
+			
+			if(file==null) 
+				return false;
+		}
+		else
+			file = new File(fileName);
+		
+		setIsModified(false);
+		newProject();
+		currentFile = file;
+		reinitializeButtons();
+		setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.201")); //$NON-NLS-1$
+		projectName = file.getName();
+		setExportAsMenu(true);
+		
+		String ext = projectName.endsWith(LaTeXDrawResources.PROJECT_EXTENSION) ? LaTeXDrawResources.PROJECT_EXTENSION : SVGFilter.SVG_EXTENSION;
+		int id = projectName.toLowerCase().indexOf(ext.toLowerCase());
+		
+		if(id !=-1)			
+			projectName = projectName.substring(0, id);
+	    
+	    if(file.exists() && file.isFile() && file.canRead()) 
+	    {
+	    	try 
+	    	{
+		    	if(ext.equals(SVGFilter.SVG_EXTENSION))
+		    	{
+		    		if(progressbarSVG==null)
+		    			progressbarSVG = new SVGProgressBarManager(this);
+		    		
+		    		progressbarSVG.setFileToParse(file);
+		    		progressbarSVG.startProgressBar();
+		    	}
+		    	else
+		    	{
+					ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));
+	                DrawContainer draw;
+	                
+					if(!LaTeXDrawResources.LABEL_APP.equals(in.readObject()))
+						new LaTeXDrawException(LaTeXDrawException.NOT_TEXDRAW_FILE);
+	
+					versionOfFile = (String)in.readObject();
+					boolean autoUpd = in.readBoolean();
+					formerIsInAutoUpdate = in.readBoolean();
+					boolean displayB = in.readBoolean();
+					menuBar.getAutoAdjustBorders().setSelected(in.readBoolean());
+					
+	                if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.9.3")>=0) //$NON-NLS-1$
+					{
+						draw = new DrawContainer();
+						draw.open(in);
+					}
+					else
+						draw = (DrawContainer)in.readObject(); 
+	                
+					drawPanel.setDraw(draw);
+					draw = drawPanel.getDraw();
+					draw.isSelection(false);
+					toolbar.getSliderDelimitor().setValue(Delimitor.getOpacity());
+					menuBar.getDisplayBorders().setSelected(displayB);
+					draw.setParentPanel(drawPanel);
+					draw.setAutoAdjustement(menuBar.getAutoAdjustBorders().isSelected());				
+					draw.displayBorders(displayB);	
+					undoManager.setFigures(draw.getFigures());
+					setPreferredSize((Dimension)in.readObject());
+					Point location = (Point)in.readObject();
+					setLocation(new Point(Math.max(0, location.x), Math.max(0, location.y)));
+					splitPane.setDividerLocation(in.readInt());
+					displayCodePanel(in.readBoolean());
+					codePanel.setIsInAutoUpdate(autoUpd);
+					Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+					formerDividerLocation=(int)(dim.width*0.7);
+					formerIsInAutoUpdate = !isCodePanelDisplayed();
+					toolbar.getButtonImageBorders().setSelected(menuBar.getDisplayBorders().isSelected());
+					drawPanel.setIsGridDisplay(in.readBoolean());
+					menuBar.getDisplayXScale().setSelected(in.readBoolean());
+					menuBar.getDisplayYScale().setSelected(in.readBoolean());
+					codePanel.setComments((String) in.readObject());
+					
+					if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.6")>=0) //$NON-NLS-1$
+					{
+						codePanel.setLabel((String)in.readObject());
+						codePanel.setCaption((String)in.readObject());
+						codePanel.setPositionHoriToken((String)in.readObject());
+						codePanel.setPositionVertToken((String)in.readObject());
+					}
+					
+					if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.8")>=0) //$NON-NLS-1$
+					{
+						drawPanel.setGridIsMagnetic(in.readBoolean());
+						toolbar.getMagneticCB().setSelected(drawPanel.isGridMagnetic());
+						boolean isClassicGrid = in.readBoolean();
+						menuBar.getDisplayGrid().setSelected(isClassicGrid && drawPanel.isGridDisplayed());
+						menuBar.getDisplayPersoGrid().setSelected(!isClassicGrid && drawPanel.isGridDisplayed());
+						toolbar.getPersoGridGapField().setEnabled(menuBar.getDisplayPersoGrid().isSelected());
+						drawPanel.draw.setClassicGridDrawn(isClassicGrid);
+						drawPanel.draw.setPersonalGridGap(in.readInt());
+						toolbar.getPersoGridGapField().setValue(drawPanel.draw.getPersonalGridGap());
+					}
+					else
+					{
+						menuBar.getDisplayGrid().setSelected(drawPanel.isGridDisplayed());
+						menuBar.getDisplayPersoGrid().setSelected(false);
+						toolbar.getPersoGridGapField().setEnabled(false);
+					}
+					
+					if(LaTeXDrawFrame.getVersionOfFile().compareTo("1.9")>=0) //$NON-NLS-1$
+					{
+						Delimitor.setOpacity(in.readInt());
+						toolbar.getSliderDelimitor().setValue(Delimitor.getOpacity());
+					}
+					
+					currentFile = new File(currentFile.getPath().substring(0, 
+							currentFile.getPath().length()-LaTeXDrawResources.PROJECT_EXTENSION.length())+SVGFilter.SVG_EXTENSION);
+					drawPanel.updateDraw(true);
+					in.close();	
+					
+					setTitle();
+					undoManager = new UndoRedoManager(drawPanel.getDraw().getFigures(), drawPanel.getDraw(), this);
+					updateUndoRedo();
+					setSelection(false);
+					setIsModified(false);
+					preferencesFrame.addRecentFile(file.getAbsolutePath());
+					menuBar.updateRecentFilesMenu();
+					setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.202")); //$NON-NLS-1$
+		    	}
+			}
+	    	catch(InvalidClassException ex)
+	    	{
+	    		currentFile = null;
+	    		setIsModified(false);
+	    		
+	    		if(withDialog)
+		    		JOptionPane.showMessageDialog(this, LaTeXDrawLang.getString1_9("LaTeXDrawFrame.12"),  //$NON-NLS-1$
+				 		    LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.86"), JOptionPane.WARNING_MESSAGE);  //$NON-NLS-1$
+				return false;
+	    	}
+			catch(Exception ex) 
+			{
+				setIsModified(false);
+				currentFile = null;
+				setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.203")); //$NON-NLS-1$
+				ex.printStackTrace(); 
+				
+				if(withDialog)
+					JOptionPane.showMessageDialog(this, 
+				 		    LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.204") + ex.toString(), //$NON-NLS-1$
+				 		    LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.86"), JOptionPane.WARNING_MESSAGE);   //$NON-NLS-1$
+				return false;
+			}
+	    }
+	    else
+	    {
+	    	setIsModified(false);
+			currentFile = null;
+			setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.203")); //$NON-NLS-1$
+			
+			if(withDialog)
+				JOptionPane.showMessageDialog(this, LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.18"), //$NON-NLS-1$
+			 		    LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.86"), JOptionPane.WARNING_MESSAGE); //$NON-NLS-1$
+			return false;
+	    }
+
+	    return true;
+	}
+	
+	
+	
+	/**
+	 * Allows to create and display a dialog box which ask to
+	 * the user if he wants to save his project or not
+	 * @return JOptionPane.YES_OPTION or JOptionPane.NO_OPTION
+	 */
+  	private int dialogConfirmSave()
+  	{  	
+  		return (JOptionPane.showConfirmDialog(this,
+  					LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.156"), //$NON-NLS-1$
+					LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.110"), JOptionPane.YES_NO_CANCEL_OPTION)); //$NON-NLS-1$
+  	}
+
+  	
+  	
+  	
+  	/**
+  	 * Allows to create the frame which contains to LaTeXDraw help
+  	 */
+  	private void createHelpFrame()
+  	{
+  		try
+  		{
+	  		JPanel pHelp = new JPanel(new BorderLayout());
+			final JEditorPane htmlPageEditor = new JEditorPane(); 
+			htmlPageEditor.setEditable(false);
+			URL helpURL = getClass().getResource("/help/index.html");//$NON-NLS-1$
+			htmlPageEditor.setPage(helpURL);
+	  		helpFrame = new JFrame();
+			Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+			
+			htmlPageEditor.addHyperlinkListener(new HyperlinkListener() 
+					{
+						public void hyperlinkUpdate(HyperlinkEvent event) 
+						{
+							if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) 
+								try { htmlPageEditor.setPage(event.getURL()); }
+								catch(IOException ioe) 
+								{ 
+									ioe.printStackTrace();
+									ExceptionFrameDialog.showExceptionDialog(ioe);
+								}
+						}
+					}); 
+			
+			JScrollPane scrollPane = new JScrollPane (htmlPageEditor);
+			scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
+			
+			pHelp.add(scrollPane);
+			helpFrame.getContentPane().add(pHelp, BorderLayout.CENTER);
+			
+			helpFrame.setSize(dim.width,dim.height);
+	  		helpFrame.setLocation(0, 0);
+	  		helpFrame.setResizable(true);
+	  		helpFrame.setTitle(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.215")); //$NON-NLS-1$
+	  		helpFrame.setVisible(false); 	
+	  		
+	  		helpFrame.setIconImage(Toolkit.getDefaultToolkit().getImage(
+					getClass().getClassLoader().getResource("res/help-browser.png")));//$NON-NLS-1$
+
+  		}catch(Exception ex)
+  		{
+			JOptionPane.showMessageDialog(this,
+					LaTeXDrawLang.getString1_9("LaTeXDrawFrame.13"),  //$NON-NLS-1$
+					LaTeXDrawLang.getString1_9("LaTeXDrawFrame.14"), //$NON-NLS-1$
+		 		    JOptionPane.WARNING_MESSAGE); 
+  		}
+
+  	}
+  	
+  	
+  	
+	
+	
+	/**
+	 * Allows to create the "About LaTeXDraw" box
+	 */
+	private void createAboutLaTeXDrawFrame()
+	{
+		Dimension dim 	= Toolkit.getDefaultToolkit().getScreenSize();
+		aboutTeXDraw 	= new JFrame();
+		JTabbedPane tabbedPane = new JTabbedPane();
+		JPanel p2 		= new JPanel(), panel = new JPanel();
+		JButton okB 	= new JButton(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.23")); //$NON-NLS-1$
+		
+		aboutTeXDraw.setTitle(LaTeXDrawResources.LABEL_ABOUT);
+		aboutTeXDraw.setLocation(dim.width*1/4, dim.height*1/16);
+
+		Image i = Toolkit.getDefaultToolkit().getImage(
+						getClass().getClassLoader().getResource("res/LaTeXDrawSmall.png"));//$NON-NLS-1$
+		MediaTracker tracker=new MediaTracker(this);
+	    tracker.addImage(i,0);
+	    try { tracker.waitForID(0); } 
+	    catch(InterruptedException e) { e.printStackTrace(); }
+	    
+		p2.add(new DisplayCanvas(i));
+		
+		try
+		{
+			JEditorPane editorPane = new JEditorPane();
+			editorPane.setEditable(false);
+			editorPane.setDragEnabled(true);
+			
+			editorPane.setContentType("text/html");//$NON-NLS-1$
+			editorPane.setBackground(tabbedPane.getBackground());
+			editorPane.setText("<html><body><div style=\"text-align: center; \"><font size=\"-1\"><br>"+ //$NON-NLS-1$
+					LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.218")+"<br>"+//$NON-NLS-1$//$NON-NLS-2$
+					LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.219")+ " " + //$NON-NLS-1$
+					VERSION + (VERSION_STABILITY.length()==0 ? "" : " " + VERSION_STABILITY) + LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.220") + " " + ID_BUILD+"<br><br>"+//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+					LaTeXDrawResources.LABEL_APP+ LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.221")+"<br>"+//$NON-NLS-1$//$NON-NLS-2$
+					"Copyright(c) 2005-2008 - Arnaud BLOUIN - arno_b at users.sourceforge.net<br><br>"+//$NON-NLS-1$
+					"http://latexdraw.sourceforge.net/<br></div></body></html>");//$NON-NLS-1$
+			
+			tabbedPane.add(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.general"), new JScrollPane(editorPane)); //$NON-NLS-1$
+		}
+		catch(Exception e) { System.out.println("About tabular cannot be created."); } //$NON-NLS-1$
+		
+		try
+		{
+			JEditorPane editorPane = new JEditorPane();
+			editorPane.setEditable(false);
+			editorPane.setDragEnabled(true);
+			
+			editorPane.setContentType("text/html");//$NON-NLS-1$
+			editorPane.setBackground(tabbedPane.getBackground());
+			editorPane.setText("<html><body><div style=\"text-align: center; \"><font size=\"-1\"><br><br>"+ //$NON-NLS-1$
+					LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.25")+"<br><br>"+ //$NON-NLS-1$//$NON-NLS-2$
+					LaTeXDrawLang.getString1_6("LaTeXDrawFrame.18")+"<br>"+//$NON-NLS-1$//$NON-NLS-2$
+					LaTeXDrawLang.getString1_6("LaTeXDrawFrame.19")+"<br>"+//$NON-NLS-1$//$NON-NLS-2$
+					"<br></font></div></body></html>");//$NON-NLS-1$
+
+			tabbedPane.add(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.25"), new JScrollPane(editorPane)); //$NON-NLS-1$
+		}
+		catch(Exception e) { System.out.println("Library tabular cannot be created."); } //$NON-NLS-1$
+		
+		try
+		{
+			JEditorPane editorPane = new JEditorPane(getClass().getResource("/res/translators.txt"));//$NON-NLS-1$
+			editorPane.setEditable(false);
+			editorPane.setDragEnabled(true);
+			tabbedPane.add(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.26"), new JScrollPane(editorPane)); //$NON-NLS-1$
+		}
+		catch(Exception e) { System.out.println("Translators tabular cannot be created."); } //$NON-NLS-1$
+		
+		try
+		{
+			JEditorPane editorPane = new JEditorPane(getClass().getResource("/release_note.txt"));//$NON-NLS-1$
+			editorPane.setEditable(false);
+			editorPane.setDragEnabled(true);
+			tabbedPane.add(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.27"), new JScrollPane(editorPane)); //$NON-NLS-1$
+		}
+		catch(Exception e) { System.out.println("Release note tabular cannot be created."); } //$NON-NLS-1$
+		
+		try
+		{
+			JEditorPane editorPane = new JEditorPane(getClass().getResource("/license.txt"));//$NON-NLS-1$
+			editorPane.setEditable(false);
+			editorPane.setDragEnabled(true);
+			tabbedPane.add(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.28"), new JScrollPane(editorPane)); //$NON-NLS-1$
+		}
+		catch(Exception e) { System.out.println("License tabular cannot be created."); } //$NON-NLS-1$
+		
+		tabbedPane.setPreferredSize(new Dimension(490, 290));
+		p2.add(tabbedPane);
+
+ 		aboutTeXDraw.setIconImage(LaTeXDrawResources.aboutIcon.getImage());
+ 		
+		okB.addActionListener(new ActionListener()
+				{
+					public void actionPerformed(ActionEvent e)
+					{
+						aboutTeXDraw.setVisible(false);
+					}
+				});
+		panel.add(okB);
+ 		
+ 		aboutTeXDraw.getContentPane().setLayout(new BorderLayout());
+ 		aboutTeXDraw.getContentPane().add(p2, BorderLayout.CENTER);
+ 		aboutTeXDraw.getContentPane().add(panel, BorderLayout.SOUTH);
+		
+ 		aboutTeXDraw.setSize(500, 620);
+ 		aboutTeXDraw.setResizable(false);
+	}
+	
+	
+	
+	private void readObject(@SuppressWarnings("unused") ObjectInputStream ois)
+	{		
+		/* Nothing to do. */
+	}
+
+
+
+	/**
+	 * Actions to do when an item change.
+	 */
+	public void itemStateChanged(ItemEvent e) 
+	{
+		if(e.getSource() instanceof LaTeXDrawComboBox)
+		{
+			LaTeXDrawComboBox c = (LaTeXDrawComboBox)e.getSource();
+			String label = c.getName();
+		
+			try
+			{
+				DrawContainer draw = drawPanel.getDraw();
+				Draw listSelected = draw.getSelected();
+				
+				if(label.compareTo(Figure.LABEL_HATCH_CHOICE)==0)
+				{
+					String style = ((JLabel) hatchChoice.getSelectedItem()).getText();
+					Object item = e.getItem();
+					
+					if(listSelected==null ||
+						(item instanceof JLabel && ((JLabel)item).getName().compareTo(style)!=0 && listSelected.size()<2))
+						return ;
+					
+					if(listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+					
+					if(listSelected.size()==1)
+					{
+						Figure selected = listSelected.getFigureAt(0);
+						selected.setHatchingStyle(style);
+						
+						if(style.compareTo(PSTricksConstants.TOKEN_FILL_GRADIENT)==0)
+						{
+							buttonGradientEndC.setVisible(true);
+							buttonGradientStartC.setVisible(true);
+							buttonInteriorColor.setVisible(false);
+							filledCheckBox.setVisible(false);
+							buttonHatchColor.setVisible(false);
+						}
+						else
+						{
+							buttonHatchColor.setVisible(style.compareTo(PSTricksConstants.TOKEN_FILL_SOLID)!=0 &&
+														style.compareTo(PSTricksConstants.TOKEN_FILL_NONE)!=0);
+							filledCheckBox.setVisible(true);
+							buttonGradientEndC.setVisible(false);
+							buttonGradientStartC.setVisible(false);
+							buttonInteriorColor.setVisible(filledCheckBox.isSelected());
+						}
+					}
+					else
+					{
+						genHatchS = style;
+						
+						for(Figure f : listSelected.getFigures())
+							if(f.isCustomizable() && f.canBeHatched())
+								f.setHatchingStyle(style);
+					}
+						
+					updateFillCB();
+					drawPanel.updateDraw(true);
+					setIsModified(true);
+					return ;
+				}				
+				
+				if(label.compareTo(Figure.LABEL_BORDERS_POSITION_CHOICE)==0)
+				{
+					String style = ((JLabel) bordersPositionChoice.getSelectedItem()).getText();
+					Object item = e.getItem();
+					
+					if(listSelected==null ||
+						(item instanceof JLabel && ((JLabel)item).getName().compareTo(style)!=0 && listSelected.size()<2))
+						return ;
+					
+					if(listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+					
+					if(listSelected.size()==1)
+						listSelected.getFigureAt(0).setBordersPosition(style);
+					else
+					{
+						genBordPosS = style;
+						
+						for(Figure f : listSelected.getFigures())
+							if(f.isCustomizable() && f.isBordersMovable())
+								f.setBordersPosition(style);
+					}
+						
+					listSelected.updateBorders();
+					drawPanel.updateDraw(true);
+					setIsModified(true);
+					return ;
+				}		
+				
+				if(label.compareTo(LaTeXDrawResources.CHOICE_ARROW_LEFT_NAME)==0)
+				{
+					String arrowS = ((JLabel)lineArrowLChoice.getSelectedItem()).getText();
+					Object item = e.getItem();
+					
+					if(listSelected==null ||
+						(item instanceof JLabel && ((JLabel)item).getName().compareTo(arrowS)!=0 && listSelected.size()<2))
+							return ;
+					
+					if(listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+					
+					if(listSelected.size()==1)
+					{
+						Figure selected = listSelected.getFigureAt(0);
+						
+						if(selected instanceof Arrowable)
+							((Arrowable)selected).setArrow1Style(arrowS);
+					}
+					else
+					{
+						genLeftArrS = arrowS;
+						
+						for(Figure f : listSelected.getFigures())
+							if(f.isCustomizable() && f instanceof Arrowable)
+								((Arrowable)f).setArrow1Style(arrowS);
+					}
+						
+					drawPanel.updateDraw(true);
+					setIsModified(true);
+					return;
+				}
+				
+				if(label.compareTo(LaTeXDrawResources.CHOICE_ARROW_RIGHT_NAME)==0)
+				{
+					String arrowS = ((JLabel)lineArrowRChoice.getSelectedItem()).getText();
+					Object item = e.getItem();
+					
+					if(listSelected==null ||
+						(item instanceof JLabel && ((JLabel)item).getName().compareTo(arrowS)!=0 && listSelected.size()<2))
+								return ;
+					
+					if(listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+					
+					if(listSelected.size()==1)
+					{
+						Figure selected = listSelected.getFigureAt(0);
+						
+						if(selected instanceof Arrowable)
+						{
+							if(((Arrowable)selected).hasTwoLeftArrows())
+								arrowS = ArrowHead.invertArrowStyle(arrowS);
+							
+							((Arrowable)selected).setArrow2Style(arrowS);
+						}
+					}
+					else
+					{
+						genRightArrS = arrowS;
+						
+						for(Figure f : listSelected.getFigures())
+							if(f.isCustomizable() && f instanceof Arrowable)
+								((Arrowable)f).setArrow2Style(((Arrowable)f).hasTwoLeftArrows() ? 
+																ArrowHead.invertArrowStyle(arrowS) : arrowS);
+					}
+						
+					drawPanel.updateDraw(true);
+					setIsModified(true);
+					return;
+				}
+				
+				
+				if(label.compareTo(LaTeXDrawResources.CHOICE_LINE_NAME)==0)
+				{				
+					String str = ((JLabel) lineChoice.getSelectedItem()).getText();
+					Object item = e.getItem();
+					
+					if(listSelected==null ||
+						(item instanceof JLabel && ((JLabel)item).getName().compareTo(str)!=0 && listSelected.size()<2))
+								return ;
+					
+					if(listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+					
+					if(listSelected.size()==1)
+						listSelected.getFigureAt(0).setLineStyle(str);
+					else
+					{
+						genLineStyleS = str;
+						
+						for(Figure f : listSelected.getFigures())
+							if(f.isCustomizable() && f.isDashableOrDotable())
+								f.setLineStyle(str);
+					}
+						
+					drawPanel.updateDraw(true);
+					setIsModified(true);
+					return ;
+				}
+				
+				
+				if(label.compareTo(LaTeXDrawResources.CHOICE_DOT_NAME)==0)
+				{
+					String str = ((JLabel) dotChoice.getSelectedItem()).getText();
+					Object item = e.getItem();
+					
+					if(listSelected==null ||
+						(item instanceof JLabel && ((JLabel)item).getName().compareTo(str)!=0 && listSelected.size()<2))
+							return ;
+					
+					if(listSelected.size()>0)
+						addToUndoTransformation(listSelected);
+					
+					if(listSelected.size()==1)
+					{
+						Figure selected = listSelected.getFigureAt(0);
+						
+						if(selected instanceof Dot)
+						{
+							((Dot)selected).setCurrentStyle(str);
+							filledCheckBox.setVisible(false);
+							buttonInteriorColor.setVisible(((Dot)selected).canBeFilled() && selected.isFilled());
+						}
+					}
+					else
+					{
+						genDotS = str;
+						
+						for(Figure f : listSelected.getFigures())
+							if(f instanceof Dot)
+								((Dot)f).setCurrentStyle(str);
+					}
+					
+					listSelected.updateBorders();
+					setIsModified(true);
+					drawPanel.updateDraw(true);
+					return;
+				}
+			
+			}catch(Exception ex)
+			{
+				ex.printStackTrace(); 
+				ExceptionFrameDialog.showExceptionDialog(ex);
+			}
+		}
+	}
+
+
+
+	/**
+	 * @return Returns the xScale.
+	 */
+	public XScale getXScale()
+	{
+		return xScale;
+	}
+
+
+
+
+	/**
+	 * @return Returns the yScale.
+	 */
+	public YScale getYScale()
+	{
+		return yScale;
+	}
+
+
+
+
+	/**
+	 * @return the checkNewVersion
+	 */
+	public boolean isCheckNewVersion()
+	{
+		return checkNewVersion;
+	}
+
+
+
+
+	/**
+	 * @param checkNewVersion the checkNewVersion to set
+	 */
+	public void setCheckNewVersion(boolean checkNewVersion)
+	{
+		this.checkNewVersion = checkNewVersion;
+	}
+
+
+
+
+	/**
+	 * @return the text of statusBar
+	 */
+	public String getStatusBarText()
+	{
+		return statusBar.getText();
+	}
+
+
+
+
+	/**
+	 * @param text The text to put in the statusbar
+	 */
+	public void setStatusBarText(String text)
+	{
+		statusBar.setText(text);
+	}
+
+	
+	
+	
+	/**
+	 * @param unitForPixelsPerCm The unitForPixelsPerCm to set.
+	 */
+	public void setUnitForPixelsPerCm(String unitForPixelsPerCm)
+	{
+		drawPanel.getDraw().setUnitForPixelsPerCm(unitForPixelsPerCm);
+		xScale.setUnitForPixelsPerCm(unitForPixelsPerCm);
+	}
+
+	
+	
+	
+	/**
+	 * Allows to choose and to insert a picture in the draw
+	 */
+	public void insertPicture()
+	{
+		try
+		{
+			if(fileChooserPicture==null)	
+				fileChooserPicture = new PictureChooser(this, LaTeXDrawLang.getString1_6("LaTeXDrawFrame.23"),  //$NON-NLS-1$
+														true, LaTeXDrawLang.getString1_6("LaTeXDrawFrame.1")); //$NON-NLS-1$
+	 		
+			File file = fileChooserPicture.displayFrame();
+			
+			if(file!=null && file.canRead() && file.isFile()) 
+			{
+				setStatusBarText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.25")); //$NON-NLS-1$
+	
+				boolean state = drawPanel.insertPicture(undoManager, file.getAbsolutePath());
+				if(state) setStatusBarText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.28")); //$NON-NLS-1$
+				else	  setStatusBarText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.27")); //$NON-NLS-1$
+			}
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			JOptionPane.showMessageDialog(this, 
+		 		    LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.204") + ex.toString(), //$NON-NLS-1$
+		 		   LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.86"), JOptionPane.WARNING_MESSAGE);  //$NON-NLS-1$
+		}
+	}
+
+	
+	
+	
+	/**
+	 * Allows to convert several figures in an other format.
+	 */
+	public void batchConvertion()
+	{
+		convertFrame.setVisible(true);
+	}
+
+
+
+
+	/**
+	 * @param state Define if the grid must be magnetic.
+	 */
+	public void setMagneticGrid(boolean state)
+	{
+		toolbar.getMagneticCB().setSelected(state);
+		drawPanel.setGridIsMagnetic(state);
+	}
+
+
+
+
+	/**
+	 * @param value Define the interval between two lines of the personal grid.
+	 */
+	public void setPersoGridGap(int value)
+	{
+		toolbar.getPersoGridGapField().setValue(value);
+		drawPanel.draw.setPersonalGridGap(value);
+	}
+
+
+
+
+
+	/**
+	 * @return the pathTexEditor.
+	 */
+	public String getPathTexEditor()
+	{
+		return pathTexEditor;
+	}
+
+
+
+
+	/**
+	 * @param pathTexEditor the pathTexEditor to set.
+	 */
+	public void setPathTexEditor(String pathTexEditor)
+	{
+		this.pathTexEditor = pathTexEditor;
+	}
+	
+	
+	
+	/**
+	 * Selects all the figures of the current drawing and put the current action to "selection".
+	 * @since 1.9
+	 */
+	public void selectAllFigures()
+	{
+		menuBar.getMenuSelect().setSelected(true);
+		toolbar.getButtonImageSelect().setSelected(true);
+		actionPerformed(new ActionEvent(menuBar.getMenuSelect(), 0, LaTeXDrawResources.LABEL_SELECT_FIGURE));
+		drawPanel.getDraw().selectAll();
+		setSelection(true);
+		setCurrentChoice(LaTeXDrawResources.LABEL_SELECT_FIGURE);
+	}
+
+
+
+
+	public void showShortcutsFrame()
+	{
+		if(shortcutsFrame==null)
+			shortcutsFrame = new ShortcutsFrame();
+		
+		shortcutsFrame.setVisible(true);
+	}
+
+
+
+
+	public static void setCurrentChoice(String currentChoice)
+	{
+		LaTeXDrawFrame.currentChoice = currentChoice;
+	}
+
+
+
+
+	public void setFormerIsInAutoUpdate(boolean formerIsInAutoUpdate)
+	{
+		this.formerIsInAutoUpdate = formerIsInAutoUpdate;
+	}
+
+
+
+
+	/**
+	 * @return the lookAndFeel.
+	 * @since 1.9
+	 */
+	public static String getLookAndFeel()
+	{
+		return lookAndFeel;
+	}
+
+
+
+
+	/**
+	 * @param lookAndFeel the lookAndFeel to set.
+	 * @since 1.9
+	 */
+	public static void setLookAndFeel(String lookAndFeel)
+	{
+		if(lookAndFeel==null)
+			throw new IllegalArgumentException();
+		
+    		LaTeXDrawFrame.lookAndFeel = lookAndFeel;
+	}
+
+	
+	/**
+	 * @return True if the selection of figures is activated.
+	 * @since 1.9
+	 */
+	public boolean isOnSelection()
+	{
+		return getLMenuBar().getMenuSelect().isSelected();
+	}
+
+
+	
+	
+	/**
+	 * Defines if the CheckBox FillCB must be enable or not considering if the current selected figure.
+	 * has a shadow or not (in pstricks, all shape having a shadow is filled but joined-lines, akin-points and Bézier curves). 
+	 * @since 1.9
+	 */
+	protected void updateFillCB()
+	{
+		Draw selection = drawPanel.draw.getSelected();
+		
+		if(selection!=null && selection.size()==1)
+		{
+			Figure f = selection.getFigureAt(0);
+			
+			if(!f.canBeFilled())
+				return ;
+			
+			if(f instanceof JoinedLines || f instanceof BezierCurve || f instanceof AkinPoints)
+			{
+				String txt = f.getHatchingStyle();
+				
+				filledCheckBox.setEnabled(!(shadowCheckBox.isSelected() && f.canHaveShadow() &&
+						(txt.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH) ||
+						txt.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH_F) ||
+						txt.equals(PSTricksConstants.TOKEN_FILL_HLINES) ||
+						txt.equals(PSTricksConstants.TOKEN_FILL_HLINES_F) ||
+						txt.equals(PSTricksConstants.TOKEN_FILL_VLINES) ||
+						txt.equals(PSTricksConstants.TOKEN_FILL_VLINES_F))));
+			}
+			else
+				filledCheckBox.setEnabled(!shadowCheckBox.isSelected() || !f.canHaveShadow());
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Initialise the values of the general parameters (do not change the fields).
+	 * @since 1.9.1
+	 */
+	protected void initializeGeneralFields()
+	{
+		genBordPosS = Figure.DEFAULT_BORDERS_POSITION;
+		genDbleBordCB.setColor(Figure.DEFAULT_DOUBLE_COLOR);
+		genDotS = Dot.DEFAULT_DOT_STYLE;
+		genGradientEndCB.setColor(PSTricksConstants.DEFAULT_GRADIENT_END_COLOR);
+		genGradientStartCB.setColor(PSTricksConstants.DEFAULT_GRADIENT_START_COLOR);
+		genHasDbleBord = Figure.DEFAULT_HAS_DOUBLE_BOUNDARY;
+		genHatchCB.setColor(Figure.DEFAULT_HATCH_COL);
+		genHatchS = Figure.DEFAULT_HATCH_STYLE;
+		genInteriorCB.setColor(Figure.DEFAULT_INTERIOR_COL);
+		genIsFilled = Figure.DEFAULT_IS_FILLED;
+		genLeftArrS = genRightArrS = ArrowHead.DEFAULT_STYLE;
+		genLineCB.setColor(Figure.DEFAULT_BORDERS_COL);
+		genLineStyleS = Figure.DEFAULT_LINE_STYLE;
+		genThickness = Figure.DEFAULT_THICKNESS;
+		genDotSize = Dot.DEFAULT_WIDTH;
+		genGradientEndC = PSTricksConstants.DEFAULT_GRADIENT_END_COLOR;
+		genGradientStartC = PSTricksConstants.DEFAULT_GRADIENT_START_COLOR;
+		genDbleC = Figure.DEFAULT_DOUBLE_COLOR;
+		genHatchC = Figure.DEFAULT_HATCH_COL;
+		genInteriorC = Figure.DEFAULT_INTERIOR_COL;
+		genLineC = Figure.DEFAULT_BORDERS_COL;
+		genShadowC = Figure.DEFAULT_SHADOW_COLOR;
+	}
+	
+
+	
+	/**
+	 * @return The frame of preferences.
+	 * @since 2.0.0
+	 */
+	public PreferencesFrame getPreferencesFrame() 
+	{
+		return preferencesFrame;
+	}
+
+
+
+	public void windowStateChanged(WindowEvent e)
+	{
+		updateSplitSeparatorPosition();
+	}
+	
+	
+	
+	/**
+	 * Update the position of the divider.
+	 * @since 2.0.0
+	 */
+	public void updateSplitSeparatorPosition()
+	{
+		if(isCodePanelDisplayed())
+		{
+			int widthFrame, dividerLocation;
+			
+	     	formerDividerLocation = splitPane.getDividerLocation();
+	     	widthFrame = getExtendedState()==Frame.MAXIMIZED_BOTH ? Toolkit.getDefaultToolkit().getScreenSize().width : getSize().width;
+	     	dividerLocation = (int)(widthFrame*getDividerPosition());
+	     	splitPane.setDividerLocation(dividerLocation); 
+	     	codePanel.editor.setPreferredSize(new Dimension(widthFrame-dividerLocation, codePanel.editor.getPreferredSize().height));
+	     	codePanel.editor.revalidate();
+		}
+	}
+
+
+
+	/**
+	 * @return the splitPane.
+	 * @since 2.0.0
+	 */
+	public JSplitPane getSplitPane()
+	{
+		return splitPane;
+	}
+
+
+	
+	
+	public double getDividerCurrentLocation()
+	{
+		return isCodePanelDisplayed() ? splitPane.getDividerLocation() : formerDividerLocation; 
+	}
+	
+	
+
+	/**
+	 * @return the dividerPosition read in the preferences file.
+	 * @since 2.0.0
+	 */
+	public double getDividerPosition()
+	{
+		return dividerPosition;
+	}
+
+
+
+	/**
+	 * @param dividerPosition the dividerPosition to set in ]0;1[.
+	 * @since 2.0.0
+	 */
+	public void setDividerPosition(double dividerPosition)
+	{
+		if(dividerPosition>0 && dividerPosition<=1)
+		{
+			this.dividerPosition = dividerPosition;
+			updateSplitSeparatorPosition();
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Sets the XML element "meta" with the parameters of the code panel.
+	 * @param document The XML document.
+	 * @param meta The Element to fill.
+	 * @throws IllegalArgumentException If document or meta is null.
+	 * @since 2.0.0
+	 */
+	public void getXMLMetadata(Document document, Element meta)
+	{
+		if(document==null || meta==null)
+			throw new IllegalArgumentException();
+		
+    	Element elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_VERSION), elt2;
+
+    	elt.appendChild(document.createTextNode(VERSION));
+    	meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_SIZE);
+        meta.appendChild(elt);
+        
+        elt2 = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_WIDTH);
+        elt2.setTextContent(String.valueOf(getWidth()));
+        elt.appendChild(elt2);
+        
+        elt2 = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_HEIGHT);
+        elt2.setTextContent(String.valueOf(getHeight()));
+        elt.appendChild(elt2);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_POSITION);
+        meta.appendChild(elt);
+        
+        elt2 = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_POSITION_X);
+        elt2.setTextContent(String.valueOf(getLocation().x));
+        elt.appendChild(elt2);
+        
+        elt2 = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_POSITION_Y);
+        elt2.setTextContent(String.valueOf(getLocation().y));
+        elt.appendChild(elt2);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_DIVIDER_POSITION);
+        double divLoc = isCodePanelDisplayed() ? getDividerCurrentLocation() : 1;
+        elt.setTextContent(String.valueOf(divLoc<getWidth() && divLoc>1 ? divLoc/getWidth() : 0.8));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_DISPLAY_CODE_PANEL);
+        elt.setTextContent(String.valueOf(menuBar.getDisplayCodePanel().isSelected()));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_DISPLAY_X);
+        elt.setTextContent(String.valueOf(menuBar.getDisplayXScale().isSelected()));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_DISPLAY_Y);
+        elt.setTextContent(String.valueOf(menuBar.getDisplayYScale().isSelected()));
+        meta.appendChild(elt);
+        
+        elt = document.createElement(LaTeXDrawNamespace.LATEXDRAW_NAMESPACE+':'+LaTeXDrawNamespace.XML_DELIMITOR_OPACITY);
+        elt.setTextContent(String.valueOf(Delimitor.getOpacity()));
+        meta.appendChild(elt);
+	}
+
+
+
+	/**
+	 * Sets the latexdraw parameters from the <code>metadata</code> SVG tag.
+	 * @param nl The list of the parameters.
+	 * @since 2.0.0
+	 */
+	public void setXMLMetadata(NodeList nl)
+	{
+		if(nl==null)
+			return ;
+		
+		Node n, n2;
+		String name;
+		double dividerPos = -1;
+		
+		for(int i=0, size = nl.getLength(); i<size; i++)
+		{
+			n = nl.item(i);
+			
+			if(n!=null && LaTeXDrawNamespace.LATEXDRAW_NAMESPACE_URI.equals(n.getNamespaceURI()))
+			{
+				name = n.getNodeName();
+				
+				try
+				{
+					if(name.endsWith(LaTeXDrawNamespace.XML_SIZE))
+					{
+						NodeList nl2 = n.getChildNodes();
+						
+						for(int j=0, size2 = nl2.getLength(); j<size2; j++)
+						{
+							n2 = nl2.item(j);
+							
+							if(n2.getNodeName().endsWith(LaTeXDrawNamespace.XML_WIDTH))
+								setSize(Double.valueOf(n2.getTextContent()).intValue(), getHeight());
+							else
+								if(n2.getNodeName().endsWith(LaTeXDrawNamespace.XML_HEIGHT))
+									setSize(getWidth(), Double.valueOf(n2.getTextContent()).intValue());
+						}
+					}
+					else if(name.endsWith(LaTeXDrawNamespace.XML_POSITION))
+					{
+						NodeList nl2 = n.getChildNodes();
+						
+						for(int j=0, size2 = nl2.getLength(); j<size2; j++)
+						{
+							n2 = nl2.item(j);
+							
+							if(n2.getNodeName().endsWith(LaTeXDrawNamespace.XML_POSITION_X))
+								setLocation(Math.max(0, Double.valueOf(n2.getTextContent()).intValue()), getLocation().y);
+							else
+								if(n2.getNodeName().endsWith(LaTeXDrawNamespace.XML_POSITION_Y))
+									setLocation(getLocation().x, Math.max(0, Double.valueOf(n2.getTextContent()).intValue()));
+						}
+					}
+					else if(name.endsWith(LaTeXDrawNamespace.XML_DIVIDER_POSITION))
+						dividerPos = Double.valueOf(n.getTextContent()).doubleValue();
+					else if(name.endsWith(LaTeXDrawNamespace.XML_DISPLAY_CODE_PANEL))
+						displayCodePanel(Boolean.valueOf(n.getTextContent()).booleanValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_DISPLAY_X))
+						displayXScale(Boolean.valueOf(n.getTextContent()).booleanValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_DISPLAY_Y))
+						displayYScale(Boolean.valueOf(n.getTextContent()).booleanValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_DELIMITOR_OPACITY)) {
+						toolbar.getSliderDelimitor().setValue(Delimitor.getOpacity());
+						Delimitor.setOpacity(Double.valueOf(n.getTextContent()).intValue());
+					}
+					else if(name.endsWith(LaTeXDrawNamespace.XML_MAGNETIC_GRID))
+						setMagneticGrid(Boolean.valueOf(n.getTextContent()).booleanValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_ZOOM))
+						setZoom(Double.valueOf(n.getTextContent()).doubleValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_GRID_GAP))
+						toolbar.getPersoGridGapField().setValue(Double.valueOf(n.getTextContent()).intValue());
+					else if(name.endsWith(LaTeXDrawNamespace.XML_DRAW_BORDERS))
+						displayBorders(Boolean.valueOf(n.getTextContent()).booleanValue());
+				}
+				catch(Exception e) { e.printStackTrace(); System.out.println(name + ": invalid value."); }//$NON-NLS-1$
+			}
+		}
+		
+		if(dividerPos>0)
+		{
+			formerDividerLocation = (int)(getWidth()*dividerPos);
+			setDividerPosition(dividerPos);
+		}
+	}
+	
+	
+	public void setZoom(double zoom) {
+		drawPanel.getDraw().setZoom(zoom);
+		toolbar.getZoomField().setValue(drawPanel.getDraw().getZoom()*100.);
+	}
+	
+	
+	/**
+	 * @return The menu listener.
+	 * @since 2.0.0
+	 */
+	public MenusListener getMenuListener()
+	{
+		return menusListener;
+	}
+
+	/**
+	 * @return the toolbar.
+	 * @since 2.0.0
+	 */
+	public LToolbar getToolbar()
+	{
+		return toolbar;
+	}
+	
+	
+	/**
+	 * @return The recent files Listener.
+	 * @since 2.0.0
+	 */
+	public RecentFilesListener getRecentFilesListener()
+	{
+		return recentFilesListener;
+	}
+	
+	
+	public LMenuBar getLMenuBar()
+	{
+		return menuBar;
+	}
+
+
+	/**
+	 * @return the progressBar.
+	 * @since 2.0.0
+	 */
+	public JProgressBar getProgressBar()
+	{
+		return progressBar;
+	}
+
+
+	/**
+	 * @return the stopButton.
+	 * @since 2.0.0
+	 */
+	public JButton getStopButton()
+	{
+		return stopButton;
+	}
+
+
+
+	/**
+	 * @return the currentFile.
+	 * @since 2.0.0
+	 */
+	public File getCurrentFile()
+	{
+		return currentFile;
+	}
+
+
+
+	/**
+	 * @param currentFile the currentFile to set.
+	 * @since 2.0.0
+	 */
+	public void setCurrentFile(File currentFile)
+	{
+		this.currentFile = currentFile;
+	}
+
+
+	/**
+	 * @return the formerDividerLocation.
+	 * @since 2.0.0
+	 */
+	public int getFormerDividerLocation()
+	{
+		return formerDividerLocation;
+	}
+
+
+
+	public void setPathDistribLatex(String path)
+	{
+		pathDistribLatex = path;
+	}
+	
+	
+	public String getPathDistribLatex() {
+		return pathDistribLatex;
+	}
+
+
+
+	public void setLatexIncludes(String includes)
+	{
+		latexIncludes = includes;
+	}
+	
+	public String getLatexIncludes() {
+		return latexIncludes;
+	}
+	
+	public void setIsInAutoUpdate(boolean auto) {
+		menuBar.getMenuAutoUpdate().setSelected(auto);
+		codePanel.setIsInAutoUpdate(auto);
+	}
+}
diff --git a/current/latexDraw/ui/SplashScreen.java b/current/latexDraw/ui/SplashScreen.java
new file mode 100644
index 0000000..9ad30e7
--- /dev/null
+++ b/current/latexDraw/ui/SplashScreen.java
@@ -0,0 +1,118 @@
+package latexDraw.ui;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.Image;
+import java.awt.MediaTracker;
+import java.awt.Toolkit;
+
+import javax.swing.JProgressBar;
+import javax.swing.JWindow;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+
+import latexDraw.ui.components.DisplayCanvas;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+/** 
+ * This class defines a splash screen displayed during the start of the program with a progress
+ * bar showing us the progression of the loading of the LaTeXDraw interface.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/13/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.9<br>
+ */
+public class SplashScreen extends JWindow
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The progress bar showing us the progression of the loading of the LaTeXDraw interface.*/
+	JProgressBar progressBar;
+	
+	
+	/**
+	 * The constructor by default.
+	 * @param lookAndFeel the class of the look and feel; default LaF if null.
+	 */
+	public SplashScreen(String lookAndFeel)
+	{
+		try
+		{
+			try
+			{
+				if(lookAndFeel==null)
+					UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
+				else
+					UIManager.setLookAndFeel(lookAndFeel);
+			}catch(Exception ex)
+			{/* Tant pis ! */}
+			
+			Dimension dim 	= Toolkit.getDefaultToolkit().getScreenSize();
+			progressBar 	= new JProgressBar(0, 100);
+			Image i 		= Toolkit.getDefaultToolkit().getImage(
+							  getClass().getClassLoader().getResource("res/LaTeXDrawSmall.png"));//$NON-NLS-1$
+			MediaTracker tracker=new MediaTracker(this);
+			tracker.addImage(i,0);
+			
+			try { tracker.waitForID(0); } 
+			catch(InterruptedException e) { e.printStackTrace(); }
+			
+			setLayout(new BorderLayout());
+			getContentPane().add(new DisplayCanvas(i), BorderLayout.CENTER);
+			getContentPane().add(progressBar, BorderLayout.SOUTH);
+			setLocation((dim.width-i.getWidth(null))/2, (dim.height-i.getHeight(null))/2);
+			setSize(i.getWidth(null), i.getHeight(null)+15);
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+	
+	
+	/**
+	 * Increment the progress bar.
+	 * @param increment The value to add to the progress bar.
+	 */
+	public void addToProgressBar(int increment)
+	{
+		final int cpt = progressBar.getValue()+increment;
+		
+		if(cpt>=progressBar.getMinimum() && cpt<=progressBar.getMaximum())
+			try
+			{
+				SwingUtilities.invokeAndWait(new Runnable() { public void run() {updateBar(cpt);} });
+			} catch(Exception e)
+			{
+				e.printStackTrace();
+				ExceptionFrameDialog.showExceptionDialog(e);
+			}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update the progress bar.
+	 * @param newValue its new value.
+	 */
+	protected synchronized void updateBar(int newValue) 
+	{
+		progressBar.setValue(newValue);
+	}
+}
diff --git a/current/latexDraw/ui/codeEditorPane/AbstractCodeEditorPane.java b/current/latexDraw/ui/codeEditorPane/AbstractCodeEditorPane.java
new file mode 100644
index 0000000..bb9e87e
--- /dev/null
+++ b/current/latexDraw/ui/codeEditorPane/AbstractCodeEditorPane.java
@@ -0,0 +1,211 @@
+package latexDraw.ui.codeEditorPane;
+
+import static latexDraw.ui.CodePanel.LABEL_COPY_SELECTION_CODE;
+
+import java.awt.event.FocusEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.JButton;
+import javax.swing.JEditorPane;
+
+import latexDraw.ui.CodePanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * Defines an abstract model of code editor pane.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 06/03/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class AbstractCodeEditorPane extends JEditorPane implements MouseListener
+{
+	private static final long	serialVersionUID	= 1L;
+
+	protected CodePanel codePanel;
+	
+	/** Corresponds to the beginning of the code of the figure: \begin{pspicture}... */
+	protected String begin;
+	
+	/** Corresponds to the body of the code : the definitions of the figures (lines, dots, ...)*/
+	protected String body;
+	
+	/** Defines the start of the code. */
+	protected String beginCodeTag;
+	
+	/** Corresponds to the end of the code of the figure. */
+	protected String endCodeTag;
+	
+	
+	
+	/**
+	 * The constructor.
+	 * @param codePanel The associated codePanel.
+	 */
+	public AbstractCodeEditorPane(CodePanel codePanel)
+	{
+		super();
+		setEditable(false);
+		addMouseListener(this);
+		setDragEnabled(true);
+		this.codePanel = codePanel;
+		begin = "";//$NON-NLS-1$
+		body = "";//$NON-NLS-1$
+		setBeginCodeTag();
+		setEndCodeTag();
+	}
+	
+	
+	
+	
+	/**
+	 * Update the buttons managing the copy of the code.
+	 * @since 1.9
+	 */
+	public void updateButtonsCopy()
+	{
+		String text = getSelectedText();
+		boolean enable = text!=null && !text.equals("");//$NON-NLS-1$
+		codePanel.getButtonCopySel().setEnabled(enable); 
+	}
+	
+	
+	
+	public void mouseClicked(MouseEvent e)
+	{
+		updateButtonsCopy();
+	}
+
+
+
+
+	public void mousePressed(MouseEvent e)
+	{
+		/* No code required */		
+	}
+
+
+
+
+	public void mouseReleased(MouseEvent e)
+	{
+		updateButtonsCopy();
+	}
+
+
+
+
+	public void mouseEntered(MouseEvent e)
+	{
+		/* No code required */
+	}
+
+
+
+
+	public void mouseExited(MouseEvent e)
+	{
+		/* No code required */
+	}
+
+
+
+	@Override
+	protected void processFocusEvent(FocusEvent e)
+	{
+		super.processFocusEvent(e);
+	
+		if(e.getID()==FocusEvent.FOCUS_LOST)
+		{
+			Object o = e.getOppositeComponent();
+
+			if(!(o instanceof JButton && ((JButton)o).getActionCommand().equals(LABEL_COPY_SELECTION_CODE)))
+			{
+				select(0, 0);
+				codePanel.getButtonCopySel().setEnabled(false);
+			}
+		}
+	}
+	
+	
+	
+	/**
+	 * @param withLatexParams True: latex parameters (position, caption, etc.) are added
+	 * to the code.
+	 * @param withComments True: comments are added to the code.
+	 * @return The generated code.
+	 * @since 2.0.3
+	 */
+	public abstract String getCode(boolean withLatexParams, boolean withComments);
+	
+	
+	/**
+	 * Update the text of the panel.
+	 */
+	public void updateText()
+	{
+		setText(getCode(true, true));
+	}
+	
+	
+	
+	/**
+	 * Set the beginning of the code generated.
+	 * @param SW The top right point.
+	 * @param NE The bottom left point.
+	 * @param pixPerCm The definition level of the drawing.
+	 * @param origin The origin point of the system of coordinates.
+	 */
+	public abstract void setStart(LaTeXDrawPoint2D SW, LaTeXDrawPoint2D NE, float pixPerCm, LaTeXDrawPoint2D origin);
+	
+	
+	
+	/**
+	 * Set the body (between the beginning and the end) of the code.
+	 * @param code The new code.
+	 */
+	public void setBody(String code)
+	{
+		body = code;
+		updateText();
+	}
+	
+	
+	/**
+	 * Empty the panel.
+	 */
+	public void setEmpty()
+	{
+		body=""; //$NON-NLS-1$
+		setText("");//$NON-NLS-1$
+	}
+
+	
+	
+	/**
+	 * Set the tag which will be defined the start of the code.
+	 * @since 2.0.0
+	 */
+	protected abstract void setBeginCodeTag();
+	
+	
+	/**
+	 * Set the tag which will be defined the end of the code.
+	 * @since 2.0.0
+	 */
+	protected abstract void setEndCodeTag();
+}
diff --git a/current/latexDraw/ui/codeEditorPane/PSTricksEditorPane.java b/current/latexDraw/ui/codeEditorPane/PSTricksEditorPane.java
new file mode 100644
index 0000000..89d1bad
--- /dev/null
+++ b/current/latexDraw/ui/codeEditorPane/PSTricksEditorPane.java
@@ -0,0 +1,181 @@
+package latexDraw.ui.codeEditorPane;
+
+import static latexDraw.ui.CodePanel.TOKEN_HORI_CENTER_END;
+import static latexDraw.ui.CodePanel.TOKEN_HORI_CENTER_START;
+
+import java.util.Calendar;
+
+import latexDraw.ui.CodePanel;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+/** 
+ * Defines the model of a code editor pane used which display PSTricks code.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 06/03/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class PSTricksEditorPane extends AbstractCodeEditorPane
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The line code which include the package pstricks */
+	public static final String PACKAGE_PSTRICKS = "% \\usepackage[usenames,dvipsnames]{pstricks}\n% \\usepackage{epsfig}\n% \\usepackage{pst-grad} % For gradients\n% \\usepackage{pst-plot} % For axes\n"; //$NON-NLS-1$
+	
+	
+	
+	/**
+	 * The constructor.
+	 * @param codePanel The associated codePanel.
+	 */
+	public PSTricksEditorPane(CodePanel codePanel)
+	{
+		super(codePanel);
+	}
+	
+	
+	
+	
+	@Override
+	public String getCode(boolean withLatexParams, boolean withComments) {
+		String seol = System.getProperty("line.separator");//$NON-NLS-1$
+		String code;
+		
+		if(body==null || body=="") //$NON-NLS-1$
+			code = withComments ? codePanel.getComments() : "" ;
+		else
+		{
+			boolean addEntete;
+			StringBuffer entete = new StringBuffer();
+			StringBuffer end    = new StringBuffer();
+			String packages		= codePanel.getDocumentPackages();
+			
+			if(withLatexParams && (!codePanel.getCaption().equals("") || !codePanel.getLabel().equals("") || //$NON-NLS-1$ //$NON-NLS-2$
+			   !codePanel.getPositionVertToken().equals(""))) //$NON-NLS-1$
+			{
+				 addEntete = true;
+				 entete.append("\\begin{figure}"); //$NON-NLS-1$
+				 
+				 if(!codePanel.getPositionVertToken().equals("")) //$NON-NLS-1$
+					 entete.append("[").append(codePanel.getPositionVertToken()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+				 
+				 entete.append(seol);
+			}
+			else
+				addEntete = false;
+			
+			if(addEntete)
+			{
+				if(!codePanel.getLabel().equals("")) //$NON-NLS-1$
+				{
+					String lab = codePanel.getLabel().replaceAll("%", ""); //$NON-NLS-1$ //$NON-NLS-2$
+					lab = lab.replaceAll("\\\\", ""); //$NON-NLS-1$ //$NON-NLS-2$
+					end.append("\\label{").append(lab).append("}").append(seol); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+				
+				if(!codePanel.getCaption().equals("")) //$NON-NLS-1$
+					end.append("\\caption{").append(codePanel.getCaption()).append("}").append(seol);//$NON-NLS-1$//$NON-NLS-2$
+				
+				end.append("\\end{figure}").append(seol); //$NON-NLS-1$
+			}
+			
+			if(withLatexParams && codePanel.getPositionHoriToken().equals(TOKEN_HORI_CENTER_START))
+				end.insert(0, TOKEN_HORI_CENTER_END);
+			
+			StringBuffer madeBy = new StringBuffer();
+			
+			madeBy.append("% Generated with "); //$NON-NLS-1$
+			madeBy.append(LaTeXDrawResources.LABEL_APP);
+			madeBy.append(" "); //$NON-NLS-1$
+			madeBy.append(LaTeXDrawFrame.VERSION);
+			madeBy.append(seol);
+			madeBy.append("% "); //$NON-NLS-1$
+			madeBy.append(Calendar.getInstance().getTime().toString());
+			madeBy.append(seol);
+			
+			StringBuffer stringBuffer = new StringBuffer();
+			stringBuffer.append(body);
+			stringBuffer.append(endCodeTag);
+			stringBuffer.append("}\n"); //$NON-NLS-1$
+			stringBuffer.append(end);
+			String text = stringBuffer.toString();
+			
+			// We despecialise all the "%".
+			text = text.replaceAll("%", "\\\\%");     //$NON-NLS-1$ //$NON-NLS-2$
+			text = text.replaceAll(seol+"\\\\%", seol+"\\%"); //$NON-NLS-1$ //$NON-NLS-2$
+			
+			stringBuffer = new StringBuffer();
+			stringBuffer.append(madeBy);
+			stringBuffer.append(codePanel.getComments());
+			stringBuffer.append(PACKAGE_PSTRICKS);
+			if(packages!=null && packages.length()>0) {
+				packages = "% User packages:" + seol + packages;
+				packages = packages.replace(seol, seol+"%");
+				stringBuffer.append(packages).append(seol);
+			}
+			stringBuffer.append(entete);
+			if(withLatexParams)
+				stringBuffer.append(codePanel.getPositionHoriToken());
+			stringBuffer.append(begin);
+			stringBuffer.append(text);
+			
+			code = stringBuffer.toString();
+		}
+		
+		return code;
+	}
+	
+
+
+	@Override
+	protected void setBeginCodeTag()
+	{
+		beginCodeTag = "\\begin{pspicture}"; //$NON-NLS-1$
+	}
+
+
+
+	@Override
+	protected void setEndCodeTag()
+	{
+		endCodeTag = "\\end{pspicture} \n"; //$NON-NLS-1$
+	}
+
+
+
+	@Override
+	public void setStart(LaTeXDrawPoint2D SW, LaTeXDrawPoint2D NE, float pixPerCm, LaTeXDrawPoint2D origin)
+	{
+		StringBuffer stringBuffer = new StringBuffer();
+		
+		stringBuffer.append("\\scalebox{1} % Change this value to rescale the drawing.\n{\n"); //$NON-NLS-1$
+		stringBuffer.append(beginCodeTag);
+		stringBuffer.append("("); //$NON-NLS-1$
+		stringBuffer.append(0);
+		stringBuffer.append(","); //$NON-NLS-1$
+		stringBuffer.append((float)((origin.y-SW.y)/pixPerCm));
+		stringBuffer.append(")"); //$NON-NLS-1$
+		stringBuffer.append("("); //$NON-NLS-1$
+		stringBuffer.append((float)((NE.x-origin.x)/pixPerCm));
+		stringBuffer.append(",");  //$NON-NLS-1$ 
+		stringBuffer.append((float)((origin.y-NE.y)/pixPerCm));
+		stringBuffer.append(")\n"); //$NON-NLS-1$
+		begin = stringBuffer.toString(); 
+
+		updateText();
+	}
+}
diff --git a/current/latexDraw/ui/components/ButtonIcon.java b/current/latexDraw/ui/components/ButtonIcon.java
new file mode 100644
index 0000000..f67249b
--- /dev/null
+++ b/current/latexDraw/ui/components/ButtonIcon.java
@@ -0,0 +1,129 @@
+package latexDraw.ui.components;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.io.Serializable;
+
+import javax.swing.Icon;
+
+/** 
+ * This class defines an icon in a JButton.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ * <br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ButtonIcon implements Icon, Serializable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The colour of the icon */
+	private Color color;
+	
+	/** The colour of the borders of the icon */
+	public final static Color EDGE = Color.BLACK;
+	
+	/** The width of the icon */
+	public final static int WIDTH = 11;
+	
+	/** he height of the icon */
+	public final static int HEIGHT = 11;
+	
+	
+	/**
+	 * The constructor using a colour.
+	 * @param color The colour of the icon.
+	 */
+	public ButtonIcon(Color color)
+	{
+		if(color==null)
+			throw new IllegalArgumentException();
+		
+		this.color = color;
+	}
+	
+	
+	
+	
+	/**
+	 * This method allows to paint the icon in the graphics g.
+	 */
+	public void paintIcon(Component c, Graphics g, int x, int y) 
+	{		
+		Graphics2D g2 = (Graphics2D) g;
+    	
+		g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+		g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+		
+		Color former = g2.getColor();
+		g2.setColor(EDGE); 
+		g2.fillRect(x, y, getIconWidth(), getIconHeight());
+	 	
+		g2.setColor(color); 
+		g2.fillRect(x+2, y+2, getIconWidth()-4, getIconHeight()-4); 
+	 	
+		g2.setColor(former);
+	}
+
+	
+
+	/**
+	 * Allows to get the colour of the interior of the icon
+	 * @return The colour of the interior of the icon
+	 */
+	public synchronized Color getColor() 
+	{ 
+		return color; 
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the colour of the interior of the icon
+	 * @param c The new Colour of the interior of the icon
+	 */
+	public synchronized void setColor(Color c) 
+	{ 
+		if(c==null)
+			throw new IllegalArgumentException();
+		
+		color = c; 
+	}
+
+
+
+
+	/**
+	 * Allows to get the width of the icon
+	 */
+	public int getIconWidth() 
+	{
+		return WIDTH;
+	}
+
+
+
+	/**
+	 * Allows to get the height of the icon
+	 */
+	public int getIconHeight() 
+	{
+		return HEIGHT;
+	}
+}
diff --git a/current/latexDraw/ui/components/CloseButton.java b/current/latexDraw/ui/components/CloseButton.java
new file mode 100644
index 0000000..975740f
--- /dev/null
+++ b/current/latexDraw/ui/components/CloseButton.java
@@ -0,0 +1,99 @@
+package latexDraw.ui.components;
+
+import java.awt.Dimension;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JPanel;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+
+
+/** 
+ * This class defines a button which allows the user to close a window<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 05/23/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class CloseButton extends JButton implements ActionListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The panel to close */
+	private JPanel closePanel;
+	
+	/** The width of the button */
+	public static final int ICON_WIDTH = 14;
+	
+	/** The height of the button */
+	public static final int ICON_HEIGHT = 14;
+	
+	/** The image of the button. */
+	protected final static ImageIcon closeOut = new ImageIcon(Class.class.getClass().getResource("/res/closeOut.png"));//$NON-NLS-1$
+	
+	/** The image of the button when the mouse is on. */
+	protected final static ImageIcon closeIn = new ImageIcon(Class.class.getClass().getResource("/res/closeIn.png"));//$NON-NLS-1$
+	
+	/** The name and the action command of the button. */
+	public static final String NAME_BUTTON = "CLOSE_BUTTON";//$NON-NLS-1$
+	
+	
+	/**
+	 * The constructor by default.
+	 * @param panel The panel to close (can be null).
+	 */
+	public CloseButton(JPanel panel)
+	{
+		try
+		{
+			closePanel = panel;
+			
+			addActionListener(this);
+			
+			setSize(ICON_WIDTH, ICON_HEIGHT);
+			setPreferredSize(new Dimension(ICON_WIDTH, ICON_HEIGHT));
+			setMinimumSize(new Dimension(ICON_WIDTH, ICON_HEIGHT));
+			setMaximumSize(new Dimension(ICON_WIDTH, ICON_HEIGHT));
+			setActionCommand(NAME_BUTTON);
+			setName(NAME_BUTTON);
+			setIcon(closeOut);
+			setRolloverIcon(closeIn);
+			setToolTipText(LaTeXDrawLang.getOthersString("CloseButton.closePanel")); //$NON-NLS-1$
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+
+
+	public void actionPerformed(ActionEvent e)
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof CloseButton && closePanel!=null)
+		{
+			closePanel.setVisible(false);
+			return ;
+		}
+	}
+}
diff --git a/current/latexDraw/ui/components/ColorButton.java b/current/latexDraw/ui/components/ColorButton.java
new file mode 100644
index 0000000..d14b3f2
--- /dev/null
+++ b/current/latexDraw/ui/components/ColorButton.java
@@ -0,0 +1,92 @@
+package latexDraw.ui.components;
+
+import java.awt.Color;
+import java.awt.Insets;
+
+import javax.swing.Action;
+import javax.swing.Icon;
+import javax.swing.JButton;
+
+
+/** 
+ * This class define a new kind of button : a button with an coloured icon.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 03/15/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ColorButton extends JButton
+{
+	private static final long serialVersionUID = 1L;
+
+	public static final Insets INSET_BUTTON = new Insets(1,1,1,1);
+	
+	
+	public ColorButton()
+	{
+		super();
+	}
+
+
+	public ColorButton(Action a)
+	{
+		super(a);
+	}
+
+
+	public ColorButton(Icon icon)
+	{
+		super(icon);
+	}
+
+	
+	public ColorButton(String text, Icon icon)
+	{
+		super(text, icon);
+	}
+
+
+	public ColorButton(String text)
+	{
+		super(text);
+	}
+
+
+
+	/**
+	 * Set a new colour to the button.
+	 * @param c The new colour.
+	 * @since 1.9.1
+	 */
+	public void setColor(Color c)
+	{
+		((ButtonIcon)getIcon()).setColor(c);		
+		repaint();
+	}
+	
+	
+	
+	/**
+	 * @return The colour of the icon of the button.
+	 * @since 1.9.1
+	 */
+	public Color getColor()
+	{
+		if(((ButtonIcon)getIcon())==null)
+			return null;
+		
+		return ((ButtonIcon)getIcon()).getColor();
+	}
+}
diff --git a/current/latexDraw/ui/components/CopyPasteMenu.java b/current/latexDraw/ui/components/CopyPasteMenu.java
new file mode 100644
index 0000000..ab7a0a9
--- /dev/null
+++ b/current/latexDraw/ui/components/CopyPasteMenu.java
@@ -0,0 +1,183 @@
+package latexDraw.ui.components;
+
+import java.awt.Point;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.JEditorPane;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+
+/** 
+ * This class define a popup menu allowing to cut, paste and copy text from an {@link JEditorPane}.
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 10/24/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.9<br>
+ */
+public class CopyPasteMenu extends JPopupMenu implements ActionListener, MouseListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The editor to manage. */
+	protected JEditorPane editor;
+	
+	public static final String LABEL_COPY 	= LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.40"); //$NON-NLS-1$
+	
+	public static final String LABEL_CUT	= LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.44"); //$NON-NLS-1$
+	
+	public static final String LABEL_PASTE 	= LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.43"); //$NON-NLS-1$
+	
+	protected JMenuItem copyM;
+	
+	protected JMenuItem cutM;
+	
+	protected JMenuItem pasteM;
+	
+	
+	/**
+	 * The constructor.
+	 * @param edit The editor, must not be null.
+	 */
+	public CopyPasteMenu(JEditorPane edit)
+	{
+		if(edit==null)
+			throw new IllegalArgumentException("Invalid editor.");//$NON-NLS-1$
+		
+		editor = edit;
+		
+		copyM = new JMenuItem(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.40")); //$NON-NLS-1$
+		copyM.setActionCommand(LABEL_COPY);
+		copyM.addActionListener(this);
+		add(copyM);
+		cutM = new JMenuItem(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.44")); //$NON-NLS-1$
+		cutM.setActionCommand(LABEL_CUT);
+		cutM.addActionListener(this);
+		add(cutM);
+		pasteM = new JMenuItem(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.43")); //$NON-NLS-1$
+		pasteM.setActionCommand(LABEL_PASTE);
+		pasteM.addActionListener(this);
+		add(pasteM);
+	}
+
+
+
+
+	/**
+	 * Update the {@link JMenuItem} of the menu.
+	 * @since 1.9
+	 */
+	public void updateMenus()
+	{
+		boolean ok = editor.getSelectedText()!=null;
+		
+		try 
+		{
+			Transferable transf = editor.getToolkit().getSystemClipboard().getContents(null);
+			Object o = transf.getTransferData(DataFlavor.stringFlavor);
+			pasteM.setEnabled(o!=null && o instanceof String);
+		}
+		catch(Exception e) { pasteM.setEnabled(false); }
+		
+		copyM.setEnabled(ok);
+		cutM.setEnabled(ok);
+	}
+
+
+
+
+	public void actionPerformed(ActionEvent e)
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JMenuItem)
+		{
+			String actionCmd = ((JMenuItem)o).getActionCommand();
+			
+			if(actionCmd.equals(LABEL_COPY))
+			{
+				editor.copy();
+				return ;
+			}
+			
+			if(actionCmd.equals(LABEL_CUT))
+			{
+				editor.cut();
+				return ;
+			}
+			
+			if(actionCmd.equals(LABEL_PASTE))
+			{
+				editor.paste();
+				return ;
+			}
+			
+			return ;
+		}
+		
+	}
+	
+	
+	public void mouseClicked(MouseEvent e)
+	{
+		try
+		{
+	    	switch(e.getButton())
+		    {
+			    case MouseEvent.BUTTON3 : 
+			    			Point point = e.getPoint();
+			    			updateMenus();
+			    			show(e.getComponent(), point.x, point.y);   
+							break;
+		    }
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+    	e.consume();
+	}
+
+
+	public void mouseEntered(MouseEvent e)
+	{
+		/* No action to do. */
+	}
+
+	public void mouseExited(MouseEvent e)
+	{
+		/* No action to do. */
+	}
+
+	public void mousePressed(MouseEvent e)
+	{
+		/* No action to do. */
+	}
+
+	public void mouseReleased(MouseEvent e)
+	{
+		/* No action to do. */
+	}
+}
diff --git a/current/latexDraw/ui/components/Delimitor.java b/current/latexDraw/ui/components/Delimitor.java
new file mode 100644
index 0000000..57cf5e7
--- /dev/null
+++ b/current/latexDraw/ui/components/Delimitor.java
@@ -0,0 +1,339 @@
+package latexDraw.ui.components;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
+
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/**
+ * A delimiter delimits figures in the draw panel.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 06/26/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class Delimitor implements Serializable, Cloneable
+{
+	private static final long serialVersionUID = 1L;
+	
+	public static final int DEFAULT_OPACITY = 130;
+
+	/** The coordinates of the centre of the delimiter */
+	protected LaTeXDrawPoint2D center;
+	
+	/** The thickness of the delimiters */
+	public static final int THICKNESS = 2;
+	
+	/** The dimension of the delimiter */
+	protected double dim  = 8.;
+	
+	/** The opacity of the delimiters. Can be changed. */
+	private static int opacity = DEFAULT_OPACITY;
+	
+	/** A possible colour for the interior of the delimiter */
+	public static final Color INTERIOR  = new Color(153, 153, 204, opacity);	
+	
+	/** A possible colour for the interior of the delimiter */
+	public static final Color INTERIOR_2  = new Color(204, 133, 133, opacity);	
+		
+	/** A possible colour for the interior of the delimiter */
+	public static final Color INTERIOR_3  = new Color(150, 98, 144, opacity);	
+	
+	/** A possible colour for the interior of the delimiter */
+	public static final Color INTERIOR_4  = new Color(60, 160, 115, opacity);	
+
+	private static final BasicStroke STROKE = new BasicStroke(2, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER);
+	
+	
+	/** The colour of the interior of the delimiter */
+	private Color interior;
+
+	
+	/**
+	 * The constructor by default
+	 */
+	public Delimitor()
+	{
+		this(new LaTeXDrawPoint2D());
+	}
+	
+	
+	
+	/**
+	 * The constructor
+	 * @param p The location of the delimiter
+	 */
+	public Delimitor(LaTeXDrawPoint2D p)
+	{
+		center = p==null ? new LaTeXDrawPoint2D() : p;
+		interior = INTERIOR;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to change the centre
+	 * @param c The new centre
+	 */
+	public synchronized  void setCenter(LaTeXDrawPoint2D c)
+	{
+		if(c==null)
+			throw new IllegalArgumentException();
+		
+		center = c;			
+	}
+	
+	
+	
+	/**
+	 * Allows to change to change the colours of the delimiter
+	 */
+	public synchronized void setColorSet1()
+	{
+		interior = new Color(INTERIOR.getRed(), INTERIOR.getGreen(), INTERIOR.getBlue(), opacity);
+	}
+	
+	
+	/**
+	 * Allows to change to change the colours of the delimiter
+	 */
+	public synchronized void setColorSet2()
+	{
+		interior = new Color(INTERIOR_2.getRed(), INTERIOR_2.getGreen(), INTERIOR_2.getBlue(), opacity);
+	}
+	
+	
+	
+	/**
+	 * Allows to change to change the colours of the delimiter
+	 */
+	public synchronized void setColorSet3()
+	{
+		interior = new Color(INTERIOR_3.getRed(), INTERIOR_3.getGreen(), INTERIOR_3.getBlue(), opacity);
+	}
+	
+
+	
+	/**
+	 * Allows to change to change the colours of the delimiter
+	 */
+	public synchronized void setColorSet4()
+	{
+		interior = new Color(INTERIOR_4.getRed(), INTERIOR_4.getGreen(), INTERIOR_4.getBlue(), opacity);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the width of the delimiter
+	 * @param dim Its new width
+	 */
+	public synchronized void setDim(double dim)
+	{
+		if(dim<=0)
+			throw new IllegalArgumentException();
+		
+		this.dim = dim;
+	}
+
+	
+	
+	/**
+	 * Allows to get the X-coordinate of the delimiter
+	 * @return The X-coordinate
+	 */
+	public double getX()
+	{
+		return center.getX();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to access to the centre of the delimiter
+	 * @return The centre of the delimiter
+	 */
+	public synchronized LaTeXDrawPoint2D getCenter()
+	{
+		return center;
+	}
+	
+	
+	
+	/**
+	 * Allows to get the Y-coordinate of the delimiter
+	 * @return The Y-coordinate
+	 */
+	public double getY()
+	{		
+		return center.getY();
+	}
+	
+	
+	
+
+	/**
+	 * This method allows to draw the delimiter.
+	 * @param g The Graphics of the panel where the delimiter must be drawn
+	 */
+	public void draw(Graphics2D g)
+	{
+		double demiDim = dim/2.;
+		
+		if(opacity!=interior.getTransparency())
+			interior = new Color(interior.getRed(), interior.getGreen(),interior.getBlue(), opacity);
+		
+		g.setStroke(STROKE);
+		g.setColor(interior);
+		g.fill(new Rectangle2D.Double(center.x-demiDim, center.y-demiDim, dim, dim));
+	}
+	
+	
+	
+	/**
+	 * Allows the change the coordinate of the delimiter
+	 * @param p The new centre of the delimiter
+	 */	
+	public synchronized void setCoordinates(LaTeXDrawPoint2D p)
+	{
+		if(p==null)
+			throw new IllegalArgumentException();
+		
+		setCoordinates(p.x, p.y);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows the change the coordinate of the delimiter
+	 * @param x The X-coordinate of the new position
+	 * @param y The Y-coordinate of the new position
+	 */
+	public synchronized void setCoordinates(double x, double y) 
+	{
+		center.setLocation(x, y);		
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to know if the point pt is in the delimiter
+	 * @param pt The point which we want to know if it's in the delimiter
+	 * @return true if it is in the delimiter and else false
+	 */
+	public boolean isIn(LaTeXDrawPoint2D pt)
+	{
+		if(pt==null)
+			return false;
+		
+		return pt.x>=center.x-dim/2. && pt.x<=center.x+dim/2. 
+			&& pt.y>=center.y-dim/2. && pt.y<=center.y+dim/2.;
+	}
+	
+	
+
+	
+	/**
+	 * Allows to know if the point pt is in the delimiter
+	 * @param pt The point which we want to know if it's in the delimiter
+	 * @return true if it is in the delimiter and else false
+	 */
+	public boolean isIn(Point pt)
+	{
+		if(pt==null)
+			return false;
+		
+		return isIn(new LaTeXDrawPoint2D(pt.x, pt.y));
+	}
+	
+	
+	
+	@Override
+	public Object clone() throws CloneNotSupportedException
+	{
+		Delimitor d =(Delimitor) super.clone();
+		d.center = (LaTeXDrawPoint2D)center.clone();
+		d.dim = dim;
+		d.interior = interior;
+		
+		return d;
+	}
+	
+	
+	
+	private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
+	{
+		ois.readObject();// The two other colours that are no more used.
+		ois.readObject();
+		interior = (Color) ois.readObject();
+		center = (LaTeXDrawPoint2D) ois.readObject();
+		dim = ois.readDouble();
+	}
+
+
+
+	/**
+	 * @return the dim
+	 */
+	public synchronized double getDim()
+	{
+		return dim;
+	}
+
+
+
+	/**
+	 * @return the opacity.
+	 */
+	public static synchronized int getOpacity()
+	{
+		return opacity;
+	}
+
+
+
+	/**
+	 * @param opacity the opacity to set.
+	 */
+	public static void setOpacity(int opacity)
+	{
+		if(opacity<0 || opacity>255)
+			throw new IllegalArgumentException();
+		
+		Delimitor.opacity = opacity;
+	}
+
+
+
+	/**
+	 * @return the interior.
+	 * @since 2.0.0
+	 */
+	public synchronized Color getInterior()
+	{
+		return interior;
+	}
+}
diff --git a/current/latexDraw/ui/components/DisplayCanvas.java b/current/latexDraw/ui/components/DisplayCanvas.java
new file mode 100644
index 0000000..a93594b
--- /dev/null
+++ b/current/latexDraw/ui/components/DisplayCanvas.java
@@ -0,0 +1,55 @@
+package latexDraw.ui.components;
+
+import java.awt.Canvas;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Image;
+
+
+/**
+ * Allows to display a given image in a panel(canvas).<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class DisplayCanvas extends Canvas
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** The image to display */
+	protected transient Image image;
+	
+	
+	/**
+	 * The constructor by default
+	 * @param i The image to display
+	 */
+	public DisplayCanvas(Image i)
+	{
+		image = i;
+		prepareImage(image, this);
+		setPreferredSize(new Dimension(image.getWidth(this), image.getHeight(this)));
+	}
+	
+	
+	
+	@Override
+	public void paint(Graphics g)
+	{
+		if(image!=null)
+			g.drawImage(image, 0, 0, this);
+	}
+}
diff --git a/current/latexDraw/ui/components/LMenuBar.java b/current/latexDraw/ui/components/LMenuBar.java
new file mode 100644
index 0000000..e09599a
--- /dev/null
+++ b/current/latexDraw/ui/components/LMenuBar.java
@@ -0,0 +1,1214 @@
+/*
+ * LMenuBar.java
+ */
+package latexDraw.ui.components;
+
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.util.Vector;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JRadioButtonMenuItem;
+import javax.swing.KeyStroke;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.CodePanel;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+import latexDraw.ui.listeners.MenusListener;
+import latexDraw.ui.listeners.RecentFilesListener;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * Defines the latexdraw menu bar..<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/22/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class LMenuBar extends JMenuBar
+{
+	private static final long	serialVersionUID	= 1L;
+	
+	/** The menu which allows to import templates */
+	protected MenuTemplate menuTemplate;
+	
+	/** Allows to cut a figure */
+	protected JMenuItem cutMenu;
+	
+	/** Allows to paste a figure */
+	protected JMenuItem pasteMenu;
+	
+	/** Allows to copy a figure */
+	protected JMenuItem copyMenu;
+	
+	/** This menu allows to export the drawing as a template */
+	protected JMenuItem exportTemplateMenu;
+	
+	/** Allows to undo actions */
+	protected JMenuItem undoMenu;
+	
+	/** Allows to redo actions */
+	protected JMenuItem redoMenu;
+	
+    /** This menu allows the user to export either the pstricks code or the drawing as jpg picture */
+	protected JMenu exportAsMenu;
+	
+	protected JMenu recentFilesMenu;
+	
+	/** The menu "drawing" */
+	protected JMenu drawMenu;
+	
+	/** This menu allows the user to set his preferences */
+	protected JMenuItem preferencesMenu;
+	
+	/** This menu allows the set the properties of the selected figure */
+	protected JMenuItem propertiesFigureMenu;
+        
+    /** This menu allows the user to delete a figure in the drawing. */
+	protected JMenuItem deleteFigure;
+    
+    /** This menu allows the user to see or not the borders of the drawing */
+    protected JCheckBoxMenuItem displayBorders;
+    
+    /** This menu allows the user to see or not the X-scale */
+    protected JCheckBoxMenuItem displayXScale;
+    
+    /** This menu allows the user to see or not the Y-scale */
+    protected JCheckBoxMenuItem displayYScale;
+    
+    /** This menu allows the user to see or not the grids */
+    protected JCheckBoxMenuItem displayGrid;
+    
+    protected JCheckBoxMenuItem displayPersoGrid;
+    
+    /** This menu allows the user to set visible or not the code panel */
+    protected JCheckBoxMenuItem displayCodePanel;
+    
+    /** This menu allows to activate the automatic adjustment of the borders of the drawing */
+    protected JCheckBoxMenuItem autoAdjustBorders;
+    
+	/** The button of the menubar to draw polygons */
+    protected JRadioButtonMenuItem menuPoly;
+	
+	/** The button of the menubar to draw lines */
+    protected JRadioButtonMenuItem menuLine;
+	
+	/** The button of the menubar to draw rectangles */
+    protected JRadioButtonMenuItem menuRect;
+	
+	/** The button of the menubar to draw squares */
+    protected JRadioButtonMenuItem menuSquare;
+	
+	/** The button of the menubar to draw dots */
+    protected JRadioButtonMenuItem menuDot;
+	
+	/** The button of the menubar to draw rhombus */
+    protected JRadioButtonMenuItem menuRhombus;
+	
+	/** The button of the menubar to draw triangles */
+    protected JRadioButtonMenuItem menuTriangle;
+	
+	/** The button of the menubar to draw joined lines */
+    protected JRadioButtonMenuItem menuJoinedLines;
+	
+	/** The button of the menubar to draw circles */
+    protected JRadioButtonMenuItem menuCircle;
+	
+    protected JRadioButtonMenuItem menuAxes;
+	
+	/** The button of the menubar to draw chords */
+    protected JRadioButtonMenuItem menuChord;
+	
+	/** The button of the menubar to draw ellipses */
+    protected JRadioButtonMenuItem menuEllipse;
+	
+	/** The button of the menubar to draw Bézier curves */
+    protected JRadioButtonMenuItem menuBezierCurve;
+	
+    protected JRadioButtonMenuItem menuClosedBezierCurve;
+	
+	/** The button of the menubar to select figures */
+    protected JRadioButtonMenuItem menuSelect;
+	
+	/** The button of the menubar to draw arcs */
+    protected JRadioButtonMenuItem menuArc;
+	
+	/** The button of the menubar to draw wedges */
+    protected JRadioButtonMenuItem menuWedge;
+	
+	/** The button of the menubar to draw texts */
+    protected JRadioButtonMenuItem menuText;
+	
+	/** The button of the menubar to draw akin points */
+    protected JRadioButtonMenuItem menuPointsAkin;
+	
+	/** The button of the menubar to draw grids */
+    protected JRadioButtonMenuItem menuGrid;
+	protected JCheckBoxMenuItem menuAutoUpdate;
+	protected JMenuItem menuReloadCode;
+	protected JMenuItem updateToGridMenu;
+	
+	protected LaTeXDrawFrame parentFrame;
+	
+	
+	public LMenuBar(LaTeXDrawFrame p)
+	{
+		super();
+		
+		if(p==null)
+			throw new IllegalArgumentException();
+		
+		parentFrame = p;
+		
+		MenusListener ml = parentFrame.getMenuListener();
+		ButtonGroup drawMenuGroup = new ButtonGroup();
+
+		JMenu fileMenu = new JMenu(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.88")); //$NON-NLS-1$
+		JMenu editMenu = new JMenu(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.89")); //$NON-NLS-1$
+		JMenu displayM = new JMenu(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.90")); //$NON-NLS-1$
+		drawMenu = new JMenu(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.91")); //$NON-NLS-1$
+		JMenu insertMenu = new JMenu(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.10")); //$NON-NLS-1$
+		JMenu codeMenu = new JMenu(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.92")); //$NON-NLS-1$
+		JMenu helpMenu = new JMenu(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.93")); //$NON-NLS-1$
+		JMenuItem menu;
+		
+		undoMenu = new JMenuItem(LaTeXDrawResources.LABEL_UNDO, KeyEvent.VK_Z);
+		undoMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z,InputEvent.CTRL_MASK));
+		undoMenu.setIcon(LaTeXDrawResources.undoIcon);
+		undoMenu.addActionListener(ml); 
+		undoMenu.setActionCommand(LaTeXDrawResources.LABEL_UNDO);
+		editMenu.add(undoMenu); 
+		
+		redoMenu = new JMenuItem(LaTeXDrawResources.LABEL_REDO, KeyEvent.VK_Y);
+		redoMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y,InputEvent.CTRL_MASK));
+		redoMenu.setIcon(LaTeXDrawResources.redoIcon);
+		redoMenu.addActionListener(ml); 
+		redoMenu.setActionCommand(LaTeXDrawResources.LABEL_REDO);
+		editMenu.add(redoMenu); 
+		
+		editMenu.addSeparator();
+		
+		copyMenu = new JMenuItem(LaTeXDrawResources.LABEL_COPY, KeyEvent.VK_C);
+		copyMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C,InputEvent.CTRL_MASK));
+		copyMenu.setIcon(LaTeXDrawResources.copyIcon);
+		copyMenu.addActionListener(ml); 
+		copyMenu.setActionCommand(LaTeXDrawResources.LABEL_COPY);
+		editMenu.add(copyMenu); 
+		copyMenu.setEnabled(false);
+		
+		cutMenu = new JMenuItem(LaTeXDrawResources.LABEL_CUT, KeyEvent.VK_X);
+		cutMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X,InputEvent.CTRL_MASK));
+		cutMenu.setIcon(LaTeXDrawResources.cutIcon);
+		cutMenu.addActionListener(ml); 
+		cutMenu.setActionCommand(LaTeXDrawResources.LABEL_CUT);
+		editMenu.add(cutMenu); 
+		cutMenu.setEnabled(false);
+		
+		pasteMenu = new JMenuItem(LaTeXDrawResources.LABEL_PASTE, KeyEvent.VK_V);
+		pasteMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V,InputEvent.CTRL_MASK));
+		pasteMenu.setIcon(LaTeXDrawResources.pasteIcon);
+		pasteMenu.addActionListener(ml); 
+		pasteMenu.setActionCommand(LaTeXDrawResources.LABEL_PASTE);
+		editMenu.add(pasteMenu); 
+		pasteMenu.setEnabled(false);
+		
+		menu = new JMenuItem(LaTeXDrawResources.LABEL_NEW, KeyEvent.VK_N);
+		menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,InputEvent.CTRL_MASK));
+		menu.setIcon(LaTeXDrawResources.newIcon);
+		menu.addActionListener(ml); 
+		menu.setActionCommand(LaTeXDrawResources.LABEL_NEW);
+		fileMenu.add(menu);
+		
+		menu = new JMenuItem(LaTeXDrawResources.LABEL_NEW_WITH_SEL);
+		menu.setIcon(LaTeXDrawResources.newIcon);
+		menu.addActionListener(ml); 
+		menu.setActionCommand(LaTeXDrawResources.LABEL_NEW_WITH_SEL);
+		fileMenu.add(menu);
+
+		menu = new JMenuItem(LaTeXDrawResources.LABEL_OPEN, KeyEvent.VK_O);
+		menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,InputEvent.CTRL_MASK));
+		menu.setIcon(LaTeXDrawResources.openIcon);
+		menu.addActionListener(ml); 
+		menu.setActionCommand(LaTeXDrawResources.LABEL_OPEN);
+        fileMenu.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_SAVE, KeyEvent.VK_S);
+        menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,InputEvent.CTRL_MASK));
+        menu.setIcon(LaTeXDrawResources.saveIcon);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_SAVE);
+        fileMenu.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_SAVE_AS, KeyEvent.VK_A);
+        menu.setIcon(LaTeXDrawResources.saveAsIcon);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_SAVE_AS);
+        fileMenu.add(menu);
+        
+        recentFilesMenu = new JMenu(LaTeXDrawResources.LABEL_RECENT_FILES);
+        recentFilesMenu.setIcon(LaTeXDrawResources.emptyIcon);
+        recentFilesMenu.setActionCommand(LaTeXDrawResources.LABEL_RECENT_FILES);
+        fileMenu.add(recentFilesMenu);
+        
+        fileMenu.addSeparator();
+        
+        JMenu importM = new JMenu(LaTeXDrawResources.LABEL_IMPORT);
+        importM.setIcon(LaTeXDrawResources.importIcon);
+        fileMenu.add(importM);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_IMPORT_TEX, KeyEvent.VK_X);
+        menu.setIcon(LaTeXDrawResources.insertPSTricksIcon);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_IMPORT_TEX);
+        importM.add(menu);
+        
+        exportAsMenu = new JMenu(LaTeXDrawResources.LABEL_EXPORT_AS);
+        exportAsMenu.setIcon(LaTeXDrawResources.exportIcon);
+        fileMenu.add(exportAsMenu);
+        exportAsMenu.setEnabled(false);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_EXPORT_TRICKS, KeyEvent.VK_T);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_EXPORT_TRICKS);
+        exportAsMenu.add(menu);
+       
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_EXPORT_JPG, KeyEvent.VK_J);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_EXPORT_JPG);
+        exportAsMenu.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_EXPORT_PNG, KeyEvent.VK_P);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_EXPORT_PNG);
+        exportAsMenu.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_EXPORT_EPS, KeyEvent.VK_E);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_EXPORT_EPS);
+        exportAsMenu.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_EXPORT_BMP, KeyEvent.VK_B);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_EXPORT_BMP);
+        exportAsMenu.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_EXPORT_PPM, KeyEvent.VK_N);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_EXPORT_PPM);
+        exportAsMenu.add(menu);
+        
+        menu = new JMenuItem("eps (latex) picture", KeyEvent.VK_S);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_EXPORT_EPS_LATEX);
+        exportAsMenu.add(menu);
+        
+        menu = new JMenuItem("pdf (latex) picture", KeyEvent.VK_F);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_EXPORT_PDF_LATEX);
+        exportAsMenu.add(menu);
+        
+        exportTemplateMenu = new JMenuItem(LaTeXDrawResources.LABEL_TEMPLATE_EXPORT);
+        exportTemplateMenu.addActionListener(ml); 
+        exportTemplateMenu.setActionCommand(LaTeXDrawResources.LABEL_TEMPLATE_EXPORT);
+        exportAsMenu.add(exportTemplateMenu);
+        exportTemplateMenu.setEnabled(false);
+           
+        fileMenu.addSeparator();
+     
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_BATCH_CONVERT, KeyEvent.VK_V);
+        menu.addActionListener(ml); 
+        menu.setIcon(LaTeXDrawResources.copyIcon);
+        menu.setActionCommand(LaTeXDrawResources.LABEL_BATCH_CONVERT);
+        fileMenu.add(menu);
+        
+        fileMenu.addSeparator();
+        
+        preferencesMenu = new JMenuItem(LaTeXDrawResources.LABEL_PREFERENCES, KeyEvent.VK_P);
+        preferencesMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P,InputEvent.CTRL_MASK));
+        preferencesMenu.setIcon(LaTeXDrawResources.preferencesIcon);
+        preferencesMenu.addActionListener(parentFrame); 
+        preferencesMenu.setActionCommand(LaTeXDrawResources.LABEL_PREFERENCES);
+        fileMenu.add(preferencesMenu);
+        
+        fileMenu.addSeparator();
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_PRINT_CODE, KeyEvent.VK_E);
+        menu.setIcon(LaTeXDrawResources.printIcon);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_PRINT_CODE);
+        fileMenu.add(menu);
+         
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_PRINT_DRAW, KeyEvent.VK_D);
+        menu.setIcon(LaTeXDrawResources.printIcon);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_PRINT_DRAW);
+        fileMenu.add(menu);
+        
+        fileMenu.addSeparator();
+         
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_QUIT, KeyEvent.VK_Q);
+        menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W,InputEvent.CTRL_MASK));
+        menu.setIcon(LaTeXDrawResources.emptyIcon);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_QUIT);
+        fileMenu.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_HELP, KeyEvent.VK_H);
+        menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0));
+        menu.setIcon(LaTeXDrawResources.helpIcon);
+        menu.addActionListener(parentFrame); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_HELP);
+        helpMenu.add(menu); 
+        
+        menu = new JMenuItem(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.3"), KeyEvent.VK_S); //$NON-NLS-1$
+        menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0));
+        menu.setIcon(LaTeXDrawResources.helpIcon);
+        menu.addActionListener(ml); 
+        menu.setActionCommand(MenusListener.ACTION_CMD_SHORTCUTS);
+        helpMenu.add(menu);   
+     
+     	helpMenu.addSeparator();
+     	
+     	if(LaTeXDrawFrame.WITH_UPDATE)
+     	{
+	        menu = new JMenuItem(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.4"), KeyEvent.VK_U); //$NON-NLS-1$
+	        menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0));
+	        menu.setIcon(LaTeXDrawResources.updateIcon);
+	        menu.addActionListener(ml);
+	        menu.setActionCommand(MenusListener.LABEL_CHECK_UPDATE);
+	        helpMenu.add(menu);   
+	     
+	     	helpMenu.addSeparator();
+     	}
+     
+     	menu = new JMenuItem(LaTeXDrawResources.LABEL_ABOUT, KeyEvent.VK_A);
+     	menu.setIcon(LaTeXDrawResources.aboutIcon);
+        menu.addActionListener(parentFrame); 
+        menu.setActionCommand(LaTeXDrawResources.LABEL_ABOUT);
+        helpMenu.add(menu);    
+              
+        drawMenu.add(createTemplateMenu());        
+        drawMenu.addSeparator();
+        
+        menu = new JMenu(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.5")); //$NON-NLS-1$
+        menu.setIcon(LaTeXDrawResources.emptyIcon);
+        drawMenu.add(menu);
+        
+        menuLine = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_LINE, LaTeXDrawResources.lineIcon);
+        menuLine.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_L, 0));
+        menuLine.setMnemonic(KeyEvent.VK_L);
+        menuLine.addActionListener(ml);
+        menuLine.setActionCommand(LaTeXDrawResources.LABEL_LINE);
+        menu.add(menuLine);
+        drawMenuGroup.add(menuLine);
+        
+        menuJoinedLines = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_JOINED_LINES, LaTeXDrawResources.joinedLinesIcon);
+        menuJoinedLines.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_J,0));
+        menuJoinedLines.setMnemonic(KeyEvent.VK_J);
+        menuJoinedLines.addActionListener(ml);
+        menuJoinedLines.setActionCommand(LaTeXDrawResources.LABEL_JOINED_LINES);
+        menu.add(menuJoinedLines);
+        drawMenuGroup.add(menuJoinedLines);
+           
+        menuPoly = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_POLY, LaTeXDrawResources.polygonIcon);
+        menuPoly.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P,0));
+        menuPoly.setMnemonic(KeyEvent.VK_P);
+        menuPoly.addActionListener(ml);
+        menuPoly.setActionCommand(LaTeXDrawResources.LABEL_POLY);
+        menu.add(menuPoly);
+        drawMenuGroup.add(menuPoly);
+        menuPoly.setSelected(false);
+        
+        menuDot = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_DOT, LaTeXDrawResources.dotIcon);
+        menuDot.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D,0));
+        menuDot.setMnemonic(KeyEvent.VK_D);
+        menuDot.addActionListener(ml);
+        menuDot.setActionCommand(LaTeXDrawResources.LABEL_DOT);
+        menu.add(menuDot);
+        drawMenuGroup.add(menuDot);
+        menuDot.setSelected(false);
+        
+        menuRect = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_RECT, LaTeXDrawResources.rectIcon);
+        menuRect.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R,0));
+        menuRect.setMnemonic(KeyEvent.VK_R);
+        menuRect.addActionListener(ml);
+        menuRect.setActionCommand(LaTeXDrawResources.LABEL_RECT);
+        menu.add(menuRect);
+        drawMenuGroup.add(menuRect);
+        menuRect.setSelected(false);
+        
+        menuSquare = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_SQUARE, LaTeXDrawResources.squareIcon);
+        menuSquare.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,0));
+        menuSquare.setMnemonic(KeyEvent.VK_S);
+        menuSquare.addActionListener(ml);
+        menuSquare.setActionCommand(LaTeXDrawResources.LABEL_SQUARE);
+        menu.add(menuSquare);
+        drawMenuGroup.add(menuSquare);
+        menuSquare.setSelected(false);
+        
+        menuRhombus = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_RHOMBUS, LaTeXDrawResources.rhombusIcon);
+        menuRhombus.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,0));
+        menuRhombus.setMnemonic(KeyEvent.VK_H);
+        menuRhombus.addActionListener(ml);
+        menuRhombus.setActionCommand(LaTeXDrawResources.LABEL_RHOMBUS);
+        menu.add(menuRhombus);
+        drawMenuGroup.add(menuRhombus);
+        menuRhombus.setSelected(false);
+        
+        menuTriangle = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_TRIANGLE, LaTeXDrawResources.triangleIcon);
+        menuTriangle.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T,0));
+        menuTriangle.setMnemonic(KeyEvent.VK_T);
+        menuTriangle.addActionListener(ml);
+        menuTriangle.setActionCommand(LaTeXDrawResources.LABEL_TRIANGLE);
+        menu.add(menuTriangle);
+        drawMenuGroup.add(menuTriangle);
+        menuTriangle.setSelected(false);
+
+        menuEllipse = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_ELLIPSE, LaTeXDrawResources.ellipseIcon);
+        menuEllipse.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E,0));
+        menuEllipse.setMnemonic(KeyEvent.VK_E);
+        menuEllipse.addActionListener(ml);
+        menuEllipse.setActionCommand(LaTeXDrawResources.LABEL_ELLIPSE);
+        menu.add(menuEllipse);
+        drawMenuGroup.add(menuEllipse);
+        menuEllipse.setSelected(false);
+        
+        menuCircle = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_CIRCLE, LaTeXDrawResources.circleIcon);
+        menuCircle.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C,0));
+        menuCircle.setMnemonic(KeyEvent.VK_C);
+        menuCircle.addActionListener(ml);
+        menuCircle.setActionCommand(LaTeXDrawResources.LABEL_CIRCLE);
+        menu.add(menuCircle);
+        drawMenuGroup.add(menuCircle);
+        menuCircle.setSelected(false);
+        
+        menuArc = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_ARC, LaTeXDrawResources.arcIcon);
+        menuArc.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,0));
+        menuArc.setMnemonic(KeyEvent.VK_A);
+        menuArc.addActionListener(ml);
+        menuArc.setActionCommand(LaTeXDrawResources.LABEL_ARC);
+        menu.add(menuArc);
+        drawMenuGroup.add(menuArc);
+        menuArc.setSelected(false);
+        
+        menuWedge = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_WEDGE, LaTeXDrawResources.wedgeIcon);
+        menuWedge.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W,0));
+        menuWedge.setMnemonic(KeyEvent.VK_W);
+        menuWedge.addActionListener(ml);
+        menuWedge.setActionCommand(LaTeXDrawResources.LABEL_WEDGE);
+        menu.add(menuWedge);
+        drawMenuGroup.add(menuWedge);
+        menuWedge.setSelected(false);
+        
+        menuChord = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_CHORD, LaTeXDrawResources.chordIcon);
+        menuChord.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,0));
+        menuChord.setMnemonic(KeyEvent.VK_O);
+        menuChord.addActionListener(ml);
+        menuChord.setActionCommand(LaTeXDrawResources.LABEL_CHORD);
+        menu.add(menuChord);
+        drawMenuGroup.add(menuChord);
+        menuChord.setSelected(false);
+        
+        menuBezierCurve = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_BEZIER_CURVE, LaTeXDrawResources.bezierCurveIcon);
+        menuBezierCurve.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B,0));
+        menuBezierCurve.setMnemonic(KeyEvent.VK_B);
+        menuBezierCurve.addActionListener(ml);
+        menuBezierCurve.setActionCommand(LaTeXDrawResources.LABEL_BEZIER_CURVE);
+        menu.add(menuBezierCurve);
+        drawMenuGroup.add(menuBezierCurve);
+        menuBezierCurve.setSelected(false);
+        
+        menuClosedBezierCurve = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE, LaTeXDrawResources.closedBezierIcon);
+        menuClosedBezierCurve.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V,0));
+        menuClosedBezierCurve.setMnemonic(KeyEvent.VK_B);
+        menuClosedBezierCurve.addActionListener(ml);
+        menuClosedBezierCurve.setActionCommand(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE);
+        menu.add(menuClosedBezierCurve);
+        drawMenuGroup.add(menuClosedBezierCurve);
+        menuClosedBezierCurve.setSelected(false);
+        
+        menuGrid = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_GRID, LaTeXDrawResources.gridIcon);
+        menuGrid.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_G,0));
+        menuGrid.setMnemonic(KeyEvent.VK_G);
+        menuGrid.addActionListener(ml);
+        menuGrid.setActionCommand(LaTeXDrawResources.LABEL_GRID);
+        menu.add(menuGrid);
+        drawMenuGroup.add(menuGrid);
+        menuGrid.setSelected(false);
+        
+        menuAxes = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_AXES, LaTeXDrawResources.axesIcon);
+        menuAxes.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z,0));
+        menuAxes.setMnemonic(KeyEvent.VK_Z);
+        menuAxes.addActionListener(ml);
+        menuAxes.setActionCommand(LaTeXDrawResources.LABEL_AXES);
+        menu.add(menuAxes);
+        drawMenuGroup.add(menuAxes);
+        menuAxes.setSelected(false);
+        
+        menuPointsAkin = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_POINTS_AKIN, LaTeXDrawResources.pointsAkinIcon);
+        menuPointsAkin.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_K,0));
+        menuPointsAkin.setMnemonic(KeyEvent.VK_K);
+        menuPointsAkin.addActionListener(ml);
+        menuPointsAkin.setActionCommand(LaTeXDrawResources.LABEL_POINTS_AKIN);
+        menu.add(menuPointsAkin);
+        drawMenuGroup.add(menuPointsAkin);
+        menuPointsAkin.setSelected(false);
+               
+        menuText = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_TEXT, LaTeXDrawResources.textIcon);
+        menuText.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X,0));
+        menuText.setMnemonic(KeyEvent.VK_X);
+        menuText.addActionListener(ml);
+        menuText.setActionCommand(LaTeXDrawResources.LABEL_TEXT);
+        menu.add(menuText);
+        drawMenuGroup.add(menuText);
+        menuText.setSelected(false);
+        
+        menuSelect = new JRadioButtonMenuItem(LaTeXDrawResources.LABEL_SELECT_FIGURE, LaTeXDrawResources.selectIcon);
+        menuSelect.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F,0));
+        menuSelect.addActionListener(ml);
+        menuSelect.setActionCommand(LaTeXDrawResources.LABEL_SELECT_FIGURE);
+        drawMenu.add(menuSelect);
+        drawMenuGroup.add(menuSelect);
+        menuSelect.setSelected(true);
+        
+        deleteFigure = new JMenuItem(LaTeXDrawResources.LABEL_DELETE, LaTeXDrawResources.delIcon);
+        deleteFigure.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0));
+        deleteFigure.addActionListener(ml);
+        deleteFigure.setActionCommand(LaTeXDrawResources.LABEL_DELETE);
+        deleteFigure.setEnabled(false);
+        drawMenu.add(deleteFigure);
+        
+        updateToGridMenu = new JMenuItem(DrawPanel.LABEL_UPDATE_TO_GRID, LaTeXDrawResources.emptyIcon);
+        updateToGridMenu.setActionCommand(DrawPanel.ACTION_CMD_UPDATETOGRID);
+        updateToGridMenu.addActionListener(ml);
+        drawMenu.add(updateToGridMenu);
+        
+        menu = new JMenuItem(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.6"), LaTeXDrawResources.emptyIcon); //$NON-NLS-1$
+        menu.setToolTipText(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.7")); //$NON-NLS-1$
+		menu.setActionCommand(MenusListener.ACTION_VISIBLE_ALL_FIGURES);
+		menu.addActionListener(ml);
+		drawMenu.add(menu);
+        drawMenu.addSeparator();
+        
+        propertiesFigureMenu = new JMenuItem(LaTeXDrawResources.LABEL_FIGURE_PROPERTIES, LaTeXDrawResources.propertiesIcon);
+        propertiesFigureMenu.addActionListener(ml);
+        propertiesFigureMenu.setActionCommand(LaTeXDrawResources.LABEL_FIGURE_PROPERTIES);
+        propertiesFigureMenu.setEnabled(false);
+        drawMenu.add(propertiesFigureMenu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_DRAW_PROPERTIES, LaTeXDrawResources.drawingPropIcon);
+        menu.addActionListener(parentFrame);
+        menu.setActionCommand(LaTeXDrawResources.LABEL_DRAW_PROPERTIES);
+        drawMenu.add(menu);
+        
+        drawMenu.addSeparator();
+        
+        displayBorders = new JCheckBoxMenuItem(LaTeXDrawResources.LABEL_DISPLAY_BORDERS, LaTeXDrawResources.bordersIcon);
+        displayBorders.addActionListener(ml);
+        displayBorders.setActionCommand(LaTeXDrawResources.LABEL_DISPLAY_BORDERS);
+        displayBorders.setSelected(false);
+        drawMenu.add(displayBorders);
+        
+        autoAdjustBorders = new JCheckBoxMenuItem(LaTeXDrawResources.LABEL_AUTO_ADJUST_BORDERS, LaTeXDrawResources.autoBordersIcon);
+        autoAdjustBorders.addActionListener(ml);
+        autoAdjustBorders.setActionCommand(LaTeXDrawResources.LABEL_AUTO_ADJUST_BORDERS);
+        autoAdjustBorders.setSelected(true);
+        drawMenu.add(autoAdjustBorders);
+        
+        
+        displayXScale = new JCheckBoxMenuItem(LaTeXDrawResources.LABEL_DISPLAY_XSCALE, LaTeXDrawResources.emptyIcon);
+        displayXScale.addActionListener(ml);
+        displayXScale.setActionCommand(LaTeXDrawResources.LABEL_DISPLAY_XSCALE);
+        displayXScale.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_XSCALE);
+        displayM.add(displayXScale);
+        
+        displayYScale = new JCheckBoxMenuItem(LaTeXDrawResources.LABEL_DISPLAY_YSCALE, LaTeXDrawResources.emptyIcon);
+        displayYScale.addActionListener(ml);
+        displayYScale.setActionCommand(LaTeXDrawResources.LABEL_DISPLAY_YSCALE);
+        displayYScale.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_YSCALE);
+        displayM.add(displayYScale);
+        
+        JMenu menuGrill = new JMenu(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.grid"));  //$NON-NLS-1$
+        menuGrill.setIcon(LaTeXDrawResources.displayGridIcon);
+        
+        displayGrid = new JCheckBoxMenuItem(LaTeXDrawResources.LABEL_DISPLAY_GRID, LaTeXDrawResources.emptyIcon);
+        displayGrid.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.10")); //$NON-NLS-1$
+        displayGrid.addActionListener(parentFrame);
+        displayGrid.setActionCommand(LaTeXDrawResources.LABEL_DISPLAY_GRID);
+        displayGrid.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_GRID && MagneticGrid.DEFAULT_TYPE!=MagneticGrid.TYPE_PERSONAL);
+        menuGrill.add(displayGrid);
+        displayM.add(menuGrill);
+        
+        displayPersoGrid = new JCheckBoxMenuItem(LaTeXDrawResources.LABEL_DISPLAY_PERSO_GRID, LaTeXDrawResources.emptyIcon);
+        displayPersoGrid.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.11")); //$NON-NLS-1$
+        displayPersoGrid.addActionListener(parentFrame);
+        displayPersoGrid.setActionCommand(LaTeXDrawResources.LABEL_DISPLAY_PERSO_GRID);
+        displayPersoGrid.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_GRID && MagneticGrid.DEFAULT_TYPE==MagneticGrid.TYPE_PERSONAL);
+        menuGrill.add(displayPersoGrid);
+        
+        displayCodePanel = new JCheckBoxMenuItem(LaTeXDrawResources.LABEL_DISPLAY_CODE_PANEL, LaTeXDrawResources.emptyIcon);
+        displayCodePanel.addActionListener(parentFrame);
+        displayCodePanel.setActionCommand(LaTeXDrawResources.LABEL_DISPLAY_CODE_PANEL);
+        displayCodePanel.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_CODEPANEL);
+        displayCodePanel.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E,InputEvent.CTRL_MASK));
+        displayM.add(displayCodePanel);
+        
+        displayM.addSeparator();
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_ZOOM_IN, LaTeXDrawResources.zoomInIcon);
+        menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_ADD,0));
+        menu.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.94")); //$NON-NLS-1$
+        menu.addActionListener(ml);
+        menu.setActionCommand(LaTeXDrawResources.LABEL_ZOOM_IN);
+        displayM.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_ZOOM_OUT, LaTeXDrawResources.zoomOutIcon);
+        menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT,0));
+        menu.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.95")); //$NON-NLS-1$
+        menu.addActionListener(ml);
+        menu.setActionCommand(LaTeXDrawResources.LABEL_ZOOM_OUT);
+        displayM.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_ZOOM_DEFAULT, LaTeXDrawResources.zoomDefaultIcon);
+        menu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F9,0));
+        menu.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.96")); //$NON-NLS-1$
+        menu.addActionListener(ml);
+        menu.setActionCommand(LaTeXDrawResources.LABEL_ZOOM_DEFAULT);
+        displayM.add(menu);
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_INSERT_CODE, LaTeXDrawResources.insertPSTricksIcon);
+        menu.setToolTipText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.11"));  //$NON-NLS-1$
+        menu.addActionListener(parentFrame);
+        menu.setActionCommand(LaTeXDrawResources.LABEL_INSERT_CODE);
+        insertMenu.add(menu); 
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_INSERT_PIX, LaTeXDrawResources.insertPicIcon);
+        menu.setToolTipText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.1"));  //$NON-NLS-1$
+        menu.addActionListener(ml);
+        menu.setActionCommand(LaTeXDrawResources.LABEL_INSERT_PIX);
+        insertMenu.add(menu); 
+        
+        menu = new JMenuItem(LaTeXDrawResources.LABEL_COMMENTS, LaTeXDrawResources.commentIcon); 
+        menu.addActionListener(parentFrame);
+        menu.setActionCommand(LaTeXDrawResources.LABEL_COMMENTS);
+        codeMenu.add(menu);
+        
+        codeMenu.addSeparator();
+        
+        menu = new JMenuItem(CodePanel.LABEL_COPY_ALL, LaTeXDrawResources.copyIcon);
+        menu.addActionListener(parentFrame.getCodePanel());
+        menu.setActionCommand(CodePanel.LABEL_COPY_ALL);
+        codeMenu.add(menu);
+        
+        codeMenu.addSeparator();
+        
+        menuAutoUpdate = new JCheckBoxMenuItem(CodePanel.LABEL_AUTO_UPDATE, LaTeXDrawResources.emptyIcon);
+        menuAutoUpdate.addActionListener(parentFrame.getCodePanel());
+        menuAutoUpdate.setToolTipText(LaTeXDrawLang.getOthersString("CodePanel.tip")); //$NON-NLS-1$
+        menuAutoUpdate.setActionCommand(CodePanel.LABEL_AUTO_UPDATE);
+        menuAutoUpdate.setSelected(CodePanel.DEFAULT_AUTO_UPDATE);
+        codeMenu.add(menuAutoUpdate);
+        
+        menuReloadCode = new JMenuItem(CodePanel.LABEL_RELOAD, LaTeXDrawResources.reloadIcon);
+        menuReloadCode.addActionListener(parentFrame.getCodePanel());
+        menuReloadCode.setToolTipText(LaTeXDrawLang.getOthersString("CodePanel.updateCode")); //$NON-NLS-1$
+        menuReloadCode.setActionCommand(CodePanel.LABEL_RELOAD);
+        menuReloadCode.setSelected(!CodePanel.DEFAULT_AUTO_UPDATE);
+        codeMenu.add(menuReloadCode);
+        
+        add(fileMenu);
+        add(editMenu);
+        add(displayM);
+        add(drawMenu);
+        add(insertMenu);
+        add(codeMenu);
+        add(helpMenu);  
+	}
+
+	
+	
+    /**
+     * Allows to create the menu "template".
+     * @return The menu template.
+     */
+    private JMenu createTemplateMenu()
+    {
+		try
+		{
+	        menuTemplate = new MenuTemplate(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.103"), parentFrame); //$NON-NLS-1$
+	        menuTemplate.setIcon(LaTeXDrawResources.emptyIcon);
+	        
+		}catch(Exception e)
+		{
+			parentFrame.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.105")); //$NON-NLS-1$
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+    	return menuTemplate;
+    }
+
+	/**
+	 * @return the menuTemplate.
+	 * @since 2.0.0
+	 */
+	public MenuTemplate getMenuTemplate()
+	{
+		return menuTemplate;
+	}
+
+	/**
+	 * @return the cutMenu.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getCutMenu()
+	{
+		return cutMenu;
+	}
+
+	/**
+	 * @return the pasteMenu.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getPasteMenu()
+	{
+		return pasteMenu;
+	}
+
+	/**
+	 * @return the copyMenu.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getCopyMenu()
+	{
+		return copyMenu;
+	}
+
+	/**
+	 * @return the exportTemplateMenu.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getExportTemplateMenu()
+	{
+		return exportTemplateMenu;
+	}
+
+	/**
+	 * @return the undoMenu.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getUndoMenu()
+	{
+		return undoMenu;
+	}
+
+	/**
+	 * @return the redoMenu.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getRedoMenu()
+	{
+		return redoMenu;
+	}
+
+	/**
+	 * @return the exportAsMenu.
+	 * @since 2.0.0
+	 */
+	public JMenu getExportAsMenu()
+	{
+		return exportAsMenu;
+	}
+
+	/**
+	 * @return the recentFilesMenu.
+	 * @since 2.0.0
+	 */
+	public JMenu getRecentFilesMenu()
+	{
+		return recentFilesMenu;
+	}
+
+	/**
+	 * @return the drawMenu.
+	 * @since 2.0.0
+	 */
+	public JMenu getDrawMenu()
+	{
+		return drawMenu;
+	}
+
+	/**
+	 * @return the preferencesMenu.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getPreferencesMenu()
+	{
+		return preferencesMenu;
+	}
+
+	/**
+	 * @return the propertiesFigureMenu.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getPropertiesFigureMenu()
+	{
+		return propertiesFigureMenu;
+	}
+
+	/**
+	 * @return the deleteFigure.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getDeleteFigure()
+	{
+		return deleteFigure;
+	}
+
+	/**
+	 * @return the displayBorders.
+	 * @since 2.0.0
+	 */
+	public JCheckBoxMenuItem getDisplayBorders()
+	{
+		return displayBorders;
+	}
+
+	/**
+	 * @return the displayXScale.
+	 * @since 2.0.0
+	 */
+	public JCheckBoxMenuItem getDisplayXScale()
+	{
+		return displayXScale;
+	}
+
+	/**
+	 * @return the displayYScale.
+	 * @since 2.0.0
+	 */
+	public JCheckBoxMenuItem getDisplayYScale()
+	{
+		return displayYScale;
+	}
+
+	/**
+	 * @return the displayGrid.
+	 * @since 2.0.0
+	 */
+	public JCheckBoxMenuItem getDisplayGrid()
+	{
+		return displayGrid;
+	}
+
+	/**
+	 * @return the displayPersoGrid.
+	 * @since 2.0.0
+	 */
+	public JCheckBoxMenuItem getDisplayPersoGrid()
+	{
+		return displayPersoGrid;
+	}
+
+	/**
+	 * @return the displayCodePanel.
+	 * @since 2.0.0
+	 */
+	public JCheckBoxMenuItem getDisplayCodePanel()
+	{
+		return displayCodePanel;
+	}
+
+	/**
+	 * @return the autoAdjustBorders.
+	 * @since 2.0.0
+	 */
+	public JCheckBoxMenuItem getAutoAdjustBorders()
+	{
+		return autoAdjustBorders;
+	}
+
+	/**
+	 * @return the menuPoly.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuPoly()
+	{
+		return menuPoly;
+	}
+
+	/**
+	 * @return the menuLine.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuLine()
+	{
+		return menuLine;
+	}
+
+	/**
+	 * @return the menuRect.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuRect()
+	{
+		return menuRect;
+	}
+
+	/**
+	 * @return the menuSquare.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuSquare()
+	{
+		return menuSquare;
+	}
+
+	/**
+	 * @return the menuDot.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuDot()
+	{
+		return menuDot;
+	}
+
+	/**
+	 * @return the menuRhombus.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuRhombus()
+	{
+		return menuRhombus;
+	}
+
+	/**
+	 * @return the menuTriangle.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuTriangle()
+	{
+		return menuTriangle;
+	}
+
+	/**
+	 * @return the menuJoinedLines.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuJoinedLines()
+	{
+		return menuJoinedLines;
+	}
+
+	/**
+	 * @return the menuCircle.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuCircle()
+	{
+		return menuCircle;
+	}
+
+	/**
+	 * @return the menuAxes.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuAxes()
+	{
+		return menuAxes;
+	}
+
+	/**
+	 * @return the menuChord.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuChord()
+	{
+		return menuChord;
+	}
+
+	/**
+	 * @return the menuEllipse.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuEllipse()
+	{
+		return menuEllipse;
+	}
+
+	/**
+	 * @return the menuBezierCurve.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuBezierCurve()
+	{
+		return menuBezierCurve;
+	}
+
+	/**
+	 * @return the menuClosedBezierCurve.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuClosedBezierCurve()
+	{
+		return menuClosedBezierCurve;
+	}
+
+	/**
+	 * @return the menuSelect.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuSelect()
+	{
+		return menuSelect;
+	}
+
+	/**
+	 * @return the menuArc.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuArc()
+	{
+		return menuArc;
+	}
+
+	/**
+	 * @return the menuWedge.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuWedge()
+	{
+		return menuWedge;
+	}
+
+	/**
+	 * @return the menuText.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuText()
+	{
+		return menuText;
+	}
+
+	/**
+	 * @return the menuPointsAkin.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuPointsAkin()
+	{
+		return menuPointsAkin;
+	}
+
+	/**
+	 * @return the menuGrid.
+	 * @since 2.0.0
+	 */
+	public JRadioButtonMenuItem getMenuGrid()
+	{
+		return menuGrid;
+	}
+
+	/**
+	 * @return the menuAutoUpdate.
+	 * @since 2.0.0
+	 */
+	public JCheckBoxMenuItem getMenuAutoUpdate()
+	{
+		return menuAutoUpdate;
+	}
+
+	/**
+	 * @return the menuReloadCode.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getMenuReloadCode()
+	{
+		return menuReloadCode;
+	}
+
+	/**
+	 * @return the updateToGridMenu.
+	 * @since 2.0.0
+	 */
+	public JMenuItem getUpdateToGridMenu()
+	{
+		return updateToGridMenu;
+	}
+
+	/**
+	 * @return the parentFrame.
+	 * @since 2.0.0
+	 */
+	public LaTeXDrawFrame getParentFrame()
+	{
+		return parentFrame;
+	}
+	
+	
+	
+	/**
+	 * Updates the menus related to the grid.
+	 * @param displayed Defines if the grid is shown or not.
+	 * @param classic Defines if the grid is classic or defined by the user.
+	 * @since 2.0.0
+	 */
+	public void setGridDisplayed(boolean displayed, boolean classic)
+	{
+		if(displayed)
+		{
+			displayGrid.setSelected(classic);
+			displayPersoGrid.setSelected(!classic);
+		}
+		else
+		{
+			displayGrid.setSelected(false);
+			displayPersoGrid.setSelected(false);
+		}
+	}
+	
+	
+	
+	/**
+	 * Create the menu item of the menu "recent files".
+	 * @since 1.9
+	 */
+	public void updateRecentFilesMenu()
+	{
+		Vector<String> recentFilesName = parentFrame.getPreferencesFrame().getRecentFilesName();
+		recentFilesMenu.removeAll();
+		
+		for(String fileName : recentFilesName)
+		{
+			String shortName = fileName.substring(fileName.lastIndexOf(System.getProperty("file.separator"))+1);//$NON-NLS-1$
+			JMenuItem menuItem = new JMenuItem(shortName);
+			menuItem.setToolTipText(fileName);
+			menuItem.addActionListener(parentFrame.getRecentFilesListener());
+			menuItem.setActionCommand(RecentFilesListener.RECENT_PREFIX_CMD+fileName);
+			recentFilesMenu.add(menuItem);
+		}
+		
+		recentFilesMenu.addSeparator();
+		JMenuItem delMenu = new JMenuItem(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.2"), LaTeXDrawResources.delIcon); //$NON-NLS-1$
+		delMenu.setActionCommand(RecentFilesListener.ACTION_CMD_RECENT_CLEAR);
+		delMenu.addActionListener(parentFrame.getRecentFilesListener());
+		recentFilesMenu.add(delMenu);
+	}
+}
diff --git a/current/latexDraw/ui/components/LToolbar.java b/current/latexDraw/ui/components/LToolbar.java
new file mode 100644
index 0000000..25dd7bb
--- /dev/null
+++ b/current/latexDraw/ui/components/LToolbar.java
@@ -0,0 +1,777 @@
+/*
+ * LaTeXDrawToolbar.java
+ */
+package latexDraw.ui.components;
+
+import java.awt.Component;
+import java.awt.Dimension;
+
+import javax.swing.*;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.CodePanel;
+import latexDraw.ui.DrawContainer;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.listeners.MenusListener;
+import latexDraw.util.LaTeXDrawResources;
+
+/** 
+ * This class defines a the toolbar of the program.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 
+ * 09/22/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 2.0.0<br>
+ */
+public class LToolbar extends JToolBar
+{
+	private static final long	serialVersionUID	= 1L;
+
+	protected JSpinner zoomField;
+    protected JSpinner persoGridGapField;
+    protected JCheckBox magneticCB;
+    protected JSlider sliderDelimitor;
+	/** This button allows to copy the generated code when the code panel is closed. */
+    protected JButton copyCodeButton;
+    protected JButton copyCodeSelButton;
+    protected JToggleButton buttonImageLine;
+	protected JToggleButton buttonImageDot;
+	protected JToggleButton buttonImageRect;
+	protected JToggleButton buttonImageSquare;
+	protected JToggleButton buttonImageRhombus;
+	protected JToggleButton buttonImageTriangle;
+	protected JToggleButton buttonImageEllipse;
+	protected JToggleButton buttonImageCircle;
+	protected JToggleButton buttonImageSelect;
+	protected JToggleButton buttonImageBorders;
+	protected JToggleButton buttonImageWedge;
+	protected JToggleButton buttonImageChord;
+	protected JToggleButton buttonImageArc;
+	protected JToggleButton buttonImagePoly;
+	protected JToggleButton buttonImageText;
+	protected JToggleButton buttonImagePointsAkin;
+	protected JToggleButton buttonImageGrid;
+	protected JToggleButton buttonImageAxes;
+	protected JToggleButton buttonImageBezierCurve; 
+	protected JToggleButton buttonImageClosedBezierCurve; 
+	protected JToggleButton buttonImageJoinedLines; 
+	protected JButton buttonImageDel;
+	protected JButton buttonImageProperties;
+	protected JButton buttonImageRedo;
+	protected JButton buttonImageUndo;
+	protected LaTeXDrawFrame parentFrame;
+	protected JButton buttonPdfExport;
+	
+	
+	
+	public LToolbar(LaTeXDrawFrame parent)
+	{
+		super();
+		
+		if(parent==null)
+			throw new IllegalArgumentException();
+		
+		parentFrame = parent;
+		MenusListener ml = parentFrame.getMenuListener();
+		
+		setName(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.107"));	 //$NON-NLS-1$
+		ButtonGroup drawButtonGroup = new ButtonGroup();
+		JButton button;
+		
+		button = new JButton(LaTeXDrawResources.newIcon);		
+		button.addActionListener(ml);
+		button.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+		button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.108")); //$NON-NLS-1$
+		button.setActionCommand(LaTeXDrawResources.LABEL_NEW);
+ 		add(button);
+ 		
+ 		button = new JButton(LaTeXDrawResources.openIcon);		
+ 		button.addActionListener(ml);
+		button.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.109")); //$NON-NLS-1$
+ 		button.setActionCommand(LaTeXDrawResources.LABEL_OPEN);
+ 		add(button);
+ 		
+ 		button = new JButton(LaTeXDrawResources.saveIcon);		
+ 		button.addActionListener(ml);
+		button.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.110")); //$NON-NLS-1$
+ 		button.setActionCommand(LaTeXDrawResources.LABEL_SAVE);
+ 		add(button);
+ 		
+ 		buttonPdfExport = new JButton(LaTeXDrawResources.pdfIcon);		
+ 		buttonPdfExport.addActionListener(ml);
+ 		buttonPdfExport.setEnabled(false);
+ 		buttonPdfExport.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonPdfExport.setToolTipText("Export the drawing as a pdf document (the drawing is compiled using your latex distribution)");
+ 		buttonPdfExport.setActionCommand(LaTeXDrawResources.LABEL_EXPORT_PDF_LATEX);
+ 		add(buttonPdfExport);
+
+ 		addSeparator();
+ 		
+ 		SpinnerNumberModel model = new SpinnerNumberModel(DrawContainer.DEFAULT_ZOOM*100, DrawContainer.MIN_ZOOM*100, 
+ 										DrawContainer.MAX_ZOOM*100,DrawContainer.DEFAULT_ADD_ZOOM*100);
+ 		zoomField = new JSpinner(model);
+ 		zoomField.setMaximumSize(new Dimension(50, 28));
+ 		zoomField.setToolTipText(LaTeXDrawLang.getString1_9("ShortcutsFrame.30"));
+ 		zoomField.setName(LaTeXDrawResources.LABEL_ZOOM_CHANGE);
+ 		zoomField.addChangeListener(parentFrame);
+ 		
+ 		add(zoomField);
+ 		
+ 		button = new JButton(LaTeXDrawResources.zoomDefaultIcon);
+ 		button.addActionListener(ml);
+		button.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		button.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.113")); //$NON-NLS-1$
+ 		button.setActionCommand(LaTeXDrawResources.LABEL_ZOOM_DEFAULT);
+ 		add(button);
+
+ 		addSeparator();
+ 		
+ 		ListJToggleButton listGrid = new ListJToggleButton(parentFrame, LaTeXDrawResources.displayGridIcon, ListJToggleButton.LOCATION_SOUTH);
+ 		listGrid.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.12")); //$NON-NLS-1$
+ 		
+ 		magneticCB = new JCheckBox(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.13")); //$NON-NLS-1$
+ 		magneticCB.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		magneticCB.setActionCommand(LaTeXDrawResources.LABEL_MAGNETIC_CB);
+ 		magneticCB.addActionListener(parentFrame);
+ 		magneticCB.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.14")); //$NON-NLS-1$
+ 		listGrid.addComponent(magneticCB);
+ 		listGrid.addSeparator();
+ 		
+ 		JLabel label = new JLabel(LaTeXDrawResources.loadImageIcon("/res/gridGap.png"));//$NON-NLS-1$
+ 		listGrid.addComponent(label);
+ 		
+     	model = new SpinnerNumberModel(MagneticGrid.DEFAULT_PERSONAL_GRID_GAP, 2, 100000, 1);
+     	persoGridGapField = new JSpinner(model);
+     	persoGridGapField.setEditor(new JSpinner.NumberEditor(persoGridGapField, "0"));//$NON-NLS-1$
+     	persoGridGapField.addChangeListener(parentFrame);
+     	persoGridGapField.setName(LaTeXDrawResources.LABEL_PERSO_GRID_GAP_FIELD);
+     	persoGridGapField.setPreferredSize(new Dimension(45,25));
+     	persoGridGapField.setMaximumSize(new Dimension(45,25));
+     	persoGridGapField.addChangeListener(parentFrame);
+     	persoGridGapField.setEnabled(false);
+     	persoGridGapField.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.15")); //$NON-NLS-1$
+     	listGrid.addComponent(persoGridGapField);
+     	listGrid.addSeparator();
+
+ 		add(listGrid);
+ 		
+ 		ListJToggleButton listDelimitor = new ListJToggleButton(parentFrame, LaTeXDrawResources.delimitorIcon, ListJToggleButton.LOCATION_SOUTH);
+ 		listDelimitor.setToolTipText(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.8"));  //$NON-NLS-1$
+ 		JPanel panelSliderDel = new JPanel();
+ 		JLabel sliderLabel = new JLabel(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.9"), SwingConstants.CENTER); //$NON-NLS-1$
+ 		panelSliderDel.setLayout(new BoxLayout(panelSliderDel, BoxLayout.PAGE_AXIS));
+ 		panelSliderDel.add(sliderLabel);
+        sliderLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
+ 		sliderDelimitor = new JSlider(0, 255);
+ 		sliderDelimitor.setToolTipText(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.10")); //$NON-NLS-1$
+ 		sliderDelimitor.setName(LaTeXDrawResources.NAME_SLIDER_DELIMITOR);
+ 		sliderDelimitor.setMajorTickSpacing(50);
+ 		sliderDelimitor.setPaintTicks(true);
+ 		sliderDelimitor.setPaintLabels(true); 
+ 		sliderDelimitor.addChangeListener(parentFrame);
+ 		panelSliderDel.add(sliderDelimitor);
+ 		listDelimitor.addComponent(panelSliderDel);
+ 		listDelimitor.addSeparator();
+ 		
+ 		add(listDelimitor);
+ 		addSeparator();
+ 		
+ 		buttonImageUndo = new JButton(LaTeXDrawResources.undoIcon);
+ 		buttonImageUndo.addActionListener(ml);
+ 		buttonImageUndo.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageUndo.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.114")); //$NON-NLS-1$
+ 		buttonImageUndo.setActionCommand(LaTeXDrawResources.LABEL_UNDO);
+ 		add(buttonImageUndo);
+ 		
+ 		buttonImageRedo = new JButton(LaTeXDrawResources.redoIcon);
+ 		buttonImageRedo.addActionListener(ml);
+ 		buttonImageRedo.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageRedo.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.115")); //$NON-NLS-1$
+ 		buttonImageRedo.setActionCommand(LaTeXDrawResources.LABEL_REDO);
+ 		add(buttonImageRedo);
+ 		
+ 		addSeparator();
+ 		
+ 		ListJToggleButton ltb = new ListJToggleButton(parentFrame, LaTeXDrawResources.lineIcon, ListJToggleButton.LOCATION_SOUTH);
+ 		ltb.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.116"));  //$NON-NLS-1$
+ 		add(ltb);
+ 		
+ 		buttonImageLine = new JToggleButton(LaTeXDrawResources.lineIcon);
+ 		buttonImageLine.addActionListener(ml);
+ 		buttonImageLine.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageLine.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.116")); //$NON-NLS-1$
+ 		buttonImageLine.setActionCommand(LaTeXDrawResources.LABEL_LINE);
+ 		drawButtonGroup.add(buttonImageLine);
+ 		ltb.addComponent(buttonImageLine);
+ 	
+ 		buttonImageJoinedLines = new JToggleButton(LaTeXDrawResources.joinedLinesIcon);
+ 		buttonImageJoinedLines.addActionListener(ml);
+ 		buttonImageJoinedLines.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageJoinedLines.setToolTipText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.14"));  //$NON-NLS-1$
+ 		buttonImageJoinedLines.setActionCommand(LaTeXDrawResources.LABEL_JOINED_LINES);
+ 		drawButtonGroup.add(buttonImageJoinedLines);
+ 		ltb.addComponent(buttonImageJoinedLines);
+ 		ltb.addSeparator();
+ 		
+ 		buttonImageDot = new JToggleButton(LaTeXDrawResources.dotIcon);		
+ 		buttonImageDot.addActionListener(ml);
+ 		buttonImageDot.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageDot.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.117")); //$NON-NLS-1$
+ 		buttonImageDot.setActionCommand(LaTeXDrawResources.LABEL_DOT);
+ 		drawButtonGroup.add(buttonImageDot);
+ 		add(buttonImageDot);
+				
+ 		ltb = new ListJToggleButton(parentFrame, LaTeXDrawResources.rectIcon, ListJToggleButton.LOCATION_SOUTH);
+ 		ltb.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.118")); //$NON-NLS-1$
+ 		add(ltb);
+ 		
+ 		buttonImageRect = new JToggleButton(LaTeXDrawResources.rectIcon);		
+ 		buttonImageRect.addActionListener(ml);
+ 		buttonImageRect.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageRect.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.119")); //$NON-NLS-1$
+ 		buttonImageRect.setActionCommand(LaTeXDrawResources.LABEL_RECT);
+ 		drawButtonGroup.add(buttonImageRect);
+ 		ltb.addComponent(buttonImageRect);
+
+ 		buttonImageSquare = new JToggleButton(LaTeXDrawResources.squareIcon);		
+ 		buttonImageSquare.addActionListener(ml);
+ 		buttonImageSquare.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageSquare.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.120")); //$NON-NLS-1$
+ 		buttonImageSquare.setActionCommand(LaTeXDrawResources.LABEL_SQUARE);
+ 		drawButtonGroup.add(buttonImageSquare);
+ 		ltb.addComponent(buttonImageSquare);
+ 		ltb.addSeparator();
+ 		
+ 		ltb = new ListJToggleButton(parentFrame, LaTeXDrawResources.polygonIcon, ListJToggleButton.LOCATION_SOUTH);
+ 		ltb.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.121")); //$NON-NLS-1$
+ 		add(ltb);
+ 		
+ 		buttonImagePoly = new JToggleButton(LaTeXDrawResources.polygonIcon);		
+ 		buttonImagePoly.addActionListener(ml);
+ 		buttonImagePoly.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImagePoly.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.121")); //$NON-NLS-1$
+ 		buttonImagePoly.setActionCommand(LaTeXDrawResources.LABEL_POLY);
+ 		drawButtonGroup.add(buttonImagePoly);
+ 		ltb.addComponent(buttonImagePoly);
+ 		
+ 		buttonImageRhombus = new JToggleButton(LaTeXDrawResources.rhombusIcon);		
+ 		buttonImageRhombus.addActionListener(ml);
+ 		buttonImageRhombus.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageRhombus.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.123")); //$NON-NLS-1$
+ 		buttonImageRhombus.setActionCommand(LaTeXDrawResources.LABEL_RHOMBUS);
+ 		drawButtonGroup.add(buttonImageRhombus);
+ 		ltb.addComponent(buttonImageRhombus);
+ 		
+ 		buttonImageTriangle = new JToggleButton(LaTeXDrawResources.triangleIcon);		
+ 		buttonImageTriangle.addActionListener(ml);
+ 		buttonImageTriangle.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageTriangle.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.124")); //$NON-NLS-1$
+ 		buttonImageTriangle.setActionCommand(LaTeXDrawResources.LABEL_TRIANGLE);
+ 		drawButtonGroup.add(buttonImageTriangle);
+ 		ltb.addComponent(buttonImageTriangle);
+ 		ltb.addSeparator();
+ 		
+ 		ltb = new ListJToggleButton(parentFrame, LaTeXDrawResources.ellipseIcon, ListJToggleButton.LOCATION_SOUTH);
+ 		ltb.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.125")); //$NON-NLS-1$
+ 		add(ltb);
+ 		
+ 		buttonImageEllipse = new JToggleButton(LaTeXDrawResources.ellipseIcon);		
+ 		buttonImageEllipse.addActionListener(ml);
+ 		buttonImageEllipse.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageEllipse.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.125")); //$NON-NLS-1$
+ 		buttonImageEllipse.setActionCommand(LaTeXDrawResources.LABEL_ELLIPSE);
+ 		drawButtonGroup.add(buttonImageEllipse);
+ 		ltb.addComponent(buttonImageEllipse);
+ 		
+ 		buttonImageCircle = new JToggleButton(LaTeXDrawResources.circleIcon);		
+ 		buttonImageCircle.addActionListener(ml);
+ 		buttonImageCircle.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageCircle.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.127")); //$NON-NLS-1$
+ 		buttonImageCircle.setActionCommand(LaTeXDrawResources.LABEL_CIRCLE);
+ 		drawButtonGroup.add(buttonImageCircle);
+ 		ltb.addComponent(buttonImageCircle);
+ 		ltb.addSeparator();
+
+ 		ltb = new ListJToggleButton(parentFrame, LaTeXDrawResources.arcIcon, ListJToggleButton.LOCATION_SOUTH);
+ 		ltb.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.128")); //$NON-NLS-1$
+ 		add(ltb);
+ 		
+ 		buttonImageArc = new JToggleButton(LaTeXDrawResources.arcIcon);
+ 		buttonImageArc.addActionListener(ml);
+ 		buttonImageArc.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageArc.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.128")); //$NON-NLS-1$
+ 		buttonImageArc.setActionCommand(LaTeXDrawResources.LABEL_ARC);
+ 		drawButtonGroup.add(buttonImageArc);
+ 		ltb.addComponent(buttonImageArc);
+ 		
+ 		buttonImageWedge = new JToggleButton(LaTeXDrawResources.wedgeIcon);
+ 		buttonImageWedge.addActionListener(ml);
+ 		buttonImageWedge.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageWedge.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.130")); //$NON-NLS-1$
+ 		buttonImageWedge.setActionCommand(LaTeXDrawResources.LABEL_WEDGE);
+ 		drawButtonGroup.add(buttonImageWedge);
+ 		ltb.addComponent(buttonImageWedge);
+ 		
+ 		buttonImageChord = new JToggleButton(LaTeXDrawResources.chordIcon);
+ 		buttonImageChord.addActionListener(ml);
+ 		buttonImageChord.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageChord.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.131")); //$NON-NLS-1$
+ 		buttonImageChord.setActionCommand(LaTeXDrawResources.LABEL_CHORD);
+ 		drawButtonGroup.add(buttonImageChord);
+ 		ltb.addComponent(buttonImageChord);
+ 		ltb.addSeparator();
+ 		
+ 		ltb = new ListJToggleButton(parentFrame, LaTeXDrawResources.closedBezierIcon, ListJToggleButton.LOCATION_SOUTH);
+ 		ltb.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.132")); //$NON-NLS-1$
+ 		add(ltb);
+ 
+ 		buttonImageClosedBezierCurve = new JToggleButton(LaTeXDrawResources.closedBezierIcon);
+ 		buttonImageClosedBezierCurve.addActionListener(ml);
+ 		buttonImageClosedBezierCurve.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageClosedBezierCurve.setToolTipText(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.11")); //$NON-NLS-1$
+ 		buttonImageClosedBezierCurve.setActionCommand(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE);
+ 		drawButtonGroup.add(buttonImageClosedBezierCurve);
+ 		ltb.addComponent(buttonImageClosedBezierCurve);
+ 		
+ 		buttonImageBezierCurve = new JToggleButton(LaTeXDrawResources.bezierCurveIcon);
+ 		buttonImageBezierCurve.addActionListener(ml);
+ 		buttonImageBezierCurve.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageBezierCurve.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.132")); //$NON-NLS-1$
+ 		buttonImageBezierCurve.setActionCommand(LaTeXDrawResources.LABEL_BEZIER_CURVE);
+ 		drawButtonGroup.add(buttonImageBezierCurve);
+ 		ltb.addComponent(buttonImageBezierCurve);
+ 		ltb.addSeparator();
+ 		
+ 		ltb = new ListJToggleButton(parentFrame, LaTeXDrawResources.gridIcon, ListJToggleButton.LOCATION_SOUTH);
+ 		ltb.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.16")); //$NON-NLS-1$
+ 		
+ 		buttonImageGrid = new JToggleButton(LaTeXDrawResources.gridIcon);
+ 		buttonImageGrid.addActionListener(ml);
+ 		buttonImageGrid.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageGrid.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.133")); //$NON-NLS-1$
+ 		buttonImageGrid.setActionCommand(LaTeXDrawResources.LABEL_GRID);
+ 		drawButtonGroup.add(buttonImageGrid);
+ 		ltb.addComponent(buttonImageGrid);
+ 		
+ 		buttonImageAxes = new JToggleButton(LaTeXDrawResources.axesIcon);
+ 		buttonImageAxes.addActionListener(ml);
+ 		buttonImageAxes.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageAxes.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.17")); //$NON-NLS-1$
+ 		buttonImageAxes.setActionCommand(LaTeXDrawResources.LABEL_AXES);
+ 		drawButtonGroup.add(buttonImageAxes);
+ 		ltb.addComponent(buttonImageAxes);
+ 		ltb.addSeparator();
+ 		add(ltb);
+ 		
+ 		buttonImagePointsAkin = new JToggleButton(LaTeXDrawResources.pointsAkinIcon);
+ 		buttonImagePointsAkin.addActionListener(ml);
+ 		buttonImagePointsAkin.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImagePointsAkin.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.7")); //$NON-NLS-1$
+ 		buttonImagePointsAkin.setActionCommand(LaTeXDrawResources.LABEL_POINTS_AKIN);
+ 		drawButtonGroup.add(buttonImagePointsAkin);
+ 		add(buttonImagePointsAkin);
+ 		
+ 		buttonImageText = new JToggleButton(LaTeXDrawResources.textIcon);
+ 		buttonImageText.addActionListener(ml);
+ 		buttonImageText.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageText.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.60")); //$NON-NLS-1$
+ 		buttonImageText.setActionCommand(LaTeXDrawResources.LABEL_TEXT);
+ 		drawButtonGroup.add(buttonImageText);
+ 		add(buttonImageText);
+ 		
+ 		addSeparator();
+ 		
+ 		buttonImageSelect = new JToggleButton(LaTeXDrawResources.selectIcon);		
+ 		buttonImageSelect.addActionListener(ml);
+ 		buttonImageSelect.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageSelect.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.136") + //$NON-NLS-1$
+ 				LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.137") + //$NON-NLS-1$
+ 				LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.138")); //$NON-NLS-1$
+ 		buttonImageSelect.setActionCommand(LaTeXDrawResources.LABEL_SELECT_FIGURE);
+ 		drawButtonGroup.add(buttonImageSelect);
+		drawButtonGroup.setSelected(buttonImageSelect.getModel(), true);
+ 		add(buttonImageSelect);
+ 		
+ 		buttonImageDel = new JButton(LaTeXDrawResources.delIcon);		
+ 		buttonImageDel.addActionListener(ml);
+ 		buttonImageDel.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageDel.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.139")); //$NON-NLS-1$
+ 		buttonImageDel.setActionCommand(LaTeXDrawResources.LABEL_DELETE);
+ 		buttonImageDel.setEnabled(false);
+ 		add(buttonImageDel);
+ 		
+ 		addSeparator();
+ 		
+ 		buttonImageProperties = new JButton(LaTeXDrawResources.propertiesIcon);
+ 		buttonImageProperties.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.140")); //$NON-NLS-1$
+ 		buttonImageProperties.addActionListener(ml);
+ 		buttonImageProperties.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageProperties.setActionCommand(LaTeXDrawResources.LABEL_FIGURE_PROPERTIES);
+ 		buttonImageProperties.setEnabled(false);
+        add(buttonImageProperties);
+        
+        addSeparator();
+
+ 		buttonImageBorders = new JToggleButton(LaTeXDrawResources.bordersIcon);		
+ 		buttonImageBorders.addActionListener(ml);
+ 		buttonImageBorders.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		buttonImageBorders.setToolTipText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.141") + //$NON-NLS-1$
+ 				LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.142") + //$NON-NLS-1$
+ 				LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.143") + //$NON-NLS-1$
+ 				LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.144")); //$NON-NLS-1$
+ 		buttonImageBorders.setActionCommand(LaTeXDrawResources.LABEL_DISPLAY_BORDERS);
+ 		add(buttonImageBorders);
+ 		
+ 		button = new JButton(LaTeXDrawResources.texEditorIcon);
+ 		button.addActionListener(parentFrame);
+ 		button.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		button.setToolTipText(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.18")); //$NON-NLS-1$
+ 		button.setActionCommand(LaTeXDrawResources.LABEL_TEX_EDITOR);
+ 		add(button);
+ 		
+ 		copyCodeButton = new JButton(LaTeXDrawResources.copyIcon);
+ 		copyCodeButton.addActionListener(parentFrame.getCodePanel());
+ 		copyCodeButton.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		copyCodeButton.setToolTipText(CodePanel.LABEL_COPY_ALL);
+ 		copyCodeButton.setActionCommand(CodePanel.LABEL_COPY_ALL);
+ 		copyCodeButton.setVisible(!LaTeXDrawFrame.DEFAULT_DISPLAY_CODEPANEL);
+ 		add(copyCodeButton);
+ 		
+ 		copyCodeSelButton = new JButton(LaTeXDrawResources.copySelIcon);
+ 		copyCodeSelButton.addActionListener(parentFrame.getCodePanel());
+ 		copyCodeSelButton.setMargin(LaTeXDrawFrame.INSET_BUTTON);
+ 		copyCodeSelButton.setToolTipText(CodePanel.LABEL_COPY_SELECTED_FIG);
+ 		copyCodeSelButton.setActionCommand(CodePanel.LABEL_COPY_SELECTED_FIG);
+ 		add(copyCodeSelButton);
+	}
+
+
+	/**
+	 * @return the persoGridGapField.
+	 * @since 2.0.0
+	 */
+	public JSpinner getPersoGridGapField()
+	{
+		return persoGridGapField;
+	}
+
+
+	/**
+	 * @return the magneticCB.
+	 * @since 2.0.0
+	 */
+	public JCheckBox getMagneticCB()
+	{
+		return magneticCB;
+	}
+
+
+	/**
+	 * @return the sliderDelimitor.
+	 * @since 2.0.0
+	 */
+	public JSlider getSliderDelimitor()
+	{
+		return sliderDelimitor;
+	}
+
+
+	/**
+	 * @return the copyCodeButton.
+	 * @since 2.0.0
+	 */
+	public JButton getCopyCodeButton()
+	{
+		return copyCodeButton;
+	}
+
+
+	/**
+	 * @return the copyCodeSelButton.
+	 * @since 2.0.0
+	 */
+	public JButton getCopyCodeSelButton()
+	{
+		return copyCodeSelButton;
+	}
+
+
+	/**
+	 * @return the buttonImageLine.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageLine()
+	{
+		return buttonImageLine;
+	}
+
+
+	/**
+	 * @return the buttonImageDot.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageDot()
+	{
+		return buttonImageDot;
+	}
+
+
+	/**
+	 * @return the buttonImageRect.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageRect()
+	{
+		return buttonImageRect;
+	}
+
+
+	/**
+	 * @return the buttonImageSquare.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageSquare()
+	{
+		return buttonImageSquare;
+	}
+
+
+	/**
+	 * @return the buttonImageRhombus.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageRhombus()
+	{
+		return buttonImageRhombus;
+	}
+
+
+	/**
+	 * @return the buttonImageTriangle.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageTriangle()
+	{
+		return buttonImageTriangle;
+	}
+
+
+	/**
+	 * @return the buttonImageEllipse.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageEllipse()
+	{
+		return buttonImageEllipse;
+	}
+
+
+	/**
+	 * @return the buttonImageCircle.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageCircle()
+	{
+		return buttonImageCircle;
+	}
+
+
+	/**
+	 * @return the buttonImageSelect.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageSelect()
+	{
+		return buttonImageSelect;
+	}
+
+
+	/**
+	 * @return the buttonImageBorders.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageBorders()
+	{
+		return buttonImageBorders;
+	}
+
+
+	/**
+	 * @return the buttonImageWedge.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageWedge()
+	{
+		return buttonImageWedge;
+	}
+
+
+	/**
+	 * @return the buttonImageChord.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageChord()
+	{
+		return buttonImageChord;
+	}
+
+
+	/**
+	 * @return the buttonImageArc.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageArc()
+	{
+		return buttonImageArc;
+	}
+
+
+	/**
+	 * @return the buttonImagePoly.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImagePoly()
+	{
+		return buttonImagePoly;
+	}
+
+
+	/**
+	 * @return the buttonImageText.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageText()
+	{
+		return buttonImageText;
+	}
+
+
+	/**
+	 * @return the buttonImagePointsAkin.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImagePointsAkin()
+	{
+		return buttonImagePointsAkin;
+	}
+
+
+	/**
+	 * @return the buttonImageGrid.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageGrid()
+	{
+		return buttonImageGrid;
+	}
+
+
+	/**
+	 * @return the buttonImageAxes.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageAxes()
+	{
+		return buttonImageAxes;
+	}
+
+
+	/**
+	 * @return the buttonImageBezierCurve.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageBezierCurve()
+	{
+		return buttonImageBezierCurve;
+	}
+
+
+	/**
+	 * @return the buttonImageClosedBezierCurve.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageClosedBezierCurve()
+	{
+		return buttonImageClosedBezierCurve;
+	}
+
+
+	/**
+	 * @return the buttonImageJoinedLines.
+	 * @since 2.0.0
+	 */
+	public JToggleButton getButtonImageJoinedLines()
+	{
+		return buttonImageJoinedLines;
+	}
+
+
+	/**
+	 * @return the buttonImageDel.
+	 * @since 2.0.0
+	 */
+	public JButton getButtonImageDel()
+	{
+		return buttonImageDel;
+	}
+
+
+	/**
+	 * @return the buttonImageProperties.
+	 * @since 2.0.0
+	 */
+	public JButton getButtonImageProperties()
+	{
+		return buttonImageProperties;
+	}
+
+
+	/**
+	 * @return the buttonImageRedo.
+	 * @since 2.0.0
+	 */
+	public JButton getButtonImageRedo()
+	{
+		return buttonImageRedo;
+	}
+
+
+	/**
+	 * @return the buttonImageUndo.
+	 * @since 2.0.0
+	 */
+	public JButton getButtonImageUndo()
+	{
+		return buttonImageUndo;
+	}
+
+
+	/**
+	 * @return the zoomField.
+	 * @since 2.0.0
+	 */
+	public JSpinner getZoomField()
+	{
+		return zoomField;
+	}
+
+
+	public JButton getButtonPdfExport() {
+		return buttonPdfExport;
+	}
+}
diff --git a/current/latexDraw/ui/components/LaTeXDrawComboBox.java b/current/latexDraw/ui/components/LaTeXDrawComboBox.java
new file mode 100644
index 0000000..14cca43
--- /dev/null
+++ b/current/latexDraw/ui/components/LaTeXDrawComboBox.java
@@ -0,0 +1,90 @@
+package latexDraw.ui.components;
+
+import java.awt.event.ItemEvent;
+
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+
+
+/** 
+ * This class change only on function of the mother class ComboBox : the method
+ * setSelectedItem ; by default this method selected a given object in the list. but
+ * in our case, we want the selected the object whose name is the string given in parameter
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class LaTeXDrawComboBox extends JComboBox
+{
+	private static final long serialVersionUID = 1L;
+
+	
+	@Override
+	public void setSelectedItem(Object anObject)
+	{
+		try
+		{
+			int i, size = getItemCount();
+			boolean found = false;
+			Object o=null;
+			
+			if(anObject instanceof JLabel)
+				o = anObject;
+			else
+			{
+				if(!(anObject instanceof String))
+					throw new ClassCastException();
+					
+				if(size==0) return ;
+				
+				for(i=0; i<size && !found; i++)
+				{
+					o = getItemAt(i);
+					if(o instanceof JLabel)
+					{
+						if(((JLabel)o).getText().compareTo((String)anObject)==0)
+							found=true;
+					}
+					else
+					if(o instanceof String)
+						if(((String)o).compareTo((String)anObject)==0)
+							found=true;
+				}
+			}
+			
+		    dataModel.setSelectedItem(o);
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+    @Override
+	protected void selectedItemChanged() 
+    {
+    	selectedItemReminder = dataModel.getSelectedItem();
+
+    	if(selectedItemReminder != null) 
+    		fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, selectedItemReminder, ItemEvent.SELECTED));
+    }
+}
diff --git a/current/latexDraw/ui/components/LabelListCellRenderer.java b/current/latexDraw/ui/components/LabelListCellRenderer.java
new file mode 100644
index 0000000..2b50b89
--- /dev/null
+++ b/current/latexDraw/ui/components/LabelListCellRenderer.java
@@ -0,0 +1,69 @@
+package latexDraw.ui.components;
+
+import java.awt.Color;
+import java.awt.Component;
+
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.ListCellRenderer;
+
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+
+/** 
+ * This class allows the change the renderer of JComboBox. it allows to display a icon in the list<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class LabelListCellRenderer extends JLabel implements ListCellRenderer
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The colour displayed when a item is selected in the list */
+	public static final Color selectcolor = new Color(120, 160, 195);
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public LabelListCellRenderer() 
+	{
+        setOpaque(true);
+    }
+	
+	
+	
+	public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) 
+	{
+		try
+		{
+			setBackground(isSelected ? selectcolor : Color.white);
+			if(value instanceof JLabel)
+				setIcon(((JLabel)value).getIcon());
+			
+			setEnabled(list.isEnabled());
+			setFont(list.getFont());
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		
+		return this;
+	}
+}
diff --git a/current/latexDraw/ui/components/ListJToggleButton.java b/current/latexDraw/ui/components/ListJToggleButton.java
new file mode 100644
index 0000000..ae010c4
--- /dev/null
+++ b/current/latexDraw/ui/components/ListJToggleButton.java
@@ -0,0 +1,398 @@
+package latexDraw.ui.components;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowFocusListener;
+import java.awt.image.BufferedImage;
+
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+
+/** 
+ * This class defines a button which displays a frame containing
+ * others buttons; a kind of menu with buttons.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 05/02/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ListJToggleButton extends JToggleButton implements ActionListener, ChangeListener, WindowFocusListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The frame which displays the toolbar */
+	JWindow buttonsFrame;
+	
+	/** The toolbar which contains the buttons */
+	JToolBar toolbar;
+	
+	/** The width of the triangle drawn in the button */
+	public static final int WIDTH_TRIANGLE = 8;
+	
+	/** The height of the triangle drawn in the button */
+	public static final int HEIGHT_TRIANGLE = 6;
+	
+	/** Define the location of the panel of buttons. */
+	protected int location;
+	
+	/** The frame is at the north of the button. */
+	public static final short LOCATION_NORTH = 1;
+	
+	/** The frame is at the south of the button. */
+	public static final short LOCATION_SOUTH = 2;
+	
+	
+	
+	/**
+	 * The constructor using a text.
+	 * @param frame The main frame containing the ListJToggleButton.
+	 * @param txt The text of the ListJToggleButton.
+	 * @param locate The position of the mini toolbar.
+	 * @since 1.9.1
+	 */
+	public ListJToggleButton(JFrame frame, String txt, int locate)
+	{
+		super(txt);
+		
+		setIcon();
+		intializing(frame, locate);
+	}
+	
+	
+	
+	/**
+	 * The constructor using an icon.
+	 * @param icon The icon of the ListJToggleButton.
+	 * @param locate The position of the mini toolbar.
+	 * @param frame The main frame containing the ListJToggleButton.
+	 */
+	public ListJToggleButton(JFrame frame, Icon icon, int locate)
+	{
+		super(icon);
+
+		intializing(frame, locate);
+	}
+
+	
+	
+	/**
+	 * Initialises the ListJToggleButton.
+	 * @param frame The main frame containing the ListJToggleButton.
+	 * @param locate The position of the mini toolbar.
+	 * @since 1.9.1
+	 */
+	protected void intializing(JFrame frame, int locate)
+	{
+		try
+		{
+			try{setLocation(locate);}
+			catch(Exception e) {location = LOCATION_SOUTH; }
+		
+			toolbar = new JToolBar();
+			JPanel buttonsPanel = new JPanel();
+			
+			toolbar.setFloatable(false);
+			
+			buttonsFrame = new JWindow(frame);
+			buttonsFrame.setVisible(false);
+			buttonsFrame.setAlwaysOnTop(true);
+			
+			buttonsPanel.add(toolbar);
+			buttonsPanel.setBorder(BorderFactory.createEtchedBorder());
+			buttonsFrame.add(buttonsPanel);
+			buttonsFrame.pack();
+			buttonsFrame.addWindowFocusListener(this);
+			
+			addActionListener(this);
+			setMargin(new Insets(1,1,1,1));
+			JButton closeB = new CloseButton(null);
+			addComponent(closeB);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	/**
+	 * @return Creates an imageIcon containing the triangle icon.
+	 * @since 1.9.1
+	 */
+	protected ImageIcon createTriangleIcon()
+	{
+		int width = 10, height = 20;
+		BufferedImage bufferImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+		Graphics2D graphic = bufferImage.createGraphics();
+		paintTriangle(graphic, width, height);
+		
+		return new ImageIcon(bufferImage);
+	}
+	
+	
+	
+	/**
+	 * Sets the location of the mini toolbar.
+	 * @param locat The position of the mini toolbar.
+	 * @throws IllegalArgumentException If the location is neither <code>LOCATION_NORTH</code> nor <code>LOCATION_SOUTH</code>.
+	 */
+	public void setLocation(int locat)
+	{
+		if(locat==LOCATION_NORTH || locat==LOCATION_SOUTH)
+			location = locat;
+		else 
+			throw new IllegalArgumentException();
+	}
+	
+	
+	
+	@Override
+	public void setSelected(boolean sel)
+	{
+		updateSelected();
+	}
+	
+	
+	
+	/**
+	 * Adds a separator to the toolbar.
+	 */
+	public void addSeparator()
+	{
+		Component c = toolbar.getComponentAtIndex(toolbar.getComponentCount()-1);
+		toolbar.remove(c);
+		toolbar.addSeparator();
+		toolbar.add(c);
+		buttonsFrame.pack();
+	}
+	
+	
+	
+	/**
+	 * Adds a button to the toolbar of the listJToggleButton.
+	 * @param b The new button to add.
+	 */
+	public void addComponent(Component b)
+	{
+		toolbar.add(b, null, toolbar.getComponentCount()-1);
+		buttonsFrame.pack();
+		
+		if(b instanceof AbstractButton)
+		{
+			((AbstractButton)b).addActionListener(this);
+			((AbstractButton)b).addChangeListener(this);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Paints the triangle icon in a graphic.
+	 * @param g The graphic.
+	 * @param width The width of the object.
+	 * @param height The height of the object.
+	 * @since 1.9.1
+	 */
+	public void paintTriangle(Graphics g, int width, int height)
+	{
+		if(g==null || width<1 || height<1)
+			throw new IllegalArgumentException();
+		
+		Graphics2D g2 = (Graphics2D) g;
+    	
+		g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+		g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+		g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+		
+		int nbPts = 3;
+		int gap = 4;
+		int xs[] = new int[nbPts];
+		int ys[] = new int[nbPts];
+		
+		if(location==LOCATION_SOUTH)
+		{
+			xs[0] = (width-WIDTH_TRIANGLE)>>1;
+			xs[1] = (width+WIDTH_TRIANGLE)>>1;
+			xs[2] = width>>1;
+			
+			ys[0] = height-HEIGHT_TRIANGLE-gap;
+			ys[1] = height-HEIGHT_TRIANGLE-gap;
+			ys[2] = height-gap;
+		}
+		else
+		{
+			xs[0] = (width-WIDTH_TRIANGLE)>>1;
+			xs[1] = (width+WIDTH_TRIANGLE)>>1;
+			xs[2] = width>>1;
+			
+			ys[0] = HEIGHT_TRIANGLE+gap;
+			ys[1] = HEIGHT_TRIANGLE+gap;
+			ys[2] = gap;
+		}
+		
+		g.setColor(Color.red);
+		g.fillPolygon(xs, ys, nbPts);
+		g.setColor(Color.black);
+		g.drawPolygon(xs, ys, nbPts);
+	}
+	
+	
+	
+	@Override
+	protected void paintComponent(Graphics g)
+	{
+		super.paintComponent(g);
+		
+		if(getText().equals(""))//$NON-NLS-1$
+			paintTriangle(g,getSize().width, getSize().height);
+	}
+
+
+
+	/**
+	 * Defines the position of the mini-toolbar.
+	 * @since 1.9.1
+	 */
+	public void defineToolbarLocation()
+	{
+		buttonsFrame.setLocation(getLocationOnScreen().x, getLocationOnScreen().y + 
+								(location==LOCATION_SOUTH ? getHeight() : -buttonsFrame.getHeight()));
+	}
+	
+	
+
+	public void actionPerformed(ActionEvent e)
+	{
+		Object src = e.getSource();
+	
+		if(src instanceof ListJToggleButton)
+		{
+			defineToolbarLocation();
+			updateSelected();
+			buttonsFrame.setVisible(!buttonsFrame.isVisible());
+			return ;
+		}
+		
+		if(src instanceof JCheckBox || src instanceof JRadioButton)
+			return ;
+		
+		if(src instanceof CloseButton)
+		{
+			buttonsFrame.setVisible(false);
+			return;
+		}
+		
+		if(src instanceof JToggleButton || src instanceof JButton)
+		{
+			buttonsFrame.setVisible(false);
+			
+			updateSelected();
+			return ;
+		}
+	}
+
+
+
+
+
+	public void stateChanged(ChangeEvent e)
+	{
+		Object src = e.getSource();
+		
+		if(src instanceof JToggleButton && !(src instanceof JCheckBox || src instanceof JRadioButton))
+			setSelected(((JToggleButton)src).isSelected());
+	}
+
+
+
+
+	/**
+	 * @return The location of the panel of buttons.
+	 */
+	public int getLocationButtonPanel()
+	{
+		return location;
+	}
+	
+	
+	
+	
+	/**
+	 * Sets the main button to selected or not following if a button is selected or not.
+	 */
+	public void updateSelected()
+	{
+		int i, size = toolbar.getComponentCount();
+		boolean selected = false;
+		Component src;
+		
+		for(i=0; i<size && !selected; i++)
+		{
+			src = toolbar.getComponent(i);
+			
+			if(src instanceof JToggleButton && !(src instanceof JCheckBox || src instanceof JRadioButton) && 
+				((JToggleButton)toolbar.getComponent(i)).isSelected())
+				selected = true;
+		}
+		
+		super.setSelected(selected);
+	}
+
+
+
+	public void windowGainedFocus(WindowEvent e)
+	{
+		toolbar.requestFocusInWindow();
+	}
+
+
+
+	public void windowLostFocus(WindowEvent e)
+	{
+		if(e.getOppositeWindow()!=null)
+			buttonsFrame.setVisible(false);
+	}
+
+
+
+	/**
+	 * The icon of the button will be the red triangle.
+	 * @since 1.9.1
+	 */
+	public void setIcon()
+	{
+		super.setIcon(createTriangleIcon());
+	}
+
+	
+	
+	@Override
+	public void setIcon(Icon defaultIcon)
+	{
+		if(!getText().equals(""))//$NON-NLS-1$
+			setIcon();
+		else 
+			super.setIcon(defaultIcon);
+	}
+}
diff --git a/current/latexDraw/ui/components/MagneticGrid.java b/current/latexDraw/ui/components/MagneticGrid.java
new file mode 100644
index 0000000..49a2533
--- /dev/null
+++ b/current/latexDraw/ui/components/MagneticGrid.java
@@ -0,0 +1,506 @@
+package latexDraw.ui.components;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.RenderingHints;
+import java.awt.geom.Line2D;
+import java.awt.image.BufferedImage;
+
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/** 
+ * This class defines a magnetic grid.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ * <br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 01/21/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class MagneticGrid
+{
+	/** The max dimension of the grid. */
+	public static final int MAX_WIDTH_HEIGHT = 2000;
+	
+	public static final BasicStroke STROKE = new BasicStroke(0, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER);
+	
+	/** The gap by default between two lines of the personal grid. */
+	public static final int DEFAULT_PERSONAL_GRID_GAP = 10;
+	
+	public static final short TYPE_PERSONAL = 0;
+	
+	public static final short TYPE_INCH = 1;
+	
+	public static final short TYPE_CM = 2;
+	
+	public static final short DEFAULT_TYPE = TYPE_PERSONAL;
+	
+	/** Allows to know if the grid is magnetic or not. */
+	protected boolean isMagnetic;
+	
+	protected int persoInterval;
+	
+	protected transient BufferedImage buffer;
+	
+	protected int width;
+	
+	protected int height;
+	
+	protected short type;
+	
+	protected double zoom;
+	
+	protected int pixelsPerCm;
+	
+	/** Allows to know if the grid must be displayed */
+	protected boolean isGridDisplayed;
+	
+	
+	
+	
+	public MagneticGrid(int width, int height, int ppc, double zoom)
+	{
+		if(width<0 || height<0 || ppc<1 || zoom<=0)
+			throw new IllegalArgumentException();
+		
+		isMagnetic  = false;
+		this.width  = width>MAX_WIDTH_HEIGHT ? MAX_WIDTH_HEIGHT : width;
+		this.height = height>MAX_WIDTH_HEIGHT ? MAX_WIDTH_HEIGHT : height;
+		buffer 		= null;
+		this.zoom	= zoom;
+		pixelsPerCm = ppc;
+		isGridDisplayed = true;
+		persoInterval = DEFAULT_PERSONAL_GRID_GAP;
+		reInitGrid();
+	}
+	
+	
+	
+	public void paint(Graphics2D g)
+	{
+		if(buffer!=null && isGridDisplayed())
+			g.drawImage(buffer, 0, 0, null);
+	}
+	
+	
+	
+	@SuppressWarnings("fallthrough")
+	public void updateBuffer()
+	{
+		if(getHeight()==0 || getWidth()==0)
+		{
+			if(buffer!=null)
+				buffer.flush();
+			
+			buffer = null;
+		}
+		else
+		{
+			if(buffer==null)
+				buffer = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
+			
+			Graphics2D g  = (Graphics2D)buffer.getGraphics();
+			double ppc    = pixelsPerCm, i, j, gap = persoInterval;
+			
+			g.setColor(Color.WHITE);
+			g.fillRect(0, 0, getWidth(), getHeight());
+			g.setColor(Color.BLACK);	    	
+			g.setStroke(STROKE);
+			g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+			g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+			g.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+			
+			switch(type)
+			{
+				case TYPE_INCH:
+					ppc*=PSTricksConstants.INCH_VAL_CM;
+					
+				case TYPE_CM:
+					gap = ppc;
+					
+					if(ppc>20)
+			    	{
+			    		if(ppc/10.!=(int)(ppc/10.))
+			    		{
+			    			ppc = Math.rint(ppc/10.)*10.;
+			    			gap = ppc;
+			    		}
+			    		
+			    		double pixPerCm10 = ppc/10.;
+			    		int cpt;
+			    		ppc*=getZoom();
+			    		pixPerCm10*=getZoom();
+			    		
+			    		for(i=pixPerCm10-1; i<width; i+=ppc)
+			    			for(j=i, cpt=0; cpt<10; j+=pixPerCm10, cpt++)
+			    				g.draw(new Line2D.Double(j, 0, j, height));
+			    		
+			    		for(i=pixPerCm10-1; i<height; i+=ppc)
+			    			for(j=i, cpt=0; cpt<10; j+=pixPerCm10, cpt++)
+			    				g.draw(new Line2D.Double(0, j, width, j));
+			    	}
+					
+				case TYPE_PERSONAL:
+					gap*=getZoom();
+					
+					for(i=gap-1; i<width; i+=gap)
+	    				g.draw(new Line2D.Double(i, 0, i, height));
+		    		
+		    		for(j=gap-1; j<height; j+=gap)
+	    				g.draw(new Line2D.Double(0, j, width, j));
+		    		
+					break;
+			}
+		}
+	}
+
+	
+	
+	
+	/**
+	 * Transform a point to another "stick" to the magnetic grid.
+	 * @since 1.8
+	 * @param pt The point to transform.
+	 * @param considerGridIsMagnetic True if we must consider if the grid is magnetic or not;<br>
+	 * for instance, if the grid is not magnetic, <code>considerGridIsMagnetic=false</code> and a grid is
+	 * displayed, the returned point will be a transformed point according to the magnetic grid.<br>
+	 * If the grid is not magnetic and <code>considerGridIsMagnetic=true</code>, the returned point will
+	 * be a clone of the point given in parameter.
+	 * @return The transformed point or if there is no magnetic grid, a clone of the given point.
+	 */
+	public Point getTransformedPointToGrid(Point pt, boolean considerGridIsMagnetic)
+	{
+	   	if(isMagnetic() || (!considerGridIsMagnetic && isGridDisplayed()))
+    	{
+	   		Point point = (Point)pt.clone();
+    		double modulo = getMagneticGridGap();
+    		double x = point.x;
+    		double y = point.y;
+    		int base = (int)(((int)(x/modulo))*modulo);
+    		
+    		if(x>modulo) x = x%((int)modulo);
+    		
+    		double res = modulo-x;
+    		x = base;
+    		
+    		if(res<modulo/2.) x+=modulo;
+    		
+    		point.x = (int)x;
+    		base = (int)(((int)(point.y/modulo))*modulo);
+    		
+    		if(y>modulo) y = y%((int)modulo);
+    		
+    		res = modulo-y;
+    		y = base;
+    		
+    		if(res<modulo/2.) y+=modulo;
+    		
+    		point.y = (int)y;
+
+    		return point;
+    	}
+	   	return (Point)pt.clone();
+	}
+
+	
+	
+	/**
+	 * @see #getTransformedPointToGrid(Point, boolean)
+	 * @since 1.9
+	 */
+	public Point getTransformedPointToGrid(LaTeXDrawPoint2D pt, boolean considerGridIsMagnetic)
+	{
+		return getTransformedPointToGrid(new Point((int)pt.x, (int)pt.y), considerGridIsMagnetic);
+	}
+	
+	
+	
+	/**
+	 * @return The gap between the lines of the magnetic grid.
+	 * @since 1.9
+	 */
+	public double getMagneticGridGap()
+	{
+		double gap;
+		
+		if(isPersonalGrid())
+			gap = getPersoInterval();
+		else
+		{
+			gap = type==TYPE_CM? getPixelsPerCm()/10. : (getPixelsPerCm()*PSTricksConstants.INCH_VAL_CM)/10.;
+			gap = (gap-(int)gap)>0.5? ((int)gap)+1 : (int)gap;
+		}
+		
+		return gap;
+	}
+	
+	
+	
+	public void reInitGrid()
+	{
+		type          = DEFAULT_TYPE;
+		persoInterval = DEFAULT_PERSONAL_GRID_GAP;
+		isMagnetic	  = false;
+		updateBuffer();
+	}
+	
+
+	/**
+	 * @return the isMagnetic
+	 * @since 2.0.0
+	 */
+	public boolean isMagnetic()
+	{
+		return isMagnetic;
+	}
+
+
+	/**
+	 * @param isMagnetic the isMagnetic to set
+	 * @since 2.0.0
+	 */
+	public void setMagnetic(boolean isMagnetic)
+	{
+		this.isMagnetic = isMagnetic;
+	}
+
+
+	/**
+	 * @return the interval
+	 * @since 2.0.0
+	 */
+	public int getPersoInterval()
+	{
+		return persoInterval;
+	}
+
+
+	/**
+	 * @param interval the interval to set
+	 * @since 2.0.0
+	 */
+	public void setPersoInterval(int interval)
+	{
+		if(interval>1)
+		{
+			int oldInter = this.persoInterval;
+			this.persoInterval = interval;
+			
+			if(oldInter!=persoInterval && isGridDisplayed())
+				updateBuffer();
+		}
+	}
+
+
+	
+	public boolean isPersonalGrid()
+	{
+		return getType()==TYPE_PERSONAL;
+	}
+	
+	
+	
+	/**
+	 * @return the width
+	 * @since 2.0.0
+	 */
+	public int getWidth()
+	{
+		return width;
+	}
+
+
+	
+	/**
+	 * @param width the width to set
+	 * @since 2.0.0
+	 */
+	public void setWidth(int width)
+	{
+		if(width>=0)
+		{
+			int oldW = this.width;
+			this.width = width>MAX_WIDTH_HEIGHT ? MAX_WIDTH_HEIGHT : width;
+			
+			if(oldW!=getWidth() && getHeight()>0 && getWidth()>0)
+			{
+				if(buffer!=null)
+					buffer.flush();
+				
+				buffer = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
+				updateBuffer();
+			}
+		}
+	}
+
+	
+
+	/**
+	 * @return the height
+	 * @since 2.0.0
+	 */
+	public int getHeight()
+	{
+		return height;
+	}
+
+
+	
+	/**
+	 * @param height the height to set
+	 * @since 2.0.0
+	 */
+	public void setHeight(int height)
+	{
+		if(height>=0)
+		{
+			int oldH = this.height;
+			this.height = height>MAX_WIDTH_HEIGHT ? MAX_WIDTH_HEIGHT : height;
+			
+			if(oldH!=getHeight() && getWidth()>0 && getHeight()>0)
+			{
+				if(buffer!=null)
+					buffer.flush();
+				
+				buffer = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
+				updateBuffer();
+			}
+		}
+	}
+
+
+	
+	/**
+	 * @return the buffer
+	 * @since 2.0.0
+	 */
+	public BufferedImage getBuffer()
+	{
+		return buffer;
+	}
+
+
+	
+	/**
+	 * @return the type
+	 * @since 2.0.0
+	 */
+	public short getType()
+	{
+		return type;
+	}
+
+	
+
+	/**
+	 * @param type the type to set
+	 * @since 2.0.0
+	 */
+	public void setType(short type)
+	{
+		if(type==TYPE_CM || type==TYPE_INCH || type==TYPE_PERSONAL)
+		{
+			short oldType = this.type;
+			this.type = type;
+
+			if(oldType!=type && isGridDisplayed())
+				updateBuffer();
+		}
+	}
+
+
+	
+	/**
+	 * @return The zoom.
+	 * @since 2.0.0
+	 */
+	public double getZoom()
+	{
+		return zoom;
+	}
+
+
+	
+	/**
+	 * @param zoom The zoom to set.
+	 * @since 2.0.0
+	 */
+	public void setZoom(double zoom)
+	{
+		if(zoom>0)
+		{
+			double oldZ = this.zoom;
+			this.zoom = zoom;
+			
+			if(oldZ!=zoom && isGridDisplayed())
+				updateBuffer();
+		}
+	}
+
+
+
+	/**
+	 * @return the pixelsPerCm
+	 * @since 2.0.0
+	 */
+	public int getPixelsPerCm()
+	{
+		return pixelsPerCm;
+	}
+
+
+	
+	/**
+	 * @param pixelsPerCm the pixelsPerCm to set
+	 * @since 2.0.0
+	 */
+	public void setPixelsPerCm(int pixelsPerCm)
+	{
+		if(pixelsPerCm>0)
+		{
+			int oldPPC = this.pixelsPerCm;
+			this.pixelsPerCm = pixelsPerCm;
+			
+			if(oldPPC!=pixelsPerCm && isGridDisplayed())
+				updateBuffer();
+		}
+	}
+
+
+	
+	/**
+	 * @return The isGridDisplayed.
+	 * @since 2.0.0
+	 */
+	public boolean isGridDisplayed()
+	{
+		return isGridDisplayed;
+	}
+
+
+	
+	/**
+	 * @param isGridDisplayed The isGridDisplayed to set.
+	 * @since 2.0.0
+	 */
+	public void setGridDisplayed(boolean isGridDisplayed)
+	{
+		this.isGridDisplayed = isGridDisplayed;
+		
+		if(isGridDisplayed)
+			updateBuffer();
+	}
+}
diff --git a/current/latexDraw/ui/components/MenuTemplate.java b/current/latexDraw/ui/components/MenuTemplate.java
new file mode 100644
index 0000000..01ff39f
--- /dev/null
+++ b/current/latexDraw/ui/components/MenuTemplate.java
@@ -0,0 +1,462 @@
+package latexDraw.ui.components;
+
+import java.awt.Image;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.util.Vector;
+
+import javax.swing.ImageIcon;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+
+import latexDraw.figures.Draw;
+import latexDraw.filters.LaTeXDrawTemplateFilter;
+import latexDraw.filters.SVGFilter;
+import latexDraw.generators.svg.SVGDocumentGenerator;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+import latexDraw.util.LaTeXDrawException;
+import latexDraw.util.LaTeXDrawPath;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * Defines the menu that contains the templates menu items.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ * <br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 04/10/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class MenuTemplate extends JMenu implements MouseListener
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** Define if the menu has been constructed. @since 1.9.2 */
+	protected boolean constructed;
+	
+	/** The parent frame. @since 1.9.2 */
+	protected LaTeXDrawFrame frame;
+	
+	
+	/**
+	 * The constructor.
+	 * @param txt The text of the menu.
+	 * @param f The parent frame
+	 * @since 1.9.2
+	 */
+	public MenuTemplate(String txt, LaTeXDrawFrame f)
+	{
+		super(txt);
+			
+		frame = f;
+		constructed = false;
+		addMouseListener(this);
+	}
+
+
+
+	public void mouseClicked(MouseEvent e)
+	{
+		// nothing to do.
+	}
+
+
+
+	public void mouseEntered(MouseEvent e)
+	{
+		constructMenu();
+	}
+
+	
+	
+
+	/**
+	 * Constructs the menu, only is constructed = false.
+	 * @since 1.9.2
+	 */
+	public void constructMenu()
+	{
+		if(constructed)
+			return ;
+		
+		Vector<JMenuItem> menus = createMenuItems(LaTeXDrawPath.PATH_TEMPLATES_DIR_USER, LaTeXDrawPath.PATH_CACHE_DIR, false);
+		
+		constructed = true;
+		removeAll();
+		
+		for(JMenuItem menu : menus)
+			add(menu);
+	
+		if(LaTeXDrawPath.PATH_TEMPLATES_SHARED!=null)
+		{
+			addSeparator();
+			
+			menus = createMenuItems(LaTeXDrawPath.PATH_TEMPLATES_SHARED, LaTeXDrawPath.PATH_CACHE_SHARE_DIR, true);
+			
+			for(JMenuItem menu : menus)
+				add(menu);
+		}
+		
+		addSeparator();
+		JMenuItem menu = new JMenuItem(LaTeXDrawResources.LABEL_TEMPLATE_UPDATE, LaTeXDrawResources.reloadIcon);
+		menu.addActionListener(frame);
+		menu.setActionCommand(LaTeXDrawResources.LABEL_TEMPLATE_UPDATE);
+		add(menu);
+	}
+
+
+	
+	
+	/**
+	 * Creates a list of JMenuItem from the given directory of templates.
+	 * @param pathTemplate The path of the templates.
+	 * @param pathCache The path of the cache of the templates.
+	 * @param sharedTemplates True if the templates are shared templates (in the shared directory).
+	 * @return The created JMenuItem.
+	 * @since 1.9.2
+	 */
+	private Vector<JMenuItem> createMenuItems(String pathTemplate, String pathCache, boolean sharedTemplates)
+	{
+		File templateDir = new File(pathTemplate);
+		int i, id;
+		SVGFilter filter = new SVGFilter();
+		File[] files = templateDir.listFiles();
+		char shared = sharedTemplates ? '1' : '0';
+		Vector<JMenuItem> menuItems = new Vector<JMenuItem>();
+
+		if(files!=null)
+			for(i=0; i<files.length; i++)
+				if(filter.accept(files[i]) && !files[i].isDirectory())
+				{
+					String name = files[i].getName()+LaTeXDrawResources.PNG_EXTENSION;
+					JMenuItem menu = createTemplateMenuItem(name, pathCache);
+					
+					id = name.toLowerCase().indexOf(SVGFilter.SVG_EXTENSION.toLowerCase());
+					
+					if(menu!=null && id != -1)//remove the extension from the name		
+					{
+						name = LaTeXDrawResources.TEMPLATE_START_ACTION_CMD + shared + name.substring(0, id);
+						menu.setActionCommand(name);
+						menuItems.add(menu);
+					}//if
+				} //if
+		
+		return menuItems;
+	}
+	
+	
+	   
+
+	/**
+     * Allows to create a menu item from the name of the jpg file.<br>
+     * @param nameThumb The name of the jpg file: file.jpg
+     * @return The created JMenuItem. 
+     */
+    private JMenuItem createTemplateMenuItem(String nameThumb, String path)
+    {
+    	JMenuItem menu=null;
+    	ImageIcon icon=null;
+    	String name = nameThumb;
+    	boolean updated = false;
+    	boolean imageOk = false;
+    	int id;
+    	
+    	while(!imageOk)
+	    	try
+	    	{
+	    		Image image = LaTeXDrawFrame.convertFrame.getImage(new File(path+File.separator+name));
+	    		icon = new ImageIcon(image);
+	    		image.flush();
+	    		imageOk = true;
+	    	}
+    		catch(Exception e)
+	    	{
+	    		if(updated)
+	    			imageOk = true;
+	    		else
+	    		{
+	    			updateTemplates();
+	    			updated = true;
+	    		}
+	    	}
+	    
+		id = name.indexOf(LaTeXDrawResources.PNG_EXTENSION);
+		
+		if(id!=-1)
+		{
+		    name = name.substring(0, id);
+		    id	 = name.indexOf(name.endsWith(SVGFilter.SVG_EXTENSION) ? SVGFilter.SVG_EXTENSION : LaTeXDrawResources.TEMPLATE_EXTENSION);
+		    
+		    if(id!=-1)
+		    {
+			    name = name.substring(0, id);
+			    	
+			    if(icon==null)
+			    	icon = LaTeXDrawResources.emptyIcon;
+			    
+				menu = new JMenuItem(name,icon);
+				menu.addActionListener(frame);
+		    }
+		}
+		
+    	return menu;
+    }
+  
+    
+
+	public void mouseExited(MouseEvent e)
+	{
+		// nothing to do.
+	}
+
+
+
+	public void mousePressed(MouseEvent e)
+	{
+		// nothing to do.
+	}
+
+
+
+	public void mouseReleased(MouseEvent e)
+	{
+		// nothing to do.
+	}
+
+
+
+	/**
+	 * @return the constructed.
+	 * @since 1.9.2
+	 */
+	public boolean isConstructed()
+	{
+		return constructed;
+	}
+
+
+
+	/**
+	 * @param constructed the constructed to set.
+	 * @since 1.9.2
+	 */
+	public void setConstructed(boolean constructed)
+	{
+		this.constructed = constructed;
+	}
+
+
+
+
+	
+	/**
+	 * Adds a menu item to the menu.
+	 * @param templateName The name of the new template item.
+	 * @since 1.9.2
+	 */
+	public void addItem(String templateName)
+	{
+		if(templateName==null)
+			throw new IllegalArgumentException();
+		
+		JMenuItem menu = createTemplateMenuItem(templateName + SVGFilter.SVG_EXTENSION + LaTeXDrawResources.PNG_EXTENSION, 
+												LaTeXDrawPath.PATH_CACHE_DIR);
+
+		int i, size = getItemCount();
+		boolean found = false;
+		String ac = LaTeXDrawResources.TEMPLATE_START_ACTION_CMD+'0'+templateName, ac2;
+	
+		for(i=0; i<size && !found; i++)
+		{
+			if(getItem(i)==null)
+				ac2=null;
+			else
+				ac2 = getItem(i).getActionCommand();
+			
+			if(ac2!=null && ac2.equals(ac))
+				found = true;
+		}
+			
+		if(found)
+			updateTemplates();
+		else
+		{
+			menu.setActionCommand(ac);			
+			add(menu, 0);
+		}
+	}
+
+
+	
+	
+	/**
+	 * Allows to update the templates and their icon.<br>
+	 */
+	public void updateTemplates()
+	{
+		try
+		{
+			convertOldTemplates();
+			updateTemplates(LaTeXDrawPath.PATH_TEMPLATES_DIR_USER, LaTeXDrawPath.PATH_CACHE_DIR);
+			updateTemplates(LaTeXDrawPath.PATH_TEMPLATES_SHARED, LaTeXDrawPath.PATH_CACHE_SHARE_DIR);
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+	
+	
+	/**
+	 * Allows to get the figures from a templates
+	 * @param file The file containing the template
+	 * @return The figures
+	 */
+	public static Draw readOldTemplate(File file)
+	{
+		try
+		{
+			Draw template;
+			FileInputStream fis = new FileInputStream(file);
+			ObjectInputStream in = new ObjectInputStream(fis);
+			String nameApp = (String)in.readObject();
+			
+			if(!nameApp.equals(LaTeXDrawResources.TOKEN_TEMPLATE_FILE))
+				throw new LaTeXDrawException(LaTeXDrawException.NOT_TEXDRAW_FILE);
+			
+			LaTeXDrawFrame.setVersionOfFile((String)in.readObject());
+			
+			template = (Draw)in.readObject();
+			in.close();
+			fis.close();
+			
+			return template;
+			
+		}catch(LaTeXDrawException e)
+		{
+			JOptionPane.showMessageDialog(null, 
+		 		   LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.161")//$NON-NLS-1$
+		 		   + file.getAbsolutePath()+", "+e.toString(), //$NON-NLS-1$
+		 		   LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.86"),  //$NON-NLS-1$
+		 		    JOptionPane.WARNING_MESSAGE); 
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		
+		return null;
+	}
+	
+	
+	
+	public void convertOldTemplates()
+	{
+		convertOldTemplates(LaTeXDrawPath.PATH_TEMPLATES_DIR_USER, LaTeXDrawPath.PATH_CACHE_DIR);
+		convertOldTemplates(LaTeXDrawPath.PATH_TEMPLATES_SHARED, LaTeXDrawPath.PATH_CACHE_SHARE_DIR);
+	}
+	
+	
+	
+	
+	private void convertOldTemplates(String pathTemplates, String pathCache)
+	{
+		if(pathTemplates==null || pathCache==null)
+			return ;
+		
+		LaTeXDrawTemplateFilter oldFilter = new LaTeXDrawTemplateFilter();
+		File dir = new File(pathTemplates);
+		
+		if(dir.isDirectory() && dir.canRead() && dir.canWrite())
+		{
+			File[] files = new File(pathTemplates).listFiles();
+			String path;
+			int id;
+			File testFile;
+			Draw d;
+			
+			for(File f : files)
+				if(oldFilter.accept(f))
+				{
+					path = f.getPath();
+					id = path.indexOf(LaTeXDrawResources.TEMPLATE_EXTENSION);
+					
+					if(id!=-1)
+					{
+						testFile = new File(path.substring(0, id) + SVGFilter.SVG_EXTENSION);
+						
+						if(!testFile.exists())
+						{
+							d = readOldTemplate(f);
+							
+							try { SVGDocumentGenerator.exportAsSVG(testFile.getPath(), d); }
+							catch(IOException e) { e.printStackTrace(); }
+						}
+					}
+				}
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Updates the templates from the given path, in the given cache path.
+	 * @param pathTemplate The path of the templates to update.
+	 * @param pathCache The path where the cache of the thumbnails of the templates will be stored.
+	 * @since 1.9.2
+	 */
+	private void updateTemplates(String pathTemplate, String pathCache)
+	{
+		File templateDir = new File(pathTemplate);
+		File thumbnail;
+		
+		if(!templateDir.exists() || !templateDir.isDirectory())
+			return ; // There is no template
+		
+		// We get the list of the templates
+		SVGFilter filter = new SVGFilter();
+		File[] files = templateDir.listFiles();
+		int i;
+		Draw template;
+		
+		// We export the updated template
+		if(files!=null)
+			for(i=0; i<files.length; i++)
+				try
+				{
+					if(filter.accept(files[i]))
+					{
+						template = SVGDocumentGenerator.toLatexdraw(files[i], null, null);
+							
+						thumbnail = new File(pathCache+File.separator+files[i].getName()+LaTeXDrawResources.PNG_EXTENSION);
+						frame.getDrawPanel().getDraw().createTemplateThumbnail(thumbnail, template);
+					}
+				}
+				catch(MalformedSVGDocument e) { e.printStackTrace(); }
+
+		constructed = false;
+	}
+}
diff --git a/current/latexDraw/ui/components/XScale.java b/current/latexDraw/ui/components/XScale.java
new file mode 100644
index 0000000..90c73ef
--- /dev/null
+++ b/current/latexDraw/ui/components/XScale.java
@@ -0,0 +1,339 @@
+package latexDraw.ui.components;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.geom.Line2D;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JPopupMenu;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+
+/** 
+ * This class defines the X-scale.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class XScale extends JComponent implements MouseListener,ItemListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The drawPanel which contains the pixels per centimetre */
+	private DrawPanel drawPanel;
+	
+	/** The other scale : the Y-scale (Useful for a good display) */
+	private YScale yScale;
+	
+	/** The size of the lines in axes */
+	public static final int SIZE = 10;
+	
+	/** The popup menu which allows to set the type of measure (inch, cm, ...) */
+	private JPopupMenu popupMenu;
+	
+	/** The label of the centimetre menu */
+	public static final String LABEL_CM = LaTeXDrawLang.getOthersString("XScale.cm"); //$NON-NLS-1$
+	
+	/** The label of the inch menu */
+	public static final String LABEL_INCH = LaTeXDrawLang.getOthersString("XScale.inch"); //$NON-NLS-1$
+	
+	/** The unit of length by default */
+	public static final String DEFAULT_UNIT = LABEL_CM;
+	
+	/** The menu for centimetres */ 
+	protected JCheckBoxMenuItem cmMenu;
+	
+	/** The menu for inches */
+	protected JCheckBoxMenuItem inchMenu;
+	
+	
+	
+	/**
+	 * The constructor.
+	 * @param drawP The drawPanel which contains the pixels per centimetre.
+	 * @param y The YScale bounds to the XScale.
+	 * @throws IllegalArgumentException If drawP or y is null.
+	 */
+	public XScale(DrawPanel drawP, YScale y)
+	{
+		super();
+		
+		if(drawP==null || y==null)
+			throw new IllegalArgumentException();
+		
+		setPreferredSize(new Dimension(500, SIZE));
+		drawPanel = drawP;
+		yScale = y;
+		
+		/* Creation of the popup menu */
+		ButtonGroup buttonGroup = new ButtonGroup();
+		popupMenu = new JPopupMenu();
+		cmMenu = new JCheckBoxMenuItem(LABEL_CM);
+		cmMenu.setActionCommand(LABEL_CM);
+		cmMenu.addItemListener(this);
+		inchMenu = new JCheckBoxMenuItem(LABEL_INCH);
+		inchMenu.addItemListener(this);
+		inchMenu.setActionCommand(LABEL_INCH);
+		cmMenu.setSelected(true);
+		popupMenu.add(cmMenu);
+		popupMenu.add(inchMenu);
+		buttonGroup.add(cmMenu);
+		buttonGroup.add(inchMenu);
+		addMouseListener(this);
+		setDoubleBuffered(true);
+	}
+	
+
+	
+    
+	/**
+	 * Sets the Y-scale.
+	 * @param y The new Y-scale.
+	 * @throws IllegalArgumentException If y is null.
+	 */
+	public void setYScale(YScale y)
+	{
+		if(y==null)
+			throw new IllegalArgumentException();
+		
+		yScale = y;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to access to the popup menu.
+	 * @return The popup menu.
+	 */
+	public JPopupMenu getPopupMenu()
+	{
+		return popupMenu;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to know the X-coordinates of the start of the X-Scale.
+	 * @return The X-coordinates of the start of the X-Scale.
+	 */
+	public float getStart()
+	{
+		float start;
+		
+		if(yScale==null)
+    		start = 0;
+    	else
+    		if(yScale.isVisible())
+    			  start = SIZE;
+    		else  start = 0;
+		
+		return start;
+	}
+	
+	
+	
+	
+	@Override
+    public void paintComponent(Graphics g)
+    {   	
+		try
+		{
+	    	Dimension d = getSize();
+	    	double zoom = drawPanel.getZoom();
+	    	double width = d.getWidth()*(1/zoom), i, j, start, cpt;
+	    	double pixPerCm = drawPanel.getPixelsPerCm();
+	    	Graphics2D g2 = (Graphics2D)g;
+	    	
+	    	g2.scale(zoom, zoom);
+	    	g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+			g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+			g2.setStroke(new BasicStroke(0, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+			
+			Color formerCol = g2.getColor();
+	    	g2.setColor(Color.BLACK);
+			
+	    	if(yScale==null)
+	    		start = 0.;
+	    	else
+	    		if(yScale.isVisible())
+	    			  start = SIZE;
+	    		else  start = 0.;
+	  
+    		if(inchMenu.isSelected())
+    			pixPerCm*=PSTricksConstants.INCH_VAL_CM;
+    		
+    		if(pixPerCm/10.!=(int)(pixPerCm/10.))
+			{
+    			double tmp = pixPerCm/10.;
+    			tmp = tmp-(int)tmp>0.5 ? ((int)tmp)+1 : (int)tmp;
+    			pixPerCm = tmp*10;
+			}
+
+	    	if(pixPerCm>20/zoom)
+	    	{    			    			
+	    		double pixPerCm10 = pixPerCm/10.;
+	    		
+	    		for(i=start/zoom+pixPerCm10; i<width; i+=pixPerCm)
+	    			for(j=i, cpt=1; cpt<10; j+=pixPerCm10, cpt++)
+	    				g2.draw(new Line2D.Double(j,(SIZE/2.)/zoom,j,SIZE/zoom));
+	    	}
+	    	
+	    	for(i=start/zoom; i<width;i+=pixPerCm)
+	    		g2.draw(new Line2D.Double(i, 0., i, SIZE/zoom));
+	    	
+	    	g2.setColor(formerCol);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+    }
+
+
+	
+	
+    /** 
+     * Defines the actions that it must be realised by a right click of the mouse.
+     * @param e Corresponds to the click of the mouse.
+     */
+	public void mouseClickedRightButton(MouseEvent e)
+    {
+		if(popupMenu!=null)
+			popupMenu.show(e.getComponent(), e.getX(), e.getY());
+    }
+	
+	
+
+
+	 /** 
+     * Defines the actions that it must be realised by a click of the mouse.
+     * @param e The event
+     */
+	public void mouseClicked(MouseEvent e) 
+	{
+    	switch(e.getButton())
+	    {
+		    case MouseEvent.BUTTON1 :   	
+		    			break;
+			
+		    case MouseEvent.BUTTON2 : 
+		    			break;
+	
+		    case MouseEvent.BUTTON3 : 
+						mouseClickedRightButton(e);    
+						break;
+				
+		    default : break;
+	    } // switch
+
+    	e.consume();
+	}
+
+	
+
+	public void mousePressed(MouseEvent e) 
+	{
+		/* No action to do. */
+	}
+
+
+	public void mouseReleased(MouseEvent e) 
+	{
+		/* No action to do. */
+	}
+
+
+	public void mouseEntered(MouseEvent e) 
+	{
+		/* No action to do. */
+	}
+
+
+
+	public void mouseExited(MouseEvent e) 
+	{
+		/* No action to do. */
+	}
+
+
+
+	public void itemStateChanged(ItemEvent e) 
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JCheckBoxMenuItem || o instanceof JComboBox)
+		{
+			boolean isInCm = true;
+
+			if(o instanceof JCheckBoxMenuItem)
+				drawPanel.getDraw().setUnitForPixelsPerCm(
+						((JCheckBoxMenuItem)o).getActionCommand());
+			else
+			if(o instanceof JComboBox)
+			{
+				if(!(((String)((JComboBox)o).getSelectedItem())).equals(LABEL_CM))
+					 isInCm = false;
+				cmMenu.setSelected(isInCm);
+				inchMenu.setSelected(!isInCm);
+				
+				drawPanel.getDraw().setUnitForPixelsPerCm(
+										((String)((JComboBox)o).getSelectedItem()));
+			}
+			
+			repaint();
+			yScale.repaint();
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Sets the unit of length (and to change the scale of the XScale and to check the good menu).
+	 * @param unitForPixelsPerCm The unitForPixelsPerCm to set.
+	 * @throws IllegalArgumentException If unitForPixelsPerCm is not valid.
+	 */
+	public void setUnitForPixelsPerCm(String unitForPixelsPerCm)
+	{
+		if(unitForPixelsPerCm==null || (!unitForPixelsPerCm.equals(LABEL_CM) && !unitForPixelsPerCm.equals(LABEL_INCH)))
+			throw new IllegalArgumentException();
+		
+		boolean inCm = unitForPixelsPerCm.equals(LABEL_CM);
+		
+		cmMenu.setSelected(inCm);
+		inchMenu.setSelected(!inCm);
+		repaint();
+		yScale.repaint();
+	}
+}
diff --git a/current/latexDraw/ui/components/YScale.java b/current/latexDraw/ui/components/YScale.java
new file mode 100644
index 0000000..b9a847b
--- /dev/null
+++ b/current/latexDraw/ui/components/YScale.java
@@ -0,0 +1,199 @@
+package latexDraw.ui.components;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.geom.Line2D;
+
+import javax.swing.JComponent;
+
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+
+/** 
+ * This class defines the Y-scale.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class YScale extends JComponent implements MouseListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The drawPanl which contains the pixels per centimetre */
+	private DrawPanel drawPanel;
+	
+	/** The X-scale of the program */
+	private XScale xScale;
+	
+	
+	
+	/**
+	 * The constructor.
+	 * @param drawP The drawPanel which contains the pixels per centimetre.
+	 * @param xScale The XScale bounds to the YScale.
+	 * @throws IllegalArgumentException If drawP is null.
+	 */
+	public YScale(DrawPanel drawP, XScale xScale)
+	{
+		super();
+		
+		if(drawP==null)
+			throw new IllegalArgumentException();
+		
+		setPreferredSize(new Dimension(XScale.SIZE, 500));
+		drawPanel = drawP;
+		this.xScale = xScale;
+		addMouseListener(this);
+		setDoubleBuffered(true);
+	}
+	
+	
+	
+	@Override
+    public void paintComponent(Graphics g)
+    {   	
+		try
+		{
+	    	Dimension d = getSize();
+	    	double zoom = drawPanel.getZoom();
+	    	double height = d.getHeight()*(1/zoom), i, j, cpt;
+	    	double pixPerCm = drawPanel.getPixelsPerCm();
+	    	Graphics2D g2 = (Graphics2D)g;
+	    	
+	    	g2.scale(zoom, zoom);
+	    	
+	    	g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+			g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+			g2.setStroke(new BasicStroke(0, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
+			
+			Color formerCol = g2.getColor();
+	    	g2.setColor(Color.BLACK);
+			
+	    	
+    		if(xScale.inchMenu.isSelected())
+    			pixPerCm*=PSTricksConstants.INCH_VAL_CM;
+	    	
+    		if(pixPerCm/10.!=(int)(pixPerCm/10.))
+			{
+    			double tmp = pixPerCm/10.;
+    			tmp = tmp-(int)tmp>0.5 ? ((int)tmp)+1 : (int)tmp;
+    			pixPerCm = tmp*10;
+			}
+    		
+	    	if(pixPerCm>20/zoom)
+	    	{
+	    		double pixPerCm10 = pixPerCm/10.;
+	    		
+	    		for(i=pixPerCm10; i<height; i+=pixPerCm)
+	    			for(j=i, cpt=1; cpt<10; j+=pixPerCm10, cpt++)
+	    				g2.draw(new Line2D.Double(XScale.SIZE/2./zoom,j,XScale.SIZE/zoom,j));
+	    	}
+	    	
+	    	for(j=0; j<height;j+=pixPerCm)
+	    		g2.draw(new Line2D.Double(0.,j,XScale.SIZE/zoom,j));
+	    	
+	    	g2.setColor(formerCol);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+    }
+
+
+	
+	/**
+	 * sets the X-scale.
+	 * @param x The new X-scale.
+	 * @throws IllegalArgumentException If x is null.
+	 */
+	public void setXScale(XScale x)
+	{
+		if(x==null)
+			throw new IllegalArgumentException();
+		
+		xScale = x;
+	}
+	
+	
+	
+	
+    /** 
+     * Defines the actions that it must be realised by a right click of the mouse.
+     * @param e Correspond to the click of the mouse.
+     */
+	public void mouseClickedRightButton(MouseEvent e)
+    {
+		if(xScale!=null && xScale.getPopupMenu()!=null)
+			xScale.getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
+    }
+	
+	
+	
+	
+	public void mouseClicked(MouseEvent e) 
+	{
+    	switch(e.getButton())
+	    {
+		    case MouseEvent.BUTTON1 :   	
+		    			break;
+			
+		    case MouseEvent.BUTTON2 : 
+		    			break;
+	
+		    case MouseEvent.BUTTON3 : 
+						mouseClickedRightButton(e);    
+						break;
+	    }
+	}
+
+
+
+	public void mousePressed(MouseEvent e) 
+	{
+		/* No action to do. */
+	}
+
+
+	
+	public void mouseReleased(MouseEvent e) 
+	{
+		/* No action to do. */
+	}
+
+
+	
+	public void mouseEntered(MouseEvent e) 
+	{
+		/* No action to do. */
+	}
+
+
+
+	public void mouseExited(MouseEvent e) 
+	{
+		/* No action to do. */
+	}
+}
diff --git a/current/latexDraw/ui/components/progressbars/AbstractProgressBarManager.java b/current/latexDraw/ui/components/progressbars/AbstractProgressBarManager.java
new file mode 100644
index 0000000..a565edb
--- /dev/null
+++ b/current/latexDraw/ui/components/progressbars/AbstractProgressBarManager.java
@@ -0,0 +1,117 @@
+package latexDraw.ui.components.progressbars;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+
+import javax.swing.JButton;
+import javax.swing.JProgressBar;
+
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.util.LaTeXDrawResources;
+
+/** 
+ * Defines an abstract progress bar manager for latexdraw.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ * <br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/04/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class AbstractProgressBarManager implements Runnable, ActionListener
+{
+	/** The thread of the parser. */
+	protected transient Thread parsingThread;
+	
+	/** The main frame. */
+	protected LaTeXDrawFrame frame;
+	
+	/** The file to parse. */
+	protected File fileToParse;
+	
+	
+	
+	public AbstractProgressBarManager(LaTeXDrawFrame f)
+	{
+		if(f==null)
+			throw new IllegalArgumentException();
+		
+		frame = f;
+		frame.getStopButton().addActionListener(this);
+		fileToParse = null;
+	}
+	
+	
+	
+	public void actionPerformed(ActionEvent e)
+	{
+		Object src = e.getSource();
+		
+		if(src instanceof JButton && LaTeXDrawResources.LABEL_STOP.equals(((JButton)(src)).getActionCommand()))
+		{
+			frame.getStopButton().setVisible(false);
+			frame.getProgressBar().setVisible(false);
+			frame.requestFocus();
+		}
+	}
+	
+	
+	
+	public void resetProgressBar()
+	{
+		JProgressBar progressBar 	= frame.getProgressBar();
+		JButton stopButton 			= frame.getStopButton();
+		
+		parsingThread=null;
+		progressBar.setVisible(false);
+		stopButton.setVisible(false);
+		fileToParse = null;
+	}
+	
+	
+	public void startProgressBar()
+	{
+		JProgressBar progressBar 	= frame.getProgressBar();
+		JButton stopButton 			= frame.getStopButton();
+		
+		progressBar.setMinimum(0);
+		progressBar.setVisible(true);
+		
+		if(stopButton!=null)
+			stopButton.setVisible(true);
+		
+		parsingThread = new Thread(this);
+		parsingThread.start();
+	}
+
+
+	/**
+	 * @return the fileToParse.
+	 * @since 2.0.0
+	 */
+	public File getFileToParse()
+	{
+		return fileToParse;
+	}
+
+
+	/**
+	 * @param fileToParse the fileToParse to set.
+	 * @since 2.0.0
+	 */
+	public void setFileToParse(File fileToParse)
+	{
+		this.fileToParse = fileToParse;
+	}
+}
diff --git a/current/latexDraw/ui/components/progressbars/PSTProgressBarManager.java b/current/latexDraw/ui/components/progressbars/PSTProgressBarManager.java
new file mode 100644
index 0000000..7e4a934
--- /dev/null
+++ b/current/latexDraw/ui/components/progressbars/PSTProgressBarManager.java
@@ -0,0 +1,169 @@
+package latexDraw.ui.components.progressbars;
+
+import java.awt.event.ActionEvent;
+import java.util.Vector;
+
+import javax.swing.JButton;
+import javax.swing.JOptionPane;
+import javax.swing.JProgressBar;
+
+import latexDraw.figures.Figure;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.parsers.Parser;
+import latexDraw.parsers.pstricks.LaTeXDrawPSTricksParserActions;
+import latexDraw.parsers.pstricks.PSTricksParameters;
+import latexDraw.parsers.pstricks.PSTricksParser;
+import latexDraw.ui.CodePanel;
+import latexDraw.ui.DrawContainer;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.util.LaTeXDrawResources;
+
+/** 
+ * Defines a progress bar manager of PSTricks import.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ * <br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/04/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class PSTProgressBarManager extends AbstractProgressBarManager
+{
+	/** The TeX parser */
+	private transient PSTricksParser texParser;
+	
+	/** The code to parse. */
+	protected String codeToParse;
+	
+	
+	public PSTProgressBarManager(LaTeXDrawFrame frame)
+	{
+		super(frame);
+		
+		codeToParse = null;
+	}
+
+	
+	@Override
+	public void actionPerformed(ActionEvent e)
+	{
+		super.actionPerformed(e);
+		
+		Object src = e.getSource();
+		
+		if(src instanceof JButton && LaTeXDrawResources.LABEL_STOP.equals(((JButton)(src)).getActionCommand()))
+			if(parsingThread!=null) texParser.stop();
+	}
+
+
+
+	public void run()
+	{
+		if(codeToParse==null && fileToParse==null)
+			return ;
+		
+		JProgressBar progressBar 	= frame.getProgressBar();
+		JButton stopButton 			= frame.getStopButton();
+		LaTeXDrawPSTricksParserActions ltpa = new LaTeXDrawPSTricksParserActions();
+		texParser = new PSTricksParser(ltpa);
+		progressBar.setValue(0);
+		stopButton.setVisible(true);
+		progressBar.setVisible(true);
+		
+		int res;
+		
+		if(fileToParse!=null)
+			 res = texParser.parse(fileToParse, frame, progressBar);
+		else res = texParser.parse(codeToParse, frame, progressBar);
+			
+		Vector<Figure> fig = ltpa.getFigures();
+		
+		switch(res)
+		{
+			case Parser.ERROR_PARSING :
+				
+				frame.setStatusBarText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.34")); //$NON-NLS-1$
+				break;
+					
+			case Parser.CANCEL_PARSING :
+				
+				frame.setStatusBarText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.35")); //$NON-NLS-1$
+				break;
+					
+			case Parser.OK_PARSING :
+				
+				if(fig==null || fig.isEmpty())
+				{
+					JOptionPane.showMessageDialog(frame, LaTeXDrawLang.getString1_6("LaTeXDrawFrame.30") //$NON-NLS-1$
+					+ LaTeXDrawResources.MAIL_ME + LaTeXDrawLang.getString1_6("LaTeXDrawFrame.31"), //$NON-NLS-1$
+					LaTeXDrawLang.getString1_6("LaTeXDrawFrame.32"),   //$NON-NLS-1$ 
+					JOptionPane.WARNING_MESSAGE );
+					frame.setStatusBarText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.33")); //$NON-NLS-1$
+				}
+				else
+				{
+					LaTeXDrawPSTricksParserActions.optimizeCode(fig);
+					DrawPanel drawPanel = frame.getDrawPanel();
+					CodePanel codePanel = frame.getCodePanel();
+					DrawContainer draw  = drawPanel.getDraw();
+					
+					for(Figure f : fig)
+						draw.addFigure(f, frame.getUndoManager());
+					
+					draw.recenterFigures();
+					codePanel.setPositionHoriToken(PSTricksParameters.isCentered ? 
+										CodePanel.TOKEN_HORI_CENTER_START : CodePanel.TOKEN_HORI_VERT_DEFAULT);
+					codePanel.setPositionVertToken(PSTricksParameters.tokenPosition);
+					drawPanel.updateDraw(true);
+					frame.setStatusBarText(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.36")); //$NON-NLS-1$
+					frame.getLMenuBar().getExportAsMenu().setEnabled(true);
+					frame.getToolbar().getButtonPdfExport().setEnabled(true);
+					drawPanel.setIsModified(true);
+				}
+				break;
+		}
+		
+		resetProgressBar();
+	}
+
+
+	
+	@Override
+	public void resetProgressBar()
+	{
+		super.resetProgressBar();
+		
+		codeToParse = null;
+	}
+	
+	
+	/**
+	 * @return the codeToParse.
+	 * @since 2.0.0
+	 */
+	public String getCodeToParse()
+	{
+		return codeToParse;
+	}
+
+
+	/**
+	 * @param codeToParse the codeToParse to set.
+	 * @since 2.0.0
+	 */
+	public void setCodeToParse(String codeToParse)
+	{
+		this.codeToParse = codeToParse;
+	}
+}
diff --git a/current/latexDraw/ui/components/progressbars/SVGProgressBarManager.java b/current/latexDraw/ui/components/progressbars/SVGProgressBarManager.java
new file mode 100644
index 0000000..7df063f
--- /dev/null
+++ b/current/latexDraw/ui/components/progressbars/SVGProgressBarManager.java
@@ -0,0 +1,84 @@
+package latexDraw.ui.components.progressbars;
+
+import javax.swing.JOptionPane;
+
+import latexDraw.figures.Draw;
+import latexDraw.figures.Figure;
+import latexDraw.generators.svg.SVGDocumentGenerator;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.parsers.svg.MalformedSVGDocument;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.LaTeXDrawFrame;
+
+/** 
+ * Defines a progress bar manager of SVG import.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ * <br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 02/04/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class SVGProgressBarManager extends AbstractProgressBarManager
+{
+	public SVGProgressBarManager(LaTeXDrawFrame f)
+	{
+		super(f);
+	}
+
+
+
+	public void run()
+	{
+		try
+		{
+			Draw figures = SVGDocumentGenerator.toLatexdraw(fileToParse, frame, frame.getProgressBar());
+			DrawPanel drawPanel = frame.getDrawPanel();
+
+			if(figures!=null)
+			{
+				for(Figure f : figures.getFigures())
+					drawPanel.getDraw().addFigure(f, null);
+				
+				if(!figures.isEmpty())
+    				frame.setIsModified(true);
+				
+				drawPanel.updateDraw(true);
+			}
+			else
+				frame.setStatusBarText(LaTeXDrawLang.getOthersString("SVGManager.0")); //$NON-NLS-1$
+			
+			frame.setTitle();
+			frame.getUndoManager().clear();
+			frame.updateUndoRedo();
+			frame.setSelection(false);
+			frame.setIsModified(false);
+			frame.getPreferencesFrame().addRecentFile(fileToParse.getAbsolutePath());
+			frame.getLMenuBar().updateRecentFilesMenu();
+			frame.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.202")); //$NON-NLS-1$
+		}
+		catch(MalformedSVGDocument ex)
+		{
+			frame.setIsModified(false);
+			frame.setCurrentFile(null);
+			frame.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.203")); //$NON-NLS-1$
+			ex.printStackTrace(); 
+			
+			JOptionPane.showMessageDialog(frame, 
+		 		    LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.204") + ex.toString(), //$NON-NLS-1$
+		 		    LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.86"), JOptionPane.WARNING_MESSAGE);   //$NON-NLS-1$
+		}
+		
+		resetProgressBar();
+	}
+}
diff --git a/current/latexDraw/ui/dialog/AbstractGridShapeFrame.java b/current/latexDraw/ui/dialog/AbstractGridShapeFrame.java
new file mode 100644
index 0000000..a07e198
--- /dev/null
+++ b/current/latexDraw/ui/dialog/AbstractGridShapeFrame.java
@@ -0,0 +1,521 @@
+package latexDraw.ui.dialog;
+
+import java.awt.Dimension;
+import java.awt.Frame;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.GridShape;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+/** 
+ * This class defines the frame which allows to modify a grid<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 08/17/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @since 1.8<br>
+ * @version 2.0.0<br>
+ */
+public abstract class AbstractGridShapeFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to change the minimum value of X */
+	protected JSpinner xGridStart;
+	
+	/** Allows to change the minimum value of Y */
+	protected JSpinner yGridStart;
+	
+	/** Allows to change the maximum value of X */
+	protected JSpinner xGridEnd;
+	
+	/** Allows to change the maximum value of Y */
+	protected JSpinner yGridEnd;
+	
+	/** Allows to change the X-origin */
+	protected JSpinner xOrigin;
+	
+	/** Allows to change the Y-origin */
+	protected JSpinner yOrigin;
+	
+	/** This field allows the set the X-coordinate of position of the grid 
+	 * (the south-west point) */
+	protected JSpinner xPosition;
+	
+	/** This field allows the set the Y-coordinate of position of the grid 
+	 * (the south-west point) */
+	protected JSpinner yPosition;
+	
+	/** Allows to know if we must draw the labels */
+	protected JCheckBox invertXLabelsCB;
+	
+	/** Allows to know if we must draw the labels */
+	protected JCheckBox invertYLabelsCB;
+
+	
+	
+	/** The label of the invertXLabelsCB */
+	public static final String LABEL_ISXLABEL = LaTeXDrawLang.getString1_6("ParametersGridFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the invertYLabelsCB */
+	public static final String LABEL_ISYLABEL = LaTeXDrawLang.getString1_6("ParametersGridFrame.1"); //$NON-NLS-1$
+	
+	/** The label of the yOrigin item */
+	public static final String LABEL_YORIGIN = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the xOrigin item */
+	public static final String LABEL_XORIGIN = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.1"); //$NON-NLS-1$
+	
+	/** The label of the gridLabelsColor item */
+	public static final String LABEL_LABELSCOLOR = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.2"); //$NON-NLS-1$
+	
+	/** The label of the xGridEnd item */
+	public static final String LABEL_XGRIDEND = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.11"); //$NON-NLS-1$
+	
+	/** The label of the xGridStart item */
+	public static final String LABEL_XGRIDSTART = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.12"); //$NON-NLS-1$
+	
+	/** The label of the yGridEnd item */
+	public static final String LABEL_YGRIDEND = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.13"); //$NON-NLS-1$
+	
+	/** The label of the yGridStart item */
+	public static final String LABEL_YGRIDSTART = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.14"); //$NON-NLS-1$
+	
+
+
+	protected AbstractGridShapeFrame(Frame parent, DrawPanel d, boolean attachToMainFrame)
+	{
+		super(parent, d, attachToMainFrame);
+	}
+
+
+	
+	protected JPanel createPositionPanel(boolean withOrigin)
+	{
+  		JPanel coordP = new JPanel(new GridBagLayout());
+  		
+  		GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;
+     	constraint.gridy = 0;
+     	constraint.gridwidth = 1;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.CENTER;
+     	coordP.add(new JLabel(LABEL_X), constraint);
+  		
+     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+     	xPosition = new JSpinner(model);
+     	xPosition.setEditor(new JSpinner.NumberEditor(xPosition, "0.0"));//$NON-NLS-1$
+		xPosition.addChangeListener(this);
+     	xPosition.setName(LABEL_X);
+     	constraint.gridx++;
+     	coordP.add(xPosition, constraint);	  		
+
+    	constraint.gridx++;
+    	coordP.add(new JLabel(LABEL_Y), constraint);
+  		
+     	model = new SpinnerNumberModel(0,0,10000,0.1);
+     	yPosition = new JSpinner(model);
+     	yPosition.setEditor(new JSpinner.NumberEditor(yPosition, "0.0"));//$NON-NLS-1$
+     	yPosition.addChangeListener(this);
+     	yPosition.setName(LABEL_Y);
+     	constraint.gridx++;
+     	coordP.add(yPosition, constraint);
+     	
+    	constraint.gridx = 0;	constraint.gridy++;
+    	coordP.add(new JLabel(LABEL_XGRIDSTART), constraint);
+  		
+     	model = new SpinnerNumberModel(0,-10000,10000,1);
+     	xGridStart = new JSpinner(model);
+     	xGridStart.setEditor(new JSpinner.NumberEditor(xGridStart, "0"));//$NON-NLS-1$
+     	xGridStart.addChangeListener(this);
+     	xGridStart.setName(LABEL_XGRIDSTART);
+     	constraint.gridx++;
+     	coordP.add(xGridStart, constraint);
+   
+     	constraint.gridx++;
+     	coordP.add(new JLabel(LABEL_YGRIDSTART), constraint);
+  		
+     	model = new SpinnerNumberModel(0,-10000,10000,1);
+     	yGridStart = new JSpinner(model);
+     	yGridStart.setEditor(new JSpinner.NumberEditor(yGridStart, "0"));//$NON-NLS-1$
+     	yGridStart.addChangeListener(this);
+     	yGridStart.setName(LABEL_YGRIDSTART);
+     	constraint.gridx++;
+     	coordP.add(yGridStart, constraint);	     	
+    	
+     	constraint.gridx = 0;	constraint.gridy++;
+     	coordP.add(new JLabel(LABEL_XGRIDEND), constraint);
+     	
+     	model = new SpinnerNumberModel(0,-10000,10000,1);
+     	xGridEnd = new JSpinner(model);
+     	xGridEnd.setEditor(new JSpinner.NumberEditor(xGridEnd, "0"));//$NON-NLS-1$
+     	xGridEnd.addChangeListener(this);
+     	xGridEnd.setName(LABEL_XGRIDEND);
+     	constraint.gridx++;
+     	coordP.add(xGridEnd, constraint);
+   
+     	constraint.gridx++;
+     	coordP.add(new JLabel(LABEL_YGRIDEND), constraint);
+  		
+     	model = new SpinnerNumberModel(0,-10000,10000,1);
+     	yGridEnd = new JSpinner(model);
+     	yGridEnd.setEditor(new JSpinner.NumberEditor(yGridEnd, "0"));//$NON-NLS-1$
+     	yGridEnd.addChangeListener(this);
+     	yGridEnd.setName(LABEL_YGRIDEND);
+     	constraint.gridx++;
+     	coordP.add(yGridEnd, constraint);	   
+     	
+     	if(withOrigin)
+     	{
+	     	constraint.gridx=0; constraint.gridy++;
+	     	coordP.add(new JLabel(LABEL_XORIGIN), constraint);
+	     	
+	     	model = new SpinnerNumberModel(0,-10000,10000,1);
+	     	xOrigin = new JSpinner(model);
+	     	xOrigin.setEditor(new JSpinner.NumberEditor(xOrigin, "0"));//$NON-NLS-1$
+	     	xOrigin.addChangeListener(this);
+	     	xOrigin.setName(LABEL_XORIGIN);
+	     	constraint.gridx++;
+	     	coordP.add(xOrigin, constraint);	   
+	     	
+	     	constraint.gridx++; 
+	     	coordP.add(new JLabel(LABEL_YORIGIN), constraint);
+	     	
+	     	model = new SpinnerNumberModel(0,-10000,10000,1);
+	     	yOrigin = new JSpinner(model);
+	     	yOrigin.setEditor(new JSpinner.NumberEditor(yOrigin, "0"));//$NON-NLS-1$
+	     	yOrigin.addChangeListener(this);
+	     	yOrigin.setName(LABEL_YORIGIN);
+	     	constraint.gridx++;
+	     	coordP.add(yOrigin, constraint);	
+     	}
+     	
+     	constraint.gridx = 0;	constraint.gridy++;
+     	coordP.add(new JLabel(LABEL_ROTATION), constraint);
+     	
+     	model = new SpinnerNumberModel(Figure.DEFAULT_ROTATION_ANGLE, -360, 360,0.1);
+     	rotationField = new JSpinner(model);
+     	rotationField.setEditor(new JSpinner.NumberEditor(rotationField, "0.0"));//$NON-NLS-1$
+     	rotationField.setName(LaTeXDrawResources.LABEL_ROTATE);
+     	rotationField.addChangeListener(this);
+     	constraint.gridx++;
+     	coordP.add(rotationField, constraint);
+     	coordP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_POSITION_DIMENSIONS, 
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	coordP.setPreferredSize(new Dimension(WIDTH_PANELS, 200));
+     	coordP.setMinimumSize(new Dimension(WIDTH_PANELS, 200));
+
+     	return coordP;
+	}
+
+
+	
+	
+	@Override
+	public void actionPerformed(ActionEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			GridShape g = (GridShape)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JCheckBox)
+			{
+				String label = ((JCheckBox)o).getActionCommand();
+			
+				if(label.equals(LABEL_ISXLABEL))
+				{
+					setModified(true);
+					g.setYLabelWest(!invertXLabelsCB.isSelected());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(label.equals(LABEL_ISYLABEL))
+				{
+					setModified(true);
+					g.setXLabelSouth(!invertYLabelsCB.isSelected());
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.actionPerformed(e);
+	}
+			
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			GridShape g = (GridShape)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				double v = Double.valueOf(((JSpinner)o).getValue().toString()).doubleValue();
+				
+				if(name.equals(LABEL_XGRIDEND))
+				{
+					int xE = (int)v;
+					int xS = Integer.valueOf(xGridStart.getValue().toString()).intValue();
+					
+					setModified(true);
+					g.getGridEnd().x = xE;
+					xGridStart.removeChangeListener(this);
+					xGridStart.setModel(new SpinnerNumberModel(xE,-10000,xE,1));
+					xGridStart.setValue(Math.min(xE, xS));
+					xGridStart.addChangeListener(this);
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_YGRIDEND))
+				{
+					int yE = (int)v;
+					int yS = Integer.valueOf(yGridStart.getValue().toString()).intValue();
+					
+					setModified(true);
+					g.getGridEnd().y = yE;
+					yGridStart.removeChangeListener(this);
+					yGridStart.setModel(new SpinnerNumberModel(yE,-10000,yE,1));
+					yGridStart.setValue(Math.min(yE, yS));
+					yGridStart.addChangeListener(this);
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_XGRIDSTART))
+				{
+					int xE = Integer.valueOf(xGridEnd.getValue().toString()).intValue();
+					int xS = (int)v;
+					
+					setModified(true);
+					g.getGridStart().x = xS;
+					xGridEnd.removeChangeListener(this);
+					xGridEnd.setModel(new SpinnerNumberModel(xS,xS,10000,1));
+					xGridEnd.setValue(Math.max(xE, xS));
+					xGridEnd.addChangeListener(this);
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_YGRIDSTART))
+				{
+					int yE = Integer.valueOf(yGridEnd.getValue().toString()).intValue();
+					int yS = (int)v;
+					
+					setModified(true);
+					g.getGridStart().y = yS;
+					yGridEnd.removeChangeListener(this);
+					yGridEnd.setModel(new SpinnerNumberModel(yS,yS,10000,1));
+					yGridEnd.setValue(Math.max(yE, yS));
+					yGridEnd.addChangeListener(this);
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_XORIGIN))
+				{
+					setModified(true);
+					g.getOrigin().x = (int)v;
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_YORIGIN))
+				{
+					setModified(true);
+					g.getOrigin().y = (int)v;
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_X))
+				{
+					setModified(true);
+					g.getPosition().x = (float)v;
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_Y))
+				{
+					setModified(true);
+					g.getPosition().y = (float)v;
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		GridShape g = (GridShape)figure;
+
+		LaTeXDrawPoint2D gridMax = g.getGridEnd(), gridMin = g.getGridStart();
+		gridMax.x = Integer.valueOf(xGridEnd.getValue().toString()).intValue();
+		gridMax.y = Integer.valueOf(yGridEnd.getValue().toString()).intValue();
+		gridMin.x = Integer.valueOf(xGridStart.getValue().toString()).intValue();
+		gridMin.y = Integer.valueOf(yGridStart.getValue().toString()).intValue();
+		LaTeXDrawPoint2D position = g.getPosition();
+		position.x = Double.valueOf(xPosition.getValue().toString()).doubleValue();
+		position.y = Double.valueOf(yPosition.getValue().toString()).doubleValue();
+		
+		if(xOrigin!=null)
+		{
+			LaTeXDrawPoint2D origin = g.getOrigin();
+			float tmp = Float.valueOf(xOrigin.getValue().toString()).floatValue();
+			origin.x = tmp;
+			tmp = Float.valueOf(yOrigin.getValue().toString()).floatValue();
+			origin.y = tmp;
+		}
+		
+		g.updateBorders();
+		g.setXLabelSouth(!invertYLabelsCB.isSelected());
+		g.setYLabelWest(!invertXLabelsCB.isSelected());
+		super.saveParameters();
+		g.updateBorders(null);
+	}
+
+	
+	
+	
+	@Override
+	public void setFigureFrameField()
+	{
+		GridShape g = (GridShape)figure;
+		
+		xGridStart.removeChangeListener(this);
+		yGridStart.removeChangeListener(this);
+		xGridEnd.removeChangeListener(this);
+		yGridEnd.removeChangeListener(this);
+		
+		xGridStart.setValue((int)g.getGridStart().x);
+		xGridStart.setModel(new SpinnerNumberModel((int)g.getGridStart().x,-10000,(int)g.getGridEnd().x,1));
+		yGridStart.setValue((int)g.getGridStart().y);
+		yGridStart.setModel(new SpinnerNumberModel((int)g.getGridStart().y,-10000,(int)g.getGridEnd().y,1));
+		xGridEnd.setValue((int)g.getGridEnd().x);
+		xGridEnd.setModel(new SpinnerNumberModel((int)g.getGridEnd().x,(int)g.getGridStart().x,10000,1));
+		yGridEnd.setValue((int)g.getGridEnd().y);
+		yGridEnd.setModel(new SpinnerNumberModel((int)g.getGridEnd().y,(int)g.getGridStart().y,10000,1));
+		
+		xGridStart.addChangeListener(this);
+		yGridStart.addChangeListener(this);
+		xGridEnd.addChangeListener(this);
+		yGridEnd.addChangeListener(this);
+		
+		xPosition.setValue(g.getPosition().x);
+		yPosition.setValue(g.getPosition().y);
+		
+		if(xOrigin!=null)
+		{
+			xOrigin.setValue((int)g.getOrigin().x);
+			yOrigin.setValue((int)g.getOrigin().y);
+		}
+		
+		invertXLabelsCB.setSelected(!g.isYLabelWest());
+		invertYLabelsCB.setSelected(!g.isXLabelSouth());
+	}
+
+	
+	
+	
+	@Override
+	public void setDefaultsValues()
+	{
+		super.setDefaultsValues();
+		
+		GridShape gs = (GridShape)glimpsePanel.glimpseFigure;
+		
+		invertXLabelsCB.setSelected(!GridShape.DEFAULT_ISYLABELWEST);
+		invertYLabelsCB.setSelected(!GridShape.DEFAULT_ISXLABELSOUTH);
+		gs.setXLabelSouth(GridShape.DEFAULT_ISXLABELSOUTH);
+		gs.setYLabelWest(GridShape.DEFAULT_ISYLABELWEST);
+		
+		xGridStart.removeChangeListener(this);
+		yGridStart.removeChangeListener(this);
+		xGridEnd.removeChangeListener(this);
+		yGridEnd.removeChangeListener(this);
+		
+		xGridStart.setValue((int)GridShape.DEFAULT_GRIDMIN.x);
+		xGridStart.setModel(new SpinnerNumberModel((int)GridShape.DEFAULT_GRIDMIN.x,-10000,(int)GridShape.DEFAULT_GRIDMAX.x,1));
+		yGridStart.setValue((int)GridShape.DEFAULT_GRIDMIN.y);
+		yGridStart.setModel(new SpinnerNumberModel((int)GridShape.DEFAULT_GRIDMIN.y,-10000,(int)GridShape.DEFAULT_GRIDMAX.y,1));
+		xGridEnd.setValue((int)GridShape.DEFAULT_GRIDMAX.x);
+		xGridEnd.setModel(new SpinnerNumberModel((int)GridShape.DEFAULT_GRIDMAX.x,(int)GridShape.DEFAULT_GRIDMIN.x,10000,1));
+		yGridEnd.setValue((int)GridShape.DEFAULT_GRIDMAX.y);
+		yGridEnd.setModel(new SpinnerNumberModel((int)GridShape.DEFAULT_GRIDMAX.y,(int)GridShape.DEFAULT_GRIDMIN.y,10000,1));
+
+		gs.setGridStartX((int)GridShape.DEFAULT_GRIDMIN.x);
+		gs.setGridStartY((int)GridShape.DEFAULT_GRIDMIN.y);
+		gs.setGridEndX((int)GridShape.DEFAULT_GRIDMAX.x);
+		gs.setGridEndY((int)GridShape.DEFAULT_GRIDMAX.y);
+		
+		xGridStart.addChangeListener(this);
+		yGridStart.addChangeListener(this);
+		xGridEnd.addChangeListener(this);
+		yGridEnd.addChangeListener(this);
+		
+		if(xOrigin!=null)
+		{
+			xOrigin.setValue((int)GridShape.DEFAULT_ORIGIN.x);
+			yOrigin.setValue((int)GridShape.DEFAULT_ORIGIN.y);
+		}
+		
+		gs.setOriginX((int)GridShape.DEFAULT_ORIGIN.x);
+		gs.setOriginY((int)GridShape.DEFAULT_ORIGIN.y);
+	}
+}
diff --git a/current/latexDraw/ui/dialog/AbstractParametersFrame.java b/current/latexDraw/ui/dialog/AbstractParametersFrame.java
new file mode 100644
index 0000000..0952828
--- /dev/null
+++ b/current/latexDraw/ui/dialog/AbstractParametersFrame.java
@@ -0,0 +1,2310 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.*;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import latexDraw.figures.*;
+import latexDraw.figures.properties.Arrowable;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.components.ButtonIcon;
+import latexDraw.ui.components.ColorButton;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+import latexDraw.util.UndoRedoManager;
+
+
+/** 
+ * This class defines the pattern for the frames which allow to change the parameters of the figures.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class AbstractParametersFrame extends JDialog implements ActionListener, ItemListener, KeyListener, ChangeListener
+{
+	private static final long	serialVersionUID	= 1L;
+
+	protected boolean deleteOnCancel;
+	
+	/** The panel containing the drawing */
+	protected DrawPanel drawPanel;
+	
+	/** The figure to modify */
+	protected Figure figure;
+	
+	/** The title of the frame */
+	protected String title;
+	
+	/** The width of many panels. */
+	public static final int WIDTH_PANELS = 430;
+	
+	/** The label of the panel : Position/dimensions. */
+	public static final String LABEL_POSITION_DIMENSIONS = LaTeXDrawLang.getString1_7("AbstractParametersFrame.0"); //$NON-NLS-1$
+	
+	/** The name of the button ok */
+	public static final String NAME_BUTTON_OK = "BUTTON_OK";//$NON-NLS-1$
+	
+	/** The name of the button cancel */
+	public static final String NAME_BUTTON_CANCEL = "BUTTON_CANCEL";//$NON-NLS-1$
+	
+	/** The name of the button default */
+	public static final String NAME_BUTTON_DEFAULT = "BUTTON_DEFAULT";//$NON-NLS-1$
+	
+	/** Allows to know if the frame has been launched by the main frame:
+	 * if true, the undo/redo manager will be used. */
+	protected boolean attachToMainFrame;
+	
+	protected JSpinner dotSizeNum;
+	
+	protected JSpinner dotSizeDim;
+	
+	protected JSpinner bracketNum;
+	
+	protected JSpinner rbracketNum;
+	
+	protected JSpinner tbarsizeNum;
+	
+	protected JSpinner tbarsizeDim;
+	
+	protected JSpinner arrowSizeDim;
+	
+	protected JSpinner arrowSizeNum;
+	
+	protected JSpinner arrowLength;
+	
+	protected JSpinner arrowInset;
+	
+	public static final String LABEL_DOTSIZENUM = "DotSizeNum";//$NON-NLS-1$
+	
+	public static final String LABEL_DOTSIZEDIM = "DotSizeDim";//$NON-NLS-1$
+	
+	public static final String LABEL_BRACKETNUM = "BracketNum";//$NON-NLS-1$
+	
+	public static final String LABEL_RBRACKETNUM = "rBracketNum";//$NON-NLS-1$
+	
+	public static final String LABEL_TBARSIZENUM = "tBarSizeNum"; //$NON-NLS-1$
+	
+	public static final String LABEL_TBARSIZEDIM = "tBarSizeDim"; //$NON-NLS-1$
+	
+	public static final String LABEL_ARROWLENGTH = "arrowLength";//$NON-NLS-1$
+	
+	public static final String LABEL_ARROWINSET = "arrowInset"; //$NON-NLS-1$
+	
+	public static final String LABEL_ARROWSIZENUM = "arrowSizeNum";//$NON-NLS-1$
+	
+	public static final String LABEL_ARROWSIZEDIM = "arrowSizeDim"; //$NON-NLS-1$
+	
+	/** Allows to change the mid point of the gradient. */
+	protected JSpinner gradientMidPtField;
+	
+	/** Allows to change the angle of the gradient. */
+	protected JSpinner gradientAngleField;
+	
+	/** Allows to change the colour of the shadow. */
+	protected ColorButton gradientStartColButton;
+	
+	/** Allows to change the colour of the shadow. */
+	protected ColorButton gradientEndColButton;
+	
+	/** Allows to change the size of the shadow. */
+	protected JSpinner shadowSizeField;
+	
+	/** Allows to change the colour of the shadow. */
+	protected ColorButton shadowColorButton;
+	
+	/** Allows to change the angle of the shadow. */
+	protected JSpinner shadowAngleField;
+	
+	/** Allows to set if the figure has a shadow or not. */
+	protected JCheckBox shadowCheckBox;
+	
+	/** Allows to change the thickness of the figure */
+	protected JSpinner thicknessField;
+	
+	/** Allows to change the colour of the borders of the figure */
+	protected ColorButton bordersButton;
+	
+	/** Allows to change the colour of the hatch */
+	protected ColorButton hatchButton;
+	
+	/** Allows to set if the figure is filled */
+	protected JCheckBox filledCheckBox;
+	
+	/** Allows to change the colour of the interior of the figure */
+	protected ColorButton interiorButton;
+	
+	/** Allows to change the colour of the double boundary of the figure */
+	protected ColorButton doublecolorButton;
+	
+	/** Allows to change the kind of the line */
+	protected LaTeXDrawComboBox lineChoice;
+	
+	/** Allows to change the kind of hatch */
+	protected LaTeXDrawComboBox hatchChoice;
+	
+	/** Allows to change the position of the borders */
+	protected LaTeXDrawComboBox bordersPositionChoice;
+	
+	/** Allows to change the angle of rotation of the figure */
+	protected JSpinner hatchSepField;
+
+	protected JSpinner hatchAngleField;
+	
+	/** Allows to change the angle of rotation of the figure */
+	protected JSpinner rotationField;
+	
+	/** Allows to change the width of the hatch */
+	protected JSpinner hatchWidthField;
+	
+	/** Allows to set the separation between the double line */
+	protected JSpinner doubleSep;
+	
+	/** Allows to set if the figure must have double boundary or not */
+	protected JCheckBox doubleLine;
+	
+	/** The button ok */
+	protected JButton buttonOk;
+	
+	/** The panel where the figure is displayed */
+	protected GlimpsePanel glimpsePanel;
+	
+	/** This scrollpane contains the glimpsepanel */
+	protected JPanel glimpsePanelZoom;
+	
+	/** The scroll pane of the frame to see the figure. */
+	protected JScrollPane glimpseScrollPane;
+	
+	/** The first arrow choice */
+	protected LaTeXDrawComboBox arrow1Choice;
+	
+	/** The second arrow choice */
+	protected LaTeXDrawComboBox arrow2Choice;
+	
+	/** Defines if the shape has been modified with the frame. @since 2.0.0 */
+	protected boolean isModified;
+	
+	/** The label of the check box which set if the figure has a shadow or not. */
+	public static final String LABEL_SHADOW_CB = LaTeXDrawResources.LABEL_SHADOW_CHECKBOX;
+	
+	/** The label of the button which set the angle of the shadow. */
+	public static final String LABEL_SHADOW_ANGLE = LaTeXDrawLang.getString1_7("AbstractParametersFrame.1"); //$NON-NLS-1$
+	
+	/** The label of the button which set the size of the shadow. */
+	public static final String LABEL_SHADOW_SIZE = LaTeXDrawLang.getString1_7("AbstractParametersFrame.2"); //$NON-NLS-1$
+	
+	/** The label of the button which set the angle of the gradient. */
+	public static final String LABEL_GRADIENT_ANGLE = LaTeXDrawLang.getString1_7("AbstractParametersFrame.3"); //$NON-NLS-1$
+
+	public static final String LABEL_HATCHINGS_ANGLE = "hatchAngle";
+	
+	/** The label of the button which set the middle point of the gradient. */
+	public static final String LABEL_GRADIENT_MID_PT = LaTeXDrawLang.getString1_7("AbstractParametersFrame.4"); //$NON-NLS-1$
+	
+	public static final String TITLE_TABBED_PANE_GENERAL = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.general"); //$NON-NLS-1$
+	
+	public static final String TITLE_TABBED_PANE_OTHERS = LaTeXDrawLang.getString1_7("AbstractParametersFrame.6"); //$NON-NLS-1$
+	
+	public static final String LABEL_BUTTON_BOUNDARY = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.0"); //$NON-NLS-1$
+	
+	public static final String LABEL_DOUBLELINE = LaTeXDrawLang.getString1_7("AbstractParametersFrame.9"); //$NON-NLS-1$
+	
+	public static final String LABEL_DOUBLESEP = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.2"); //$NON-NLS-1$
+	
+	public static final String LABEL_HATCH_SEP = LaTeXDrawLang.getString1_8("AbstractParametersFrame.0"); //$NON-NLS-1$
+	
+	public static final String TITLE_GENERAL = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.3"); //$NON-NLS-1$
+	
+	public static final String LABEL_ARROWS = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.38"); //$NON-NLS-1$
+	
+	public static final String LABEL_OK = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.4"); //$NON-NLS-1$
+	
+	public static final String LABEL_DEFAULT = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.5"); //$NON-NLS-1$
+	
+	public static final String LABEL_CANCEL = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.6"); //$NON-NLS-1$
+	
+	public static final String LABEL_ROTATION = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.7"); //$NON-NLS-1$
+	
+	public static final String LABEL_THICKNESS = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.8"); //$NON-NLS-1$
+	
+	public static final String LABEL_GENERAL = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.general"); //$NON-NLS-1$
+	
+	public static final String LABEL_TYPE_LINE = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.10"); //$NON-NLS-1$
+	
+	public static final String LABEL_HATCH_WIDTH = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.11"); //$NON-NLS-1$
+	
+	public static final String LABEL_LEFT_ARROW = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.12"); //$NON-NLS-1$
+	
+	public static final String LABEL_RIGHT_ARROW = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.13"); //$NON-NLS-1$
+	
+	public static final String NAME_TABBEDPANE_ARROW = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.14"); //$NON-NLS-1$
+	
+	/** The label of the showPointsCB JCheckBox */
+	public static final String LABEL_SHOWPOINTCB = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.15"); //$NON-NLS-1$
+	
+	/** The label of the isRound checkbox */
+	public static final String LABEL_ISROUND = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.16"); //$NON-NLS-1$
+	
+	/** The label of the field frameArcField */
+	public static final String LABEL_ROUND_CORNER = LaTeXDrawLang.getString1_7("AbstractParametersFrame.7"); //$NON-NLS-1$
+	
+	/** The label of the X-centre field */
+	public static final String LABEL_CENTER_X = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.17"); //$NON-NLS-1$
+	
+	/** The label of the Y-centre field */
+	public static final String LABEL_CENTER_Y = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.18"); //$NON-NLS-1$
+	
+	/** The label of the radius field */
+	public static final String LABEL_RADIUS = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.19"); //$NON-NLS-1$
+	
+	public static final String LABEL_DOTSIZE = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.20"); //$NON-NLS-1$
+	
+	public static final String LABEL_TBARSIZE = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.21"); //$NON-NLS-1$
+	
+	public static final String LABEL_BRACKET_LGTH = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.22"); //$NON-NLS-1$
+	
+	public static final String LABEL_RBRACKET_LGTH  = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.23"); //$NON-NLS-1$
+	
+	public static final String LABEL_CROSS_THICKNESS = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.24"); //$NON-NLS-1$
+	
+	public static final String LABEL_CROSS_WIDTH = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.25"); //$NON-NLS-1$
+	
+	public static final String LABEL_ARROW_LENGTH = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.26"); //$NON-NLS-1$
+	
+	public static final String LABEL_ARROW_INSET = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.27"); //$NON-NLS-1$
+	
+	public static final String LABEL_ARROW_WIDTH = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.28"); //$NON-NLS-1$
+	
+	public static final String LABEL_X = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.29"); //$NON-NLS-1$
+	
+	public static final String LABEL_Y = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.30"); //$NON-NLS-1$
+	
+	/** The label of the width field */
+	public static final String LABEL_WIDTH = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.31"); //$NON-NLS-1$
+	
+	/** The label of the height field */
+	public static final String LABEL_HEIGHT = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.32"); //$NON-NLS-1$
+	
+	
+	
+	 /**
+	 * 01/20/06<br>
+	 * @version 1.9<br>
+	 */
+	protected static class GlimpsePanel extends JPanel implements Scrollable, MouseListener, MouseMotionListener
+	{
+		private static final long serialVersionUID = 1L;
+		
+		/** The figure to display in the panel */
+		protected Figure glimpseFigure;
+		
+		/** The zoom by default (100%) */
+		public static final double DEFAULT_ZOOM = 1.;
+		
+		/** The biggest zoom we can do */
+		public static final double MAX_ZOOM = 4.5;
+		
+		/** The smallest zoom we can do */
+		public static final double MIN_ZOOM = 0.25;	
+		   
+		/** The value we add to the zoom when to user click on a zoom button */
+		public static final double DEFAULT_ADD_ZOOM = 0.25;
+		
+		/** The zoom : MIN_ZOOM<=zoom<=MAX_ZOOM */
+		protected double zoom;
+		
+		private transient Cursor formerCursor;
+
+		private transient Point formerPoint;
+		
+		private transient double tx;
+		
+		private transient double ty;
+		
+		
+		/**
+		 * The constructor by default
+		 * @param f The figure to display (can be null)
+		 */
+		public GlimpsePanel(Figure f)
+		{
+			if(f!=null)
+				f.setSelected(false);
+			glimpseFigure = f;
+			zoom = DEFAULT_ZOOM;
+			formerCursor = null;
+			formerPoint = null;
+			tx = ty = 0.;
+			addMouseListener(this);
+			addMouseMotionListener(this);
+		}
+		
+		
+		/**
+		 * Allows to zoom out the drawing (up to 25%).
+		 */
+		public void zoomOut()
+		{
+			if(zoom-DEFAULT_ADD_ZOOM>=MIN_ZOOM && glimpseFigure!=null)
+			{
+				zoom-=DEFAULT_ADD_ZOOM;
+				updateTxTy();
+				repaint();
+				updatePreferredSize();
+				revalidate();
+			}
+		}
+		
+		
+		/**
+		 * Allows to set the zoom to default. In fact the zoom is not set at ZOOM_DEFAULT, it's set to see the whole figure.
+		 */
+		public void zoomDefault()
+		{
+			if(glimpseFigure!=null)
+			{
+				LaTeXDrawPoint2D nw = glimpseFigure.getTheNWBoundPoint();
+				LaTeXDrawPoint2D se = glimpseFigure.getTheSEBoundPoint();
+				double figWidth  = se.x-nw.x;
+				double figHeight = se.y-nw.y;
+				int height = getParent().getParent().getHeight();
+				int width  = getParent().getParent().getWidth();
+				zoom = DEFAULT_ZOOM;
+				
+				while(((figHeight*zoom)>height || (figWidth*zoom)>width) && zoom>MIN_ZOOM)
+				{
+					zoom-=DEFAULT_ADD_ZOOM;
+				}
+				
+				if(zoom<MIN_ZOOM)
+					zoom = MIN_ZOOM;
+				
+				updateTxTy();
+				repaint();
+				updatePreferredSize();
+				revalidate();
+			}
+		}
+		
+		
+		/**
+		 * Allows to zoom in the drawing (up to 450%)
+		 */
+		public void zoomIn()
+		{
+			if(zoom+DEFAULT_ADD_ZOOM<=MAX_ZOOM && glimpseFigure!=null)
+			{
+				zoom+=DEFAULT_ADD_ZOOM;
+				updateTxTy();
+				updatePreferredSize();
+				repaint();
+				revalidate(); 
+			}
+		}
+		
+		
+		
+		/**
+		 * Updates the fields tx and ty.
+		 * @since 1.9.2
+		 */
+		public void updateTxTy()
+		{
+			LaTeXDrawPoint2D nw = glimpseFigure.getTheNWBoundPoint();
+			
+			tx = getParent().getParent().getWidth()/2.-glimpseFigure.getGravityCenter().x*zoom;
+			ty = getParent().getParent().getHeight()/2.-glimpseFigure.getGravityCenter().y*zoom;
+			
+			if(nw.x*zoom+tx<0)
+				tx = Math.min(-nw.x*zoom+30, -30);
+			
+			if(nw.y*zoom+ty<0)
+				ty = Math.min(-nw.y*zoom+30, -30);
+		}
+		
+		
+		
+		/**
+		 * Allows to set the figure to display
+		 * @param f The new figure to display
+		 */
+		public void setGlimpseFigure(Figure f)
+		{
+			glimpseFigure = f;
+			
+			if(f!=null)
+			{
+				f.setSelected(false);
+				zoomDefault();
+			}
+			else
+				tx = ty = 0.;
+		}
+		
+		
+		
+		/**
+		 * Allows to get the figure to display.
+		 * @return The glimpse figure.
+		 */
+		public Figure getGlimpseFigure()
+		{
+			return glimpseFigure;
+		}
+		
+		
+		
+		@Override
+		public void paintComponent(Graphics g)
+		{
+	    	if(g==null || glimpseFigure==null) return;
+
+			Graphics2D g2 = (Graphics2D) g;
+	    	g2.setColor(Color.WHITE);
+	    	g2.fillRect(0, 0, getWidth(), getHeight());
+			g2.translate(tx, ty);
+			g2.scale(zoom, zoom);
+
+			g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+			g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+			g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+			g2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+			g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+			
+			glimpseFigure.draw(g2, RenderingHints.VALUE_ANTIALIAS_ON, RenderingHints.VALUE_RENDER_QUALITY, 
+								RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+		}
+
+
+		
+		
+		/**
+	     * Allows to update the dimensions of the drawing (needed for the scrollers)
+	     */
+		public void updatePreferredSize()
+		{ 
+			if(glimpseFigure==null)
+				setPreferredSize(new Dimension(0,0));
+			else
+			{
+				LaTeXDrawPoint2D SE = glimpseFigure.getTheSEBoundPoint();
+				setPreferredSize(new Dimension((int)(SE.x*zoom+tx), (int)(SE.y*zoom+ty)));
+			}
+		}
+		
+
+		
+		@Override
+		public void repaint()
+		{
+			updatePreferredSize();
+			revalidate();
+			super.repaint();		
+		}
+		
+		
+		
+		/**
+		 * Useful for scrollbar
+		 */
+		public Dimension getPreferredScrollableViewportSize()
+		{	return new Dimension(-100, 100);  }
+		
+		
+
+		/**
+		 * Useful for scrollbar
+		 */
+		public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) 
+		{
+	        return (orientation == SwingConstants.VERTICAL) ? visibleRect.height :
+	            visibleRect.width;
+		}
+		
+		
+
+		/**
+		 * Useful for scrollbar
+		 */
+		public boolean getScrollableTracksViewportHeight()
+		{
+			if(this.getParent() instanceof JViewport) 
+		    	return (((JViewport)getParent()).getHeight() > getPreferredSize().height);
+			return false;
+		}
+		
+
+		
+		
+		/**
+		 * Useful for scrollbar
+		 */
+		public boolean getScrollableTracksViewportWidth()
+		{
+			if(getParent() instanceof JViewport) 
+		    	return (((JViewport)getParent()).getWidth() > getPreferredSize().width);
+			return false;
+		}
+		
+
+		
+		/**
+		 * Useful for scrollbar
+		 */
+		public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)  
+		{
+			return 4;
+		}
+
+
+		public void mouseClicked(MouseEvent e)
+		{
+			// Nothing to do.
+		}
+
+
+		public void mouseEntered(MouseEvent e)
+		{
+			formerCursor = getCursor();
+			setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
+		}
+
+
+		public void mouseExited(MouseEvent e)
+		{
+			if(formerCursor!=null)
+			{
+				setCursor(formerCursor);
+				formerCursor = null;
+			}
+		}
+
+
+		public void mousePressed(MouseEvent e)
+		{
+			// Nothing to do.
+		}
+
+
+		public void mouseReleased(MouseEvent e)
+		{
+			formerPoint = null;
+		}
+
+
+		public void mouseDragged(MouseEvent e)
+		{
+			if(formerPoint!=null)
+			{
+				tx += e.getPoint().x-formerPoint.x;
+				ty += e.getPoint().y-formerPoint.y;
+				repaint();
+			}
+			
+			formerPoint = e.getPoint();
+		}
+
+
+		public void mouseMoved(MouseEvent e)
+		{
+			// Nothing to do.
+		}
+	}
+	
+	
+	
+	/**
+	 * The abstract constructor
+	 * @param d The drawpanel
+	 */
+	protected AbstractParametersFrame(Frame parent, DrawPanel d, boolean attachToMainFrame)
+	{
+		super(parent, true);
+		try
+		{	
+			setModified(false);
+			this.attachToMainFrame = attachToMainFrame;
+			drawPanel = d;
+			glimpsePanel = new GlimpsePanel(null);
+			glimpseScrollPane = new JScrollPane(glimpsePanel);
+			glimpsePanel.updatePreferredSize();
+			glimpsePanel.revalidate();
+	     	glimpsePanelZoom = new JPanel(new BorderLayout());
+	     	glimpsePanelZoom.add(glimpseScrollPane, BorderLayout.CENTER);
+	     	glimpsePanelZoom.add(createZoomPanel(), BorderLayout.EAST);
+	     	glimpsePanelZoom.setBorder(new CompoundBorder(new TitledBorder(null, "", //$NON-NLS-1$
+					  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	glimpsePanelZoom.setPreferredSize(new Dimension(420, 190));
+	     	glimpsePanelZoom.setMaximumSize(new Dimension(700, 240));
+	     	createRotationField();
+
+	     	setResizable(true);
+	     	
+	     	addWindowListener(
+	                new WindowAdapter() 
+	                {
+						@Override
+						public void windowClosing(WindowEvent e) 
+	                    {
+							if(deleteOnCancel)
+							{
+								drawPanel.getDraw().deleteFigure(figure, null);
+								deleteOnCancel = false;
+							}
+	                    }
+	                }); 
+	     	
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create a panel containing buttons to zoom the 'glimpse figure'.
+	 * @return The created panel.
+	 */
+	public JPanel createZoomPanel()
+	{
+		JPanel panel = new JPanel();
+		JPanel panel2 = new JPanel();
+		panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+		panel2.setLayout(new BoxLayout(panel2, BoxLayout.Y_AXIS));
+		
+		JButton zoomIn = new JButton(LaTeXDrawResources.zoomInIcon);
+		zoomIn.setActionCommand(LaTeXDrawResources.LABEL_ZOOM_IN);
+		zoomIn.addActionListener(this);
+		
+		JButton zoomOut = new JButton(LaTeXDrawResources.zoomOutIcon);
+		zoomOut.setActionCommand(LaTeXDrawResources.LABEL_ZOOM_OUT);
+		zoomOut.addActionListener(this);
+		
+		JButton zoomDefault = new JButton(LaTeXDrawResources.zoomDefaultIcon);
+		zoomDefault.setActionCommand(LaTeXDrawResources.LABEL_ZOOM_DEFAULT);
+		zoomDefault.addActionListener(this);
+		
+		panel2.add(zoomDefault);
+		panel2.add(zoomIn);
+		panel2.add(zoomOut);
+		panel.add(panel2);
+		
+		return panel;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the title of the frame
+	 */
+	public void setTitle()
+	{
+		setTitle(LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.33")+ " #" +figure.getNumber()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to save the values of the fields in the attributes of the figure.
+	 */
+	public void saveParameters()
+	{
+		try
+		{
+			if(attachToMainFrame && !deleteOnCancel)
+			{
+				drawPanel.getFrameParent().getUndoManager().add(UndoRedoManager.LABEL_CHANGE_PARAM, 
+						drawPanel.getDraw().getFigures().indexOf(figure), figure.clone());
+				drawPanel.getFrameParent().updateUndoRedo();
+			}
+			
+			if(figure.canHaveArrow())
+			{
+				ArrowHead leftA  = ((Arrowable)figure).getArrowHead1();
+				ArrowHead rightA = ((Arrowable)figure).getArrowHead2();
+				
+				JLabel lab = (JLabel)arrow1Choice.getSelectedItem();
+				((Arrowable)figure).setArrow1Style(lab.getText());
+				lab = (JLabel)arrow2Choice.getSelectedItem();
+				((Arrowable)figure).setArrow2Style(lab.getText());
+				
+				leftA.setBracketNum(Double.valueOf(bracketNum.getValue().toString()).doubleValue());
+				rightA.setBracketNum(Double.valueOf(bracketNum.getValue().toString()).doubleValue());
+				leftA.setDotSizeDim(Double.valueOf(dotSizeDim.getValue().toString()).doubleValue());
+				rightA.setDotSizeDim(Double.valueOf(dotSizeDim.getValue().toString()).doubleValue());
+				leftA.setDotSizeNum(Double.valueOf(dotSizeNum.getValue().toString()).doubleValue());
+				rightA.setDotSizeNum(Double.valueOf(dotSizeNum.getValue().toString()).doubleValue());
+				leftA.setRBracketNum(Double.valueOf(rbracketNum.getValue().toString()).doubleValue());
+				rightA.setRBracketNum(Double.valueOf(rbracketNum.getValue().toString()).doubleValue());
+				leftA.setTBarSizeDim(Double.valueOf(tbarsizeDim.getValue().toString()).doubleValue());
+				rightA.setTBarSizeDim(Double.valueOf(tbarsizeDim.getValue().toString()).doubleValue());
+				leftA.setTBarSizeNum(Double.valueOf(tbarsizeNum.getValue().toString()).doubleValue());
+				rightA.setTBarSizeNum(Double.valueOf(tbarsizeNum.getValue().toString()).doubleValue());		
+				leftA.setArrowSizeNum(Double.valueOf(arrowSizeNum.getValue().toString()).doubleValue());
+				rightA.setArrowSizeNum(Double.valueOf(arrowSizeNum.getValue().toString()).doubleValue());
+				leftA.setArrowSizeDim(Double.valueOf(arrowSizeDim.getValue().toString()).doubleValue());
+				rightA.setArrowSizeDim(Double.valueOf(arrowSizeDim.getValue().toString()).doubleValue());
+				leftA.setArrowLength(Double.valueOf(arrowLength.getValue().toString()).doubleValue());
+				rightA.setArrowLength(Double.valueOf(arrowLength.getValue().toString()).doubleValue());
+				leftA.setArrowInset(Double.valueOf(arrowInset.getValue().toString()).doubleValue());
+				rightA.setArrowInset(Double.valueOf(arrowInset.getValue().toString()).doubleValue());
+			}
+			
+			if(doublecolorButton!=null)
+				figure.setDoubleColor(doublecolorButton.getColor());
+			
+			if(bordersPositionChoice!=null)
+			{
+				JLabel l = (JLabel) bordersPositionChoice.getSelectedItem();
+				figure.setBordersPosition(l.getText());
+			}
+			
+			if(doubleLine!=null)
+			{
+				figure.setHasDoubleBoundary(doubleLine.isSelected());
+				figure.setDoubleSep(Double.valueOf(doubleSep.getValue().toString()));
+			}
+			
+			if(lineChoice!=null)
+			{
+				JLabel l = (JLabel) lineChoice.getSelectedItem();
+				figure.setLineStyle(l.getText());
+			}
+			
+			if(thicknessField!=null)
+				figure.setThickness(Float.valueOf(thicknessField.getValue().toString()));
+			
+			if(bordersButton!=null)
+				figure.setLinesColor(bordersButton.getColor());
+			
+			if(interiorButton!=null)
+				figure.setInteriorColor(interiorButton.getColor());
+			
+			if(figure.canHaveShadow())
+			{
+				figure.setHasShadow(shadowCheckBox.isSelected());
+				figure.setShadowSize(Double.valueOf(shadowSizeField.getValue().toString()).doubleValue());
+				figure.setShadowAngle(Math.toRadians(Double.valueOf(shadowAngleField.getValue().toString()).doubleValue()));
+				figure.setShadowColor(shadowColorButton.getColor());
+			}
+			
+			if(filledCheckBox!=null)
+				figure.setIsFilled(filledCheckBox.isSelected());
+			
+			if(figure.canBeHatched())
+			{
+				figure.setHatchingAngle(Math.toRadians(Double.valueOf(hatchAngleField.getValue().toString()).doubleValue()));
+				figure.setHatchingSep(Float.valueOf(hatchSepField.getValue().toString()));
+				figure.setHatchingWidth(Float.valueOf(hatchWidthField.getValue().toString()));
+				figure.setHatchingColor(hatchButton.getColor());
+				JLabel l = (JLabel) hatchChoice.getSelectedItem();
+				figure.setHatchingStyle(l.getText());
+				figure.setGradientAngle(Math.toRadians(Double.valueOf(gradientAngleField.getValue().toString()).doubleValue()));
+				figure.setGradientEndColor(((ButtonIcon)gradientEndColButton.getIcon()).getColor());
+				figure.setGradientStartColor(((ButtonIcon)gradientStartColButton.getIcon()).getColor());
+				figure.setGradientMidPoint(Double.valueOf(gradientMidPtField.getValue().toString()).doubleValue());
+			}
+			
+			if(rotationField!=null)
+				figure.setRotationAngle(Math.toRadians(
+						Double.valueOf(rotationField.getValue().toString()).doubleValue()));
+			
+			drawPanel.getDraw().updateBorders();
+			drawPanel.updateDraw(true);
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+
+	public void keyTyped(KeyEvent e) 
+	{
+		/* No action to do */
+	}
+
+
+	public void keyReleased(KeyEvent e) 
+	{
+		/* No action to do */
+	}
+
+
+	public void keyPressed(KeyEvent e) 
+	{
+		/* No action to do */
+	}
+
+
+	
+	
+	public void actionPerformed(ActionEvent e) 
+	{
+		Object o = e.getSource();
+		
+		try
+		{
+			if(o instanceof JButton || o instanceof JCheckBox)
+			{
+				String label = ((AbstractButton)o).getActionCommand();
+				Figure f = glimpsePanel.getGlimpseFigure();
+				
+	    		if(label.equals(LaTeXDrawResources.LABEL_ZOOM_IN))
+	    		{
+	    			glimpsePanel.zoomIn();
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_ZOOM_OUT))
+	    		{
+	    			glimpsePanel.zoomOut();
+	    			return;
+	    		}
+	    		
+	    		if(label.equals(LaTeXDrawResources.LABEL_ZOOM_DEFAULT))
+	    		{
+	    			glimpsePanel.zoomDefault();
+	    			return;
+	    		}
+				
+				if(label.equals(LABEL_DOUBLELINE))
+				{
+					setModified(true);
+					f.setHasDoubleBoundary(doubleLine.isSelected());
+					doubleSep.setEnabled(doubleLine.isSelected());
+					doublecolorButton.setEnabled(doubleLine.isSelected());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(label.equals(NAME_BUTTON_CANCEL))
+				{
+					if(deleteOnCancel)
+					{
+						drawPanel.getDraw().deleteFigure(figure, null);
+						deleteOnCancel = false;
+					}
+					super.setVisible(false);
+					return;
+				}
+				
+				if(label.equals(NAME_BUTTON_DEFAULT))
+				{					
+					setDefaultsValues();
+					glimpsePanel.repaint();
+					return;
+				}
+				
+				if(label.equals(NAME_BUTTON_OK))
+				{
+					saveParameters();
+					
+					drawPanel.getFrameParent().updateFrameFields();
+					
+					if(isModified())
+						drawPanel.setIsModified(true);
+					
+					setVisible(false);
+					return;
+				}
+				
+				
+				if(label.equals(LaTeXDrawResources.LABEL_FILLED_CHECKBOX))
+	    		{
+					if(interiorButton!=null)
+					{
+						setModified(true);
+						f.setIsFilled(filledCheckBox.isSelected());
+						glimpsePanel.repaint();
+					}
+	    			return;
+	    		}
+				
+				if(label.equals(LaTeXDrawResources.LABEL_SHADOW_CHECKBOX))
+	    		{
+					if(shadowColorButton!=null)
+					{
+						setModified(true);
+						shadowColorButton.setEnabled(shadowCheckBox.isSelected());
+						shadowAngleField.setEnabled(shadowCheckBox.isSelected());
+						shadowSizeField.setEnabled(shadowCheckBox.isSelected());
+						f.setHasShadow(shadowCheckBox.isSelected());
+						updateFilledCB();
+						glimpsePanel.repaint();
+					}
+	    			return;
+	    		}
+				
+				if(label.equals(LaTeXDrawResources.LABEL_COLOR_GRADIENT_FIRST))
+				{
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.34"),  //$NON-NLS-1$
+							((ColorButton)o).getColor());
+						
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						f.setGradientStartColor(c);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				if(label.equals(LaTeXDrawResources.LABEL_COLOR_GRADIENT_SECOND))
+				{
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.34"),  //$NON-NLS-1$
+							((ColorButton)o).getColor());
+						
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						f.setGradientEndColor(c);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				if(label.equals(LaTeXDrawResources.LABEL_COLOR_HATCH))
+				{
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.34"),  //$NON-NLS-1$
+							((ColorButton)o).getColor());
+						
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						f.setHatchingColor(c);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				if(label.equals(LaTeXDrawResources.NAME_COLOR_SHADOW))
+				{
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.34"),  //$NON-NLS-1$
+							((ColorButton)o).getColor());
+						
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						f.setShadowColor(c);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				if(label.equals(LABEL_BUTTON_BOUNDARY))
+				{
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.35"),  //$NON-NLS-1$
+							((ColorButton)o).getColor());
+						
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						f.setDoubleColor(c);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				if(label.equals(LaTeXDrawResources.LABEL_COLOR_BUTTON))
+				{
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.36"),  //$NON-NLS-1$
+							((ColorButton)o).getColor());
+						
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						f.setLinesColor(c);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				if(label.equals(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON))
+				{ 
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+					LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.37"),  //$NON-NLS-1$
+					((ColorButton)o).getColor());
+				
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						f.setInteriorColor(c);
+						glimpsePanel.repaint();
+					}
+					return;
+				}
+			} // if(o instanceof JButton)
+		}catch(Exception ex) 
+		{ 
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set the value of the specific fields of the frame
+	 * from the attributes of the figure
+	 */
+	public abstract void setFigureFrameField();
+	
+	
+	
+	
+	/**
+	 * Initialises some fields of the frame and set visible or not it.
+	 * @param visible True: the frame must be visible.
+	 * @param selected The selected figure.
+	 * @param deleteOnCancel True: the figure must be deleted if the user click on the button cancel.
+	 */
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox)
+	{		
+		try
+		{
+			if(visible)
+			{
+				setModified(false);
+				this.deleteOnCancel = deleteOnCancel;
+				figure = selected;
+				setTitle();
+
+				glimpsePanel.setGlimpseFigure((Figure) selected.clone());
+				glimpsePanel.updatePreferredSize();
+				glimpsePanel.revalidate();
+				glimpsePanel.repaint();
+				
+				setFigureFrameField();
+				
+				if(figure.canHaveArrow())
+				{
+					arrow1Choice.setSelectedItem(((Arrowable)figure).getArrow1Style());
+					arrow2Choice.setSelectedItem(((Arrowable)figure).getArrow2Style());
+					
+					ArrowHead rightA = ((Arrowable)figure).getArrowHead2();
+					
+					arrowInset.setValue(rightA.getArrowInset());
+					arrowLength.setValue(rightA.getArrowLength());
+					arrowSizeDim.setValue(rightA.getArrowSizeDim());
+					arrowSizeNum.setValue(rightA.getArrowSizeNum());
+					bracketNum.setValue(rightA.getBracketNum());
+					dotSizeDim.setValue(rightA.getDotSizeDim());
+					dotSizeNum.setValue(rightA.getDotSizeNum());
+					rbracketNum.setValue(rightA.getRBracketNum());
+					tbarsizeDim.setValue(rightA.getTBarSizeDim());
+					tbarsizeNum.setValue(rightA.getTBarSizeNum());
+
+					updateEnableParamsArrow();
+				}
+				
+				if(doublecolorButton!=null)
+				{
+					doublecolorButton.setEnabled(figure.hasDoubleBoundary());
+					doublecolorButton.setColor(figure.getDoubleColor());
+				}
+				
+				if(bordersPositionChoice!=null)
+				{
+					bordersPositionChoice.setEnabled(figure.isBordersMovable() && !isFramedBox);
+					bordersPositionChoice.setSelectedItem(figure.getBordersPosition());
+				}
+				
+				if(doubleLine!=null)
+				{
+					doubleLine.setSelected(figure.hasDoubleBoundary());
+					doubleSep.setEnabled(doubleLine.isSelected());
+					doubleSep.setValue(figure.getDoubleSep());
+				}
+				
+				if(rotationField!=null)
+				{
+					rotationField.setEnabled(!isFramedBox);
+					rotationField.setValue(Math.toDegrees(selected.getRotationAngle()));
+				}
+				
+				if(lineChoice!=null)
+					lineChoice.setSelectedItem(selected.getLineStyle());
+				
+				if(thicknessField!=null)
+					thicknessField.setValue((double)selected.getThickness());
+				
+				if(bordersButton!=null)
+					bordersButton.setColor(selected.getLinesColor());
+				
+				String txt = selected.getHatchingStyle();
+				int num=0;
+				if(txt.equals(PSTricksConstants.TOKEN_FILL_GRADIENT))
+					num=1;
+				else if(txt.equals(PSTricksConstants.TOKEN_FILL_NONE) ||
+						txt.equals(PSTricksConstants.TOKEN_FILL_SOLID))
+						num=2;
+				
+				if(selected.canBeHatched())
+				{
+					hatchAngleField.setEnabled(num==0);
+					hatchAngleField.setValue(Math.toDegrees(selected.getHatchingAngle()));
+					hatchChoice.setSelectedItem(selected.getHatchingStyle());
+					hatchButton.setEnabled(num==0);
+					hatchWidthField.setValue((double)selected.getHatchingWidth());
+					hatchSepField.setValue(selected.getHatchingSep());
+					hatchButton.setColor(selected.getHatchingColor());
+					hatchWidthField.setEnabled(num==0);
+					hatchSepField.setEnabled(num==0);
+					gradientAngleField.setEnabled(num==1);
+					gradientAngleField.setValue(Math.toDegrees(selected.getGradientAngle()));
+					gradientEndColButton.setEnabled(num==1);
+					gradientMidPtField.setEnabled(num==1);
+					gradientMidPtField.setValue(selected.getGradientMidPoint());
+					gradientStartColButton.setEnabled(num==1);
+					updateFilledCB();
+					filledCheckBox.setSelected(selected.isFilled() && selected.canBeFilled());
+					gradientEndColButton.setColor(selected.getGradientEndColor());
+					gradientStartColButton.setColor(selected.getGradientStartColor());
+				}
+				
+				if(interiorButton!=null)
+					interiorButton.setColor(selected.getInteriorColor());
+				
+				if(selected.canHaveShadow())
+				{
+					shadowSizeField.setValue(figure.getShadowSize());
+					shadowAngleField.setValue(Math.toDegrees(figure.getShadowAngle()));
+					shadowColorButton.setEnabled(figure.hasShadow());
+					shadowColorButton.setColor(figure.getShadowColor());
+					shadowCheckBox.setSelected(figure.hasShadow());
+					shadowColorButton.setEnabled(shadowCheckBox.isSelected());
+					shadowAngleField.setEnabled(shadowCheckBox.isSelected());
+					shadowSizeField.setEnabled(shadowCheckBox.isSelected());
+				}
+			}
+			updateFilledCB();
+		
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+		super.setVisible(visible);
+	}
+	
+	
+	
+	
+	/**
+	 * @return A panel with components to change the parameters of the hatching of the figure.
+	 */
+	public JPanel createHatchingPanel()
+	{
+  		GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;  		constraint.gridy = 0;
+     	constraint.gridwidth = 1; 	constraint.gridheight = 1;
+     	constraint.weightx = 0.1; 	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.WEST;
+     	
+     	JPanel hatchingP = new JPanel(new GridBagLayout());
+     	
+     	hatchButton = new ColorButton(LaTeXDrawResources.LABEL_COLOR_HATCH, new ButtonIcon(Figure.DEFAULT_BORDERS_COL));
+     	hatchButton.setActionCommand(LaTeXDrawResources.LABEL_COLOR_HATCH);
+     	hatchButton.addActionListener(this);
+     	hatchingP.add(hatchButton, constraint);      	
+     	
+     	constraint.gridx++;	
+     	hatchingP.add(new JLabel(LABEL_HATCH_WIDTH), constraint);
+     	
+     	constraint.gridx++;
+     	SpinnerModel model = new SpinnerNumberModel(Figure.DEFAULT_HATCH_WIDTH, 0.1, 100,0.1);
+     	hatchWidthField = new JSpinner(model);
+     	hatchWidthField.setEditor(new JSpinner.NumberEditor(hatchWidthField, "0.0"));//$NON-NLS-1$
+     	hatchWidthField.addChangeListener(this);
+     	hatchWidthField.setName(Figure.LABEL_HATCH_WIDTH);
+     	hatchingP.add(hatchWidthField, constraint);	
+     	
+     	constraint.gridx++;
+     	hatchingP.add(new JLabel(LABEL_HATCH_SEP), constraint);
+     	
+     	constraint.gridx++;
+     	model = new SpinnerNumberModel(Figure.DEFAULT_HATCH_SEP, 0.01, 1000,1);
+     	hatchSepField = new JSpinner(model);
+     	hatchSepField.setEditor(new JSpinner.NumberEditor(hatchSepField, "0.00"));//$NON-NLS-1$
+     	hatchSepField.addChangeListener(this);
+     	hatchSepField.setName(LABEL_HATCH_SEP);
+     	hatchingP.add(hatchSepField, constraint);	
+     	
+     	constraint.gridy++;
+     	constraint.gridx=1;
+     	hatchingP.add(new JLabel("angle"), constraint);
+     	
+     	constraint.gridx++;
+     	model = new SpinnerNumberModel(0., -1000., 1000., 1.);
+     	hatchAngleField = new JSpinner(model);
+     	hatchAngleField.setEditor(new JSpinner.NumberEditor(hatchAngleField, "0.00"));//$NON-NLS-1$
+     	hatchAngleField.addChangeListener(this);
+     	hatchAngleField.setName(LABEL_HATCHINGS_ANGLE);
+     	hatchingP.add(hatchAngleField, constraint);	
+     	
+     	hatchingP.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("AbstractParametersFrame.8"),  //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	
+     	return hatchingP;
+	}
+	
+	
+	
+	
+	/**
+	 * @return A panel with components to change the parameters of the double borders of the figure.
+	 */
+	public JPanel createDoubleLinePanel()
+	{
+     	JPanel fillingP = new JPanel(new FlowLayout(FlowLayout.LEFT));
+     	
+     	doubleLine = new JCheckBox(LABEL_DOUBLELINE);
+     	doubleLine.setActionCommand(LABEL_DOUBLELINE);
+     	doubleLine.addActionListener(this);
+     	fillingP.add(doubleLine);
+     	
+     	fillingP.add(new JLabel(LABEL_DOUBLESEP));	     	
+     	
+     	SpinnerModel model = new SpinnerNumberModel(Figure.DEFAULT_DOUBLESEP, 1, 1000,1);
+     	doubleSep = new JSpinner(model);
+     	doubleSep.setEditor(new JSpinner.NumberEditor(doubleSep, "0"));	   //$NON-NLS-1$  	
+     	doubleSep.setName(LABEL_DOUBLESEP);
+     	doubleSep.addChangeListener(this);
+     	doubleSep.setEnabled(doubleLine.isSelected());
+     	fillingP.add(doubleSep);
+     	
+     	doublecolorButton = new ColorButton(LABEL_BUTTON_BOUNDARY, new ButtonIcon(Figure.DEFAULT_DOUBLE_COLOR));
+     	doublecolorButton.setActionCommand(LABEL_BUTTON_BOUNDARY);
+     	doublecolorButton.addActionListener(this);
+     	fillingP.add(doublecolorButton);
+     	fillingP.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("AbstractParametersFrame.9"),  //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	
+     	return fillingP;
+	}
+	
+	
+	
+	
+	/**
+	 * @return A panel with components to change the parameters of the borders of the figure.
+	 */
+	public JPanel createBordersPanel(boolean movable)
+	{
+     	JPanel borderP = new JPanel(new FlowLayout(FlowLayout.LEFT));
+    	borderP.add(new JLabel(LABEL_THICKNESS));
+     	
+     	SpinnerModel model = new SpinnerNumberModel(Figure.DEFAULT_THICKNESS, 0.1, 100,0.1);
+		thicknessField = new JSpinner(model);
+		thicknessField.setName(LaTeXDrawResources.NAME_THICKNESS_FIELD);
+		thicknessField.setEditor(new JSpinner.NumberEditor(thicknessField, "0.0"));//$NON-NLS-1$
+     	thicknessField.addChangeListener(this);
+     	borderP.add(thicknessField);
+     	
+     	bordersButton = new ColorButton(LaTeXDrawResources.LABEL_COLOR_BUTTON, new ButtonIcon(Figure.DEFAULT_BORDERS_COL));
+     	bordersButton.setActionCommand(LaTeXDrawResources.LABEL_COLOR_BUTTON);
+     	bordersButton.addActionListener(this);
+     	borderP.add(bordersButton);
+     	borderP.add(new JLabel(LABEL_TYPE_LINE));
+     	
+     	lineChoice = createLineChoice(this);
+     	borderP.add(lineChoice);
+     	
+     	if(movable)
+     	{
+	     	bordersPositionChoice = Figure.createBordersPositionChoice();
+	     	bordersPositionChoice.addItemListener(this);
+	     	borderP.add(bordersPositionChoice);
+     	}
+     	
+     	borderP.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.47"),  //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	
+     	return borderP;
+	}
+	
+	
+	
+	
+	/**
+	 * @return A panel with components to change the parameters of the filling of the figure.
+	 */
+	public JPanel createFillPanel()
+	{
+     	JPanel fillingP = new JPanel(new FlowLayout(FlowLayout.LEFT));
+     	
+     	filledCheckBox = new JCheckBox(LaTeXDrawResources.LABEL_FILLED_CHECKBOX);
+     	filledCheckBox.setActionCommand(LaTeXDrawResources.LABEL_FILLED_CHECKBOX);
+     	filledCheckBox.addActionListener(this);
+     	fillingP.add(filledCheckBox);
+     		     		     	
+     	interiorButton = new ColorButton(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON, new ButtonIcon(Figure.DEFAULT_INTERIOR_COL));
+     	interiorButton.setActionCommand(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON);
+     	interiorButton.addActionListener(this);
+     	fillingP.add(interiorButton);
+ 	
+     	hatchChoice = Figure.createFillChoice();
+     	hatchChoice.setPreferredSize(new Dimension(60,25));
+     	hatchChoice.addItemListener(this);
+     	fillingP.add(hatchChoice); 
+     	
+     	fillingP.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("AbstractParametersFrame.11"),  //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	
+     	return fillingP;
+	}
+	
+	
+	
+	
+	/**
+	 * @return A panel with components to change the parameters of the shadow of the figure.
+	 */
+	public JPanel createGradientPanel()
+	{
+  		GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;  		constraint.gridy = 0;
+     	constraint.gridwidth = 1; 	constraint.gridheight = 1;
+     	constraint.weightx = 0.1; 	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.WEST;
+     	
+     	JPanel gradientP = new JPanel(new GridBagLayout());
+     	
+     	gradientStartColButton = new ColorButton(LaTeXDrawResources.LABEL_COLOR_GRADIENT_FIRST, new ButtonIcon(PSTricksConstants.DEFAULT_GRADIENT_START_COLOR));
+     	gradientStartColButton.setActionCommand(LaTeXDrawResources.LABEL_COLOR_GRADIENT_FIRST);
+     	gradientStartColButton.addActionListener(this);
+     	gradientP.add(gradientStartColButton, constraint);
+     	
+     	gradientEndColButton = new ColorButton(LaTeXDrawResources.LABEL_COLOR_GRADIENT_SECOND, new ButtonIcon(PSTricksConstants.DEFAULT_GRADIENT_END_COLOR));
+     	gradientEndColButton.setActionCommand(LaTeXDrawResources.LABEL_COLOR_GRADIENT_SECOND);
+     	gradientEndColButton.addActionListener(this);
+     	constraint.gridx++;	
+     	gradientP.add(gradientEndColButton, constraint);
+     	
+     	constraint.gridy++;		constraint.gridx=0;	
+     	gradientP.add(new JLabel(LABEL_GRADIENT_MID_PT), constraint);
+     	
+     	constraint.gridx++;	
+     	SpinnerModel model = new SpinnerNumberModel(Figure.DEFAULT_GRADIENT_MID_POINT,0,1,0.01);
+     	gradientMidPtField = new JSpinner(model);
+     	gradientMidPtField.setEditor(new JSpinner.NumberEditor(gradientMidPtField, "0.000"));//$NON-NLS-1$
+     	gradientMidPtField.addChangeListener(this);
+     	gradientMidPtField.setName(LABEL_GRADIENT_MID_PT);
+     	gradientP.add(gradientMidPtField, constraint);	  
+     	
+     	constraint.gridx++;	
+     	gradientP.add(new JLabel(LABEL_GRADIENT_ANGLE), constraint);
+     	
+     	constraint.gridx++;	
+     	model = new SpinnerNumberModel(Math.toDegrees(Figure.DEFAULT_GRADIENT_ANGLE), -360, 360,0.5);
+     	gradientAngleField = new JSpinner(model);
+     	gradientAngleField.setEditor(new JSpinner.NumberEditor(gradientAngleField, "0.0"));//$NON-NLS-1$
+     	gradientAngleField.addChangeListener(this);
+     	gradientAngleField.setName(LABEL_GRADIENT_ANGLE);
+     	constraint.gridx++;	
+     	gradientP.add(gradientAngleField, constraint);	
+     	
+     	gradientP.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("AbstractParametersFrame.12"),  //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	
+     	return gradientP;
+	}
+	
+	
+	
+	/**
+	 * @return A panel with components to change the parameters of the shadow of the figure.
+	 */
+	public JPanel createShadowPanel()
+	{
+  		GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;  		constraint.gridy = 0;
+     	constraint.gridwidth = 1; 	constraint.gridheight = 1;
+     	constraint.weightx = 0.1; 	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.CENTER;
+     	
+     	JPanel shadowP = new JPanel(new GridBagLayout());
+     	
+     	constraint.gridy=0;		constraint.gridx=0;	
+     	shadowCheckBox = new JCheckBox(LaTeXDrawResources.LABEL_SHADOW_CHECKBOX);
+     	shadowCheckBox.setActionCommand(LaTeXDrawResources.LABEL_SHADOW_CHECKBOX);
+     	shadowCheckBox.addActionListener(this);
+     	constraint.gridx=0;	constraint.gridy=0;	
+     	shadowP.add(shadowCheckBox, constraint);
+     	
+     	shadowColorButton = new ColorButton(LaTeXDrawResources.LABEL_COLOR_SHADOW, new ButtonIcon(Figure.DEFAULT_SHADOW_COLOR));
+     	shadowColorButton.setActionCommand(LaTeXDrawResources.NAME_COLOR_SHADOW);
+     	shadowColorButton.addActionListener(this);
+     	constraint.gridx++;	
+     	shadowP.add(shadowColorButton, constraint);
+     	
+     	constraint.gridy++;		constraint.gridx=0;	
+     	shadowP.add(new JLabel(LABEL_SHADOW_SIZE), constraint);
+     	
+     	constraint.gridx++;	
+     	SpinnerModel model = new SpinnerNumberModel(Figure.DEFAULT_SHADOW_SIZE,0.01,1000,1);
+     	shadowSizeField = new JSpinner(model);
+     	shadowSizeField.setEditor(new JSpinner.NumberEditor(shadowSizeField, "0.00"));//$NON-NLS-1$
+     	shadowSizeField.addChangeListener(this);
+     	shadowSizeField.setName(LABEL_SHADOW_SIZE);
+     	shadowP.add(shadowSizeField, constraint);	  
+     	
+     	constraint.gridx++;	
+     	shadowP.add(new JLabel(LABEL_SHADOW_ANGLE), constraint);
+     	
+     	constraint.gridx++;	
+     	model = new SpinnerNumberModel(Math.toDegrees(Figure.DEFAULT_SHADOW_ANGLE), -360, 360,0.5);
+     	shadowAngleField = new JSpinner(model);
+     	shadowAngleField.setEditor(new JSpinner.NumberEditor(shadowAngleField, "0.0"));//$NON-NLS-1$
+     	shadowAngleField.addChangeListener(this);
+     	shadowAngleField.setName(LABEL_SHADOW_ANGLE);
+     	constraint.gridx++;	
+     	shadowP.add(shadowAngleField, constraint);	
+     	
+     	shadowP.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("LaTeXDrawFrame.0"),  //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	
+     	return shadowP;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create a panel with defaults buttons (ok, cancel, default)
+	 * @param frame The frame which ask the panel
+	 * @return The created panel
+	 */
+	public JPanel createButtonsPanel(AbstractParametersFrame frame)
+	{
+		JPanel panel = new JPanel();
+		
+		buttonOk = new JButton(LABEL_OK);
+		JButton buttonCancel  = new JButton(LABEL_CANCEL),
+				buttonDefault = new JButton(LABEL_DEFAULT);  		
+		
+  		buttonOk.setActionCommand(NAME_BUTTON_OK);
+  		buttonCancel.setActionCommand(NAME_BUTTON_CANCEL);
+  		buttonDefault.setActionCommand(NAME_BUTTON_DEFAULT);
+  		
+  		panel.add(buttonOk);
+  		panel.add(buttonCancel);
+  		panel.add(buttonDefault);
+  		panel.setPreferredSize(new Dimension(280, 40));
+  		panel.setMaximumSize(new Dimension(280, 40));
+  		buttonOk.addActionListener(frame);
+  		buttonCancel.addActionListener(frame);
+  		buttonDefault.addActionListener(frame);
+
+  		return panel;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set by default some fields of the frame
+	 */
+	public void setDefaultsValues()
+	{
+		Figure f = glimpsePanel.getGlimpseFigure();
+		setModified(true);
+		
+		if(f.canHaveShadow())
+		{
+			f.setHasShadow(PSTricksConstants.DEFAULT_SHADOW);
+			shadowAngleField.setValue(Math.toDegrees(Figure.DEFAULT_SHADOW_ANGLE));
+			shadowSizeField.setValue(Figure.DEFAULT_SHADOW_SIZE);
+			shadowColorButton.setEnabled(Figure.DEFAULT_SHADOW_HAS);
+			shadowColorButton.setColor(Figure.DEFAULT_SHADOW_COLOR);
+			f.setShadowColor(Figure.DEFAULT_SHADOW_COLOR);
+			glimpsePanel.glimpseFigure.setDoubleColor(Figure.DEFAULT_SHADOW_COLOR);
+			shadowCheckBox.setSelected(Figure.DEFAULT_SHADOW_HAS);
+			shadowSizeField.setEnabled(shadowCheckBox.isSelected());
+			shadowAngleField.setEnabled(shadowCheckBox.isSelected());
+		}
+		
+		if(f.canHaveArrow())
+		{
+			((Arrowable)f).setArrow1Style(ArrowHead.DEFAULT_STYLE);
+			((Arrowable)f).setArrow2Style(ArrowHead.DEFAULT_STYLE);
+			arrow1Choice.setSelectedItem(ArrowHead.DEFAULT_STYLE);
+			arrow2Choice.setSelectedItem(ArrowHead.DEFAULT_STYLE);
+			
+			bracketNum.setValue(ArrowHead.DEFAULT_BRACKET_NUM);
+			dotSizeDim.setValue(ArrowHead.DEFAULT_DOT_SIZE_DIM);
+			dotSizeNum.setValue(ArrowHead.DEFAULT_ARROW_SIZE_NUM);
+			rbracketNum.setValue(ArrowHead.DEFAULT_RBRACKET_NUM);
+			tbarsizeDim.setValue(ArrowHead.DEFAULT_TBAR_SIZE_DIM);
+			tbarsizeNum.setValue(ArrowHead.DEFAULT_TBAR_SIZE_NUM);
+			arrowInset.setValue(ArrowHead.DEFAULT_ARROW_INSET);
+			arrowLength.setValue(ArrowHead.DEFAULT_ARROW_LGTH);
+			arrowSizeDim.setValue(ArrowHead.DEFAULT_ARROW_SIZE_DIM);
+			arrowSizeNum.setValue(ArrowHead.DEFAULT_ARROW_SIZE_NUM);
+			
+			ArrowHead leftA = ((Arrowable)f).getArrowHead1();
+			ArrowHead rightA = ((Arrowable)f).getArrowHead2();
+			
+			leftA.setBracketNum(ArrowHead.DEFAULT_BRACKET_NUM);
+			rightA.setBracketNum(ArrowHead.DEFAULT_BRACKET_NUM);
+			leftA.setDotSizeDim(ArrowHead.DEFAULT_DOT_SIZE_DIM);
+			rightA.setDotSizeDim(ArrowHead.DEFAULT_DOT_SIZE_DIM);
+			leftA.setDotSizeNum(ArrowHead.DEFAULT_ARROW_SIZE_NUM);
+			rightA.setDotSizeNum(ArrowHead.DEFAULT_ARROW_SIZE_NUM);
+			leftA.setRBracketNum(ArrowHead.DEFAULT_RBRACKET_NUM);
+			rightA.setRBracketNum(ArrowHead.DEFAULT_RBRACKET_NUM);
+			leftA.setTBarSizeDim(ArrowHead.DEFAULT_TBAR_SIZE_DIM);
+			rightA.setTBarSizeDim(ArrowHead.DEFAULT_TBAR_SIZE_DIM);
+			leftA.setTBarSizeNum(ArrowHead.DEFAULT_TBAR_SIZE_NUM);
+			rightA.setTBarSizeNum(ArrowHead.DEFAULT_TBAR_SIZE_NUM);
+			
+			leftA.setArrowSizeNum(ArrowHead.DEFAULT_ARROW_SIZE_NUM);
+			rightA.setArrowSizeNum(ArrowHead.DEFAULT_ARROW_SIZE_NUM);
+			leftA.setArrowSizeDim(ArrowHead.DEFAULT_ARROW_SIZE_DIM);
+			rightA.setArrowSizeDim(ArrowHead.DEFAULT_ARROW_SIZE_DIM);
+			leftA.setArrowLength(ArrowHead.DEFAULT_ARROW_LGTH);
+			rightA.setArrowLength(ArrowHead.DEFAULT_ARROW_LGTH);
+			leftA.setArrowInset(ArrowHead.DEFAULT_ARROW_INSET);
+			rightA.setArrowInset(ArrowHead.DEFAULT_ARROW_INSET);
+			
+			updateEnableParamsArrow();
+		}
+		
+		if(doublecolorButton!=null)
+		{
+			doublecolorButton.setEnabled(Figure.DEFAULT_DOUBLELINE);
+			doublecolorButton.setColor(Figure.DEFAULT_DOUBLE_COLOR);
+			glimpsePanel.glimpseFigure.setDoubleColor(Figure.DEFAULT_DOUBLE_COLOR);
+		}
+		
+		if(bordersPositionChoice!=null)
+		{
+			bordersPositionChoice.setSelectedItem(Figure.DEFAULT_BORDERS_POSITION);
+			glimpsePanel.glimpseFigure.setBordersPosition(Figure.DEFAULT_BORDERS_POSITION);
+		}
+		
+		if(doubleLine!=null)
+		{
+			glimpsePanel.glimpseFigure.setHasDoubleBoundary(Figure.DEFAULT_DOUBLELINE);
+			glimpsePanel.glimpseFigure.setDoubleSep(Figure.DEFAULT_DOUBLESEP);
+			doubleLine.setSelected(Figure.DEFAULT_DOUBLELINE);
+			doubleSep.setValue(Figure.DEFAULT_DOUBLESEP);
+		}		
+		
+		if(lineChoice!=null)
+			lineChoice.setSelectedItem(Figure.DEFAULT_LINE_STYLE);
+
+		if(f.canBeHatched())
+		{
+			hatchButton.setColor(Figure.DEFAULT_HATCH_COL);
+			glimpsePanel.getGlimpseFigure().setHatchingColor(Figure.DEFAULT_HATCH_COL);
+			hatchChoice.setSelectedItem(Figure.DEFAULT_HATCH_STYLE);
+			hatchWidthField.setValue((double)Figure.DEFAULT_HATCH_WIDTH);	
+			hatchSepField.setValue(Figure.DEFAULT_HATCH_SEP);
+			hatchAngleField.setValue(0.);
+		}
+		
+		if(bordersButton!=null)
+		{
+			bordersButton.setColor(Figure.DEFAULT_BORDERS_COL);
+			glimpsePanel.getGlimpseFigure().setLinesColor(Figure.DEFAULT_BORDERS_COL);
+		}
+		
+		if(interiorButton!=null)
+		{
+			interiorButton.setColor(Figure.DEFAULT_INTERIOR_COL);
+			glimpsePanel.getGlimpseFigure().setInteriorColor(Figure.DEFAULT_INTERIOR_COL);
+		}
+		
+		if(filledCheckBox!=null)
+			filledCheckBox.setSelected(Figure.DEFAULT_IS_FILLED);
+		
+		if(f.canBeHatched())
+		{
+			gradientAngleField.setValue(Math.toDegrees(Figure.DEFAULT_GRADIENT_ANGLE));
+			gradientMidPtField.setValue(Figure.DEFAULT_GRADIENT_MID_POINT);
+			gradientEndColButton.setColor(PSTricksConstants.DEFAULT_GRADIENT_END_COLOR);
+			boolean ok = Figure.DEFAULT_HATCH_STYLE.equals(PSTricksConstants.TOKEN_FILL_GRADIENT);
+			gradientEndColButton.setEnabled(ok);
+			gradientStartColButton.setColor(PSTricksConstants.DEFAULT_GRADIENT_START_COLOR);
+			gradientStartColButton.setEnabled(ok);
+			gradientMidPtField.setEnabled(ok);
+			gradientAngleField.setEnabled(ok);
+		}
+		
+		if(rotationField!=null)
+			rotationField.setValue(Figure.DEFAULT_ROTATION_ANGLE);
+		
+		if(thicknessField!=null)
+			thicknessField.setValue((double)Figure.DEFAULT_THICKNESS);
+		
+		glimpsePanel.repaint();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create the list of the different styles of line.
+	 * @param frame The frame which ask the Choice.
+	 * @return The created Choice.
+	 */
+	public LaTeXDrawComboBox createLineChoice(AbstractParametersFrame frame)
+	{
+		LaTeXDrawComboBox choice = Figure.createStyleLineChoice();
+		choice.setActionCommand(LaTeXDrawResources.CHOICE_LINE_NAME);
+		choice.setName(LaTeXDrawResources.CHOICE_LINE_NAME);
+		choice.addItemListener(frame);
+     	
+     	return choice;
+	}
+	
+	
+	
+	
+	public void itemStateChanged(ItemEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Figure f = glimpsePanel.getGlimpseFigure();
+
+			if(o instanceof LaTeXDrawComboBox)
+			{
+				String ac = ((LaTeXDrawComboBox)o).getActionCommand();
+				
+				if(ac.equals(LaTeXDrawResources.CHOICE_LINE_NAME))
+				{
+					JLabel l = (JLabel) lineChoice.getSelectedItem();
+					
+					setModified(true);
+					f.setLineStyle(l.getText());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(ac.equals(Figure.LABEL_BORDERS_POSITION_CHOICE))
+				{
+					JLabel l = (JLabel) bordersPositionChoice.getSelectedItem();
+					
+					setModified(true);
+					f.setBordersPosition(l.getText());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(ac.equals(Figure.LABEL_HATCH_CHOICE))
+				{
+					String txt = ((JLabel)hatchChoice.getSelectedItem()).getText();
+					int num=0;
+					
+					if(txt.equals(PSTricksConstants.TOKEN_FILL_GRADIENT))
+						num=1;
+					else if(txt.equals(PSTricksConstants.TOKEN_FILL_NONE) || txt.equals(PSTricksConstants.TOKEN_FILL_SOLID))
+							num=2;
+					
+					setModified(true);
+					f.setHatchingStyle(txt);
+					hatchButton.setEnabled(num==0);
+					hatchWidthField.setEnabled(num==0);
+					hatchAngleField.setEnabled(num==0);
+					hatchSepField.setEnabled(num==0);
+					gradientAngleField.setEnabled(num==1);
+					gradientEndColButton.setEnabled(num==1);
+					gradientMidPtField.setEnabled(num==1);
+					gradientStartColButton.setEnabled(num==1);
+					updateFilledCB();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(ac.equals(LaTeXDrawResources.CHOICE_ARROW_LEFT_NAME))
+				{
+					JLabel label = (JLabel) arrow1Choice.getSelectedItem();
+
+					setModified(true);
+					((Arrowable)f).setArrow1Style(label.getText());
+					updateEnableParamsArrow();	
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(ac.equals(LaTeXDrawResources.CHOICE_ARROW_RIGHT_NAME))
+				{
+					JLabel label = (JLabel) arrow2Choice.getSelectedItem();
+
+					setModified(true);
+					((Arrowable)f).setArrow2Style(label.getText());
+					updateEnableParamsArrow();
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+
+	/**
+	 * Defines actions to do when a item like JSpinner has changed
+	 */
+	public void stateChanged(ChangeEvent e)
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				Figure f = glimpsePanel.getGlimpseFigure();
+				double v = Double.valueOf(((JSpinner)o).getValue().toString()).doubleValue();
+				
+				if(name.equals(LaTeXDrawResources.NAME_THICKNESS_FIELD))
+				{
+					if(f instanceof Dot)
+						((Dot)f).setWidth((float)v);
+					else 
+						f.setThickness((float)v);
+					
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_DOUBLESEP))
+				{
+					setModified(true);
+					f.setDoubleSep(v);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_HATCH_SEP))
+				{
+					setModified(true);
+					f.setHatchingSep(v);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_HATCHINGS_ANGLE))
+				{
+					setModified(true);
+					f.setHatchingAngle(Math.toRadians(v));
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_GRADIENT_ANGLE))
+				{
+					setModified(true);
+					f.setGradientAngle(Math.toRadians(v));
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_GRADIENT_MID_PT))
+				{
+					setModified(true);
+					f.setGradientMidPoint(v);				
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_SHADOW_ANGLE))
+				{
+					setModified(true);
+					f.setShadowAngle(Math.toRadians(v));
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_SHADOW_SIZE))
+				{
+					setModified(true);
+					f.setShadowSize(v);				
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(Figure.LABEL_HATCH_WIDTH))
+				{
+					setModified(true);
+					f.setHatchingWidth((float)v);				
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LaTeXDrawResources.LABEL_ROTATE))
+				{
+					setModified(true);
+					f.setRotationAngle(Math.toRadians(v));
+					glimpsePanel.repaint();
+					return;
+				}
+
+				if(name.equals(LABEL_BRACKETNUM))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead2().setBracketNum(v);
+					((Arrowable)f).getArrowHead1().setBracketNum(v);
+					glimpsePanel.repaint();
+					return;
+				}
+
+				if(name.equals(LABEL_DOTSIZEDIM))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead1().setDotSizeDim(v);
+					((Arrowable)f).getArrowHead2().setDotSizeDim(v);
+					glimpsePanel.repaint();
+					return;
+				}
+
+				if(name.equals(LABEL_DOTSIZENUM))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead1().setDotSizeNum(v);
+					((Arrowable)f).getArrowHead2().setDotSizeNum(v);
+					glimpsePanel.repaint();
+					return;
+				}
+
+				if(name.equals(LABEL_RBRACKETNUM))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead1().setRBracketNum(v);
+					((Arrowable)f).getArrowHead2().setRBracketNum(v);
+					glimpsePanel.repaint();
+					return;
+				}
+
+				if(name.equals(LABEL_TBARSIZEDIM))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead1().setTBarSizeDim(v);
+					((Arrowable)f).getArrowHead2().setTBarSizeDim(v);
+					glimpsePanel.repaint();
+					return;
+				}
+
+				if(name.equals(LABEL_TBARSIZENUM))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead1().setTBarSizeNum(v);
+					((Arrowable)f).getArrowHead2().setTBarSizeNum(v);
+					glimpsePanel.repaint();
+					return;
+				}
+
+				if(name.equals(LABEL_ARROWSIZENUM))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead1().setArrowSizeNum(v);
+					((Arrowable)f).getArrowHead2().setArrowSizeNum(v);
+					glimpsePanel.repaint();
+					return;
+				}
+				
+				if(name.equals(LABEL_ARROWSIZEDIM))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead1().setArrowSizeDim(v);
+					((Arrowable)f).getArrowHead2().setArrowSizeDim(v);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_ARROWLENGTH))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead1().setArrowLength(v);
+					((Arrowable)f).getArrowHead2().setArrowLength(v);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_ARROWINSET))
+				{
+					setModified(true);
+					((Arrowable)f).getArrowHead1().setArrowInset(v);
+					((Arrowable)f).getArrowHead2().setArrowInset(v);
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	/**
+	 * Allows to set the field rotationField.
+	 */
+	public void createRotationField()
+	{
+		SpinnerModel model = new SpinnerNumberModel(Figure.DEFAULT_ROTATION_ANGLE, -360, 360,0.1);
+     	rotationField = new JSpinner(model);
+     	rotationField.setEditor(new JSpinner.NumberEditor(rotationField, "0.0"));	//$NON-NLS-1$     	
+     	rotationField.setName(LaTeXDrawResources.LABEL_ROTATE);
+     	rotationField.addChangeListener(this);
+     	rotationField.setName(LaTeXDrawResources.LABEL_ROTATE);
+	}
+	
+	
+	
+	/**
+	 * @return Create a panel with fields to modify the arrows.
+	 * @param twoLeftArrows True if the figure has two 'left' arrows like arc and not a right arrow and a left arrow like line.
+	 */
+	public JPanel createArrowPanel(boolean twoLeftArrows, boolean withFillButton)
+	{
+		JPanel arrowP = new JPanel(new GridBagLayout());
+     	GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;
+     	constraint.gridy = 0;
+     	constraint.gridwidth = 1;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.WEST;
+     	
+     	arrowP.add(new JLabel(LABEL_LEFT_ARROW), constraint);
+     	
+    	arrow1Choice = ArrowHead.createLeftArrowStyleList();
+     	arrow1Choice.setName(LaTeXDrawResources.CHOICE_ARROW_LEFT_NAME);
+     	arrow1Choice.setActionCommand(LaTeXDrawResources.CHOICE_ARROW_LEFT_NAME);
+     	arrow1Choice.setSelectedItem(PSTricksConstants.NONEARROW_STYLE);
+     	arrow1Choice.addItemListener(this);
+     	constraint.gridx++;
+     	arrowP.add(arrow1Choice, constraint);
+     	
+    	constraint.gridx++;
+    	arrowP.add(new JLabel(LABEL_RIGHT_ARROW), constraint);	     	
+     	
+    	if(twoLeftArrows)
+    		arrow2Choice = ArrowHead.createLeftArrowStyleList();
+    	else
+    		arrow2Choice = ArrowHead.createRightArrowStyleList();
+     	arrow2Choice.setName(LaTeXDrawResources.CHOICE_ARROW_RIGHT_NAME);
+     	arrow2Choice.setActionCommand(LaTeXDrawResources.CHOICE_ARROW_RIGHT_NAME);
+     	arrow2Choice.setSelectedItem(PSTricksConstants.NONEARROW_STYLE);
+     	arrow2Choice.addItemListener(this);
+     	constraint.gridx++;
+     	arrowP.add(arrow2Choice, constraint);
+     	
+     	constraint.gridx=0;	constraint.gridy++;
+     	arrowP.add(new JLabel(LABEL_DOTSIZE), constraint);
+     	
+     	SpinnerNumberModel model = new SpinnerNumberModel(ArrowHead.DEFAULT_DOT_SIZE_NUM, 0.1, 100,0.1);
+     	dotSizeNum = new JSpinner(model);
+     	dotSizeNum.setName(LABEL_DOTSIZENUM);
+     	dotSizeNum.setEditor(new JSpinner.NumberEditor(dotSizeNum, "0.0000"));//$NON-NLS-1$
+     	dotSizeNum.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(dotSizeNum, constraint);
+
+     	constraint.gridx++;
+     	arrowP.add(new JLabel(LABEL_CROSS_THICKNESS), constraint);     	
+     	
+     	model = new SpinnerNumberModel(ArrowHead.DEFAULT_DOT_SIZE_DIM, 0, 1000,1);
+     	dotSizeDim = new JSpinner(model);
+     	dotSizeDim.setName(LABEL_DOTSIZEDIM);
+     	dotSizeDim.setEditor(new JSpinner.NumberEditor(dotSizeDim, "0.00"));//$NON-NLS-1$
+     	dotSizeDim.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(dotSizeDim, constraint);	     	
+     	
+     	constraint.gridx = 0;
+     	constraint.gridy++;
+     	arrowP.add(new JLabel(LABEL_TBARSIZE), constraint);
+     	
+     	model = new SpinnerNumberModel(ArrowHead.DEFAULT_TBAR_SIZE_NUM,0.1, 100,0.1);
+     	tbarsizeNum = new JSpinner(model);
+     	tbarsizeNum.setName(LABEL_TBARSIZENUM);
+     	tbarsizeNum.setEditor(new JSpinner.NumberEditor(tbarsizeNum, "0.0000"));//$NON-NLS-1$
+     	tbarsizeNum.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(tbarsizeNum, constraint);
+
+     	constraint.gridx++;
+     	arrowP.add(new JLabel(LABEL_CROSS_THICKNESS), constraint);     	
+     	
+     	model = new SpinnerNumberModel(ArrowHead.DEFAULT_TBAR_SIZE_DIM, 0, 1000,1);
+     	tbarsizeDim = new JSpinner(model);
+     	tbarsizeDim.setName(LABEL_TBARSIZEDIM);
+     	tbarsizeDim.setEditor(new JSpinner.NumberEditor(tbarsizeDim, "0.00"));//$NON-NLS-1$
+     	tbarsizeDim.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(tbarsizeDim, constraint);	     		     	
+     	
+     	constraint.gridx = 0;
+     	constraint.gridy++;
+     	arrowP.add(new JLabel(LABEL_BRACKET_LGTH), constraint);
+     	
+     	model = new SpinnerNumberModel(ArrowHead.DEFAULT_BRACKET_NUM, 0.001, 100,0.01);
+     	bracketNum = new JSpinner(model);
+     	bracketNum.setName(LABEL_BRACKETNUM);
+     	bracketNum.setEditor(new JSpinner.NumberEditor(bracketNum, "0.0000"));//$NON-NLS-1$
+     	bracketNum.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(bracketNum, constraint);
+
+     	constraint.gridx++;
+     	arrowP.add(new JLabel(LABEL_CROSS_WIDTH), constraint);
+     	
+     	constraint.gridx = 0;
+     	constraint.gridy++;
+     	arrowP.add(new JLabel(LABEL_RBRACKET_LGTH), constraint);
+     	
+     	model = new SpinnerNumberModel(ArrowHead.DEFAULT_RBRACKET_NUM, 0.001, 100,0.01);
+     	rbracketNum = new JSpinner(model);
+     	rbracketNum.setName(LABEL_RBRACKETNUM);
+     	rbracketNum.setEditor(new JSpinner.NumberEditor(rbracketNum, "0.0000"));//$NON-NLS-1$
+     	rbracketNum.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(rbracketNum, constraint);
+
+     	constraint.gridx++;
+     	arrowP.add(new JLabel(LABEL_CROSS_WIDTH), constraint); 
+     	
+     	constraint.gridx=0;
+     	constraint.gridy++;
+     	arrowP.add(new JLabel(LABEL_ARROW_WIDTH), constraint); 	     	
+     	
+     	model = new SpinnerNumberModel(ArrowHead.DEFAULT_ARROW_SIZE_NUM, 0.001, 100,0.01);
+     	arrowSizeNum = new JSpinner(model);
+     	arrowSizeNum.setName(LABEL_ARROWSIZENUM);
+     	arrowSizeNum.setEditor(new JSpinner.NumberEditor(arrowSizeNum, "0.0000"));//$NON-NLS-1$
+     	arrowSizeNum.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(arrowSizeNum, constraint);
+
+     	constraint.gridx++;
+     	arrowP.add(new JLabel(LABEL_CROSS_THICKNESS), constraint);     	
+     	
+     	model = new SpinnerNumberModel(ArrowHead.DEFAULT_ARROW_SIZE_DIM, 0, 1000, 1);
+     	arrowSizeDim = new JSpinner(model);
+     	arrowSizeDim.setName(LABEL_ARROWSIZEDIM);
+     	arrowSizeDim.setEditor(new JSpinner.NumberEditor(arrowSizeDim, "0.00"));//$NON-NLS-1$
+     	arrowSizeDim.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(arrowSizeDim, constraint);	   
+     	
+     	constraint.gridx=0;
+     	constraint.gridy++;
+     	arrowP.add(new JLabel(LABEL_ARROW_LENGTH), constraint); 
+     	
+     	model = new SpinnerNumberModel(ArrowHead.DEFAULT_ARROW_LGTH, 0, 100,0.01);
+     	arrowLength = new JSpinner(model);
+     	arrowLength.setName(LABEL_ARROWLENGTH);
+     	arrowLength.setEditor(new JSpinner.NumberEditor(arrowLength, "0.0000"));//$NON-NLS-1$
+     	arrowLength.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(arrowLength, constraint);
+     	
+     	constraint.gridx=0;
+     	constraint.gridy++;
+     	arrowP.add(new JLabel(LABEL_ARROW_INSET), constraint); 
+     	
+     	model = new SpinnerNumberModel(ArrowHead.DEFAULT_ARROW_INSET, 0, 100,0.01);
+     	arrowInset = new JSpinner(model);
+     	arrowInset.setName(LABEL_ARROWINSET);
+     	arrowInset.setEditor(new JSpinner.NumberEditor(arrowInset, "0.0000"));//$NON-NLS-1$
+     	arrowInset.addChangeListener(this);
+     	constraint.gridx++;
+     	arrowP.add(arrowInset, constraint);	     	
+     	
+     	if(withFillButton)
+     	{
+	     	interiorButton = new ColorButton(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON, new ButtonIcon(Figure.DEFAULT_INTERIOR_COL));
+	     	interiorButton.setActionCommand(LaTeXDrawResources.LABEL_COLOR_INTERIOR_BUTTON);
+	     	interiorButton.addActionListener(this);
+	     	constraint.gridx++;
+	     	arrowP.add(interiorButton, constraint);
+     	}
+     	
+     	arrowP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_ARROWS, 
+						  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+		return arrowP;
+	}
+	
+	
+	
+	/**
+	 * Allows to set enable or disable the parameters of the left arrow
+	 */
+	public void updateEnableParamsArrow()
+	{
+		JLabel label1 = (JLabel) arrow2Choice.getSelectedItem();
+		JLabel label2 = (JLabel) arrow1Choice.getSelectedItem();
+		String text1 = label1.getText();
+		String text2 = label2.getText();
+		
+		boolean ok = text1.equals(PSTricksConstants.BAREND_STYLE) ||
+					text1.equals(PSTricksConstants.BARIN_STYLE) ||
+					text1.equals(PSTricksConstants.LSBRACKET_STYLE) ||
+					text1.equals(PSTricksConstants.RSBRACKET_STYLE) ||
+					text1.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+					text1.equals(PSTricksConstants.LRBRACKET_STYLE) || 
+					text2.equals(PSTricksConstants.BAREND_STYLE) ||
+					text2.equals(PSTricksConstants.BARIN_STYLE) ||
+					text2.equals(PSTricksConstants.LSBRACKET_STYLE) ||
+					text2.equals(PSTricksConstants.RSBRACKET_STYLE) ||
+					text2.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+					text2.equals(PSTricksConstants.LRBRACKET_STYLE) ;
+		
+		tbarsizeDim.setEnabled(ok);
+		tbarsizeNum.setEnabled(ok);
+		bracketNum.setEnabled(text1.equals(PSTricksConstants.RSBRACKET_STYLE) ||
+								text1.equals(PSTricksConstants.LSBRACKET_STYLE) ||
+								text2.equals(PSTricksConstants.RSBRACKET_STYLE) ||
+								text2.equals(PSTricksConstants.LSBRACKET_STYLE));
+		
+		rbracketNum.setEnabled(text1.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+								text1.equals(PSTricksConstants.LRBRACKET_STYLE) ||
+								text2.equals(PSTricksConstants.RRBRACKET_STYLE) ||
+								text2.equals(PSTricksConstants.LRBRACKET_STYLE));
+		
+		ok = text1.equals(PSTricksConstants.CIRCLEEND_STYLE) ||
+			text1.equals(PSTricksConstants.CIRCLEIN_STYLE) ||
+			text1.equals(PSTricksConstants.DISKEND_STYLE) ||
+			text1.equals(PSTricksConstants.DISKIN_STYLE) ||
+			text2.equals(PSTricksConstants.CIRCLEEND_STYLE) ||
+			text2.equals(PSTricksConstants.CIRCLEIN_STYLE) ||
+			text2.equals(PSTricksConstants.DISKEND_STYLE) ||
+			text2.equals(PSTricksConstants.DISKIN_STYLE);
+		
+		dotSizeDim.setEnabled(ok);
+		dotSizeNum.setEnabled(ok);
+		
+		ok = (text1.equals(PSTricksConstants.DLARROW_STYLE) ||
+			text1.equals(PSTricksConstants.LARROW_STYLE) ||
+			text1.equals(PSTricksConstants.DRARROW_STYLE) ||
+			text1.equals(PSTricksConstants.RARROW_STYLE) ||
+			text2.equals(PSTricksConstants.DLARROW_STYLE) ||
+			text2.equals(PSTricksConstants.LARROW_STYLE) ||
+			text2.equals(PSTricksConstants.DRARROW_STYLE) ||
+			text2.equals(PSTricksConstants.RARROW_STYLE));
+		
+		arrowInset.setEnabled(ok);
+		arrowLength.setEnabled(ok);
+		arrowSizeDim.setEnabled(ok);
+		arrowSizeNum.setEnabled(ok);
+	}
+	
+	
+	
+	
+	/**
+	 * Defines if the checkbox "filledCB" must be enable or not.
+	 * @since 1.9
+	 */
+	protected void updateFilledCB()
+	{
+		Figure f = glimpsePanel.getGlimpseFigure();
+		
+		if(!f.canBeFilled() || filledCheckBox==null)
+			return ;
+		
+		String txt = f.getHatchingStyle();
+		
+		if(txt.equals(PSTricksConstants.TOKEN_FILL_GRADIENT))
+		{
+			filledCheckBox.setEnabled(false);
+			return ;
+		}
+		
+		if(f instanceof JoinedLines || f instanceof BezierCurve || f instanceof AkinPoints)
+		{
+			filledCheckBox.setEnabled(!(shadowCheckBox.isSelected() && f.canHaveShadow() &&
+					(txt.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH) ||
+					txt.equals(PSTricksConstants.TOKEN_FILL_CROSSHATCH_F) ||
+					txt.equals(PSTricksConstants.TOKEN_FILL_HLINES) ||
+					txt.equals(PSTricksConstants.TOKEN_FILL_HLINES_F) ||
+					txt.equals(PSTricksConstants.TOKEN_FILL_VLINES) ||
+					txt.equals(PSTricksConstants.TOKEN_FILL_VLINES_F))));
+		}
+		else
+			filledCheckBox.setEnabled(!f.canHaveShadow() || !shadowCheckBox.isSelected());
+	}
+
+
+
+	/**
+	 * @return the isModified.
+	 * @since 2.0.0
+	 */
+	public synchronized boolean isModified()
+	{
+		return isModified;
+	}
+
+
+	/**
+	 * @param isModified the isModified to set.
+	 * @since 2.0.0
+	 */
+	public synchronized void setModified(boolean isModified)
+	{
+		this.isModified = isModified;
+	}
+}
diff --git a/current/latexDraw/ui/dialog/AddCommentsFrame.java b/current/latexDraw/ui/dialog/AddCommentsFrame.java
new file mode 100644
index 0000000..af69b39
--- /dev/null
+++ b/current/latexDraw/ui/dialog/AddCommentsFrame.java
@@ -0,0 +1,165 @@
+package latexDraw.ui.dialog;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.*;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.CodePanel;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.CopyPasteMenu;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/**
+ * This frame allows the user to add comments to his current drawing<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 06/03/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class AddCommentsFrame extends JFrame implements ActionListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The label of the button "ok" of the frame addCommentsFrame */
+	public static final String LABEL_FRAME_ADDCOMMENTS_OK = "ADDCOMMENTS_OK";//$NON-NLS-1$
+	
+	/** The label of the button "Cancel" of the frame addCommentsFrame */
+	public static final String LABEL_FRAME_ADDCOMMENTS_CANCEL = "ADDCOMMENTS_CANCEL";//$NON-NLS-1$
+
+	/** The title of the frame */
+	public static final String TITLE = LaTeXDrawLang.getOthersString("CodePanel.updateCode"); //$NON-NLS-1$
+	
+	/** The main frame of the program */
+	protected LaTeXDrawFrame mainFrame;
+	
+	/** This editor allows to write comments */
+	protected JEditorPane editorAddComments;
+	
+	protected CopyPasteMenu copyMenu;
+	
+	
+	public AddCommentsFrame(LaTeXDrawFrame frame)
+	{
+		try
+		{
+	  		setIconImage(LaTeXDrawResources.commentIcon.getImage());
+			
+			mainFrame = frame;
+			Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		setTitle(TITLE);
+	  		setLocation(dim.width*1/3, dim.height*1/4);
+	  		
+	  		// Creation of the panel which contains the editor
+	  		// and creation of the panel which contains the buttons
+	  		JPanel  pGeneral = new JPanel(new BorderLayout()), 
+	  				pButton = new JPanel(new BorderLayout());
+	  		JButton buttonOk = new JButton(AbstractParametersFrame.LABEL_OK), 
+	  				buttonCancel = new JButton(AbstractParametersFrame.LABEL_CANCEL);
+	  		editorAddComments 	= new JEditorPane();
+	  		copyMenu			= new CopyPasteMenu(editorAddComments);
+	  		
+	  		buttonOk.setActionCommand(LABEL_FRAME_ADDCOMMENTS_OK);
+	  		buttonCancel.setActionCommand(LABEL_FRAME_ADDCOMMENTS_CANCEL);
+			buttonOk.addActionListener(this);
+			buttonCancel.addActionListener(this);
+
+	  		// The scroller of the editor
+			JScrollPane scrollPane = new JScrollPane(editorAddComments);
+	 		scrollPane.setVerticalScrollBarPolicy(
+	 									ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); 
+			GridLayout  gridButton = new GridLayout(1, 2);
+
+			editorAddComments.setText("");//$NON-NLS-1$
+			pButton.setLayout(gridButton);
+			pButton.add(buttonOk);
+			pButton.add(buttonCancel);
+			pGeneral.add(scrollPane, BorderLayout.CENTER);
+			pGeneral.add(pButton, BorderLayout.SOUTH);
+			
+			// Creation of the frame
+			getContentPane().add(pGeneral);
+			setSize(340, 250);
+			setVisible(false);
+			
+			editorAddComments.addMouseListener(copyMenu);
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible)
+	{
+		super.setVisible(visible);
+		
+		if(visible)
+		{
+			CodePanel codePanel = mainFrame.getCodePanel();
+			editorAddComments.setText(codePanel.getCommentsWithoutTag());
+		}
+		else
+			mainFrame.requestFocus();
+	}
+	
+	
+
+	public void actionPerformed(ActionEvent e) 
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JButton)
+		{
+			String label = ((JButton)o).getActionCommand();
+			
+			if(label == LABEL_FRAME_ADDCOMMENTS_CANCEL)
+			{
+				setVisible(false);
+				return ;
+			}
+			
+			if(label == LABEL_FRAME_ADDCOMMENTS_OK)
+			{
+				CodePanel codePanel;
+				try
+				{
+					codePanel = mainFrame.getCodePanel();
+					codePanel.setComments(editorAddComments.getText());
+					codePanel.updateText();
+					mainFrame.setIsModified(true);
+					
+				}catch(Exception ex) 
+				{
+					ex.printStackTrace(); 
+					ExceptionFrameDialog.showExceptionDialog(ex);
+				}
+
+				setVisible(false);
+
+				return;
+			}
+		} // if JButton
+	}
+}
diff --git a/current/latexDraw/ui/dialog/BatchConvertFrame.java b/current/latexDraw/ui/dialog/BatchConvertFrame.java
new file mode 100644
index 0000000..20da25f
--- /dev/null
+++ b/current/latexDraw/ui/dialog/BatchConvertFrame.java
@@ -0,0 +1,975 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Vector;
+
+import javax.imageio.ImageIO;
+import javax.print.DocFlavor;
+import javax.swing.*;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import latexDraw.filters.*;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.util.LaTeXDrawResources;
+import net.sourceforge.jiu.codecs.BMPCodec;
+import net.sourceforge.jiu.codecs.CodecMode;
+import net.sourceforge.jiu.codecs.PNMCodec;
+import net.sourceforge.jiu.gui.awt.BufferedRGB24Image;
+import net.sourceforge.jiu.gui.awt.ImageCreator;
+import net.sourceforge.jiu.gui.awt.RGBA;
+import net.sourceforge.jiu.gui.awt.ToolkitLoader;
+
+import org.sourceforge.jlibeps.epsgraphics.EpsGraphics2D;
+
+
+/**
+ * This frame allows the user to convert several pictures in an another format.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 02/13/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class BatchConvertFrame extends JFrame implements ActionListener, ListSelectionListener, Runnable
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The label of the frame */
+	public static final String TITLE_FRAME = LaTeXDrawLang.getString1_6("LaTeXDrawFrame.2"); //$NON-NLS-1$
+	
+	/** The model of the list (Useful to add element to the list) */
+	private BatchConvertListModel listModel;
+	
+	/** The list of pictures of folders to convert */
+	private JList list;
+	
+	/** Allows to know if the user want to overwrite the existing files */
+	private JCheckBox overwriteCB;
+	
+	private JCheckBox sameDirCB;
+	
+	/** Allows to choose the format of the new pictures */
+	private JComboBox formatList;
+	
+	/** Allows to add severals pictures */
+	private JButton addFilesB;
+	
+	/** Allows to remove a line of the list */
+	private JButton removeB;
+	
+	/** Allows to remove of the lines of the list */
+	private JButton removeAllB;
+	
+	/** Allows to set the path of the output directory */
+	private JTextField pathField;
+	
+	/** Allows to select the path of the output directory */
+	private JButton pathSelectB;
+	
+	/** The file chooser of paths selections */
+	private JFileChooser dirChooser;
+	
+	/** The file chooser of pictures selections */
+	private JFileChooser picturesChooser;
+	
+	/** Allows to start the conversion */
+	private JButton beginB;
+	
+	/** Allows to cancel the conversion */
+	private JButton stopB;
+	
+	/** Allows to close the frame */
+	private JButton closeB;
+	
+	/** Allows to know if the scan of folders must be recursive */
+	private JCheckBox recursiveCB;
+	
+	/** The thread of the conversion */
+	private transient Thread thread;
+	
+	/** Allows to stop the thread which convert the pictures */
+	private boolean stopThread;
+
+	protected String pathSelectFigure;
+	
+	/** The label of the JCheckBox recursiveCB */
+	public static final String LABEL_RECURSIVE = LaTeXDrawLang.getString1_6("BatchConvertFrame.1"); //$NON-NLS-1$
+	
+	/** The label of the button addFilesB */
+	public static final String LABEL_ADD_FILES = LaTeXDrawLang.getString1_6("BatchConvertFrame.2"); //$NON-NLS-1$
+	
+	/** The label of the button  removeB */
+	public static final String LABEL_REMOVE = LaTeXDrawLang.getString1_7("ParametersTextFrame.13"); //$NON-NLS-1$
+	
+	/** The label of the button removeAllB */
+	public static final String LABEL_REMOVE_ALL = LaTeXDrawLang.getString1_6("BatchConvertFrame.4"); //$NON-NLS-1$
+	
+	/** The label of the checkbox overwrite */
+	public static final String LABEL_OVERWRITE = LaTeXDrawLang.getString1_6("BatchConvertFrame.5"); //$NON-NLS-1$
+	
+	public static final String LABEL_SAME_DIR = LaTeXDrawLang.getString1_7("BatchConvertFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the button pathSelectB */
+	public static final String LABEL_SEL_PATH = LaTeXDrawLang.getString1_6("BatchConvertFrame.6"); //$NON-NLS-1$
+	
+	/** The label of the button formatList */
+	public static final String LABEL_FORMAT_LIST = LaTeXDrawLang.getString1_6("BatchConvertFrame.7"); //$NON-NLS-1$
+	
+	/** The label of the button beginB */
+	public static final String LABEL_BEGIN = LaTeXDrawLang.getString1_6("BatchConvertFrame.8"); //$NON-NLS-1$
+	
+	/** The second label of the button beginB */
+	public static final String LABEL_STOP = LaTeXDrawLang.getString1_6("BatchConvertFrame.9"); //$NON-NLS-1$
+	
+	/** The label of the button closeB */
+	public static final String LABEL_CLOSE = LaTeXDrawLang.getString1_8("LaTeXDrawFrame.23"); //$NON-NLS-1$
+	
+	/** The name of the list */
+	public static final String NAME_LIST = LaTeXDrawLang.getString1_6("BatchConvertFrame.11"); //$NON-NLS-1$
+	
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public BatchConvertFrame()
+	{
+		try
+		{
+	  		setIconImage(LaTeXDrawResources.copyIcon.getImage());
+	  		
+	  		stopThread = true;
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+			setTitle(TITLE_FRAME);
+
+	  		dirChooser = null;
+	  		picturesChooser = null;
+	  		pathSelectFigure = null;
+
+	  		JPanel buttonListPanel = new JPanel();
+			JPanel panelTmp = new JPanel();
+			panelTmp.setLayout(new BoxLayout(panelTmp, BoxLayout.Y_AXIS));
+            buttonListPanel.setLayout(new BoxLayout(buttonListPanel, BoxLayout.X_AXIS));
+	  		addFilesB  = new JButton(LABEL_ADD_FILES, LaTeXDrawResources.plusIcon);
+	  		removeB	   = new JButton(LABEL_REMOVE, LaTeXDrawResources.minusIcon);
+	  		removeAllB = new JButton(LABEL_REMOVE_ALL, LaTeXDrawResources.minusIcon);
+	  		addFilesB.setActionCommand(LABEL_ADD_FILES);
+	  		removeB.setActionCommand(LABEL_REMOVE);
+	  		removeAllB.setActionCommand(LABEL_REMOVE_ALL);
+	  		addFilesB.addActionListener(this);
+	  		removeB.addActionListener(this);
+	  		removeAllB.addActionListener(this);
+	  		removeB.setEnabled(false);
+	  		removeAllB.setEnabled(false);
+	  		panelTmp.add(addFilesB);
+	  		panelTmp.add(removeB);
+	  		panelTmp.add(removeAllB);
+	  		buttonListPanel.add(panelTmp);
+	  		
+	  		JPanel listPanel = new JPanel(); 
+			list = new JList(); 
+			list.setCellRenderer(new BatchConvertListCellRenderer());
+			list.addListSelectionListener(this);
+			list.setName(NAME_LIST);
+			listModel = new BatchConvertListModel();
+			list.setModel(listModel);
+	  		list.setVisibleRowCount(10); 
+	  		JScrollPane scrollPane = new JScrollPane(list); 
+	  	 	listPanel.add(scrollPane); 
+	  	 	
+	  	 	JPanel topPanel = new JPanel(new BorderLayout());
+	  	 	topPanel.add(listPanel, BorderLayout.CENTER);
+	  	 	topPanel.add(buttonListPanel, BorderLayout.EAST);
+			
+	  	 	JPanel formatPanel = new JPanel(new GridBagLayout());
+	  	 	GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.HORIZONTAL;
+	     	constraint.anchor = GridBagConstraints.EAST;
+	     	formatPanel.add(new JLabel(LaTeXDrawLang.getString1_6("BatchConvertFrame.14")),constraint); //$NON-NLS-1$
+	     	
+	  	 	formatList = new JComboBox();
+	  	 	formatList.setActionCommand(LABEL_FORMAT_LIST);
+	  	 	formatList.addItem(LaTeXDrawResources.EPS_EXTENSION);
+	  	 	formatList.addItem(LaTeXDrawResources.JPG_EXTENSION);
+	  	 	formatList.addItem(LaTeXDrawResources.BMP_EXTENSION);
+	  	 	formatList.addItem(LaTeXDrawResources.PNG_EXTENSION);
+	  	 	formatList.addItem(LaTeXDrawResources.PPM_EXTENSION);
+	  	 	formatList.setSelectedIndex(0);
+	  	 	formatList.setPreferredSize(new Dimension(300, 30));
+	  	 	formatList.setSize(new Dimension(300, 30));
+	  	 	formatList.setMaximumSize(new Dimension(300, 30));
+	  	 	formatList.setMinimumSize(new Dimension(300, 30));
+	     	constraint.gridx = 1;
+	     	constraint.gridwidth = 6;
+	     	formatPanel.add(formatList,constraint);
+	  	 	overwriteCB = new JCheckBox(LABEL_OVERWRITE);
+	  	 	overwriteCB.setActionCommand(LABEL_OVERWRITE);
+	  	 	pathSelectB = new JButton(LaTeXDrawResources.openIcon);
+	  	 	pathSelectB.setActionCommand(LABEL_SEL_PATH);
+	  	 	pathSelectB.addActionListener(this);
+	  	 	pathSelectB.setMaximumSize(new Dimension(40,40));
+	  	 	pathSelectB.setPreferredSize(new Dimension(40,40));
+	  	 	pathField = new JTextField();
+	  	 	pathField.setEditable(false);
+	  	 	pathField.setText(LaTeXDrawFrame.getPathExport());
+	  	 	pathField.setMinimumSize(new Dimension(300,40));
+	  	 	pathField.setPreferredSize(new Dimension(300,40));
+	  	 	sameDirCB = new JCheckBox(LABEL_SAME_DIR);
+	  	 	sameDirCB.setActionCommand(LABEL_SAME_DIR);
+	  	 	sameDirCB.addActionListener(this);
+	  	 	constraint.fill = GridBagConstraints.NONE;
+	  	 	JPanel pathPanel = new JPanel(new GridBagLayout());
+	    	constraint.gridx = 0;
+	     	constraint.gridwidth = 6;
+	     	pathPanel.add(pathField, constraint);
+	     	
+	     	constraint.gridx = 6;
+	     	constraint.gridwidth = 1;
+	     	pathPanel.add(pathSelectB, constraint);
+	     	
+	  	 	JPanel optPanel = new JPanel(new GridLayout(4,1));
+	  	 	optPanel.add(formatPanel);
+	  	 	optPanel.add(pathPanel);
+	  	 	optPanel.add(overwriteCB);
+	  	 	optPanel.add(sameDirCB);
+	  	 	
+	  	 	JPanel ctrlPanel = new JPanel(new GridLayout(1, 3));
+	  	 	closeB = new JButton(LABEL_CLOSE);
+	  	 	beginB = new JButton(LABEL_BEGIN);
+	  	 	stopB = new JButton(LABEL_STOP);
+	  	 	beginB.setEnabled(false);
+	  	 	stopB.setEnabled(false);
+	  	 	closeB.addActionListener(this);
+	  	 	beginB.addActionListener(this);
+	  	 	stopB.addActionListener(this);
+	  	 	closeB.setActionCommand(LABEL_CLOSE);
+	  	 	beginB.setActionCommand(LABEL_BEGIN);
+	  	 	stopB.setActionCommand(LABEL_STOP);
+	  	 	ctrlPanel.add(beginB);
+	  	 	ctrlPanel.add(stopB);
+	  	 	ctrlPanel.add(closeB);
+	  	 	ctrlPanel.setPreferredSize(new Dimension(280, 40));
+	  	 	ctrlPanel.setMaximumSize(new Dimension(280, 40));
+	  	 	
+	  	 	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+			getContentPane().add(topPanel);
+			getContentPane().add(optPanel);
+			getContentPane().add(ctrlPanel);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+
+
+
+	public void actionPerformed(ActionEvent e)
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof AbstractButton)
+		{
+			String cmd = ((AbstractButton)o).getActionCommand();
+			
+			if(cmd==null) return;
+			
+			if(cmd.equals(LABEL_SAME_DIR))
+			{
+				if(sameDirCB.isSelected())
+				{
+					pathField.setEnabled(false);
+					pathSelectB.setEnabled(false);
+				}
+				else
+				{
+					pathField.setEnabled(true);
+					pathSelectB.setEnabled(true);
+				}
+				return ;
+			}
+			
+			if(cmd.equals(LABEL_CLOSE))
+			{
+				setVisible(false);
+				return ;
+			}
+			
+			if(cmd.equals(LABEL_BEGIN))
+			{
+				if(thread==null)
+				{
+					int i, size = listModel.getSize();
+					for(i=0; i<size; i++)
+						listModel.changeIconLabel(-1, i);
+					list.updateUI();
+					
+					setStopThread(false);
+					beginB.setEnabled(false);
+					stopB.setEnabled(true);
+					closeB.setEnabled(false);
+					addFilesB.setEnabled(false);
+					formatList.setEnabled(false);
+					overwriteCB.setEnabled(false);
+					pathSelectB.setEnabled(false);
+					removeAllB.setEnabled(false);
+					removeB.setEnabled(false);
+					sameDirCB.setEnabled(false);
+					thread = new Thread(this);
+					thread.start();
+				}
+				return;
+			}
+			
+			if(cmd.equals(LABEL_STOP))
+			{
+				stop();
+				stopB.setEnabled(false);
+				beginB.setEnabled(true);
+				closeB.setEnabled(true);
+				sameDirCB.setEnabled(true);
+				addFilesB.setEnabled(true);
+				formatList.setEnabled(true);
+				overwriteCB.setEnabled(true);
+				removeAllB.setEnabled(true);
+				if(!list.isSelectionEmpty())
+					removeB.setEnabled(true);
+				if(!sameDirCB.isSelected())
+					pathSelectB.setEnabled(true);
+				thread=null;
+				return;
+			}
+			
+			if(cmd.equals(LABEL_ADD_FILES))
+			{
+				
+				if(picturesChooser==null)
+				{
+			  		picturesChooser = new JFileChooser();
+			  		picturesChooser.addChoosableFileFilter(new BMPFilter());
+			  		picturesChooser.addChoosableFileFilter(new PNGFilter());
+			  		picturesChooser.addChoosableFileFilter(new PPMFilter());
+			  		picturesChooser.addChoosableFileFilter(new GIFFilter());
+			  		picturesChooser.addChoosableFileFilter(new JPGFilter());			  		
+			 		picturesChooser.setAcceptAllFileFilterUsed(false);
+			  		recursiveCB = new JCheckBox(LABEL_RECURSIVE);
+			  		recursiveCB.setSelected(false);
+			  		JPanel custom = new JPanel(); 
+			 		custom.setLayout(new BoxLayout(custom, BoxLayout.Y_AXIS)); 
+			 		custom.add(recursiveCB); 
+			 		picturesChooser.add(custom, BorderLayout.SOUTH);
+			  		
+					picturesChooser.setCurrentDirectory(new File(LaTeXDrawFrame.getPathOpen()));
+			  		picturesChooser.setApproveButtonText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.171")); //$NON-NLS-1$
+			  		picturesChooser.setDialogTitle(LaTeXDrawLang.getString1_6("BatchConvertFrame.13"));     //$NON-NLS-1$
+			  		picturesChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
+			  		picturesChooser.setMultiSelectionEnabled(true);
+				}
+				
+				if(pathSelectFigure!=null)
+					picturesChooser.setCurrentDirectory(new File(pathSelectFigure));
+				
+				picturesChooser.showSaveDialog(this);
+				File[] files = picturesChooser.getSelectedFiles();
+				
+				if(files!=null)
+					for(File f : files)
+						if(f.canRead() && f.exists())
+						{
+							if(f.isDirectory())
+							{
+								listModel.addElement(f.getAbsolutePath(), -1);
+								
+								if(recursiveCB.isSelected())
+									addSubFolders(f);
+							}
+							else
+								listModel.addElement(f.getAbsolutePath(), -1);
+						}
+				
+				list.updateUI();
+				if(listModel.getSize()>0)
+				{
+					removeAllB.setEnabled(true);
+					beginB.setEnabled(true);
+				}
+				return;
+			}
+			
+			if(cmd.equals(LABEL_REMOVE))
+			{
+				listModel.removeElementAt(list.getSelectedIndex());
+				list.updateUI();
+				if(listModel.getSize()==0) 
+				{
+					removeAllB.setEnabled(false);
+					beginB.setEnabled(false);
+				}
+				removeB.setEnabled(false);
+			}
+			
+			if(cmd.equals(LABEL_REMOVE_ALL))
+			{
+				listModel.removeAllElements();
+				list.updateUI();
+				if(listModel.getSize()==0) 
+					removeAllB.setEnabled(false);
+				removeB.setEnabled(false);
+				beginB.setEnabled(false);
+			}
+			
+			if(cmd.equals(LABEL_SEL_PATH))
+			{
+				if(dirChooser==null)
+				{
+			  		dirChooser = new JFileChooser();
+			  		dirChooser.setApproveButtonText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.171")); //$NON-NLS-1$
+			  		dirChooser.setDialogTitle(LaTeXDrawLang.getString1_6("BatchConvertFrame.12"));     //$NON-NLS-1$
+			  		dirChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+			  		dirChooser.setMultiSelectionEnabled(false);
+				}
+				dirChooser.setCurrentDirectory(new File(pathField.getText()));
+				dirChooser.showSaveDialog(this);
+				File file = dirChooser.getSelectedFile();
+				
+				if(file!=null)
+					if(file.isDirectory())
+						pathField.setText(file.getPath());
+				return;
+			}
+			
+			return ;
+		}// if(o instanceof JButton)
+	} 
+	
+	
+	
+	
+	/**
+	 * Converts the pictures.
+	 * @throws InterruptedException If the user cancel the conversion.
+	 */
+	public void convert() throws InterruptedException
+	{
+		try
+		{
+			int i, size = listModel.getSize();
+			
+			for(i=0; i<size; i++)
+			{
+				testEndThread();
+				Object o = listModel.getElementAt(i);
+				String path=null;
+				if(o instanceof String) 
+					path = (String)o;
+				else if(o instanceof JLabel)
+					path = ((JLabel)o).getText();
+				else listModel.changeIconLabel(0, i);
+				
+				if(path!=null)
+				{
+					File f = new File(path);
+					if(f.exists() && f.canRead())
+					{
+						if(f.isFile())
+						{
+							boolean state = convertFile(f);
+							if(state)
+								 listModel.changeIconLabel(1, i);
+							else listModel.changeIconLabel(0, i);
+						}
+						else
+						{
+							File[] dir = f.listFiles();
+							for(File f2 : dir)
+							{
+								convertFile(f2);
+								testEndThread();
+							}
+							listModel.changeIconLabel(1, i);
+						}
+					}
+					else listModel.changeIconLabel(0, i);
+				} //if(path!=null)
+				list.updateUI();
+			} // for(i=0; i<size; i++)
+		}catch(InterruptedException e){throw new InterruptedException(); }
+	    catch (Exception e)
+	    {
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+	    }
+	}
+
+
+	
+	
+	/**
+	 * Allows to convert a file.
+	 * @param f The file to convert.
+	 * @return true: the conversion is successful, else false.
+	 */
+	public boolean convertFile(File f)
+	{
+		try
+		{
+			// Creation of the path
+			String format = formatList.getSelectedItem().toString();
+			String path = null;
+			if(sameDirCB.isSelected())
+			{
+				path = f.getAbsolutePath();
+				int end = path.lastIndexOf(".");//$NON-NLS-1$
+				path = path.substring(0, end);
+				path += format;
+			}
+			else
+			{
+				String name = f.getName();
+				int end = name.lastIndexOf(".");//$NON-NLS-1$
+				name = name.substring(0, end);
+				name += format;
+				path = pathField.getText()+System.getProperty("file.separator")+name;//$NON-NLS-1$
+			}
+			
+			File file = new File(path);
+			
+			if(file.exists() && !overwriteCB.isSelected()) return false;
+			
+			Image image = getImage(f);
+			if(image==null) return false;
+			
+			boolean ok = true;
+			// Creation of the buffered image
+			BufferedImage bufferedImage = new BufferedImage(image.getWidth(null), 
+												image.getHeight(null), BufferedImage.TYPE_INT_RGB );
+			Graphics g = bufferedImage.createGraphics();
+			g.drawImage(image,0,0,null);
+			g.dispose();
+			
+			// Exportation of the picture following the selected format
+			if(format.equals(LaTeXDrawResources.EPS_EXTENSION))
+			{
+				FileOutputStream finalImage = new FileOutputStream(file);
+				EpsGraphics2D graph = new EpsGraphics2D("TeXDrawPicture",  //$NON-NLS-1$
+						finalImage, 0, 0, bufferedImage.getWidth(), bufferedImage.getHeight());	
+				graph.drawImage(image, 0, 0, null);
+				graph.flush();
+				graph.close();
+				finalImage.close();
+				
+			}
+			else if(format.equals(LaTeXDrawResources.JPG_EXTENSION))
+				ImageIO.write(bufferedImage, "jpg", file);//$NON-NLS-1$
+			else if(format.equals(LaTeXDrawResources.BMP_EXTENSION))
+			{
+				BMPCodec codec = new BMPCodec();
+				codec.setFile(path, CodecMode.SAVE);
+				BufferedRGB24Image img = new BufferedRGB24Image(bufferedImage);
+				codec.setImage(img); 
+				codec.process();
+				codec.close();
+			}
+			else if(format.equals(LaTeXDrawResources.PNG_EXTENSION))
+				ImageIO.write(bufferedImage, "png", file);//$NON-NLS-1$
+			else if(format.equals(LaTeXDrawResources.PPM_EXTENSION))
+			{
+				PNMCodec codec = new PNMCodec();
+				codec.setFile(file.getAbsolutePath(), CodecMode.SAVE);
+				BufferedRGB24Image img = new BufferedRGB24Image(bufferedImage);
+				codec.setImage(img); 
+				codec.process();
+				codec.close();
+			}
+			else ok = false;
+			
+			bufferedImage.flush();
+			
+			return ok;
+		}
+		catch(Exception e) { return false; }
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the image of a file.
+	 * @param f The file of the picture.
+	 * @return The AWT image.
+	 */
+	public Image getImage(File f)
+	{
+		try
+		{
+			if(f==null || !f.exists() || !f.canRead() || !f.isFile())
+				return null;
+			
+			Image image=null;
+			URL url = f.toURI().toURL();
+			URLConnection connection = url.openConnection();
+		    String type = connection.getContentType();
+		
+		    if(type.equals(DocFlavor.INPUT_STREAM.JPEG.getMimeType()) || 
+		       type.equals(DocFlavor.INPUT_STREAM.PNG.getMimeType()) ||
+	    	   type.equals(DocFlavor.INPUT_STREAM.GIF.getMimeType()))
+		    	image = Toolkit.getDefaultToolkit().getImage(f.getPath());
+		    else
+		    	if(f.getName().toLowerCase().endsWith(LaTeXDrawResources.BMP_EXTENSION) ||
+		    		f.getName().toLowerCase().endsWith(LaTeXDrawResources.PPM_EXTENSION))
+			     image = ImageCreator.convertToAwtImage(
+			    		 ToolkitLoader.loadViaToolkitOrCodecs(f.getAbsolutePath(), true, null), RGBA.DEFAULT_ALPHA);
+		    else
+		    	return null;
+		    
+		    //	We must wait the end of the loading of the picture
+		    MediaTracker tracker = new MediaTracker(this);
+		    tracker.addImage(image, 0);
+		    tracker.waitForID(0, 0);
+
+		    if(tracker.isErrorID(0))
+		    	return null;
+		    
+		    return image;
+
+		 }catch(Exception e) { return null;}
+	}
+	
+	
+
+
+	/**
+	 * Allows to add sub-folders in the list.
+	 * @param f The root folder.
+	 */
+	private void addSubFolders(File f)
+	{
+		if(f==null || !f.canRead() || !f.isDirectory()) return ;
+		
+		File[] files = f.listFiles();
+		
+		for(File f1 : files)
+			if(f1!=null && f1.canRead() && f1.isDirectory())
+			{
+				addSubFolders(f1);
+				listModel.addElement(f1.getAbsolutePath(), -1);
+			}
+	}
+
+
+
+
+	public void valueChanged(ListSelectionEvent e)
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JList)
+		{
+			JList l = (JList)o;
+			
+			if(l.getName().equals(NAME_LIST))
+			{
+				int[] id = l.getSelectedIndices();
+				removeB.setEnabled(id!=null && id.length!=0);
+				
+				return ;
+			}
+			return ;
+		}
+	}
+
+
+
+	public synchronized void testEndThread() throws InterruptedException 
+	{
+        if(stopThread) 
+               throw new InterruptedException();
+	} 
+
+	
+	
+	public synchronized void stop() 
+	{
+        stopThread = true;
+	}
+	
+	
+	
+	
+	public synchronized void setStopThread(boolean state)
+	{
+		stopThread = state;
+	}
+	
+	
+	
+	
+	public void run()
+	{
+		try 
+		{
+			convert();
+			stopB.setEnabled(false);
+			beginB.setEnabled(true);
+			closeB.setEnabled(true);
+			sameDirCB.setEnabled(true);
+			addFilesB.setEnabled(true);
+			formatList.setEnabled(true);
+			overwriteCB.setEnabled(true);
+			
+			if(!sameDirCB.isSelected())
+				pathSelectB.setEnabled(true);
+			
+			removeAllB.setEnabled(true);
+			
+			if(!list.isSelectionEmpty())
+				removeB.setEnabled(true);
+			
+			thread=null;
+	    }
+		catch(InterruptedException e) { /* nothing to do */ }
+	}
+	
+	
+	
+	/**
+	 * Sets the path used to select pictures.
+	 * @param pathOpen The path.
+	 * @since 1.9
+	 */
+	public void setPathSelect(String pathOpen)
+	{
+		File f = new File(pathOpen);
+		
+		if(f.exists() && f.canRead())
+			pathSelectFigure = pathOpen;
+	}
+
+
+
+
+	/**
+	 * Sets the path defining the location of the output pictures.
+	 * @param pathExport The path.
+	 * @since 1.9
+	 */
+	public void setPathOutput(String pathExport)
+	{
+		File f = new File(pathExport);
+		
+		if(f.exists() && f.canRead())
+			pathField.setText(pathExport);
+	}
+}
+
+
+
+
+/**
+ * This is the model of the list of the batch conversion frame.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 02/14/06<br>
+ * @author Arnaud BLOUIN<br>
+ * 1.9.2<br>
+ */
+class BatchConvertListModel extends AbstractListModel
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The element of the list */
+	Vector<JLabel> elements;
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public BatchConvertListModel()
+	{
+		elements = new Vector<JLabel>();
+	}
+	
+	
+	/**
+	 * @return the elements
+	 */
+	public Vector<JLabel> getElements()
+	{
+		return elements;
+	}
+
+
+	/**
+	 * Allows to remove all the elements of the list
+	 */
+	public void removeAllElements()
+	{
+		elements.removeAllElements();
+	}
+
+
+	
+	/**
+	 * Allows to remove an element at the position id in the list
+	 * @param id The position of the element to remove from the list
+	 */
+	public void removeElementAt(int id)
+	{
+		if(id<0 || id>elements.size()) return ;
+		elements.remove(id);
+	}
+	
+
+
+	/**
+	 * Allows to change the icon of an element of the list
+	 * @param ok : 1, the 'ok' icon<br>0 : the 'err' icon<br>else: the 'empty' icon
+	 * @param id The position of the element in the list
+	 */
+	public void changeIconLabel(int ok, int id)
+	{
+		if(id>=0 && id<elements.size())
+		{
+			if(ok==1) elements.elementAt(id).setIcon(LaTeXDrawResources.okIcon);
+			else  if(ok==0) elements.elementAt(id).setIcon(LaTeXDrawResources.errIcon);
+			else elements.elementAt(id).setIcon(LaTeXDrawResources.emptyIcon);
+		}
+			
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to add an element to the list
+	 * @param txt The text to add
+	 * @param ok : 1, the 'ok' icon<br>0: the 'err' icon<br>else : the 'empty' icon
+	 */
+	public void addElement(String txt, int ok)
+	{
+		JLabel label = new JLabel(txt);
+		
+		if(ok==1) label.setIcon(LaTeXDrawResources.okIcon);
+		else  if(ok==0) label.setIcon(LaTeXDrawResources.errIcon);
+		else label.setIcon(LaTeXDrawResources.emptyIcon);
+		
+		elements.add(label);
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the size of the list
+	 */
+	public int getSize()
+	{
+		return elements.size();
+	}
+
+	
+	
+	/**
+	 * Allows to get an element of the list
+	 * @param id The position of the element in the list
+	 */
+	public Object getElementAt(int id)
+	{
+		if(id<0 || id>elements.size()) return null;
+		
+		return elements.elementAt(id);
+	}
+	
+}
+
+
+
+
+/**
+ * This is the renderer of the cells of the list of the batch conversion frame.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 02/14/06<br>
+ * @author Arnaud BLOUIN<br>
+ * 1.9.2<br>
+ */
+class BatchConvertListCellRenderer extends DefaultListCellRenderer 
+{ 
+	private static final long serialVersionUID = 1L;
+
+	
+	@Override
+	public Component getListCellRendererComponent(JList list, Object value, 
+            				int index, boolean isSelected, boolean cellHasFocus) 
+    { 
+		Component retValue;
+		
+		if(value instanceof JLabel)
+		{
+			retValue = super.getListCellRendererComponent( 
+			 							list, ((JLabel)value).getText(), index, isSelected, cellHasFocus); 
+			setIcon(((JLabel)value).getIcon());
+		}
+		else
+		{
+			retValue = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); 
+			setIcon(LaTeXDrawResources.emptyIcon);
+		}
+
+		return retValue; 
+    }
+}
diff --git a/current/latexDraw/ui/dialog/DrawPropertiesFrame.java b/current/latexDraw/ui/dialog/DrawPropertiesFrame.java
new file mode 100644
index 0000000..cd03379
--- /dev/null
+++ b/current/latexDraw/ui/dialog/DrawPropertiesFrame.java
@@ -0,0 +1,485 @@
+package latexDraw.ui.dialog;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.CodePanel;
+import latexDraw.ui.DrawContainer;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.ui.components.XScale;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines the frame which allows to set the parameters of the drawing (not the figure.draw)<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class DrawPropertiesFrame extends JFrame implements ActionListener
+{
+	private static final long serialVersionUID = 1L;
+
+    /** Allows to choice the unit of length (for the field pixel/unit) */
+    private LaTeXDrawComboBox unitChoice;   
+	
+	/** The field which allows to change the number of pixels per 
+	 * unit of length */
+	private JSpinner pixelsPerUnitField;	
+	
+	/** The main frame of the program */
+	private LaTeXDrawFrame parentFrame;
+	
+	/** The former unit selected */
+	private String formerUnitChoice;
+	
+	/** Allows to set the caption of the drawing */
+	private JTextField captionField;
+	
+	/** Allows to set the label of the drawing */
+	private JTextField labelField;
+	
+	/** Allows to place the figure in a page containing only floats */
+	private JRadioButton onlyWithFloatsCB;
+	
+	/** Allows to place the drawing at the top of the page */
+	private JRadioButton topCB;
+	
+	/** Allows to put the drawing at the bottom of the page */
+	private JRadioButton bottomCB;
+	
+	/** Allows to put the drawing following the code position */
+	private JRadioButton hereCB;
+	
+	/** Obligates to put the drawing following the code position */
+	private JRadioButton HERECB;
+	
+	/** Allows to put the drawing at the default position */
+	private JRadioButton defaultPositionCB;
+	
+	/** Obligates to put the drawing following the code position */
+	private JRadioButton centerHoriCB;
+	
+	/** Allows to put the drawing at the default position */
+	private JRadioButton defaultPositionHoriCB;
+	
+	/** The list of the packages of the current drawing. */
+	private JTextArea packagesDrawing;
+	
+	/** The list of the packages contained in the preferences. */
+	private JTextArea packagesList;
+	
+	/** The label of the label field */
+	public static final String LABEL_LABEL = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the caption field */
+	public static final String LABEL_CAPTION = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.1"); //$NON-NLS-1$
+	
+	/** The name of the pixelsPerUnitField JFormattedTextField */
+	public final static String NAME_PIXELS_FIELD = "pixelsPerUnitField";//$NON-NLS-1$
+	
+	/** The name of the button ok */
+	public static final String NAME_BUTTON_OK = "BUTTON_OK";//$NON-NLS-1$
+	
+	/** The name of the button cancel */
+	public static final String NAME_BUTTON_CANCEL = "BUTTON_CANCEL";//$NON-NLS-1$
+	
+	/** The title of the frame */
+	public static final String TITLE = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.2"); //$NON-NLS-1$
+	
+	public static final String LABEL_UNIT_PER = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.3"); //$NON-NLS-1$
+	
+	public static final String ACTION_CMD_UNITCHOICE = "unitChoice"; //$NON-NLS-1$
+	
+	public static final String LABEL_ONLYFLOATCB = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.5"); //$NON-NLS-1$
+	
+	public static final String LABEL_TOP = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.6"); //$NON-NLS-1$
+	
+	public static final String LABEL_BOTTOM = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.7"); //$NON-NLS-1$
+	
+	public static final String LABEL_HERE = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.8"); //$NON-NLS-1$
+	
+	public static final String LABEL_HERE_HERE = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.9"); //$NON-NLS-1$
+	
+	public static final String LABEL_DEFAULT_POSITION = AbstractParametersFrame.LABEL_DEFAULT;
+	
+	public static final String LABEL_CENTER = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.10"); //$NON-NLS-1$
+	
+	public static final String TITLE_BORDERS_PLACEMENT_VERT = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.11"); //$NON-NLS-1$
+	
+	public static final String TITLE_BORDERS_PLACEMENT_HORI = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.12"); //$NON-NLS-1$
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public DrawPropertiesFrame(LaTeXDrawFrame frame)
+	{
+  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+		parentFrame = frame;
+		
+  		setIconImage(LaTeXDrawResources.drawingPropIcon.getImage());
+  		
+  		formerUnitChoice = XScale.DEFAULT_UNIT;
+	  	setTitle(TITLE);
+  	
+	  	JTabbedPane tabbedPane = new JTabbedPane();
+  		JButton buttonOk  = new JButton(AbstractParametersFrame.LABEL_OK), 
+		buttonCancel  = new JButton(AbstractParametersFrame.LABEL_CANCEL);	
+		
+  		buttonOk.setActionCommand(NAME_BUTTON_OK);
+  		buttonCancel.setActionCommand(NAME_BUTTON_CANCEL);
+  		buttonOk.addActionListener(this);
+		buttonCancel.addActionListener(this);
+		
+  		JPanel pButton  = new JPanel();
+		pButton.add(buttonOk);
+		pButton.add(buttonCancel);
+		pButton.setPreferredSize(new Dimension(500, 40));
+		pButton.setMaximumSize(new Dimension(500, 40));
+		
+		tabbedPane.addTab(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.general"), createPanelGenParameters());
+		tabbedPane.addTab("Packages", createPanelPackages());
+     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+     	getContentPane().setLayout(bl);
+     	getContentPane().add(tabbedPane);
+     	getContentPane().add(pButton);
+  		pack();
+  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+		setVisible(false);
+	}
+
+	
+	
+	private JPanel createPanelPackages() {
+		JPanel pkgP 	= new JPanel();
+		JSplitPane pane = new JSplitPane();
+		packagesDrawing = new JTextArea();
+		packagesList 	= new JTextArea();
+		JScrollPane sp1 = new JScrollPane(packagesDrawing);
+		JScrollPane sp2 = new JScrollPane(packagesList);
+		JPanel p1 		= new JPanel();
+		JPanel p2 		= new JPanel();
+
+		packagesList.setEditable(false);
+		p1.setBorder(new CompoundBorder(new TitledBorder(null, "Document packages", 
+  				TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(5,5,5,5)));
+		p2.setBorder(new CompoundBorder(new TitledBorder(null, "Packages from preferences", 
+				TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(5,5,5,5)));
+		
+		p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS));
+		p2.setLayout(new BoxLayout(p2, BoxLayout.X_AXIS));
+		pkgP.setLayout(new BoxLayout(pkgP, BoxLayout.X_AXIS));
+		
+		packagesList.setToolTipText("<html>These packages come from your preferences file.<br>They are not used for the drawing.</html>");
+		packagesDrawing.setToolTipText("<html>Include into this list the packages you need to compile the drawing, e.g. :<br>\\usepackage[frenchb]{babel}<br>\\usepackage[utf8]{inputenc}<br>You can also copy/paste the packages you already saved in your preferences displayed on the right.</html>");
+		
+		p1.add(sp1);
+		p2.add(sp2);
+		pane.setLeftComponent(p1);
+		pane.setRightComponent(p2);
+		pane.setDividerLocation(230);
+		pkgP.add(pane);
+		
+		return pkgP;
+	}
+	
+	
+	protected void setPackagesLists() {
+		packagesList.setText(parentFrame.getLatexIncludes());
+		packagesDrawing.setText(parentFrame.getCodePanel().getDocumentPackages());
+	}
+	
+	
+	
+	private JPanel createPanelGenParameters() {
+		JPanel pGeneral = new JPanel();
+  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+  		
+     	JPanel placementPanel = new JPanel();
+     	placementPanel.setLayout(new GridLayout(6, 1));
+     	
+     	ButtonGroup group = new ButtonGroup();
+     	onlyWithFloatsCB = new JRadioButton(LABEL_ONLYFLOATCB);
+     	onlyWithFloatsCB.setName(CodePanel.TOKEN_VERT_FLOATS_PAGE);
+     	placementPanel.add(onlyWithFloatsCB);
+     	group.add(onlyWithFloatsCB);
+     	
+     	hereCB = new JRadioButton(LABEL_HERE);
+     	hereCB.setName(CodePanel.TOKEN_VERT_HERE);
+     	placementPanel.add(hereCB);
+     	group.add(hereCB);
+     	
+     	HERECB = new JRadioButton(LABEL_HERE_HERE);
+     	placementPanel.add(HERECB);
+     	group.add(HERECB);
+     	
+     	topCB = new JRadioButton(LABEL_TOP);
+     	placementPanel.add(topCB);
+     	group.add(topCB);
+     	
+     	bottomCB = new JRadioButton(LABEL_BOTTOM);
+     	placementPanel.add(bottomCB);
+     	group.add(bottomCB);
+     	
+     	defaultPositionCB = new JRadioButton(LABEL_DEFAULT_POSITION);
+     	placementPanel.add(defaultPositionCB);
+     	group.add(defaultPositionCB);
+     	
+     	placementPanel.setBorder(new CompoundBorder(new TitledBorder(null, TITLE_BORDERS_PLACEMENT_VERT, 
+				  				TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(5,5,5,5)));
+     	pGeneral.add(placementPanel);
+     	
+     	JPanel placementHoriPanel = new JPanel();
+     	placementHoriPanel.setLayout(new GridLayout(2, 1));
+     	group = new ButtonGroup();
+     	
+     	centerHoriCB = new JRadioButton(LABEL_CENTER);
+     	placementHoriPanel.add(centerHoriCB);
+     	group.add(centerHoriCB);
+     	
+     	defaultPositionHoriCB = new JRadioButton(LABEL_DEFAULT_POSITION);
+     	placementHoriPanel.add(defaultPositionHoriCB);
+     	group.add(defaultPositionHoriCB);
+     	
+     	placementHoriPanel.setBorder(new CompoundBorder(new TitledBorder(null, TITLE_BORDERS_PLACEMENT_HORI, 
+				  				TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(5,5,5,5)));
+     	pGeneral.add(placementHoriPanel);
+     	
+     	JPanel pPpc = new JPanel(new FlowLayout(FlowLayout.LEFT));
+    	SpinnerModel model = new SpinnerNumberModel(parentFrame.getDrawPanel().getPixelsPerCm(),1,100000,1);
+     	pixelsPerUnitField = new JSpinner(model);
+     	pixelsPerUnitField.setEditor(new JSpinner.NumberEditor(pixelsPerUnitField, "0"));//$NON-NLS-1$
+      	pixelsPerUnitField.setToolTipText(LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.13")); //$NON-NLS-1$
+      	pixelsPerUnitField.setName(NAME_PIXELS_FIELD);
+     	pixelsPerUnitField.setMaximumSize(new Dimension(50,30));
+     	pPpc.add(pixelsPerUnitField);
+     	pPpc.add(new JLabel(LABEL_UNIT_PER));
+     	
+     	unitChoice = new LaTeXDrawComboBox();
+     	unitChoice.addItem(XScale.LABEL_CM);
+     	unitChoice.addItem(XScale.LABEL_INCH);
+     	unitChoice.setSelectedItem(XScale.DEFAULT_UNIT);
+     	unitChoice.setPreferredSize(new Dimension(65,30));
+     	unitChoice.setMaximumSize(new Dimension(65,30));
+     	unitChoice.setMinimumSize(new Dimension(65,30));
+     	unitChoice.setActionCommand(ACTION_CMD_UNITCHOICE);
+     	unitChoice.addActionListener(this);
+     	pPpc.add(unitChoice);
+     	
+     	JPanel pCaption = new JPanel(new FlowLayout(FlowLayout.LEFT));
+     	pCaption.add(new JLabel(LABEL_CAPTION));
+     	captionField = new JTextField();
+     	captionField.setMinimumSize(new Dimension(200, 25));
+     	captionField.setPreferredSize(new Dimension(200, 25));
+     	pCaption.add(captionField);
+     	
+     	JPanel pLabel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+     	pLabel.add(new JLabel(LABEL_LABEL));
+     	labelField = new JTextField();
+     	labelField.setMinimumSize(new Dimension(200, 25));
+     	labelField.setPreferredSize(new Dimension(200, 25));
+     	pLabel.add(labelField);
+     	
+     	pGeneral.add(pPpc);
+     	pGeneral.add(pCaption);
+     	pGeneral.add(pLabel);
+     	
+     	return pGeneral;
+	}
+	
+	
+	public void actionPerformed(ActionEvent e)
+	{
+		Object o = e.getSource();
+		
+		try
+		{
+			if(o instanceof JButton)
+			{
+				String label = ((JButton)o).getActionCommand();
+				
+				if(label == NAME_BUTTON_CANCEL)
+				{
+					super.setVisible(false);
+					return;
+				}
+
+				if(label == NAME_BUTTON_OK)
+				{
+					saveProperties();
+					parentFrame.getDrawPanel().repaint();
+					setVisible(false);
+					return;
+				}
+			}
+			
+			if(o instanceof LaTeXDrawComboBox)
+			{
+				if(((LaTeXDrawComboBox)o).getActionCommand().equals(ACTION_CMD_UNITCHOICE))
+				{
+					if(!formerUnitChoice.equals(unitChoice.getSelectedItem().toString()))
+					{
+						float pixf = Float.valueOf(pixelsPerUnitField.getValue().toString());
+						
+						if(unitChoice.getSelectedItem().toString().equals(XScale.LABEL_CM))
+							pixelsPerUnitField.setValue((int)(pixf*PSTricksConstants.INCH_VAL_CM));
+						else
+							pixelsPerUnitField.setValue((int)(pixf/PSTricksConstants.INCH_VAL_CM+1));
+						
+						formerUnitChoice = unitChoice.getSelectedItem().toString();
+					}
+					
+					return ;
+				}
+			}
+			
+		}catch(Exception ex) 
+		{ 
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	/**
+	 * Initialise the values of the item of the frame
+	 */
+	public void setProperties()
+	{
+		try
+		{
+			DrawContainer draw = parentFrame.getDrawPanel().getDraw();
+		
+			setPackagesLists();
+			unitChoice.setSelectedItem(draw.getUnitForPixelsPerCm());
+			
+			int pix = draw.getPixelsPerCm();
+			
+			if(unitChoice.getSelectedItem().toString().equals(XScale.LABEL_CM))
+				pixelsPerUnitField.setValue(pix);
+			else
+				pixelsPerUnitField.setValue((int)(pix/PSTricksConstants.INCH_VAL_CM+1));
+			
+			CodePanel codePanel = parentFrame.getCodePanel();
+			String currentVertPosition = codePanel.getPositionVertToken();
+			String currentHoriPosition = codePanel.getPositionHoriToken();
+			
+			if(currentVertPosition.equals(CodePanel.TOKEN_VERT_FLOATS_PAGE))
+				onlyWithFloatsCB.setSelected(true);
+			else if(currentVertPosition.equals(CodePanel.TOKEN_VERT_BOTTOM))
+				bottomCB.setSelected(true);
+			else if(currentVertPosition.equals(CodePanel.TOKEN_VERT_HERE))
+				hereCB.setSelected(true);
+			else if(currentVertPosition.equals(CodePanel.TOKEN_VERT_HERE_HERE))
+				HERECB.setSelected(true);
+			else if(currentVertPosition.equals(CodePanel.TOKEN_VERT_TOP))
+				topCB.setSelected(true);
+			else defaultPositionCB.setSelected(true);
+			
+			if(currentHoriPosition.equals(CodePanel.TOKEN_HORI_CENTER_START))
+				 centerHoriCB.setSelected(true);
+			else defaultPositionHoriCB.setSelected(true);
+				
+			captionField.setText(codePanel.getCaption());
+			labelField.setText(codePanel.getLabel());
+			
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible)
+	{
+		if(visible)
+			setProperties();
+
+		super.setVisible(visible);
+	}
+	
+	
+	
+	
+	/**
+	 * Saves the properties
+	 */
+	public void saveProperties()
+	{
+		try
+		{
+			DrawContainer draw = parentFrame.getDrawPanel().getDraw();	
+			CodePanel codePanel = parentFrame.getCodePanel();
+			float pixf = Float.valueOf(pixelsPerUnitField.getValue().toString());
+			int pix = (int)pixf;
+			
+			if(((String)unitChoice.getSelectedItem()).equals(XScale.LABEL_INCH))
+				pix*=PSTricksConstants.INCH_VAL_CM;
+	
+			parentFrame.setUnitForPixelsPerCm(unitChoice.getSelectedItem().toString());			
+			draw.setPixelsPerCm(pix);
+			
+			codePanel.setLabel(labelField.getText());
+			codePanel.setCaption(captionField.getText());
+			
+			
+			if(onlyWithFloatsCB.isSelected())
+				codePanel.setPositionVertToken(CodePanel.TOKEN_VERT_FLOATS_PAGE);
+			else if(HERECB.isSelected())
+				codePanel.setPositionVertToken(CodePanel.TOKEN_VERT_HERE_HERE);
+			else if(hereCB.isSelected())
+				codePanel.setPositionVertToken(CodePanel.TOKEN_VERT_HERE);
+			else if(topCB.isSelected())
+				codePanel.setPositionVertToken(CodePanel.TOKEN_VERT_TOP);
+			else if(bottomCB.isSelected())
+				codePanel.setPositionVertToken(CodePanel.TOKEN_VERT_BOTTOM);
+			else if(defaultPositionCB.isSelected())
+				codePanel.setPositionVertToken(CodePanel.TOKEN_HORI_VERT_DEFAULT);
+			
+			if(centerHoriCB.isSelected())
+				codePanel.setPositionHoriToken(CodePanel.TOKEN_HORI_CENTER_START);
+			else codePanel.setPositionHoriToken(CodePanel.TOKEN_HORI_VERT_DEFAULT);
+			
+			codePanel.setDocumentPackages(packagesDrawing.getText());
+			parentFrame.getDrawPanel().setIsModified(true);
+			parentFrame.getDrawPanel().updateCode();
+			
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ExceptionFrameDialog.java b/current/latexDraw/ui/dialog/ExceptionFrameDialog.java
new file mode 100644
index 0000000..6d576bb
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ExceptionFrameDialog.java
@@ -0,0 +1,205 @@
+package latexDraw.ui.dialog;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.Toolkit;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.ClipboardOwner;
+import java.awt.datatransfer.StringSelection;
+import java.awt.datatransfer.Transferable;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.*;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines a frame which allows to show, to the user, the
+ * exception which has occurred in a frame. The user can send the report
+ * of the exception to the developer of the LaTeXDraw Project
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 1.9<br>
+ */
+public class ExceptionFrameDialog extends JFrame implements ActionListener, ClipboardOwner
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The exception which much be displayed */
+	Exception exception;
+	
+	/** The label of the button "ok" */
+	public static final String LABEL_OK  = AbstractParametersFrame.LABEL_OK;
+	
+	public static final String LABEL_COPY = "copy"; //$NON-NLS-1$
+	
+	private JEditorPane editor;
+	
+	protected JLabel info;
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public ExceptionFrameDialog(Exception e)
+	{
+		try
+		{
+			info = new JLabel();
+			exception = e;
+			
+	 		setIconImage(LaTeXDrawResources.errIcon.getImage());
+			
+			editor = new JEditorPane();
+			JScrollPane scroller = new JScrollPane(); 
+		 	JViewport vp = scroller.getViewport();
+		 	StackTraceElement[] stack = e.getStackTrace();
+		 	int i, size = stack.length;
+		 	String msg=""; //$NON-NLS-1$
+		 	
+			editor.setEditable(false);
+		 	vp.add(editor); 
+		 	
+		 	for(i=0; i<size;i++)
+		 		msg += "   at "+stack[i].getClassName() +"."+stack[i].getMethodName()+"("+  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		 		stack[i].getFileName() +":"+stack[i].getLineNumber()+")\n"; //$NON-NLS-1$ //$NON-NLS-2$
+		 	
+		 	editor.setText(e.toString()+"\n"+msg); //$NON-NLS-1$
+		 	
+			JPanel bPanel = new JPanel(new GridLayout(1, 2));
+			JButton okB = new JButton(LABEL_OK);
+			okB.setActionCommand(LABEL_OK);
+			okB.addActionListener(this);
+			bPanel.add(okB);
+			
+			JToolBar toolbar = new JToolBar();
+			JButton copyB = new JButton(LaTeXDrawResources.copyIcon);
+			
+			copyB.setActionCommand(LABEL_COPY);
+			copyB.setName(LABEL_COPY);
+			copyB.addActionListener(this);
+			
+			toolbar.setFloatable(false);
+			toolbar.add(copyB);
+			
+			JPanel pInfo = new JPanel();
+			info.setText(LaTeXDrawLang.getDialogFrameString("ExceptionFrameDialog.1") //$NON-NLS-1$
+						+e.toString()+LaTeXDrawLang.getDialogFrameString("ExceptionFrameDialog.2"));//$NON-NLS-1$
+			pInfo.add(info); 
+			
+			setTitle(LaTeXDrawLang.getDialogFrameString("ExceptionFrameDialog.3")); //$NON-NLS-1$
+			
+			JPanel panel = new JPanel(new BorderLayout());
+			panel.add(scroller, BorderLayout.CENTER);
+			panel.add(pInfo, BorderLayout.NORTH);
+			
+			getContentPane().setLayout(new BorderLayout());
+			getContentPane().add(panel, BorderLayout.CENTER);
+			getContentPane().add(toolbar, BorderLayout.NORTH);
+			getContentPane().add(bPanel, BorderLayout.SOUTH);
+			setResizable(true);
+			pack();
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			JOptionPane.showMessageDialog(this, 
+		 		   LaTeXDrawLang.getDialogFrameString("ExceptionFrameDialog.4") + ex.toString(),  //$NON-NLS-1$
+		 		   LaTeXDrawLang.getDialogFrameString("ExceptionFrameDialog.5"), JOptionPane.WARNING_MESSAGE);//$NON-NLS-1$
+		}
+	}
+	
+	
+	
+	public void setInfoLabel(String infoLabel) {
+		if(infoLabel!=null)
+			info.setText(infoLabel);
+	}
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible)
+	{		
+		if(visible)
+		{
+			Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+			setSize(600, 400);
+			setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+		}
+		
+		super.setVisible(visible);
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to display a frame which contains the exception and which
+	 * allows to send the exception log the LaTeXDraw developer
+	 * @param e The exception which has occurred
+	 */
+	public static void showExceptionDialog(Exception e)
+	{
+		ExceptionFrameDialog f = new ExceptionFrameDialog(e);
+		f.editor.setCaretPosition(0);
+		f.setVisible(true);
+	}
+
+
+
+	public void actionPerformed(ActionEvent e) 
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JButton)
+		{
+			String msg = ((JButton)o).getActionCommand();
+			
+			if(msg.equals(LABEL_OK))
+			{
+				setVisible(false);
+				return ;
+			}
+			
+			if(msg.equals(LABEL_COPY))
+			{
+				Clipboard cb = getToolkit().getSystemClipboard();
+				cb.setContents(new StringSelection(editor.getText()), this);
+				return ;
+			}
+		}
+	}
+
+
+	public void lostOwnership(Clipboard clipboard, Transferable contents)
+	{
+		// Nothing to do.
+	}
+
+
+
+	public JEditorPane getEditor() {
+		return editor;
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ExportDialog.java b/current/latexDraw/ui/dialog/ExportDialog.java
new file mode 100644
index 0000000..0fab4fa
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ExportDialog.java
@@ -0,0 +1,102 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.io.File;
+
+import javax.swing.*;
+
+import latexDraw.lang.LaTeXDrawLang;
+
+
+/** 
+ * Define a JFileChooser that exports the drawing in a graphical format.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 04/08/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ExportDialog extends JFileChooser
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The slide that allows to change the compression rate. */
+	protected JSlider compressionSlide;
+	
+	/** The panel that contains the compression slider and its label. */
+	protected JPanel pCompression;
+	
+	public static final String NAME_SLIDE_COMPRESSION = "slideComp";//$NON-NLS-1$
+	
+	public static final int DEFAULT_COMPRESSION_RATE = 20;
+	
+	
+	public ExportDialog(String path)
+	{
+		super(path);
+		
+		setApproveButtonText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.171")); //$NON-NLS-1$
+		setAcceptAllFileFilterUsed(true);
+		setMultiSelectionEnabled(false);
+ 		setFileSelectionMode(JFileChooser.FILES_ONLY);
+		setDragEnabled(true);
+  
+ 		pCompression = new JPanel();
+ 		pCompression.setLayout(new BoxLayout(pCompression, BoxLayout.X_AXIS)); 
+ 		pCompression.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ExportDialog.0"))); //$NON-NLS-1$
+ 		compressionSlide = new JSlider(0, 100, DEFAULT_COMPRESSION_RATE);
+ 		compressionSlide.setName(NAME_SLIDE_COMPRESSION);
+ 		compressionSlide.setMajorTickSpacing(10);
+ 		compressionSlide.setPaintTicks(true);
+ 		compressionSlide.setPaintLabels(true);
+
+ 		pCompression.add(compressionSlide);
+ 		
+ 		JPanel p = new JPanel();
+ 		Component c = getComponent(getComponentCount()-1);
+ 		
+ 		p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); 
+ 		p.add(pCompression);
+ 		p.add(c);
+ 		
+ 		add(p, BorderLayout.SOUTH);
+ 		
+ 		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+	}
+
+	
+	
+	
+	@Override
+	public int showDialog(Component parent, String approveButtonText) throws HeadlessException
+	{
+		pCompression.setVisible(accept(new File("test.jpg")));//$NON-NLS-1$
+		
+		return super.showDialog(parent, approveButtonText);
+	}
+
+
+
+	/**
+	 * @return The compression rate if the filter accepts jpg files, else return -1.
+	 * @since 1.9.2
+	 */
+	public int getCompressionRate()
+	{
+		if(accept(new File("test.jpg")))//$NON-NLS-1$
+			return compressionSlide.getValue();
+		return -1;
+	}
+}
diff --git a/current/latexDraw/ui/dialog/InsertPSTricksCodeFrame.java b/current/latexDraw/ui/dialog/InsertPSTricksCodeFrame.java
new file mode 100644
index 0000000..9aaf4fc
--- /dev/null
+++ b/current/latexDraw/ui/dialog/InsertPSTricksCodeFrame.java
@@ -0,0 +1,149 @@
+package latexDraw.ui.dialog;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.*;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.CopyPasteMenu;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This frame allows to user to insert several figures from PSTricks code into the current drawing (by using the TeX parser).
+ *<br> 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/31/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class InsertPSTricksCodeFrame extends JFrame implements ActionListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The label of the button "ok" of the frame */
+	public static final String LABEL_FRAME_INSERT_OK = "INSERT_CODE_OK";//$NON-NLS-1$
+	
+	/** The label of the button "Cancel" of the frame */
+	public static final String LABEL_FRAME_INSERT_CANCEL = "INSERT_CODE_CANCEL";//$NON-NLS-1$
+
+	/** The main frame of the program */
+	private LaTeXDrawFrame mainFrame;
+	
+	/** This editor allows to put the PSTricks code */
+	private JEditorPane editor;
+
+	protected CopyPasteMenu copyMenu;
+	
+	
+	
+	/**
+	 * The constructor.
+	 * @param frame The parent frame.
+	 */
+	public InsertPSTricksCodeFrame(LaTeXDrawFrame frame) 
+	{
+		super(LaTeXDrawLang.getString1_6("InsertPSTricksCodeFrame.0")); //$NON-NLS-1$
+		try
+		{
+			mainFrame 	= frame;
+			setIconImage(LaTeXDrawResources.insertPSTricksIcon.getImage());
+			
+	  		JPanel  pButton = new JPanel();
+	  		JButton buttonOk = new JButton(AbstractParametersFrame.LABEL_OK), 
+	  				buttonCancel = new JButton(AbstractParametersFrame.LABEL_CANCEL);
+	  		
+	  		editor 		= new JEditorPane();
+			copyMenu	= new CopyPasteMenu(editor);
+
+	  		buttonOk.setActionCommand(LABEL_FRAME_INSERT_OK);
+	  		buttonCancel.setActionCommand(LABEL_FRAME_INSERT_CANCEL);
+			buttonOk.addActionListener(this);
+			buttonCancel.addActionListener(this);
+
+	  		// The scroller of the editor
+			JScrollPane scrollPane = new JScrollPane(editor);
+			scrollPane.setMinimumSize(new Dimension(450, 250));
+			scrollPane.setPreferredSize(new Dimension(450, 250));
+	 		scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); 
+
+			JLabel label = new JLabel(LaTeXDrawLang.getString1_6("LaTeXDrawFrame.16"), SwingConstants.CENTER); //$NON-NLS-1$
+			label.setAlignmentX(Component.CENTER_ALIGNMENT); 
+			
+			editor.setText("");//$NON-NLS-1$
+			pButton.add(buttonOk);
+			pButton.add(buttonCancel);
+			pButton.setPreferredSize(new Dimension(280, 40));
+			pButton.setMaximumSize(new Dimension(280, 40));
+			getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
+			getContentPane().add(label);
+			getContentPane().add(scrollPane);
+			getContentPane().add(pButton);
+			
+	 		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+			editor.addMouseListener(copyMenu);
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+
+
+	public void actionPerformed(ActionEvent e) 
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JButton)
+		{
+			String label = ((JButton)o).getActionCommand();
+			
+			if(label == LABEL_FRAME_INSERT_CANCEL)
+			{
+				super.setVisible(false);
+				return ;
+			}
+			
+			if(label == LABEL_FRAME_INSERT_OK)
+			{
+				mainFrame.insertPSTricksCode(editor.getText());
+				super.setVisible(false);
+
+				return;
+			}
+		}
+	}
+
+
+
+
+	@Override
+	public void setVisible(boolean e)
+	{
+		if(e)
+			editor.setText("");//$NON-NLS-1$
+
+		super.setVisible(e);
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersAkinPointsFrame.java b/current/latexDraw/ui/dialog/ParametersAkinPointsFrame.java
new file mode 100644
index 0000000..8b2bd82
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersAkinPointsFrame.java
@@ -0,0 +1,310 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ItemEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.AkinPoints;
+import latexDraw.figures.Figure;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+
+
+/** 
+ * This class defines the frame which allows to change the parameters of polygons.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersAkinPointsFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	public static final String NAME_INTERVAL_FIELD = "interField";//$NON-NLS-1$
+	
+	public static final String ACTION_CMD_OPENCB = "openCB";//$NON-NLS-1$
+	
+	protected JSpinner intervalField;
+	
+	protected LaTeXDrawComboBox typeChoice;
+	
+	protected JCheckBox openCB;
+	
+	
+	/**
+	 * The constructor by default.
+	 */
+	public ParametersAkinPointsFrame(Frame parent, DrawPanel p, boolean attachToMainFrame)
+	{
+		super(parent, p, attachToMainFrame);
+		try
+		{
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.WEST;
+
+	     	JPanel akinP = new JPanel(new GridBagLayout());
+	     	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	akinP.add(new JLabel(LaTeXDrawLang.getString1_9("ParametersAkinPointsFrame.0")), constraint); //$NON-NLS-1$
+	     	constraint.gridx++;
+	     	SpinnerModel model = new SpinnerNumberModel(AkinPoints.DEFAULT_INTERVAL, 1, 1000,1);
+	     	intervalField = new JSpinner(model);
+	     	intervalField.setName(NAME_INTERVAL_FIELD);
+	     	intervalField.setEditor(new JSpinner.NumberEditor(intervalField, "0"));//$NON-NLS-1$
+	     	intervalField.addChangeListener(this);
+	     	akinP.add(intervalField, constraint);
+	     	constraint.gridx++;
+	     	openCB = new JCheckBox(LaTeXDrawLang.getString1_9("ParametersAkinPointsFrame.1")); //$NON-NLS-1$
+	     	openCB.setActionCommand(ACTION_CMD_OPENCB);
+	     	openCB.setName(ACTION_CMD_OPENCB);
+	     	openCB.addActionListener(this);
+	     	akinP.add(openCB, constraint);
+	     	
+	     	constraint.gridx = 0;
+	     	constraint.gridy++;
+	     	akinP.add(new JLabel(LaTeXDrawLang.getString1_9("ParametersAkinPointsFrame.2")), constraint); //$NON-NLS-1$
+	     	constraint.gridx++;
+	     	typeChoice = AkinPoints.createTypeChoice(); 
+	     	typeChoice.addItemListener(this);
+	     	akinP.add(typeChoice, constraint);
+	     	
+	     	createRotationField();
+	     	constraint.gridx++;
+	     	akinP.add(new JLabel(LABEL_ROTATION), constraint);
+	     	constraint.gridx++;
+	     	akinP.add(rotationField, constraint);
+	     	
+	     	akinP.setBorder(new CompoundBorder( new TitledBorder(null, LaTeXDrawLang.getString1_9("ParametersAkinPointsFrame.3"),  //$NON-NLS-1$
+					  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	
+	     	JPanel pGeneral = new JPanel();
+	     	pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	     	pGeneral.add(akinP);
+	     	pGeneral.add(createBordersPanel(false));
+	     	pGeneral.add(createFillPanel());
+	     	pGeneral.add(createHatchingPanel());
+	     	
+	     	JPanel pOthers = new JPanel();
+	     	pOthers.setLayout(new BoxLayout(pOthers, BoxLayout.Y_AXIS));
+	     	pOthers.add(createShadowPanel());
+	     	pOthers.add(createGradientPanel());
+	     	
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_OTHERS, pOthers);
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+	  		
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof AkinPoints))
+				throw new ClassCastException();
+
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+	
+	
+
+	
+	@Override
+	public void setFigureFrameField() 
+	{
+		AkinPoints ak = (AkinPoints)figure;
+		int nbPts = ak.getNbPoints();
+
+		typeChoice.setSelectedItem(String.valueOf(ak.getType()));
+		intervalField.setValue(ak.getInterval());
+		intervalField.removeChangeListener(this);
+		intervalField.setModel(new SpinnerNumberModel(ak.getInterval(),1,nbPts-1,1));
+		intervalField.addChangeListener(this);
+		openCB.setSelected(ak.isOpen());
+	}
+	
+	
+	
+
+	@Override
+	public void itemStateChanged(ItemEvent e) 
+	{
+		super.itemStateChanged(e);
+		
+		try
+		{
+			Object o = e.getSource();
+			AkinPoints ak = (AkinPoints)glimpsePanel.getGlimpseFigure();
+
+			if(o instanceof LaTeXDrawComboBox)
+			{
+				String ac = ((LaTeXDrawComboBox)o).getActionCommand();
+				
+				if(ac.equals(AkinPoints.LABEL_TYPE_CHOICE))
+				{
+					setModified(true);
+					ak.setType(Integer.valueOf(((JLabel)typeChoice.getSelectedItem()).getText()).intValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				return ;
+			}
+			
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+
+
+	@Override
+	public void setDefaultsValues()
+	{
+		super.setDefaultsValues();
+		
+		AkinPoints ak = (AkinPoints)figure;
+		
+		typeChoice.setSelectedItem(String.valueOf(AkinPoints.DEFAULT_TYPE));
+		intervalField.setValue(AkinPoints.DEFAULT_INTERVAL);
+		ak.setOpen(AkinPoints.DEFAULT_OPEN);
+		openCB.setSelected(AkinPoints.DEFAULT_OPEN);
+	}
+
+
+
+
+	@Override
+	public void stateChanged(ChangeEvent e)
+	{
+		super.stateChanged(e);
+		
+		try
+		{
+			Object o = e.getSource();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				AkinPoints ak = (AkinPoints)glimpsePanel.getGlimpseFigure();
+				
+				if(name.equals(NAME_INTERVAL_FIELD))
+				{
+					setModified(true);
+					ak.setInterval(Double.valueOf(((JSpinner)o).getValue().toString()).intValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				return ;
+			}
+			
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+
+
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		AkinPoints ak = (AkinPoints)figure;
+		
+		ak.setInterval(Float.valueOf(intervalField.getValue().toString()).intValue());
+		ak.setType(Float.valueOf(((JLabel)typeChoice.getSelectedItem()).getText()).intValue());
+		ak.setOpen(openCB.isSelected());
+		
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+
+
+
+
+	@Override
+	public void actionPerformed(ActionEvent e)
+	{
+		super.actionPerformed(e);
+		
+		try
+		{
+			Object o = e.getSource();
+			AkinPoints ak = (AkinPoints)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JCheckBox)
+			{
+				String label = ((JCheckBox)o).getActionCommand();
+				
+				if(label.equals(ACTION_CMD_OPENCB))
+				{
+					setModified(true);
+					ak.setOpen(openCB.isSelected());
+					glimpsePanel.repaint();
+					
+					return ;
+				}
+				return ;
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersArcFrame.java b/current/latexDraw/ui/dialog/ParametersArcFrame.java
new file mode 100644
index 0000000..1a895b7
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersArcFrame.java
@@ -0,0 +1,497 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ItemEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Arc;
+import latexDraw.figures.Figure;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines the frame which allows to  change the parameters of arcs and wedges.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersArcFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to change the x-coordinates of the centre of the figure */
+	protected JSpinner centerXField;
+	
+	/** Allows to change the y-coordinates of the centre of the figure */
+	protected JSpinner centerYField;
+	
+	/** Allows to change the radius of the circle */
+	protected JSpinner radiusField;
+	
+	/** Allows to set the start angle of the arc */
+	protected JSpinner startAngle;
+	
+	/** Allows to set the end angle of the arc */
+	protected JSpinner endAngle;
+	
+	/** This choice allows to choice the kind of the arc */
+	protected JComboBox arcChoice;
+	
+	/** Allows to display the points of the arc */
+	protected JCheckBox showPointCB;
+	
+	/** The label of the start angle field */
+	public static final String LABEL_START_ANGLE = LaTeXDrawLang.getDialogFrameString("ParametersArcFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the end angle field */
+	public static final String LABEL_END_ANGLE = LaTeXDrawLang.getDialogFrameString("ParametersArcFrame.1"); //$NON-NLS-1$
+	
+	public static final String NAME_TABBEDPANE_GENERAL = LABEL_GENERAL;
+	
+	
+	
+	/**
+	 * The constructor by default
+	 * @param p The panel containing the drawing
+	 */
+	public ParametersArcFrame(Frame parent, DrawPanel p, boolean attachToMainFrame) 
+	{
+		super(parent, p, attachToMainFrame);
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	  		JPanel coordP = new JPanel(new GridBagLayout());
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.CENTER;
+	     	coordP.add(new JLabel(LABEL_CENTER_X), constraint);
+	  		
+	     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerXField = new JSpinner(model);
+			centerXField.setEditor(new JSpinner.NumberEditor(centerXField, "0.0"));//$NON-NLS-1$
+			centerXField.addChangeListener(this);
+	     	constraint.gridx = 1;
+	     	centerXField.setName(LABEL_CENTER_X);
+	     	coordP.add(centerXField, constraint);
+
+	    	constraint.gridx = 3;
+	     	coordP.add(new JLabel(LABEL_CENTER_Y), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerYField = new JSpinner(model);
+	     	centerYField.setEditor(new JSpinner.NumberEditor(centerYField, "0.0"));//$NON-NLS-1$
+			centerYField.addChangeListener(this);
+	     	constraint.gridx = 4;	
+	     	centerYField.setName(LABEL_CENTER_Y);
+	     	coordP.add(centerYField, constraint);
+	     	
+	    	constraint.gridx = 0;	constraint.gridy++;
+	     	coordP.add(new JLabel(LABEL_RADIUS), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0.1,0.1,10000,0.1);
+	     	radiusField = new JSpinner(model);
+	     	radiusField.setEditor(new JSpinner.NumberEditor(radiusField, "0.0"));//$NON-NLS-1$
+	     	radiusField.addChangeListener(this);
+	     	constraint.gridx = 1;	
+	     	radiusField.setName(LABEL_RADIUS);
+	     	coordP.add(radiusField, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	coordP.add(new JLabel(LABEL_ROTATION), constraint);
+	     	constraint.gridx++;
+	     	coordP.add(rotationField, constraint);
+	     	
+	     	coordP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_POSITION_DIMENSIONS, 
+							  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	
+	     	JPanel arcP = new JPanel(new GridBagLayout());
+	     	constraint.gridx=0;	constraint.gridy=0;
+	     	arcP.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersArcFrame.2")), constraint); //$NON-NLS-1$
+	     	
+	     	constraint.gridx++;
+	     	arcChoice = Arc.createArcChoice(this);
+	     	arcP.add(arcChoice, constraint);
+	     	
+	     	constraint.gridy++; 	constraint.gridx = 0;
+	     	arcP.add(new JLabel(LABEL_START_ANGLE), constraint);
+	     	
+	     	constraint.gridx++;
+	     	model = new SpinnerNumberModel(0,-360,360,0.1);
+	     	startAngle = new JSpinner(model);
+	     	startAngle.setEditor(new JSpinner.NumberEditor(startAngle, "0.0"));//$NON-NLS-1$
+	     	startAngle.addChangeListener(this);
+	     	startAngle.setName(LABEL_START_ANGLE);
+	     	arcP.add(startAngle, constraint);
+	     	
+	     	constraint.gridx++;	
+	     	arcP.add(new JLabel(LABEL_END_ANGLE), constraint);
+	     	
+	     	constraint.gridx++;
+	     	model = new SpinnerNumberModel(0,-360,360,0.1);
+	     	endAngle = new JSpinner(model);
+	     	endAngle.setEditor(new JSpinner.NumberEditor(endAngle, "0.0"));//$NON-NLS-1$
+	     	endAngle.addChangeListener(this);
+	     	endAngle.setName(LABEL_END_ANGLE);
+	     	arcP.add(endAngle, constraint);
+	     	
+	     	arcP.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getOthersString("Arc.arc"),  //$NON-NLS-1$
+					  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	
+	     	pGeneral.add(coordP);
+	     	pGeneral.add(createBordersPanel(false));
+	     	pGeneral.add(createFillPanel());
+	     	pGeneral.add(arcP);
+	     	
+	     	JPanel showP = new JPanel(new BorderLayout());
+	     	showPointCB = new JCheckBox(LABEL_SHOWPOINTCB);
+	     	showPointCB.addActionListener(this);
+	     	showPointCB.setActionCommand(LABEL_SHOWPOINTCB);
+	     	showP.add(showPointCB);
+	     	
+	     	showP.setBorder(new CompoundBorder(new TitledBorder(null, TITLE_TABBED_PANE_OTHERS, 
+					  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	
+	     	JPanel pOther = new JPanel();
+	     	pOther.setLayout(new BoxLayout(pOther, BoxLayout.Y_AXIS));
+	     	pOther.add(createShadowPanel());
+	     	pOther.add(createGradientPanel());
+	     	pOther.add(createHatchingPanel());
+	     	pOther.add(showP);
+	     	
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(NAME_TABBEDPANE_ARROW, createArrowPanel(true, false));
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_OTHERS, pOther);
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+	
+	
+	@Override
+	public void actionPerformed(ActionEvent e) 
+	{
+		Object o = e.getSource();
+		
+		try
+		{
+			if(o instanceof JCheckBox)
+			{
+				String label = ((JCheckBox)o).getActionCommand();
+				
+				if(label.equals(LABEL_SHOWPOINTCB))
+				{
+					setModified(true);
+					((Arc)glimpsePanel.glimpseFigure).setShowPoints(showPointCB.isSelected());
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}catch(Exception ex) 
+		{ 
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.actionPerformed(e);
+	}
+	
+	
+	
+
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		LaTeXDrawPoint2D p1, p2, p3, p4;
+		Arc a = (Arc)figure;
+		p1 = a.getBordersPoint(0); 	p2 = a.getBordersPoint(1);
+		p3 = a.getBordersPoint(2); 	p4 = a.getBordersPoint(3);
+		
+		float radius = Float.valueOf(radiusField.getValue().toString());
+		float x = Float.valueOf(centerXField.getValue().toString());
+		float y = Float.valueOf(centerYField.getValue().toString());
+		float start = Float.valueOf(startAngle.getValue().toString());
+		float end = Float.valueOf(endAngle.getValue().toString());
+		String type = (String)arcChoice.getSelectedItem();
+		
+		p1.x = x - radius;
+		p2.x = x + radius;
+		p3.x = x - radius;
+		p4.x = x + radius;
+
+		p1.y = y - radius;
+		p2.y = y - radius;
+		p3.y = y + radius;
+		p4.y = y + radius;
+
+		((Arc)figure).setStartAngle(Math.toRadians(start));
+		((Arc)figure).setEndAngle(Math.toRadians(end));		
+		((Arc)figure).setType(type);		
+		((Arc)figure).updateCenterStartEndDelimitors();
+		((Arc)figure).setShowPoints(showPointCB.isSelected());
+		figure.updateShape();
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+	
+	
+	
+
+	@Override
+	public void setFigureFrameField()
+	{	
+		LaTeXDrawPoint2D NW, SE;
+		NW = figure.getTheNWPoint();
+		SE = figure.getTheSEPoint();
+		
+		radiusField.setValue((SE.x-NW.x)/2.);
+		centerXField.setValue((NW.x+SE.x)/2.);
+		centerYField.setValue((NW.y+SE.y)/2.);		
+		startAngle.setValue(Math.toDegrees(((Arc)figure).getStartAngle()));
+		endAngle.setValue(Math.toDegrees(((Arc)figure).getEndAngle()));		
+		arcChoice.setSelectedItem(((Arc)figure).getTypeName());
+		showPointCB.setSelected(((Arc)figure).isShowPoints());
+	}
+
+
+
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Arc))
+				throw new ClassCastException();
+
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+
+
+	
+	@Override
+	public void setDefaultsValues()
+	{
+		super.setDefaultsValues();
+		
+		try
+		{
+			Arc a = (Arc)glimpsePanel.getGlimpseFigure();
+			startAngle.setValue(Math.toDegrees(Arc.DEFAULT_STARTANGLE));
+			endAngle.setValue(Math.toDegrees(Arc.DEFAULT_ENDANGLE));
+			arcChoice.setSelectedItem(Arc.DEFAULT_TYPE);
+			a.setEndAngle(Arc.DEFAULT_ENDANGLE);
+			a.setStartAngle(Arc.DEFAULT_STARTANGLE);
+			a.setShowPoints(Arc.DEFAULT_SHOWPOINTS);
+			showPointCB.setSelected(Arc.DEFAULT_SHOWPOINTS);
+			a.setShowPoints(Arc.DEFAULT_SHOWPOINTS);
+			
+			glimpsePanel.repaint();
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			Arc f = (Arc) glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				double v = Double.valueOf(((JSpinner)o).getValue().toString()).doubleValue();
+				
+				if(name.equals(LABEL_START_ANGLE))
+				{
+					setModified(true);
+					f.setStartAngle(Math.toRadians(v));
+					glimpsePanel.repaint();
+					
+					return ;
+				}
+				
+				if(name.equals(LABEL_END_ANGLE))
+				{
+					setModified(true);
+					f.setEndAngle(Math.toRadians(v));
+					glimpsePanel.repaint();
+					
+					return ;
+				}
+				
+				if(name.equals(LABEL_CENTER_X))
+				{
+					setModified(true);
+					LaTeXDrawPoint2D p1, p2, p3, p4;
+					p1 = f.getBordersPoint(0); 	p2 = f.getBordersPoint(1);
+					p3 = f.getBordersPoint(2); 	p4 = f.getBordersPoint(3);
+					double radius = Double.valueOf(radiusField.getValue().toString()).doubleValue();
+					
+					p1.x = v - radius;
+					p2.x = v + radius;
+					p3.x = v - radius;
+					p4.x = v + radius;
+					
+					f.updateGravityCenter();
+					f.updateShape();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_CENTER_Y))
+				{
+					setModified(true);
+					LaTeXDrawPoint2D p1, p2, p3, p4;
+					p1 = f.getBordersPoint(0); 	p2 = f.getBordersPoint(1);
+					p3 = f.getBordersPoint(2); 	p4 = f.getBordersPoint(3);
+					double radius = Double.valueOf(radiusField.getValue().toString()).doubleValue();
+					
+					p1.y = v - radius;
+					p2.y = v - radius;
+					p3.y = v + radius;
+					p4.y = v + radius;
+					
+					f.updateGravityCenter();
+					f.updateShape();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_RADIUS))
+				{
+					setModified(true);
+					LaTeXDrawPoint2D p1, p2, p3, p4;
+					p1 = f.getBordersPoint(0); 	p2 = f.getBordersPoint(1);
+					p3 = f.getBordersPoint(2); 	p4 = f.getBordersPoint(3);
+					double y = Double.valueOf(centerYField.getValue().toString()).doubleValue();
+					double x = Double.valueOf(centerXField.getValue().toString()).doubleValue();
+					
+					p1.x = x - v;
+					p2.x = x + v;
+					p3.x = x - v;
+					p4.x = x + v;
+					p1.y = y - v;
+					p2.y = y - v;
+					p3.y = y + v;
+					p4.y = y + v;
+					
+					glimpsePanel.repaint();					
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+	
+	
+
+
+	@Override
+	public void itemStateChanged(ItemEvent e) 
+	{
+		try
+		{
+			Arc f = (Arc) glimpsePanel.getGlimpseFigure();
+			Object o = e.getSource();
+			
+			if(o instanceof JComboBox)
+			{
+				String name = ((JComboBox)o).getName();
+				
+				if(name.equals(Arc.LABEL_ARCCHOICE))
+				{
+					if(((String)((JComboBox)o).getSelectedItem()).equals(Arc.TYPE_ARC))
+					{
+						arrow1Choice.setEnabled(true);
+						arrow2Choice.setEnabled(true);
+					}
+					else
+					{
+						arrow1Choice.setEnabled(false);
+						arrow2Choice.setEnabled(false);
+					}
+					
+					updateEnableParamsArrow();
+					
+					setModified(true);
+					f.setType(((JComboBox)o).getSelectedItem().toString());
+					glimpsePanel.repaint();
+					
+					return ;
+				}
+			}
+			
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		super.itemStateChanged(e);
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersAxeFrame.java b/current/latexDraw/ui/dialog/ParametersAxeFrame.java
new file mode 100644
index 0000000..a8726f6
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersAxeFrame.java
@@ -0,0 +1,752 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Axe;
+import latexDraw.figures.Figure;
+import latexDraw.figures.GridShape;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.DrawPanel;
+
+
+/** 
+ * This class defines the frame allowing to modify axes.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 08/17/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @since 1.8<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersAxeFrame extends AbstractGridShapeFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	protected JCheckBox drawXLabel;
+	
+	protected JCheckBox drawYLabel;
+
+	protected JCheckBox drawXTicks;
+	
+	protected JCheckBox drawYTicks;
+	
+	protected JCheckBox defineLabelDistCB;
+	
+	protected JComboBox axeShapeChoice;
+
+	protected JComboBox ticksShapeChoice;
+	
+	protected JSpinner ticksSizeField;
+	
+	protected JSpinner labelXDistField;
+	
+	protected JSpinner labelYDistField;
+	
+	/** Allows to change the increment of the X labels. */
+	protected JSpinner labelXIncrement;
+	
+	/** Allows to change the increment of the Y labels. */
+	protected JSpinner labelYIncrement;
+	
+	/** Allows to change the origin of the X labels. */
+	protected JSpinner labelXOrigin;
+	
+	/** Allows to change the origin of the Y labels. */
+	protected JSpinner labelYOrigin;
+	
+	protected JCheckBox showOriginCB;
+	
+	public static final String LABEL_DRAW_X_LABELS = "dispXLab";//$NON-NLS-1$
+	
+	public static final String LABEL_DEF_LABELS_DIST = "defDist";//$NON-NLS-1$
+
+	public static final String LABEL_DRAW_Y_LABELS = "dispYLab";//$NON-NLS-1$
+
+	public static final String LABEL_DRAW_X_TICKS = "dispXTicks";//$NON-NLS-1$
+	
+	public static final String LABEL_DRAW_Y_TICKS = "dispYTicks";//$NON-NLS-1$
+	
+	public static final String LABEL_Y_LABEL_DIST = "xLabSep";//$NON-NLS-1$
+	
+	public static final String LABEL_X_LABEL_DIST = "yLabSep";//$NON-NLS-1$
+	
+	public static final String LABEL_TICKS_SIZE_FIELD = "ticksSizeField";//$NON-NLS-1$
+	
+	public static final String LABEL_LABEL_X_INCR = "labXInc";//$NON-NLS-1$
+
+	public static final String LABEL_LABEL_Y_INCR = "labYInc";//$NON-NLS-1$
+
+	public static final String LABEL_LABEL_X_ORIG = "labXOrig";//$NON-NLS-1$
+	
+	public static final String LABEL_LABEL_Y_ORIG = "labYOrig";//$NON-NLS-1$
+	
+	public static final String LABEL_SHOW_ORIGIN = "showOrig";//$NON-NLS-1$
+	
+	
+	
+	
+	public ParametersAxeFrame(Frame parent, DrawPanel d, boolean attachToMainFrame)
+	{
+		super(parent, d, attachToMainFrame);
+
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		JPanel pAxes	= new JPanel();
+	     	JPanel pOther = new JPanel(new FlowLayout(FlowLayout.LEFT));
+	     	pAxes.setLayout(new BoxLayout(pAxes, BoxLayout.Y_AXIS));
+	     	JPanel positionP = createPositionPanel(false);
+	     	
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	     	pGeneral.add(positionP);
+	     	pGeneral.add(createBordersPanel(false));
+	     	pGeneral.add(pOther);
+
+	     	pOther.add(new JLabel(LaTeXDrawLang.getString1_8("ParametersAxeFrame.0"))); //$NON-NLS-1$
+	     	
+	     	axeShapeChoice = Axe.createAxeStyleChoice();
+	     	axeShapeChoice.addActionListener(this);
+	     	pOther.add(axeShapeChoice);
+	     	
+	     	showOriginCB = new JCheckBox(LaTeXDrawLang.getString1_8("ParametersAxeFrame.1"), true); //$NON-NLS-1$
+	     	showOriginCB.setActionCommand(LABEL_SHOW_ORIGIN);
+	     	showOriginCB.setName(LABEL_SHOW_ORIGIN);
+	     	showOriginCB.addActionListener(this);
+	     	pOther.add(showOriginCB);
+	     	
+	     	String axesS = LaTeXDrawLang.getString1_8("ParametersAxeFrame.2"); //$NON-NLS-1$
+	     	pOther.setBorder(new CompoundBorder(new TitledBorder(null, axesS,
+					  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	
+	     	pAxes.add(createLabelsPanel());
+	     	pAxes.add(createTicksPanel());
+	     	
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(axesS, pAxes);
+	     	tabbedPane.addTab(NAME_TABBEDPANE_ARROW, createArrowPanel(true, false));
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+	
+	
+	
+	protected JPanel createLabelsPanel()
+	{
+		JPanel pLabels = new JPanel(new GridBagLayout());
+		GridBagConstraints constraint = new GridBagConstraints();
+		
+    	constraint.gridx = 0;
+     	constraint.gridy = 0;
+     	constraint.gridwidth = 1;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.WEST;
+     	
+     	drawXLabel = new JCheckBox(LaTeXDrawLang.getString1_8("ParametersAxeFrame.3"), true); //$NON-NLS-1$
+     	drawXLabel.setActionCommand(LABEL_DRAW_X_LABELS);
+     	drawXLabel.setName(LABEL_DRAW_X_LABELS);
+     	drawXLabel.addActionListener(this);
+     	constraint.gridx=0;
+     	pLabels.add(drawXLabel, constraint);
+
+     	drawYLabel = new JCheckBox(LaTeXDrawLang.getString1_8("ParametersAxeFrame.4"), true); //$NON-NLS-1$
+     	drawYLabel.setActionCommand(LABEL_DRAW_Y_LABELS);
+     	drawYLabel.setName(LABEL_DRAW_Y_LABELS);
+     	drawYLabel.addActionListener(this);
+     	constraint.gridx+=2;
+     	pLabels.add(drawYLabel, constraint);
+     	
+     	constraint.gridx = 0;	constraint.gridy++;
+     	constraint.gridwidth=2;
+     	invertXLabelsCB = new JCheckBox(LABEL_ISXLABEL);
+     	invertXLabelsCB.setText(LABEL_ISXLABEL);
+     	invertXLabelsCB.setSelected(GridShape.DEFAULT_ISYLABELWEST);
+     	invertXLabelsCB.setActionCommand(LABEL_ISXLABEL);
+     	invertXLabelsCB.addActionListener(this);
+     	pLabels.add(invertXLabelsCB, constraint);
+     	
+     	constraint.gridx+=2;
+     	invertYLabelsCB = new JCheckBox(LABEL_ISYLABEL);
+     	invertYLabelsCB.setText(LABEL_ISYLABEL);
+     	invertYLabelsCB.setSelected(GridShape.DEFAULT_ISXLABELSOUTH);
+     	invertYLabelsCB.addActionListener(this);
+     	invertYLabelsCB.setActionCommand(LABEL_ISYLABEL);
+     	pLabels.add(invertYLabelsCB, constraint);
+     	
+     	constraint.gridx=0;
+     	constraint.gridy++;
+     	defineLabelDistCB = new JCheckBox(LABEL_DEF_LABELS_DIST);
+     	defineLabelDistCB.setText(LaTeXDrawLang.getString1_8("ParametersAxeFrame.5")); //$NON-NLS-1$
+     	defineLabelDistCB.setSelected(false);
+     	defineLabelDistCB.addActionListener(this);
+     	defineLabelDistCB.setActionCommand(LABEL_DEF_LABELS_DIST);
+     	pLabels.add(defineLabelDistCB, constraint);
+
+     	constraint.gridwidth=1;
+     	constraint.gridx=0;
+     	constraint.gridy++;
+     	pLabels.add(new JLabel(LaTeXDrawLang.getString1_8("ParametersAxeFrame.6")), constraint); //$NON-NLS-1$
+     	
+     	SpinnerModel model = new SpinnerNumberModel(0.01,0.01,1000,0.05);
+     	labelXDistField = new JSpinner(model);
+     	labelXDistField.setEditor(new JSpinner.NumberEditor(labelXDistField, "0.00"));//$NON-NLS-1$
+     	labelXDistField.addChangeListener(this);
+     	labelXDistField.setName(LABEL_X_LABEL_DIST);
+     	labelXDistField.setEnabled(false);
+     	constraint.gridx++;
+     	pLabels.add(labelXDistField, constraint);
+
+     	constraint.gridx++;
+     	pLabels.add(new JLabel(LaTeXDrawLang.getString1_8("ParametersAxeFrame.7")), constraint); //$NON-NLS-1$
+     	
+     	model = new SpinnerNumberModel(0.01,0.01,1000,0.05);
+     	labelYDistField = new JSpinner(model);
+     	labelYDistField.setEditor(new JSpinner.NumberEditor(labelYDistField, "0.00"));//$NON-NLS-1$
+     	labelYDistField.addChangeListener(this);
+     	labelYDistField.setEnabled(false);
+     	labelYDistField.setName(LABEL_Y_LABEL_DIST);
+     	constraint.gridx++;
+     	pLabels.add(labelYDistField, constraint);
+     	
+     	constraint.gridx=0;
+     	constraint.gridy++;
+     	pLabels.add(new JLabel(LaTeXDrawLang.getString1_8("ParametersAxeFrame.8")), constraint); //$NON-NLS-1$
+     	
+     	model = new SpinnerNumberModel(0.0001,0.0001,1000,1);
+     	labelXIncrement = new JSpinner(model);
+     	labelXIncrement.setEditor(new JSpinner.NumberEditor(labelXIncrement, "0.000"));//$NON-NLS-1$
+     	labelXIncrement.addChangeListener(this);
+     	labelXIncrement.setName(LABEL_LABEL_X_INCR);
+     	constraint.gridx++;
+     	pLabels.add(labelXIncrement, constraint);
+     	
+     	constraint.gridx++;
+     	pLabels.add(new JLabel(LaTeXDrawLang.getString1_8("ParametersAxeFrame.9")), constraint); //$NON-NLS-1$
+     	
+     	model = new SpinnerNumberModel(0.0001,0.0001,1000,1);
+     	labelYIncrement = new JSpinner(model);
+     	labelYIncrement.setEditor(new JSpinner.NumberEditor(labelYIncrement, "0.000"));//$NON-NLS-1$
+     	labelYIncrement.addChangeListener(this);
+     	labelYIncrement.setName(LABEL_LABEL_Y_INCR);
+     	constraint.gridx++;
+     	pLabels.add(labelYIncrement, constraint);
+     	
+     	constraint.gridx=0;
+     	constraint.gridy++;
+     	pLabels.add(new JLabel(LaTeXDrawLang.getString1_8("ParametersAxeFrame.10")), constraint); //$NON-NLS-1$
+     	
+     	model = new SpinnerNumberModel(1,-1000,1000,1);
+     	labelXOrigin = new JSpinner(model);
+     	labelXOrigin.setEditor(new JSpinner.NumberEditor(labelXOrigin, "0"));//$NON-NLS-1$
+     	labelXOrigin.addChangeListener(this);
+     	labelXOrigin.setName(LABEL_LABEL_X_ORIG);
+     	constraint.gridx++;
+     	pLabels.add(labelXOrigin, constraint);
+     	
+     	constraint.gridx++;
+     	pLabels.add(new JLabel(LaTeXDrawLang.getString1_8("ParametersAxeFrame.11")), constraint); //$NON-NLS-1$
+     	
+     	model = new SpinnerNumberModel(1,-1000,1000,1);
+     	labelYOrigin = new JSpinner(model);
+     	labelYOrigin.setEditor(new JSpinner.NumberEditor(labelYOrigin, "0"));//$NON-NLS-1$
+     	labelYOrigin.addChangeListener(this);
+     	labelYOrigin.setName(LABEL_LABEL_Y_ORIG);
+     	constraint.gridx++;
+     	pLabels.add(labelYOrigin, constraint);
+     	
+     	pLabels.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_8("ParametersAxeFrame.12"), //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	
+     	return pLabels;
+	}
+	
+	
+	
+	protected JPanel createTicksPanel()
+	{
+		JPanel pTicks = new JPanel(new GridBagLayout());
+		GridBagConstraints constraint = new GridBagConstraints();
+		
+    	constraint.gridx = 0;
+     	constraint.gridy = 0;
+     	constraint.gridwidth = 1;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.WEST;
+
+     	pTicks.add(new JLabel(LaTeXDrawLang.getString1_8("ParametersAxeFrame.13")), constraint); //$NON-NLS-1$
+     	
+     	SpinnerModel model = new SpinnerNumberModel(1,1,1000,0.5);
+     	ticksSizeField = new JSpinner(model);
+     	ticksSizeField.setEditor(new JSpinner.NumberEditor(ticksSizeField, "0.00"));//$NON-NLS-1$
+     	ticksSizeField.addChangeListener(this);
+     	ticksSizeField.setName(LABEL_TICKS_SIZE_FIELD);
+     	constraint.gridx++;
+     	pTicks.add(ticksSizeField, constraint);
+     	
+     	constraint.gridx++;
+    	pTicks.add(new JLabel(LaTeXDrawLang.getString1_8("ParametersAxeFrame.14")), constraint); //$NON-NLS-1$
+     	
+     	ticksShapeChoice = Axe.createTicksStyleChoice();
+     	ticksShapeChoice.addActionListener(this);
+      	constraint.gridx++;
+     	pTicks.add(ticksShapeChoice, constraint);
+     	
+     	drawXTicks = new JCheckBox(LaTeXDrawLang.getString1_8("ParametersAxeFrame.15"), true); //$NON-NLS-1$
+     	drawXTicks.setActionCommand(LABEL_DRAW_X_TICKS);
+     	drawXTicks.setName(LABEL_DRAW_X_TICKS);
+     	drawXTicks.addActionListener(this);
+     	constraint.gridx=0;	constraint.gridy++;
+     	pTicks.add(drawXTicks, constraint);
+
+     	drawYTicks = new JCheckBox(LaTeXDrawLang.getString1_8("ParametersAxeFrame.16"), true); //$NON-NLS-1$
+     	drawYTicks.setActionCommand(LABEL_DRAW_Y_TICKS);
+     	drawYTicks.setName(LABEL_DRAW_Y_TICKS);
+     	drawYTicks.addActionListener(this);
+     	constraint.gridx+=1;
+     	pTicks.add(drawYTicks, constraint);
+
+		
+		pTicks.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_8("ParametersAxeFrame.17"), //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+		
+		return pTicks;
+	}
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Axe))
+				throw new ClassCastException();
+
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+
+	
+
+	
+	@Override
+	public void setFigureFrameField()
+	{
+		super.setFigureFrameField();
+		
+		Axe a = (Axe)figure;
+		int labelsDisplayed = a.getLabelsDisplayed();
+		int ticksDisplayed	= a.getTicksDisplayed();
+		
+		if(labelsDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE || labelsDisplayed==Axe.LABELS_DISPLAYED_X_VALUE)
+			drawXLabel.setSelected(true);
+		
+		if(labelsDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE || labelsDisplayed==Axe.LABELS_DISPLAYED_Y_VALUE)
+			drawYLabel.setSelected(true);
+
+		if(ticksDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE || ticksDisplayed==Axe.LABELS_DISPLAYED_X_VALUE)
+			drawXTicks.setSelected(true);
+		
+		if(ticksDisplayed==Axe.LABELS_DISPLAYED_ALL_VALUE || ticksDisplayed==Axe.LABELS_DISPLAYED_Y_VALUE)
+			drawYTicks.setSelected(true);
+		
+		String style = a.getAxesStyleToken();
+		
+		if(style.equals(PSTricksConstants.TOKEN_AXES_STYLE_AXES))
+			axeShapeChoice.setSelectedItem(Axe.LABEL_STYLE_AXE);
+		else
+			if(style.equals(PSTricksConstants.TOKEN_AXES_STYLE_FRAME))
+				axeShapeChoice.setSelectedItem(Axe.LABEL_STYLE_FRAME);
+			else 
+				if(style.equals(PSTricksConstants.TOKEN_AXES_STYLE_NONE))
+					axeShapeChoice.setSelectedItem(Axe.LABEL_STYLE_NONE);
+	
+		style = a.getTicksStyleToken();
+		
+		if(style.equals(PSTricksConstants.TOKEN_TICKS_STYLE_FULL))
+			ticksShapeChoice.setSelectedItem(Axe.LABEL_STYLE_TICKS_FULL);
+		else
+			if(style.equals(PSTricksConstants.TOKEN_TICKS_STYLE_BOTTOM))
+				ticksShapeChoice.setSelectedItem(Axe.LABEL_STYLE_TICKS_BOTTOM);
+			else 
+				if(style.equals(PSTricksConstants.TOKEN_TICKS_STYLE_TOP))
+					ticksShapeChoice.setSelectedItem(Axe.LABEL_STYLE_TICKS_TOP);
+		
+		ticksSizeField.setValue(a.getTicksSize());
+		boolean ok = a.getDistLabelsX()!=0 || a.getDistLabelsY()!=0;
+		
+		defineLabelDistCB.setSelected(ok);
+		labelXDistField.setEnabled(ok);
+		labelYDistField.setEnabled(ok);
+		labelXDistField.removeChangeListener(this);
+		labelYDistField.removeChangeListener(this);
+		labelXDistField.setValue(a.getDistLabelsX()==0 ? a.getIncrement().x : a.getDistLabelsX());
+		labelYDistField.setValue(a.getDistLabelsY()==0 ? a.getIncrement().y : a.getDistLabelsY());
+		labelXDistField.addChangeListener(this);
+		labelYDistField.addChangeListener(this);
+		labelXIncrement.setValue(a.getIncrement().x);
+		labelYIncrement.setValue(a.getIncrement().y);
+		labelXOrigin.setValue((int)a.getOrigin().x);
+		labelYOrigin.setValue((int)a.getOrigin().y);
+		showOriginCB.setSelected(a.isShowOrigin());
+		
+		glimpsePanel.repaint();
+	}
+	
+
+	
+	
+	@Override
+	public void setDefaultsValues()
+	{
+		super.setDefaultsValues();
+		
+		drawXLabel.setSelected(true);
+		drawYLabel.setSelected(true);
+		drawXTicks.setSelected(true);
+		drawYTicks.setSelected(true);
+		Axe axe = (Axe)glimpsePanel.glimpseFigure;
+		
+		axe.setLabelsDisplayed(Axe.LABELS_DISPLAYED_ALL_VALUE);
+		axeShapeChoice.setSelectedIndex(0);
+		ticksShapeChoice.setSelectedIndex(0);
+		ticksSizeField.setValue(PSTricksConstants.DEFAULT_TICKS_SIZE);
+		defineLabelDistCB.setSelected(false);
+		labelXDistField.setEnabled(false);
+		labelYDistField.setEnabled(false);
+		axe.setDistLabelsX(0);
+		axe.setDistLabelsY(0);
+		axe.setIncrementX(PSTricksConstants.DEFAULT_DX);
+		axe.setIncrementY(PSTricksConstants.DEFAULT_DY);
+		axe.setOriginX(PSTricksConstants.DEFAULT_OX);
+		axe.setOriginY(PSTricksConstants.DEFAULT_OY);
+		axe.setShowOrigin(PSTricksConstants.DEFAULT_SHOW_ORIGIN);
+		axe.updateBorders();
+		
+		glimpsePanel.repaint();
+	}
+	
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		Axe a = (Axe)figure;
+		double xVal = Float.valueOf(labelXDistField.getValue().toString()).doubleValue();
+		double yVal = Float.valueOf(labelYDistField.getValue().toString()).doubleValue();
+
+		if(drawXLabel.isSelected())
+			if(drawYLabel.isSelected())
+				a.setLabelsDisplayed(Axe.LABELS_DISPLAYED_ALL_VALUE);
+			else a.setLabelsDisplayed(Axe.LABELS_DISPLAYED_X_VALUE);
+		else 
+			if(drawYLabel.isSelected())
+				a.setLabelsDisplayed(Axe.LABELS_DISPLAYED_Y_VALUE);
+			else a.setLabelsDisplayed(Axe.LABELS_DISPLAYED_NON_VALUE);
+
+		if(drawXTicks.isSelected())
+			if(drawYTicks.isSelected())
+				a.setTicksDisplayed(Axe.LABELS_DISPLAYED_ALL_VALUE);
+			else a.setTicksDisplayed(Axe.LABELS_DISPLAYED_X_VALUE);
+		else 
+			if(drawYTicks.isSelected())
+				a.setTicksDisplayed(Axe.LABELS_DISPLAYED_Y_VALUE);
+			else a.setTicksDisplayed(Axe.LABELS_DISPLAYED_NON_VALUE);
+		
+		String selected = axeShapeChoice.getSelectedItem().toString();
+		
+		if(selected.equals(Axe.LABEL_STYLE_AXE))
+			a.setAxesStyle(Axe.AXES_STYLE_AXES_VALUE);
+		else
+			if(selected.equals(Axe.LABEL_STYLE_FRAME))
+				a.setAxesStyle(Axe.AXES_STYLE_FRAME_VALUE);
+			else 
+				if(selected.equals(Axe.LABEL_STYLE_NONE))
+					a.setAxesStyle(Axe.AXES_STYLE_NONE_VALUE);
+		
+		selected = ticksShapeChoice.getSelectedItem().toString();
+		
+		if(selected.equals(Axe.LABEL_STYLE_TICKS_FULL))
+			a.setTicksStyle(Axe.TICKS_STYLE_FULL_VALUE);
+		else
+			if(selected.equals(Axe.LABEL_STYLE_TICKS_TOP))
+				a.setTicksStyle(Axe.TICKS_STYLE_TOP_VALUE);
+			else 
+				if(selected.equals(Axe.LABEL_STYLE_TICKS_BOTTOM))
+					a.setTicksStyle(Axe.TICKS_STYLE_BOTTOM_VALUE);
+		
+		a.setTicksSize(Float.valueOf(ticksSizeField.getValue().toString()).doubleValue());
+		a.setDistLabelsX(defineLabelDistCB.isSelected() ? xVal : 0);
+		a.setDistLabelsY(defineLabelDistCB.isSelected() ? yVal : 0);
+		a.setIncrementX(Float.valueOf(labelXIncrement.getValue().toString()).doubleValue());
+		a.setIncrementY(Float.valueOf(labelYIncrement.getValue().toString()).doubleValue());
+		a.setOriginX(Float.valueOf(labelXOrigin.getValue().toString()).intValue());
+		a.setOriginY(Float.valueOf(labelYOrigin.getValue().toString()).intValue());
+		a.setShowOrigin(showOriginCB.isSelected());
+		a.updateBorders();
+		
+		drawPanel.getFrameParent().setExportAsMenu(true);
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+	
+	
+	
+	
+	@Override
+	public void actionPerformed(ActionEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Axe a = (Axe)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JCheckBox)
+			{
+				String label = ((JCheckBox)o).getActionCommand();
+				
+				if(label.equals(LABEL_SHOW_ORIGIN))
+				{
+					setModified(true);
+					a.setShowOrigin(showOriginCB.isSelected());
+					glimpsePanel.repaint();
+					
+					return ;
+				}
+				
+				if(label.equals(LABEL_DEF_LABELS_DIST))
+				{
+					double xVal = Float.valueOf(labelXDistField.getValue().toString()).doubleValue();
+					double yVal = Float.valueOf(labelYDistField.getValue().toString()).doubleValue();
+					boolean isSelected = defineLabelDistCB.isSelected();
+					
+					setModified(true);
+					labelXDistField.setEnabled(isSelected);
+					labelYDistField.setEnabled(isSelected);
+					a.setDistLabelsX(isSelected ? xVal : 0);
+					a.setDistLabelsY(isSelected ? yVal : 0);
+					a.updateBorders();
+					glimpsePanel.repaint();
+					
+					return ;
+				}
+				
+				if(label.equals(LABEL_DRAW_X_LABELS) || label.equals(LABEL_DRAW_Y_LABELS))
+				{
+					if(drawXLabel.isSelected())
+						if(drawYLabel.isSelected())
+							a.setLabelsDisplayed(Axe.LABELS_DISPLAYED_ALL_VALUE);
+						else a.setLabelsDisplayed(Axe.LABELS_DISPLAYED_X_VALUE);
+					else 
+						if(drawYLabel.isSelected())
+							a.setLabelsDisplayed(Axe.LABELS_DISPLAYED_Y_VALUE);
+						else a.setLabelsDisplayed(Axe.LABELS_DISPLAYED_NON_VALUE);
+					
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(label.equals(LABEL_DRAW_X_TICKS) || label.equals(LABEL_DRAW_Y_TICKS))
+				{
+					if(drawXTicks.isSelected())
+						if(drawYTicks.isSelected())
+							a.setTicksDisplayed(Axe.LABELS_DISPLAYED_ALL_VALUE);
+						else a.setTicksDisplayed(Axe.LABELS_DISPLAYED_X_VALUE);
+					else 
+						if(drawYTicks.isSelected())
+							a.setTicksDisplayed(Axe.LABELS_DISPLAYED_Y_VALUE);
+						else a.setTicksDisplayed(Axe.LABELS_DISPLAYED_NON_VALUE);
+					
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+			
+			if(o instanceof JComboBox)
+			{
+				String label = ((JComboBox)o).getActionCommand();
+				
+				if(label.equals(Axe.ACTION_CMD_AXE_STYLE_CHOICE))
+				{
+					String selected = axeShapeChoice.getSelectedItem().toString();
+					
+					if(selected.equals(Axe.LABEL_STYLE_AXE))
+						a.setAxesStyle(Axe.AXES_STYLE_AXES_VALUE);
+					else
+						if(selected.equals(Axe.LABEL_STYLE_FRAME))
+							a.setAxesStyle(Axe.AXES_STYLE_FRAME_VALUE);
+						else 
+							if(selected.equals(Axe.LABEL_STYLE_NONE))
+								a.setAxesStyle(Axe.AXES_STYLE_NONE_VALUE);
+					
+					setModified(true);
+					boolean ok = selected.equals(Axe.LABEL_STYLE_AXE);
+					arrow1Choice.setEnabled(ok);
+					arrow2Choice.setEnabled(ok);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(label.equals(Axe.ACTION_CMD_TICKS_STYLE_CHOICE))
+				{
+					String selected = ticksShapeChoice.getSelectedItem().toString();
+			
+					if(selected.equals(Axe.LABEL_STYLE_TICKS_FULL))
+						a.setTicksStyle(Axe.TICKS_STYLE_FULL_VALUE);
+					else
+						if(selected.equals(Axe.LABEL_STYLE_TICKS_TOP))
+							a.setTicksStyle(Axe.TICKS_STYLE_TOP_VALUE);
+						else 
+							if(selected.equals(Axe.LABEL_STYLE_TICKS_BOTTOM))
+								a.setTicksStyle(Axe.TICKS_STYLE_BOTTOM_VALUE);
+					
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				return ;
+			}
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.actionPerformed(e);
+	}
+
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Axe a = (Axe)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				
+				if(name.equals(LABEL_TICKS_SIZE_FIELD))
+				{
+					setModified(true);
+					a.setTicksSize(Float.valueOf(ticksSizeField.getValue().toString()).doubleValue());
+					a.updateBorders();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_LABEL_X_INCR))
+				{
+					setModified(true);
+					a.setIncrementX(Float.valueOf(labelXIncrement.getValue().toString()).doubleValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+
+				if(name.equals(LABEL_LABEL_Y_INCR))
+				{
+					setModified(true);
+					a.setIncrementY(Float.valueOf(labelYIncrement.getValue().toString()).doubleValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_LABEL_X_ORIG))
+				{
+					setModified(true);
+					a.setOriginX(Float.valueOf(labelXOrigin.getValue().toString()).intValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_LABEL_Y_ORIG))
+				{
+					setModified(true);
+					a.setOriginY(Float.valueOf(labelYOrigin.getValue().toString()).intValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+
+				if(name.equals(LABEL_X_LABEL_DIST))
+				{
+					setModified(true);
+					a.setDistLabelsX(Float.valueOf(labelXDistField.getValue().toString()).doubleValue());
+					a.updateBorders();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_Y_LABEL_DIST))
+				{
+					setModified(true);
+					a.setDistLabelsY(Float.valueOf(labelYDistField.getValue().toString()).doubleValue());
+					a.updateBorders();
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersBezierCurveFrame.java b/current/latexDraw/ui/dialog/ParametersBezierCurveFrame.java
new file mode 100644
index 0000000..61462e3
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersBezierCurveFrame.java
@@ -0,0 +1,635 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ItemEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.BezierCurve;
+import latexDraw.figures.Figure;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines the frame which allows to modify a Bézier curve.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersBezierCurveFrame extends ParametersPolygonJoinedLinesFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to show or to hide the control points of the Bézier curve */
+	protected JCheckBox showPointsCB;
+	
+	/** The current X-coordinates of the control point field */
+	protected JSpinner xFirstCtrlField;
+	
+	/** The current Y-coordinates of the control point field */
+	protected JSpinner yFirstCtrlField;
+	
+	/** The right X-coordinates field */
+	protected JSpinner xSecondCtrlField;
+	
+	/** The right Y-coordinates field */
+	protected JSpinner ySecondCtrlField;
+	
+	protected LaTeXDrawComboBox closingChoice;
+	
+	protected JCheckBox openCB;
+	
+	protected JButton equilibrateB;
+	
+	protected JSpinner equilibrateValueF;
+	
+	protected JCheckBox moveAll;
+	
+	public static final String LABEL_EQUILIBRATE_FIELD = "equilibrateF";//$NON-NLS-1$
+	
+	public static final String LABEL_EQUILIBRATE = "equilibrateB";//$NON-NLS-1$
+	
+	/** The label of the first X-coordinate of the control point of the current point. */
+	public static final String LABEL_CTRLPTS_FIRST_X = "firstCtrlX";//$NON-NLS-1$
+	
+	/** The label of the first Y-coordinate of the control point of the current point. */
+	public static final String LABEL_CTRLPTS_FIRST_Y = "firstCtrlY";//$NON-NLS-1$
+	
+	/** The label of the first X-coordinate of the control point of the current point. */
+	public static final String LABEL_CTRLPTS_SECOND_X = "sndCtrlX";//$NON-NLS-1$
+	
+	/** The label of the first Y-coordinate of the control point of the current point. */
+	public static final String LABEL_CTRLPTS_SECOND_Y = "sndCtrlY";//$NON-NLS-1$
+	
+	public static final String ACTION_CMD_OPENCB = "openCB";//$NON-NLS-1$
+	
+	public static final String ACTION_CMD_MOVE_ALL = "moveAll";//$NON-NLS-1$
+
+	
+	
+	/**
+	 * The constructor by default.
+	 */
+	public ParametersBezierCurveFrame(Frame parent, DrawPanel d, boolean attachToMainFrame)
+	{
+		super(parent, d, false, attachToMainFrame);
+		
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	  		pGeneral.add(createPositionPanel());
+	     	pGeneral.add(createBordersPanel(false));
+
+	     	JPanel panel2 = new JPanel();
+	     	panel2.setLayout(new BoxLayout(panel2, BoxLayout.Y_AXIS));
+	     	JPanel showP = new JPanel(new FlowLayout(FlowLayout.LEFT));
+	     	showPointsCB = new JCheckBox(LABEL_SHOWPOINTCB);
+	     	showPointsCB.addActionListener(this);
+	     	showPointsCB.setActionCommand(LABEL_SHOWPOINTCB);
+	     	showP.add(showPointsCB);
+	     	panel2.add(showP);
+	     	
+	     	JPanel closeP = new JPanel(new FlowLayout(FlowLayout.LEFT));
+	     	openCB = new JCheckBox(LaTeXDrawLang.getString1_9("ParametersAkinPointsFrame.1")); //$NON-NLS-1$
+	     	openCB.setActionCommand(ACTION_CMD_OPENCB);
+	     	openCB.setName(ACTION_CMD_OPENCB);
+	     	openCB.addActionListener(this);
+	     	closeP.add(openCB);
+	     	
+	     	closeP.add(new JLabel(LaTeXDrawLang.getString1_9("ParametersAkinPointsFrame.2"))); //$NON-NLS-1$
+	     	closingChoice = BezierCurve.createTypeChoice();
+	     	closingChoice.addItemListener(this);
+	     	closeP.add(closingChoice);
+	     	panel2.add(closeP);
+	     	
+	     	JPanel equilibrateP = new JPanel(new FlowLayout(FlowLayout.LEFT));
+	     	equilibrateB = new JButton(LaTeXDrawLang.getString1_9("ParametersBezierCurveFrame.2")); //$NON-NLS-1$
+	     	equilibrateB.setToolTipText(LaTeXDrawLang.getString1_9("ParametersBezierCurveFrame.3")); //$NON-NLS-1$
+	     	equilibrateB.setActionCommand(LABEL_EQUILIBRATE);
+	     	equilibrateB.addActionListener(this);
+	     	equilibrateP.add(equilibrateB);
+	     	panel2.add(equilibrateP);
+	     	
+	     	equilibrateP.add(new JLabel(LaTeXDrawLang.getString1_9("ParametersBezierCurveFrame.4"))); //$NON-NLS-1$
+	     	
+	     	SpinnerModel model = new SpinnerNumberModel(BezierCurve.DEFAULT_EQUILIBRATE_GAP, 1, 1000, 1);
+	     	equilibrateValueF = new JSpinner(model);
+	     	equilibrateValueF.setToolTipText(LaTeXDrawLang.getString1_9("ParametersBezierCurveFrame.5")); //$NON-NLS-1$
+	     	equilibrateValueF.setEditor(new JSpinner.NumberEditor(equilibrateValueF, "0"));//$NON-NLS-1$
+	     	equilibrateValueF.addChangeListener(this);
+	     	equilibrateValueF.setName(LABEL_EQUILIBRATE_FIELD);
+	     	equilibrateValueF.setMaximumSize(new Dimension(100, 40));
+	     	equilibrateP.add(equilibrateValueF);
+	     	
+	     	pGeneral.add(panel2);
+	     	
+	     	panel2.setBorder(new CompoundBorder(new TitledBorder(null, TITLE_TABBED_PANE_OTHERS, 
+					  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	
+	     	JPanel pOther = new JPanel();
+	     	pOther.setLayout(new BoxLayout(pOther, BoxLayout.Y_AXIS));
+	     	pOther.add(createShadowPanel());
+	     	pOther.add(createFillPanel());
+	     	pOther.add(createHatchingPanel());
+	     	pOther.add(createGradientPanel());
+	     	pOther.add(createDoubleLinePanel());
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_OTHERS, pOther);
+	     	tabbedPane.addTab(NAME_TABBEDPANE_ARROW, createArrowPanel(true, false));
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().removeAll();
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	     	
+	}
+
+	
+	
+	
+	@Override
+	protected JPanel createPositionPanel()
+	{
+		super.createPositionPanel();
+		
+		JPanel coordP = new JPanel(new GridBagLayout());
+  		GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;
+     	constraint.gridy = 0;
+     	constraint.gridwidth = 1;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.CENTER;
+     	coordP.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersPolygonFrame.1")), constraint); //$NON-NLS-1$
+  		
+     	constraint.gridx++;	
+     	coordP.add(pointChoice, constraint);
+     	
+     	moveAll = new JCheckBox(LaTeXDrawLang.getDialogFrameString("ParamsBC.0")); //$NON-NLS-1$
+     	moveAll.setName(ACTION_CMD_MOVE_ALL);
+     	moveAll.setActionCommand(ACTION_CMD_MOVE_ALL);
+     	moveAll.setToolTipText(LaTeXDrawLang.getDialogFrameString("ParamsBC.1")); //$NON-NLS-1$
+     	moveAll.setSelected(true);
+     	constraint.gridx++;	
+     	coordP.add(moveAll, constraint);
+  		
+    	constraint.gridx=0; constraint.gridy++;
+     	coordP.add(new JLabel(LABEL_X), constraint);
+  		
+     	constraint.gridx++;
+     	coordP.add(xCoord, constraint);
+     	
+    	constraint.gridx++;	
+     	coordP.add(new JLabel(LABEL_Y), constraint);
+  		
+     	constraint.gridx++;	
+     	coordP.add(yCoord, constraint);
+     	
+     	constraint.gridx=0; constraint.gridy++;
+     	coordP.add(new JLabel(LaTeXDrawLang.getString1_9("ParametersBezierCurveFrame.6")), constraint); //$NON-NLS-1$
+  		
+     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+     	xFirstCtrlField = new JSpinner(model);
+     	xFirstCtrlField.setEditor(new JSpinner.NumberEditor(xFirstCtrlField, "0.0"));//$NON-NLS-1$
+     	xFirstCtrlField.addChangeListener(this);
+     	xFirstCtrlField.setName(LABEL_CTRLPTS_FIRST_X);
+     	constraint.gridx++;
+     	coordP.add(xFirstCtrlField, constraint);
+     	
+     	constraint.gridx++;
+     	coordP.add(new JLabel(LaTeXDrawLang.getString1_9("ParametersBezierCurveFrame.7")), constraint); //$NON-NLS-1$
+     	
+     	model = new SpinnerNumberModel(0,0,10000,0.1);
+     	yFirstCtrlField = new JSpinner(model);
+     	yFirstCtrlField.setEditor(new JSpinner.NumberEditor(yFirstCtrlField, "0.0"));//$NON-NLS-1$
+     	yFirstCtrlField.addChangeListener(this);
+     	yFirstCtrlField.setName(LABEL_CTRLPTS_FIRST_Y);
+     	constraint.gridx++;
+     	coordP.add(yFirstCtrlField, constraint);
+     	
+     	constraint.gridx=0; constraint.gridy++;
+     	coordP.add(new JLabel(LaTeXDrawLang.getString1_9("ParametersBezierCurveFrame.8")), constraint); //$NON-NLS-1$
+     	
+     	model = new SpinnerNumberModel(0,0,10000,0.1);
+     	xSecondCtrlField = new JSpinner(model);
+     	xSecondCtrlField.setEditor(new JSpinner.NumberEditor(xSecondCtrlField, "0.0"));//$NON-NLS-1$
+     	xSecondCtrlField.addChangeListener(this);
+     	xSecondCtrlField.setName(LABEL_CTRLPTS_SECOND_X);
+     	constraint.gridx++;
+     	coordP.add(xSecondCtrlField, constraint);
+     	
+     	constraint.gridx++;
+     	coordP.add(new JLabel(LaTeXDrawLang.getString1_9("ParametersBezierCurveFrame.9")), constraint); //$NON-NLS-1$
+     	
+     	model = new SpinnerNumberModel(0,0,10000,0.1);
+     	ySecondCtrlField = new JSpinner(model);
+     	ySecondCtrlField.setEditor(new JSpinner.NumberEditor(ySecondCtrlField, "0.0"));//$NON-NLS-1$
+     	ySecondCtrlField.addChangeListener(this);
+     	ySecondCtrlField.setName(LABEL_CTRLPTS_SECOND_Y);
+     	constraint.gridx++;
+     	coordP.add(ySecondCtrlField, constraint);
+     	
+     	constraint.gridx = 0;	constraint.gridy++;
+     	coordP.add(new JLabel(LABEL_ROTATION), constraint);
+     	constraint.gridx++;
+     	coordP.add(rotationField, constraint);
+     	
+     	coordP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_POSITION_DIMENSIONS, 
+						  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	
+     	return coordP;
+	}
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof BezierCurve))
+				throw new ClassCastException();
+			
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+	
+	
+	
+	@Override
+	public void setDefaultsValues()
+	{
+		try
+		{
+			super.setDefaultsValues();
+			
+			showPointsCB.setSelected(BezierCurve.DEFAULT_SHOWPOINTS);
+			((BezierCurve)glimpsePanel.glimpseFigure).setShowPoints(BezierCurve.DEFAULT_SHOWPOINTS);
+			closingChoice.setSelectedItem(String.valueOf(BezierCurve.DEFAULT_CLOSE_TYPE));
+			openCB.setSelected(BezierCurve.DEFAULT_OPEN);
+			equilibrateValueF.setValue(BezierCurve.DEFAULT_EQUILIBRATE_GAP);
+			
+			glimpsePanel.repaint();
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		BezierCurve bc1 = (BezierCurve)figure;
+		BezierCurve bc2 = (BezierCurve)glimpsePanel.glimpseFigure;
+		int i, size = bc1.getNbPoints();
+		
+		for(i=0; i<size; i++)
+		{
+			bc1.getPoint(i).setLocation(bc2.getPoint(i));
+			bc1.getFirstControlPoint(i).setLocation(bc2.getFirstControlPoint(i));
+			bc1.getSecondControlPoint(i).setLocation(bc2.getSecondControlPoint(i));
+		}
+
+		bc1.setEquilibrateGap(Double.valueOf(equilibrateValueF.getValue().toString()).intValue());
+		bc1.setShowPoints(showPointsCB.isSelected());
+		bc1.setOpen(openCB.isSelected());
+		bc1.setCloseType(Integer.valueOf(((JLabel)closingChoice.getSelectedItem()).getText()));
+		bc1.updateBorders();
+		
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+	
+	
+
+	
+	@Override
+	public void setFigureFrameField()
+	{
+		super.setFigureFrameField();
+		
+		BezierCurve bc = (BezierCurve)figure;
+		
+		arrow2Choice.setEnabled(bc.isOpen());
+		equilibrateValueF.setValue(bc.getEquilibrateGap());
+		showPointsCB.setSelected(bc.isShowPoints());
+		openCB.setSelected(bc.isOpen());
+		closingChoice.setSelectedItem(String.valueOf(bc.getCloseType()));
+		closingChoice.setEnabled(!openCB.isSelected());
+		glimpsePanel.glimpseFigure.setSelected(true);
+		glimpsePanel.glimpseFigure.getBorders().setSelected(false);
+	}
+
+	
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			BezierCurve bc = (BezierCurve) glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				int id = Integer.valueOf(pointChoice.getSelectedItem().toString()).intValue()-1;
+				
+				if(name.equals(LABEL_X))
+				{
+					float x = Float.valueOf(xCoord.getValue().toString()).floatValue();
+					xs[id] = x;
+					bc.setPoint(x, bc.getPoint(id).y, id, moveAll.isSelected());
+					
+					if(moveAll.isSelected())
+					{
+						xSecondCtrlField.setValue(bc.getSecondControlPoint(id).x);
+						xFirstCtrlField.setValue(bc.getFirstControlPoint(id).x);
+					}
+					
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_Y))
+				{
+					float y = Float.valueOf(yCoord.getValue().toString()).floatValue();
+					ys[id] = y;
+					bc.setPoint(bc.getPoint(id).x, y, id, moveAll.isSelected());
+							
+					if(moveAll.isSelected())
+					{
+						ySecondCtrlField.setValue(bc.getSecondControlPoint(id).y);
+						yFirstCtrlField.setValue(bc.getFirstControlPoint(id).y);
+					}
+					
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_EQUILIBRATE_FIELD))
+				{
+					setModified(true);
+					bc.setEquilibrateGap(Double.valueOf(equilibrateValueF.getValue().toString()).intValue());
+					return ;
+				}
+				
+				if(name.equals(LABEL_CTRLPTS_FIRST_X))
+				{
+					bc.setXCoordFirstCtrl(Double.valueOf(xFirstCtrlField.getValue().toString()).doubleValue(), id);
+					xSecondCtrlField.setValue(bc.getSecondControlPoint(id).x);
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_CTRLPTS_FIRST_Y))
+				{
+					bc.setYCoordFirstCtrl(Double.valueOf(yFirstCtrlField.getValue().toString()).doubleValue(), id);
+					ySecondCtrlField.setValue(bc.getSecondControlPoint(id).y);
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_CTRLPTS_SECOND_X))
+				{
+					bc.setXCoordSecondCtrl(Double.valueOf(xSecondCtrlField.getValue().toString()).doubleValue(), id);
+					xFirstCtrlField.setValue(bc.getFirstControlPoint(id).x);
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_CTRLPTS_SECOND_Y))
+				{
+					bc.setYCoordSecondCtrl(Double.valueOf(ySecondCtrlField.getValue().toString()).doubleValue(), id);
+					yFirstCtrlField.setValue(bc.getFirstControlPoint(id).y);
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+			
+			super.stateChanged(e);
+			
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+
+	
+	
+
+	@Override
+	public void actionPerformed(ActionEvent e)
+	{
+		super.actionPerformed(e);
+		Object src = e.getSource();
+		BezierCurve f = (BezierCurve)glimpsePanel.getGlimpseFigure();
+		
+		if(src instanceof JButton)
+		{
+			String label = ((JButton)src).getActionCommand();
+			
+			if(label.equals(LABEL_EQUILIBRATE))
+			{
+				int i = Integer.valueOf(pointChoice.getSelectedItem().toString()).intValue()-1;
+				f.equilibrate();
+				
+				LaTeXDrawPoint2D pt = f.getPoint(i);
+				xCoord.removeChangeListener(this);
+				yCoord.removeChangeListener(this);
+				xCoord.setValue((float)pt.x);
+				yCoord.setValue((float)pt.y);
+				xCoord.addChangeListener(this);
+				yCoord.addChangeListener(this);
+				
+				pt = f.getFirstControlPoint(i);
+				xFirstCtrlField.removeChangeListener(this);
+				yFirstCtrlField.removeChangeListener(this);
+				xFirstCtrlField.setValue((float)pt.x);
+				yFirstCtrlField.setValue((float)pt.y);
+				xFirstCtrlField.addChangeListener(this);
+				yFirstCtrlField.addChangeListener(this);
+				
+				pt = f.getSecondControlPoint(i);
+				xSecondCtrlField.removeChangeListener(this);
+				ySecondCtrlField.removeChangeListener(this);
+				xSecondCtrlField.setValue((float)pt.x);
+				ySecondCtrlField.setValue((float)pt.y);
+				xSecondCtrlField.addChangeListener(this);
+				ySecondCtrlField.addChangeListener(this);
+				
+				setModified(true);
+				glimpsePanel.repaint();
+				return ;
+			}
+			return ;
+		}
+		
+		if(src instanceof JCheckBox)
+		{
+			String label = ((JCheckBox)src).getActionCommand();
+			
+			if(label.equals(LABEL_SHOWPOINTCB))
+			{
+				boolean isSel = showPointsCB.isSelected();
+				boolean displayDotF = isSel || f.getArrow1Style().equals(PSTricksConstants.CIRCLEEND_STYLE) ||
+										f.getArrow2Style().equals(PSTricksConstants.CIRCLEEND_STYLE) ||
+										f.getArrow1Style().equals(PSTricksConstants.CIRCLEIN_STYLE) ||
+										f.getArrow2Style().equals(PSTricksConstants.CIRCLEIN_STYLE) ||
+										f.getArrow1Style().equals(PSTricksConstants.DISKEND_STYLE) ||
+										f.getArrow2Style().equals(PSTricksConstants.DISKEND_STYLE) ||
+										f.getArrow1Style().equals(PSTricksConstants.DISKIN_STYLE) ||
+										f.getArrow2Style().equals(PSTricksConstants.DISKIN_STYLE);
+				f.setShowPoints(isSel);
+				
+				dotSizeDim.setEnabled(displayDotF);
+				dotSizeNum.setEnabled(displayDotF);
+				setModified(true);
+				glimpsePanel.repaint();
+				return ;
+			}
+			
+			if(label.equals(ACTION_CMD_OPENCB))
+			{
+				int id = Integer.valueOf(pointChoice.getSelectedItem().toString()).intValue()-1;
+				boolean ok = openCB.isSelected() && (id==0 || id==f.getNbPoints()-1);
+				
+				f.setOpen(openCB.isSelected());
+				closingChoice.setEnabled(!openCB.isSelected());
+				
+				xSecondCtrlField.setEnabled(!ok);
+				ySecondCtrlField.setEnabled(!ok);
+				arrow2Choice.setEnabled(openCB.isSelected());
+				setModified(true);
+				glimpsePanel.repaint();
+				return ;
+			}
+		}
+	}
+
+
+
+	@Override
+	public void itemStateChanged(ItemEvent e)
+	{
+		super.itemStateChanged(e);
+		
+		Object o = e.getSource();
+		BezierCurve f = (BezierCurve)glimpsePanel.getGlimpseFigure();
+		
+		if(o instanceof LaTeXDrawComboBox)
+		{
+			String ac = ((LaTeXDrawComboBox)o).getActionCommand();
+			
+			if(ac==null)
+				return;
+			
+			if(ac.equals(BezierCurve.LABEL_CLOSE_CHOICE))
+			{
+				f.setCloseType(Integer.valueOf(((JLabel)closingChoice.getSelectedItem()).getText()).intValue());
+				setModified(true);
+				glimpsePanel.repaint();
+				return ;
+			}
+		}
+
+		
+		if(o instanceof JComboBox)
+		{
+			if(((JComboBox)o).getName().equals(LABEL_CHOICE_PTS))
+			{
+				int id = Integer.valueOf(pointChoice.getSelectedItem().toString()).intValue()-1;
+				
+				xFirstCtrlField.setValue(f.getFirstControlPoint(id).x);
+				yFirstCtrlField.setValue(f.getFirstControlPoint(id).y);
+				xSecondCtrlField.setValue(f.getSecondControlPoint(id).x);
+				ySecondCtrlField.setValue(f.getSecondControlPoint(id).y);
+				
+				boolean ok = f.isOpen() && (id==0 || id==f.getNbPoints()-1);
+				
+				xSecondCtrlField.setEnabled(!ok);
+				ySecondCtrlField.setEnabled(!ok);
+				
+				return ;
+			}
+		}
+	}
+
+
+
+	@Override
+	public void updateEnableParamsArrow()
+	{
+		super.updateEnableParamsArrow();
+		
+		if(arrow2Choice!=null && openCB!=null)
+			arrow2Choice.setEnabled(openCB.isSelected());
+		
+		if(!dotSizeDim.isEnabled() && showPointsCB!=null && showPointsCB.isSelected())
+		{
+			dotSizeDim.setEnabled(true);
+			dotSizeNum.setEnabled(true);
+		}
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersCircleSquareFrame.java b/current/latexDraw/ui/dialog/ParametersCircleSquareFrame.java
new file mode 100644
index 0000000..a169cda
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersCircleSquareFrame.java
@@ -0,0 +1,432 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Circle;
+import latexDraw.figures.Figure;
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.figures.Square;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines the frame which allows to change the parameters of circles and squares.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersCircleSquareFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to change the x-coordinates of the centre of the figure */
+	protected JSpinner centerXField;
+	
+	/** Allows to change the y-coordinates of the centre of the figure */
+	protected JSpinner centerYField;
+	
+	/** Allows to change the radius of the circle */
+	protected JSpinner radiusField;
+	
+	/** Allows to set if the square will be round (only for square) */
+	protected JCheckBox isRound;
+	
+	/** The panel containing to set the roundness of the figure. */
+	protected JPanel roundPanel;
+	
+	/** Allows to change the angle of the round corner. */
+	protected JSpinner frameArcField;
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public ParametersCircleSquareFrame(Frame parent, DrawPanel p, boolean attachToMainFrame)
+	{
+		super(parent, p, attachToMainFrame);
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel coordP = new JPanel(new GridBagLayout());
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.CENTER;
+	     	coordP.add(new JLabel(LABEL_CENTER_X) , constraint);
+	  		
+	     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerXField = new JSpinner(model);
+			centerXField.setEditor(new JSpinner.NumberEditor(centerXField, "0.0"));//$NON-NLS-1$
+			centerXField.addChangeListener(this);
+	     	centerXField.setName(LABEL_CENTER_X);
+	     	constraint.gridx++;	
+	     	coordP.add(centerXField, constraint);
+
+	    	constraint.gridx++;	
+	     	coordP.add(new JLabel(LABEL_CENTER_Y), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerYField = new JSpinner(model);
+	     	centerYField.setEditor(new JSpinner.NumberEditor(centerYField, "0.0"));//$NON-NLS-1$
+			centerYField.addChangeListener(this);
+	     	centerYField.setName(LABEL_CENTER_Y);
+	     	constraint.gridx++;	
+	     	coordP.add(centerYField, constraint);
+	     	
+	    	constraint.gridx = 0;	constraint.gridy++;
+	    	coordP.add(new JLabel(LABEL_RADIUS), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0.1,0.1,10000,0.1);
+	     	radiusField = new JSpinner(model);
+	     	radiusField.setEditor(new JSpinner.NumberEditor(radiusField, "0.0"));//$NON-NLS-1$
+	     	radiusField.addChangeListener(this);
+	     	radiusField.setName(LABEL_RADIUS);
+	     	constraint.gridx++;	
+	     	coordP.add(radiusField, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	coordP.add(new JLabel(LABEL_ROTATION), constraint);
+	     	constraint.gridx++;
+	     	coordP.add(rotationField, constraint);
+	     	coordP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_POSITION_DIMENSIONS, 
+							  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	
+	     	pGeneral.add(coordP);
+	     	pGeneral.add(createBordersPanel(true));
+	     	pGeneral.add(createDoubleLinePanel());
+	     	pGeneral.add(createFillPanel());
+	     	
+	     	JPanel pOther = new JPanel();
+	     	pOther.setLayout(new BoxLayout(pOther, BoxLayout.Y_AXIS));
+	     	pOther.add(createHatchingPanel());
+	     	pOther.add(createShadowPanel());
+	     	pOther.add(createGradientPanel());
+	     	
+	     	roundPanel = new JPanel();
+	     	roundPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
+	     	
+	     	isRound = new JCheckBox(LABEL_ISROUND);
+	     	isRound.addActionListener(this);
+	     	isRound.setActionCommand(LABEL_ISROUND);
+	     	roundPanel.add(isRound);
+	     	
+	    	roundPanel.add(new JLabel(LABEL_ROUND_CORNER));
+	    	
+	     	model = new SpinnerNumberModel(LaTeXDrawRectangle.DEFAULT_FRAME_ARC, 0.01, 1,0.05);
+			frameArcField = new JSpinner(model);
+			frameArcField.setName(LABEL_ROUND_CORNER);
+			frameArcField.setEditor(new JSpinner.NumberEditor(frameArcField, "0.00"));//$NON-NLS-1$
+			frameArcField.addChangeListener(this);
+			frameArcField.setEnabled(false);
+	     	roundPanel.add(frameArcField);
+
+	     	roundPanel.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("AbstractParametersFrame.6"),  //$NON-NLS-1$
+					  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	pOther.add(roundPanel);
+	     	
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_OTHERS, pOther);
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public void actionPerformed(ActionEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Figure f = glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JCheckBox)
+			{
+				String label = ((JCheckBox)o).getActionCommand();
+
+				if(label.equals(LABEL_ISROUND))
+				{
+					((Square)f).setIsRound(isRound.isSelected());
+					frameArcField.setEnabled(isRound.isSelected());
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+			}			
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.actionPerformed(e);
+	}
+	
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			Figure f = glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				
+				if(name.equals(LABEL_ROUND_CORNER))
+				{
+					if(f instanceof Square)
+					{
+						((Square)f).setFrameArc(Double.valueOf(frameArcField.getValue().toString()).doubleValue());
+						setModified(true);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				LaTeXDrawPoint2D p1, p2, p3, p4;
+				
+				if(figure instanceof Circle)
+				{
+					Circle c = (Circle)f;
+					p1 = c.getBordersPoint(0); 	p2 = c.getBordersPoint(1);
+					p3 = c.getBordersPoint(2); 	p4 = c.getBordersPoint(3);
+				}
+				else
+				{
+					Square s = (Square)f;
+					p1 = s.getPoint(0); 	p2 = s.getPoint(1);
+					p3 = s.getPoint(2); 	p4 = s.getPoint(3);
+				}
+				
+				if(name.equals(LABEL_CENTER_X))
+				{
+					double radius = Double.valueOf(radiusField.getValue().toString());
+					double x = Double.valueOf(centerXField.getValue().toString());
+					
+					p1.x = x - radius;
+					p2.x = x + radius;
+					p3.x = x - radius;
+					p4.x = x + radius;
+					f.updateShape();
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_CENTER_Y))
+				{
+					double radius = Double.valueOf(radiusField.getValue().toString());
+					double y = Double.valueOf(centerYField.getValue().toString());
+					
+					p1.y = y - radius;
+					p2.y = y - radius;
+					p3.y = y + radius;
+					p4.y = y + radius;
+					f.updateShape();
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_RADIUS))
+				{
+					double radius = Double.valueOf(radiusField.getValue().toString());
+					double y = Double.valueOf(centerYField.getValue().toString());
+					double x = Double.valueOf(centerXField.getValue().toString());
+					
+					p1.x = x - radius;
+					p2.x = x + radius;
+					p3.x = x - radius;
+					p4.x = x + radius;
+					p1.y = y - radius;
+					p2.y = y - radius;
+					p3.y = y + radius;
+					p4.y = y + radius;
+					f.updateShape();
+					setModified(true);
+					glimpsePanel.repaint();					
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		LaTeXDrawPoint2D p1, p2, p3, p4;
+		
+		float radius = Float.valueOf(radiusField.getValue().toString()).floatValue();
+		float x = Float.valueOf(centerXField.getValue().toString()).floatValue();
+		float y = Float.valueOf(centerYField.getValue().toString()).floatValue();
+		
+		if(figure instanceof Circle)
+		{
+			Circle c = (Circle)figure;
+			p1 = c.getBordersPoint(0); 	p2 = c.getBordersPoint(1);
+			p3 = c.getBordersPoint(2); 	p4 = c.getBordersPoint(3);
+		}
+		else
+		{
+			Square s = (Square)figure;
+			p1 = s.getPoint(0); 	p2 = s.getPoint(1);
+			p3 = s.getPoint(2); 	p4 = s.getPoint(3);
+			((Square)figure).setIsRound(isRound.isSelected());
+			((Square)figure).setWidth(radius*2);
+			((Square)figure).setFrameArc(
+					Double.valueOf(frameArcField.getValue().toString()).doubleValue());
+		}
+		
+		p1.x = x - radius;
+		p2.x = x + radius;
+		p3.x = x - radius;
+		p4.x = x + radius;
+
+		p1.y = y - radius;
+		p2.y = y - radius;
+		p3.y = y + radius;
+		p4.y = y + radius;
+		
+		figure.updateShape();
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+	
+	
+	
+
+	@Override
+	public void setFigureFrameField()
+	{
+		LaTeXDrawPoint2D NW, SE;
+		NW = figure.getTheNWPoint();
+		SE = figure.getTheSEPoint();
+		
+		centerXField.removeChangeListener(this);
+		centerXField.setValue((NW.x+SE.x)/2.);
+		centerXField.addChangeListener(this);
+		
+		centerYField.removeChangeListener(this);
+		centerYField.setValue((NW.y+SE.y)/2.);
+		centerYField.addChangeListener(this);
+		
+		radiusField.removeChangeListener(this);
+		radiusField.setValue((SE.x-NW.x)/2.);
+		radiusField.addChangeListener(this);
+		
+		if(figure instanceof Square)
+		{
+			 isRound.setSelected(((Square)figure).isRound());
+			 frameArcField.setEnabled(isRound.isSelected());
+			 frameArcField.setValue(((Square)figure).getFrameArc());
+			 roundPanel.setVisible(true);
+		}
+		else roundPanel.setVisible(false);
+	}
+
+	
+	
+	
+	@Override
+	public void setDefaultsValues()
+	{
+		super.setDefaultsValues();
+		
+		if(figure instanceof Square)
+		{
+			 isRound.setSelected(LaTeXDrawRectangle.DEFAULT_ISROUND);
+		 ((Square)glimpsePanel.getGlimpseFigure()).setIsRound(LaTeXDrawRectangle.DEFAULT_ISROUND);
+		}
+		else 
+			isRound.setVisible(false);
+	}
+	
+
+	
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Circle || selected instanceof Square))
+				throw new IllegalArgumentException();
+
+			if(isFramedBox)
+			{
+				centerXField.setEnabled(false);
+				centerYField.setEnabled(false);
+				radiusField.setEnabled(false);
+			}
+			
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersDotFrame.java b/current/latexDraw/ui/dialog/ParametersDotFrame.java
new file mode 100644
index 0000000..acff337
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersDotFrame.java
@@ -0,0 +1,339 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ItemEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Dot;
+import latexDraw.figures.Figure;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.components.ButtonIcon;
+import latexDraw.ui.components.ColorButton;
+import latexDraw.ui.components.LaTeXDrawComboBox;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines the frame which allows to change the parameters of dots.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersDotFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to change the x-coordinates of the centre of the figure */
+	protected JSpinner centerXField;
+	
+	/** Allows to change the y-coordinates of the centre of the figure */
+	protected JSpinner centerYField;
+	
+	/** Allows to change the y-coordinates of the width of the figure */
+	protected JSpinner widthField;
+	
+	/** The list of the styles of dots */
+	protected LaTeXDrawComboBox dotChoice;
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public ParametersDotFrame(Frame parent, DrawPanel p, boolean attachToMainFrame)
+	{
+		super(parent, p, attachToMainFrame);
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  			  		
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	  		JPanel pParams = new JPanel(new GridBagLayout());
+	  		
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.CENTER;
+	     	pParams.add(new JLabel(LABEL_CENTER_X), constraint);
+	  		
+	     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerXField = new JSpinner(model);
+			centerXField.setEditor(new JSpinner.NumberEditor(centerXField, "0.0"));//$NON-NLS-1$
+			centerXField.addChangeListener(this);
+	     	centerXField.setName(LABEL_CENTER_X);
+	     	constraint.gridx = 1;	constraint.gridwidth = 1;
+	     	pParams.add(centerXField, constraint);
+
+	    	constraint.gridx = 0;	constraint.gridy = 1;
+	     	constraint.gridwidth = 1;
+	     	pParams.add(new JLabel(LABEL_CENTER_Y), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerYField = new JSpinner(model);
+	     	centerYField.setEditor(new JSpinner.NumberEditor(centerYField, "0.0"));//$NON-NLS-1$
+			centerYField.addChangeListener(this);
+	     	centerYField.setName(LABEL_CENTER_Y);
+	     	constraint.gridx = 1;	constraint.gridwidth = 1;
+	     	pParams.add(centerYField, constraint);
+	     	
+	    	constraint.gridx = 0;	constraint.gridy++;
+	     	constraint.gridwidth = 1;
+	     	pParams.add(new JLabel(LABEL_WIDTH), constraint);
+
+	     	model = new SpinnerNumberModel(0.1,0.1,10000,0.1);
+	     	widthField = new JSpinner(model);
+	     	widthField.setEditor(new JSpinner.NumberEditor(widthField, "0.0"));//$NON-NLS-1$
+	     	widthField.addChangeListener(this);
+	     	widthField.setName(LABEL_WIDTH);
+	     	constraint.gridx = 1;	constraint.gridwidth = 1;
+	     	pParams.add(widthField, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	constraint.gridwidth = 1;
+	     	pParams.add(new JLabel(LABEL_ROTATION), constraint);
+	     	
+	     	model = new SpinnerNumberModel(Figure.DEFAULT_ROTATION_ANGLE, -360, 360,0.1);
+	     	rotationField = new JSpinner(model);
+	     	rotationField.setEditor(new JSpinner.NumberEditor(rotationField, "0.0"));//$NON-NLS-1$
+	     	rotationField.addChangeListener(this);
+	     	rotationField.setName(LaTeXDrawResources.LABEL_ROTATE);
+	     	constraint.gridx = 1;	constraint.gridwidth = 1;
+	     	pParams.add(rotationField, constraint);
+	     	
+	     	bordersButton = new ColorButton(LaTeXDrawResources.LABEL_COLOR_BUTTON, new ButtonIcon(Color.BLACK));
+	     	bordersButton.setText(LaTeXDrawResources.LABEL_COLOR_BUTTON);
+	     	bordersButton.setActionCommand(LaTeXDrawResources.LABEL_COLOR_BUTTON);
+	     	bordersButton.addActionListener(this);
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	pParams.add(bordersButton, constraint);
+	     		     	
+	     	constraint.gridx = 1;	constraint.gridwidth = 1;
+	     	pParams.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersDotFrame.0")), constraint); //$NON-NLS-1$
+	     	
+	     	dotChoice = Dot.createDotStyleChoice();
+	     	dotChoice.setName(LaTeXDrawResources.CHOICE_DOT_NAME);
+	     	dotChoice.setSelectedItem(PSTricksConstants.LINE_NONE_STYLE);
+	     	dotChoice.addItemListener(this);
+	     	constraint.gridx = 2;	constraint.gridwidth = 1;
+	     	pParams.add(dotChoice, constraint);
+	     	
+	     	pParams.setBorder(new CompoundBorder(new TitledBorder(null, TITLE_GENERAL, 
+					  			TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	
+	     	pGeneral.add(pParams);
+	     	pGeneral.add(createFillPanel());
+	  		hatchChoice.setVisible(false);
+	  		
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(pGeneral);
+			getContentPane().add(pButton);
+			filledCheckBox.setVisible(false);
+			pack();
+			setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		Dot d = (Dot)figure;
+		
+		float x = Float.valueOf(centerXField.getValue().toString()).floatValue();
+		float y = Float.valueOf(centerYField.getValue().toString()).floatValue();
+
+		JLabel label = (JLabel) dotChoice.getSelectedItem();
+		d.setCurrentStyle(label.getText());
+		d.setWidth(Float.valueOf(widthField.getValue().toString()).floatValue());
+		d.getCenter().x = x;
+		d.getCenter().y = y;
+		d.updateDelimitor();
+		d.updateShape();
+		
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+	
+	
+	
+	
+	@Override
+	public void setFigureFrameField()
+	{
+		Dot d = (Dot)figure;
+		LaTeXDrawPoint2D center = d.getCenter();
+		dotChoice.setSelectedItem(d.getCurrentStyle());
+		centerXField.setValue(center.x);
+		centerYField.setValue(center.y);
+		widthField.setValue((double)d.getWidth());
+		interiorButton.setEnabled(d.canBeFilled());
+		
+		if(d.canBeFilled())
+			interiorButton.setColor(d.getInteriorColor());
+	}
+
+	
+	
+	@Override
+	public void setDefaultsValues()
+	{
+		try
+		{
+			super.setDefaultsValues();
+			dotChoice.setSelectedItem(Dot.DEFAULT_DOT_STYLE);
+			widthField.setValue(Dot.DEFAULT_WIDTH);
+			interiorButton.setEnabled(glimpsePanel.glimpseFigure.canBeFilled());
+			interiorButton.setColor(Figure.DEFAULT_INTERIOR_COL);
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+	
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Dot))
+				throw new ClassCastException();
+
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+	
+	
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			Dot f = (Dot) glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				
+				if(name.equals(LABEL_CENTER_X))
+				{
+					setModified(true);
+					f.getCenter().x = Float.valueOf(centerXField.getValue().toString()).floatValue();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_CENTER_Y))
+				{
+					setModified(true);
+					f.getCenter().y = Float.valueOf(centerYField.getValue().toString()).floatValue();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_WIDTH))
+				{
+					setModified(true);
+					f.setWidth(Float.valueOf(widthField.getValue().toString()).floatValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+	
+	
+	
+	
+	@Override
+	public void itemStateChanged(ItemEvent e) 
+	{	
+		try
+		{
+			Dot f = (Dot) glimpsePanel.getGlimpseFigure();
+			Object o = e.getSource();
+			
+			if(o instanceof LaTeXDrawComboBox)
+			{
+				if(((LaTeXDrawComboBox)o).getName().equals(LaTeXDrawResources.CHOICE_DOT_NAME))
+				{
+					JLabel l = (JLabel) ((LaTeXDrawComboBox)o).getSelectedItem();
+					f.setCurrentStyle(l.getText());
+					interiorButton.setEnabled(f.canBeFilled());
+					
+					if(f.canBeFilled())
+					{
+						interiorButton.setColor(f.getInteriorColor());
+						interiorButton.repaint();
+					}
+					
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		super.itemStateChanged(e);
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersDrawFrame.java b/current/latexDraw/ui/dialog/ParametersDrawFrame.java
new file mode 100644
index 0000000..c995753
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersDrawFrame.java
@@ -0,0 +1,320 @@
+package latexDraw.ui.dialog;
+
+
+import java.awt.*;
+
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Draw;
+import latexDraw.figures.Figure;
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines the frame which allows to change the parameters of the drawing.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersDrawFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to change the x-coordinates of the North-West point */
+	protected JSpinner NWX;
+	
+	/** Allows to change the y-coordinates of the North-West point */
+	protected JSpinner NWY;
+	
+	/** Allows to change the x-coordinates of the North-West point */
+	protected JSpinner SEX;
+	
+	/** Allows to change the y-coordinates of the North-West point */
+	protected JSpinner SEY;
+	
+	/** The label of the item NWX */
+	public static final String LABEL_NWX = LaTeXDrawLang.getDialogFrameString("ParametersDrawFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the item NWY */
+	public static final String LABEL_NWY = LaTeXDrawLang.getDialogFrameString("ParametersDrawFrame.1"); //$NON-NLS-1$
+	
+	/** The label of the item SEX */
+	public static final String LABEL_SEX = LaTeXDrawLang.getDialogFrameString("ParametersDrawFrame.2"); //$NON-NLS-1$
+	
+	/** The label of the item SEY */
+	public static final String LABEL_SEY = LaTeXDrawLang.getDialogFrameString("ParametersDrawFrame.3"); //$NON-NLS-1$
+	
+	
+	
+	
+	public ParametersDrawFrame(Frame parent, DrawPanel d, boolean attachToMainFrame)
+	{
+		super(parent, d, attachToMainFrame);
+		
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		
+	  		setLocation(dim.width*1/3, dim.height*1/5);
+	  		String add = " :";//$NON-NLS-1$
+	  		
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+			
+	  		pGeneral.setLayout(new GridBagLayout());
+	  		
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.CENTER;
+	     	pGeneral.add(new JLabel(LABEL_NWX+add), constraint);
+	  		
+	     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	NWX = new JSpinner(model);
+	     	NWX.setEditor(new JSpinner.NumberEditor(NWX, "0.0"));//$NON-NLS-1$
+			NWX.addChangeListener(this);
+	     	NWX.setName(LABEL_NWX);
+	     	constraint.gridx++;
+	     	pGeneral.add(NWX, constraint);
+	     	
+	     	constraint.gridx++;
+	     	pGeneral.add(new JLabel(LABEL_NWY+add), constraint);
+	     	
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	NWY = new JSpinner(model);
+	     	NWY.setEditor(new JSpinner.NumberEditor(NWY, "0.0"));//$NON-NLS-1$
+	     	NWY.addChangeListener(this);
+	     	NWY.setName(LABEL_NWY);
+	     	constraint.gridx++;
+	     	pGeneral.add(NWY, constraint);
+	     	
+	     	constraint.gridx=0;	constraint.gridy++;
+	     	pGeneral.add(new JLabel(LABEL_SEX+add), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	SEX = new JSpinner(model);
+	     	SEX.setEditor(new JSpinner.NumberEditor(SEX, "0.0"));//$NON-NLS-1$
+	     	SEX.addChangeListener(this);
+	     	SEX.setName(LABEL_SEX);
+	     	constraint.gridx++;
+	     	pGeneral.add(SEX, constraint);
+	     	
+	     	constraint.gridx++;
+	     	pGeneral.add(new JLabel(LABEL_SEY+add), constraint);
+	     	
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	SEY = new JSpinner(model);
+	     	SEY.setEditor(new JSpinner.NumberEditor(SEY, "0.0"));//$NON-NLS-1$
+	     	SEY.addChangeListener(this);
+	     	SEY.setName(LABEL_SEY);
+	     	constraint.gridx++;
+	     	pGeneral.add(SEY, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	pGeneral.add(new JLabel(LABEL_ROTATION), constraint);
+	     	
+	     	model = new SpinnerNumberModel(Figure.DEFAULT_ROTATION_ANGLE, 
+					-360, 360,0.1);
+	     	rotationField = new JSpinner(model);
+	     	rotationField.setEditor(new JSpinner.NumberEditor(rotationField, "0.0"));//$NON-NLS-1$
+	     	rotationField.addChangeListener(this);
+	     	rotationField.setName(LaTeXDrawResources.LABEL_ROTATE);
+	     	constraint.gridx = 1;
+	     	pGeneral.add(rotationField, constraint);
+	     	
+	     	JPanel panel = new JPanel();
+	     	panel.setLayout(new GridLayout(2,1));
+	     	panel.add(glimpsePanelZoom);
+	     	panel.add(pGeneral);
+	     	getContentPane().setLayout(new BorderLayout());
+	     	getContentPane().add(panel, BorderLayout.CENTER);
+			getContentPane().add(pButton, BorderLayout.SOUTH);
+	  		setSize(440, 470);
+			setVisible(false);
+			setResizable(false);
+
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+	
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			Draw f = (Draw)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				LaTeXDrawRectangle borders = f.getBorders();
+				LaTeXDrawPoint2D NW = borders.getTheNWPoint();
+				LaTeXDrawPoint2D SE = borders.getTheSEPoint();
+
+				if(name.equals(LABEL_NWX))
+				{
+					float newVal = Float.valueOf(NWX.getValue().toString());
+					setModified(true);
+					
+					if(newVal!=(float)NW.x)
+					{	
+						f.rescaleX(NW.x, newVal, Math.abs((newVal-SE.x)/(NW.x-SE.x)), borders);
+						glimpsePanel.repaint();
+						((SpinnerNumberModel)SEX.getModel()).setMinimum(NW.x);
+					}
+					return ;
+				}
+				
+				if(name.equals(LABEL_NWY))
+				{
+					float newVal = Float.valueOf(NWY.getValue().toString());
+					setModified(true);
+					
+					if(newVal!=(float)NW.y)
+					{
+						f.rescaleY(NW.y, newVal, Math.abs((newVal-SE.y)/(NW.y-SE.y)), borders);
+						glimpsePanel.repaint();
+						((SpinnerNumberModel)SEY.getModel()).setMinimum(NW.y);
+					}
+
+					return ;
+				}
+				
+				if(name.equals(LABEL_SEX))
+				{
+					float newVal = Float.valueOf(SEX.getValue().toString());
+					setModified(true);
+					
+					if(newVal!=(float)SE.x)
+					{
+						f.rescaleX(SE.x, newVal, Math.abs((newVal-NW.x)/(SE.x-NW.x)), borders);
+						glimpsePanel.repaint();
+						((SpinnerNumberModel)NWX.getModel()).setMaximum(SE.x);
+					}
+
+					return ;
+				}
+				
+				if(name.equals(LABEL_SEY))
+				{
+					float newVal = Float.valueOf(SEY.getValue().toString());
+					setModified(true);
+					
+					if(newVal!=(float)SE.y)
+					{
+						f.rescaleY(SE.y, newVal, Math.abs((newVal-NW.y)/(SE.y-NW.y)), borders);
+						glimpsePanel.repaint();
+						((SpinnerNumberModel)NWY.getModel()).setMinimum(SE.y);
+					}
+
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		if(!(figure instanceof Draw))
+			throw new ClassCastException();
+		
+		LaTeXDrawRectangle borders = figure.getBorders();
+		LaTeXDrawPoint2D NW = borders.getTheNWPoint();
+		LaTeXDrawPoint2D SE = borders.getTheSEPoint();
+		
+		float newVal = Float.valueOf(NWX.getValue().toString()).floatValue();
+		figure.rescaleX(NW.x, newVal, Math.abs((newVal-SE.x)/(NW.x-SE.x)), borders);
+		
+		newVal = Float.valueOf(NWY.getValue().toString()).floatValue();
+		figure.rescaleY(NW.y, newVal, Math.abs((newVal-SE.y)/(NW.y-SE.y)), borders);
+
+		newVal = Float.valueOf(SEX.getValue().toString()).floatValue();
+		figure.rescaleX(SE.x, newVal, Math.abs((newVal-NW.x)/(SE.x-NW.x)), borders);
+
+		newVal = Float.valueOf(SEY.getValue().toString()).floatValue();
+		figure.rescaleY(SE.y, newVal, Math.abs((newVal-NW.y)/(SE.y-NW.y)), borders);
+		
+		((Draw)figure).updateBorders();
+		((Draw)figure).updateGravityCenter();
+
+		super.saveParameters();
+	}
+	
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Draw))
+				throw new ClassCastException();
+			
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+	
+	
+	
+	
+	@Override
+	public void setFigureFrameField()
+	{
+		LaTeXDrawPoint2D NW = figure.getTheNWPoint(), SE = figure.getTheSEPoint();
+		
+		NWX.setValue((float)NW.x);
+		((SpinnerNumberModel)NWX.getModel()).setMaximum(SE.x);
+		SEX.setValue((float)SE.x);
+		((SpinnerNumberModel)SEX.getModel()).setMinimum(NW.x);
+		NWY.setValue((float)NW.y);
+		((SpinnerNumberModel)NWY.getModel()).setMaximum(SE.y);
+		SEY.setValue((float)SE.y);
+		((SpinnerNumberModel)SEY.getModel()).setMinimum(NW.y);
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersEllipseRectangleFrame.java b/current/latexDraw/ui/dialog/ParametersEllipseRectangleFrame.java
new file mode 100644
index 0000000..d851f33
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersEllipseRectangleFrame.java
@@ -0,0 +1,436 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Ellipse;
+import latexDraw.figures.Figure;
+import latexDraw.figures.LaTeXDrawRectangle;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines the frame which allows to change the parameters of ellipses and rectangles.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersEllipseRectangleFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to change the x-coordinates of the centre of the figure */
+	protected JSpinner centerXField;
+	
+	/** Allows to change the y-coordinates of the centre of the figure */
+	protected JSpinner centerYField;
+	
+	/** Allows to change the radius of the width of the ellipse */
+	protected JSpinner widthRadiusField;
+	
+	/** Allows to change the radius of the height of the ellipse */
+	protected JSpinner heightRadiusField;
+	
+	/** Allows to set if the rectangle will be round (only for rectangle */
+	protected JCheckBox isRound;
+	
+	/** Allows to change the angle of the round corner. */
+	protected JSpinner frameArcField;
+	
+	/** The panel containing to set the roundness of the figure. */
+	protected JPanel roundPanel;
+	
+	
+	/**
+	 * The constructor by default
+	 * @param p The drawPanel
+	 */
+	public ParametersEllipseRectangleFrame(Frame parent, DrawPanel p, boolean attachToMainFrame)
+	{
+		super(parent, p, attachToMainFrame);
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	  		
+	  		JPanel coordP = new JPanel(new GridBagLayout());
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;  		constraint.gridy = 0;
+	     	constraint.gridwidth = 1; 	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1; 	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.CENTER;
+	     	coordP.add(new JLabel(LABEL_CENTER_X), constraint);
+	  		
+	     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerXField = new JSpinner(model);
+			centerXField.setEditor(new JSpinner.NumberEditor(centerXField, "0.0"));//$NON-NLS-1$
+			centerXField.addChangeListener(this);
+	     	centerXField.setName(LABEL_CENTER_X);
+	     	constraint.gridx = 1;
+	     	coordP.add(centerXField, constraint);
+
+	    	constraint.gridx++;
+	     	coordP.add(new JLabel(LABEL_CENTER_Y), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerYField = new JSpinner(model);
+	     	centerYField.setEditor(new JSpinner.NumberEditor(centerYField, "0.0"));//$NON-NLS-1$
+			centerYField.addChangeListener(this);
+	     	centerYField.setName(LABEL_CENTER_Y);
+	     	constraint.gridx++;
+	     	coordP.add(centerYField, constraint);
+	     	
+	    	constraint.gridx = 0;	constraint.gridy++;
+	    	coordP.add(new JLabel(LABEL_WIDTH), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0.1,0.1,10000,0.1);
+	     	widthRadiusField = new JSpinner(model);
+	     	widthRadiusField.setEditor(new JSpinner.NumberEditor(widthRadiusField, "0.0"));//$NON-NLS-1$
+	     	widthRadiusField.addChangeListener(this);
+	     	widthRadiusField.setName(LABEL_WIDTH);
+	     	constraint.gridx++;
+	     	coordP.add(widthRadiusField, constraint);
+	   
+	     	constraint.gridx++;
+	     	coordP.add(new JLabel(LABEL_HEIGHT), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0.1,0.1,10000,0.1);
+	     	heightRadiusField = new JSpinner(model);
+	     	heightRadiusField.setEditor(new JSpinner.NumberEditor(heightRadiusField, "0.0"));//$NON-NLS-1$
+	     	heightRadiusField.addChangeListener(this);
+	     	heightRadiusField.setName(LABEL_HEIGHT);
+	     	constraint.gridx++;
+	     	coordP.add(heightRadiusField, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	coordP.add(new JLabel(LABEL_ROTATION), constraint);
+	     	constraint.gridx++;
+	     	coordP.add(rotationField, constraint);
+	     	
+	     	coordP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_POSITION_DIMENSIONS, 
+							  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	pGeneral.add(coordP);
+
+	     	pGeneral.add(createBordersPanel(true));
+	     	pGeneral.add(createDoubleLinePanel());
+	     	pGeneral.add(createFillPanel());
+	     	
+	     	JPanel pOther = new JPanel();
+	     	pOther.setLayout(new BoxLayout(pOther, BoxLayout.Y_AXIS));
+	     	pOther.add(createHatchingPanel());
+	     	pOther.add(createShadowPanel());
+	     	pOther.add(createGradientPanel());
+	     	
+	     	roundPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+	     	
+	     	isRound = new JCheckBox(LABEL_ISROUND);
+	     	isRound.addActionListener(this);
+	     	isRound.setActionCommand(LABEL_ISROUND);
+	     	roundPanel.add(isRound);
+	     	
+	    	roundPanel.add(new JLabel(LABEL_ROUND_CORNER));
+	    	
+	     	model = new SpinnerNumberModel(LaTeXDrawRectangle.DEFAULT_FRAME_ARC, 0.01, 1,0.05);
+			frameArcField = new JSpinner(model);
+			frameArcField.setName(LABEL_ROUND_CORNER);
+			frameArcField.setEditor(new JSpinner.NumberEditor(frameArcField, "0.00"));//$NON-NLS-1$
+			frameArcField.addChangeListener(this);
+			frameArcField.setEnabled(false);
+	     	roundPanel.add(frameArcField);
+
+	     	roundPanel.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("AbstractParametersFrame.6"),  //$NON-NLS-1$
+					  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	pOther.add(roundPanel);
+	     	
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_OTHERS, pOther);
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	@Override
+	public void actionPerformed(ActionEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Figure f = glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JCheckBox)
+			{
+				String label = ((JCheckBox)o).getActionCommand();
+
+				if(label.equals(LABEL_ISROUND))
+				{
+					setModified(true);
+					((LaTeXDrawRectangle)f).setIsRound(isRound.isSelected());
+					frameArcField.setEnabled(isRound.isSelected());
+					glimpsePanel.repaint();
+					return ;
+				}
+			}			
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.actionPerformed(e);
+	}
+
+	
+	
+	@Override
+	public void setFigureFrameField()
+	{
+		LaTeXDrawPoint2D NW = figure.getTheNWPoint(), SE = figure.getTheSEPoint();
+		
+		centerXField.setValue((NW.x+SE.x)/2.);
+		centerYField.setValue((NW.y+SE.y)/2.);
+		widthRadiusField.setValue((SE.x-NW.x)/2.);
+		heightRadiusField.setValue((SE.y-NW.y)/2.);
+		
+		if(figure instanceof LaTeXDrawRectangle)
+		{
+			 isRound.setSelected(((LaTeXDrawRectangle)figure).isRound());
+			 frameArcField.setEnabled(isRound.isSelected());
+			 frameArcField.setValue(((LaTeXDrawRectangle)figure).getFrameArc());
+			 roundPanel.setVisible(true);
+		}
+		else roundPanel.setVisible(false);
+	}
+
+	
+	
+	
+	@Override
+	public void setDefaultsValues()
+	{
+		super.setDefaultsValues();
+		if(figure instanceof LaTeXDrawRectangle)
+		{
+			 isRound.setSelected(LaTeXDrawRectangle.DEFAULT_ISROUND);
+			 frameArcField.setValue(LaTeXDrawRectangle.DEFAULT_FRAME_ARC);
+			 ((LaTeXDrawRectangle)glimpsePanel.getGlimpseFigure()).setIsRound(LaTeXDrawRectangle.DEFAULT_ISROUND);
+		}
+	}
+	
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			Figure f = glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();	
+				
+				if(name.equals(LABEL_ROUND_CORNER))
+				{
+					if(f instanceof LaTeXDrawRectangle)
+					{
+						((LaTeXDrawRectangle)f).setFrameArc(Double.valueOf(frameArcField.getValue().toString()).doubleValue());
+						setModified(true);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				LaTeXDrawPoint2D p1,p2,p3,p4;
+				float widthRadius = Float.valueOf(widthRadiusField.getValue().toString()).floatValue();
+				float heightRadius = Float.valueOf(heightRadiusField.getValue().toString()).floatValue();
+				float x = Float.valueOf(centerXField.getValue().toString()).floatValue();
+				float y = Float.valueOf(centerYField.getValue().toString()).floatValue();
+				
+				if(figure instanceof Ellipse)
+				{
+					Ellipse el = (Ellipse)f;
+					p1 = el.getBordersPoint(0); p2 = el.getBordersPoint(1); 
+					p3 = el.getBordersPoint(2); p4 = el.getBordersPoint(3);
+				}
+				else
+				{
+					LaTeXDrawRectangle r = (LaTeXDrawRectangle)f;
+					p1 = r.getPoint(0); p2 = r.getPoint(1); 
+					p3 = r.getPoint(2); p4 = r.getPoint(3);
+				}
+				
+				if(name.equals(LABEL_CENTER_X))
+				{
+					p1.x = x - widthRadius;
+					p2.x = x + widthRadius;
+					p3.x = x - widthRadius;
+					p4.x = x + widthRadius;
+					f.updateShape();
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_CENTER_Y))
+				{
+					p1.y = y - heightRadius;
+					p2.y = y - heightRadius;
+					p3.y = y + heightRadius;
+					p4.y = y + heightRadius;
+					f.updateShape();
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_HEIGHT))
+				{
+					p1.y = y - heightRadius;
+					p2.y = y - heightRadius;
+					p3.y = y + heightRadius;
+					p4.y = y + heightRadius;
+					f.updateShape();
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_WIDTH))
+				{
+					p1.x = x - widthRadius;
+					p2.x = x + widthRadius;
+					p3.x = x - widthRadius;
+					p4.x = x + widthRadius;
+					f.updateShape();
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		LaTeXDrawPoint2D p1,p2,p3,p4;
+		
+		if(figure instanceof Ellipse)
+		{
+			Ellipse e = (Ellipse)figure;
+			p1 = e.getBordersPoint(0); p2 = e.getBordersPoint(1); 
+			p3 = e.getBordersPoint(2); p4 = e.getBordersPoint(3);
+		}
+		else
+		{
+			LaTeXDrawRectangle r = (LaTeXDrawRectangle)figure;
+			p1 = r.getPoint(0); p2 = r.getPoint(1); 
+			p3 = r.getPoint(2); p4 = r.getPoint(3);
+			((LaTeXDrawRectangle)figure).setIsRound(isRound.isSelected());
+			((LaTeXDrawRectangle)figure).setFrameArc(
+					Double.valueOf(frameArcField.getValue().toString()).doubleValue());
+		}
+		
+		float widthRadius = Float.valueOf(widthRadiusField.getValue().toString()).floatValue();
+		float heightRadius = Float.valueOf(heightRadiusField.getValue().toString()).floatValue();
+		float x = Float.valueOf(centerXField.getValue().toString()).floatValue();
+		float y = Float.valueOf(centerYField.getValue().toString()).floatValue();
+		
+		p1.x = x - widthRadius;
+		p2.x = x + widthRadius;
+		p3.x = x - widthRadius;
+		p4.x = x + widthRadius;
+
+		p1.y = y - heightRadius;
+		p2.y = y - heightRadius;
+		p3.y = y + heightRadius;
+		p4.y = y + heightRadius;
+
+		if(figure instanceof Ellipse)
+			((Ellipse)figure).getBorders().updateNSEWDelimitors();
+		else ((LaTeXDrawRectangle)figure).updateNSEWDelimitors();
+		
+		figure.updateShape();
+		
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+	
+	
+
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Ellipse || selected instanceof LaTeXDrawRectangle))
+				throw new IllegalArgumentException();
+			
+			if(isFramedBox)
+			{
+				centerXField.setEnabled(false);
+				centerYField.setEnabled(false);
+				widthRadiusField.setEnabled(false);
+				heightRadiusField.setEnabled(false);
+			}
+			
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+			
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersGridFrame.java b/current/latexDraw/ui/dialog/ParametersGridFrame.java
new file mode 100644
index 0000000..0edee2c
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersGridFrame.java
@@ -0,0 +1,542 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.Grid;
+import latexDraw.figures.GridShape;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.components.ButtonIcon;
+import latexDraw.ui.components.ColorButton;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines the frame which allows to modify a grid<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersGridFrame extends AbstractGridShapeFrame
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** Allows to change the colour of the sub-grid */
+	protected ColorButton subGridColorButton;
+	
+	/** Allows to change the size of the label */
+	protected JSpinner labelSize;
+	
+	/** Allows to change the attribute Grid.subGridDiv */
+	protected JSpinner subGridDiv;
+	
+	/** Allows to change the attribute Grid.subGridWidth */
+	protected JSpinner subGridWidth;
+	
+	/** Allows to change the attribute Grid.gridWidth */
+	protected JSpinner gridWidth;
+	
+	/** Allows to change the colour of the labels */
+	protected ColorButton labelsColorButton;	
+	
+	/** Allows to change the attribute Grid.gridDots */
+	protected JSpinner gridDots;
+	
+	/** Allows to change the attribute Grid.subGridDots */
+	protected JSpinner subGridDots;
+	
+	/** Allows to know if we must draw the labels */
+	protected JCheckBox drawLabel;
+
+	/** Allows to change the attribute Grid.unit */
+	protected JSpinner unit;
+	
+	
+	/** The label of the unit item */
+	public static final String LABEL_UNIT = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.3"); //$NON-NLS-1$
+	
+	/** The label of the drawLabel checkbox */
+	public static final String LABEL_DRAWLABELS = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.15"); //$NON-NLS-1$
+
+	/** The label of the subGridDots item */
+	public static final String LABEL_SUBGRIDDOTS = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.4"); //$NON-NLS-1$
+	
+	/** The label of the gridDots item */
+	public static final String LABEL_GRIDDOTS = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.5"); //$NON-NLS-1$
+	
+	/** The label of the gridWidth item */
+	public static final String LABEL_GRIDWIDTH = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.6"); //$NON-NLS-1$
+	
+	/** The label of the subGridWidth item */
+	public static final String LABEL_SUBGRIDWIDTH = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.7"); //$NON-NLS-1$
+	
+	/** The label of the subGridDiv item */
+	public static final String LABEL_SUBGRIDDIV = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.8"); //$NON-NLS-1$
+	
+	/** The label of the X position item */
+	public static final String LABEL_LABEL_SIZE = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.9"); //$NON-NLS-1$
+	
+	/** The label of the subGridcolorutton item */
+	public static final String LABEL_SUBGRIDCOLOR = LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.10"); //$NON-NLS-1$
+	
+
+	
+	/**
+	 * The constructor by default
+	 * @param d The drawPanel
+	 */
+	public ParametersGridFrame(Frame parent, DrawPanel d, boolean attachToMainFrame)
+	{
+		super(parent, d, attachToMainFrame);
+		
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.WEST;
+
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	     	pGeneral.add(createPositionPanel(true));
+	     	
+	     	JPanel pOther = new JPanel();
+	     	pOther.setLayout(new BoxLayout(pOther, BoxLayout.Y_AXIS));
+	     	JPanel other = new JPanel(new GridBagLayout());
+	     	JPanel pLabels = new JPanel(new GridBagLayout());
+	     	
+	     	constraint.gridx=0;
+	     	constraint.gridy=0;
+	     	other.add(new JLabel(LABEL_GRIDWIDTH), constraint);
+	     	
+	     	SpinnerModel model = new SpinnerNumberModel(1, 0.1, 1000, 0.5);
+	     	gridWidth = new JSpinner(model);
+	     	gridWidth.setEditor(new JSpinner.NumberEditor(gridWidth, "0.00"));//$NON-NLS-1$
+	     	gridWidth.addChangeListener(this);
+	     	gridWidth.setName(LABEL_GRIDWIDTH);
+	     	constraint.gridx++;
+	     	other.add(gridWidth, constraint);	  
+	     	
+	     	bordersButton = new ColorButton(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.grid"),new ButtonIcon(Figure.DEFAULT_BORDERS_COL)); //$NON-NLS-1$
+	     	bordersButton.setActionCommand(LaTeXDrawResources.LABEL_COLOR_BUTTON);
+	     	bordersButton.addActionListener(this);
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	other.add(bordersButton, constraint);
+	     	
+	     	subGridColorButton = new ColorButton(LABEL_SUBGRIDCOLOR, new ButtonIcon(PSTricksConstants.DEFAULT_SUB_GRID_COLOR));
+	     	subGridColorButton.setActionCommand(LABEL_SUBGRIDCOLOR);
+	     	subGridColorButton.addActionListener(this);
+	     	constraint.gridx++;
+	     	other.add(subGridColorButton, constraint);
+	     	
+	     	constraint.gridy++;	constraint.gridx = 0;
+	     	other.add(new JLabel(LABEL_GRIDDOTS), constraint);
+	     	
+	     	model = new SpinnerNumberModel(0,0,10000,1);
+	     	gridDots = new JSpinner(model);
+	     	gridDots.setEditor(new JSpinner.NumberEditor(gridDots, "0"));//$NON-NLS-1$
+	     	gridDots.addChangeListener(this);
+	     	gridDots.setName(LABEL_GRIDDOTS);
+	     	constraint.gridx++;
+	     	other.add(gridDots, constraint);	  	    
+
+	     	constraint.gridx++;
+	     	other.add(new JLabel(LABEL_UNIT), constraint);
+	     	
+	     	model = new SpinnerNumberModel(1,0.0001,100,0.1);
+	     	unit = new JSpinner(model);
+	     	unit.setEditor(new JSpinner.NumberEditor(unit, "0.000"));//$NON-NLS-1$
+	     	unit.addChangeListener(this);
+	     	unit.setName(LABEL_UNIT);
+	     	constraint.gridx++;
+	     	other.add(unit, constraint);	  	
+	     	
+	     	constraint.gridy++; constraint.gridx = 0;
+	     	other.add(new JLabel(LABEL_SUBGRIDDIV), constraint);
+	     	
+	     	model = new SpinnerNumberModel(1,1,100,1);
+	     	subGridDiv = new JSpinner(model);
+	     	subGridDiv.setEditor(new JSpinner.NumberEditor(subGridDiv, "0"));//$NON-NLS-1$
+	     	subGridDiv.addChangeListener(this);
+	     	subGridDiv.setName(LABEL_SUBGRIDDIV);
+	     	constraint.gridx++;
+	     	other.add(subGridDiv, constraint);	  
+	     	
+	     	constraint.gridx++;
+	     	other.add(new JLabel(LABEL_SUBGRIDWIDTH), constraint);
+	     	
+	     	model = new SpinnerNumberModel(1, 0.1, 100, 0.5);
+	     	subGridWidth = new JSpinner(model);
+	     	subGridWidth.setEditor(new JSpinner.NumberEditor(subGridWidth, "0.00"));//$NON-NLS-1$
+	     	subGridWidth.addChangeListener(this);
+	     	subGridWidth.setName(LABEL_SUBGRIDWIDTH);
+	     	constraint.gridx++;
+	     	other.add(subGridWidth, constraint);	  	     	
+	     	
+	     	constraint.gridx=0; constraint.gridy++;
+	     	other.add(new JLabel(LABEL_SUBGRIDDOTS), constraint);
+	     	
+	     	model = new SpinnerNumberModel(0, 0, 10000, 1);
+	     	subGridDots = new JSpinner(model);
+	     	subGridDots.setEditor(new JSpinner.NumberEditor(subGridDots, "0"));//$NON-NLS-1$
+	     	subGridDots.addChangeListener(this);
+	     	subGridDots.setName(LABEL_SUBGRIDDOTS);
+	     	constraint.gridx++;
+	     	other.add(subGridDots, constraint);	
+	     	
+	     	constraint.gridx=0;
+	     	constraint.gridy=0;
+	     	pLabels.add(new JLabel(LABEL_LABEL_SIZE), constraint);
+	     	
+	     	model = new SpinnerNumberModel(Grid.MIN_LABELS_SIZE, Grid.MIN_LABELS_SIZE, 100, 1);
+	     	labelSize = new JSpinner(model);
+	     	labelSize.setEditor(new JSpinner.NumberEditor(labelSize, "0"));//$NON-NLS-1$
+	     	labelSize.addChangeListener(this);
+	     	labelSize.setName(LABEL_LABEL_SIZE);
+	     	constraint.gridx++;
+	     	pLabels.add(labelSize, constraint);	 
+	     	
+	     	labelsColorButton = new ColorButton(LABEL_LABELSCOLOR, new ButtonIcon(PSTricksConstants.DEFAULT_LABELGRIDCOLOR));
+	     	labelsColorButton.setActionCommand(LABEL_LABELSCOLOR);
+	     	labelsColorButton.addActionListener(this);
+	     	constraint.gridx++;
+	     	pLabels.add(labelsColorButton, constraint);
+	     	
+	     	drawLabel = new JCheckBox(LABEL_DRAWLABELS, Grid.DEFAULT_LABELSSIZE>0);
+	     	drawLabel.setActionCommand(LABEL_DRAWLABELS);
+	     	drawLabel.setName(LABEL_DRAWLABELS);
+	     	drawLabel.addActionListener(this);
+	     	constraint.gridwidth = 1;
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	pLabels.add(drawLabel, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	invertXLabelsCB = new JCheckBox(LABEL_ISXLABEL);
+	     	invertXLabelsCB.setText(LABEL_ISXLABEL);
+	     	invertXLabelsCB.setSelected(GridShape.DEFAULT_ISYLABELWEST);
+	     	invertXLabelsCB.setActionCommand(LABEL_ISXLABEL);
+	     	invertXLabelsCB.addActionListener(this);
+	     	pLabels.add(invertXLabelsCB, constraint);
+	     	
+	     	constraint.gridx+=2;
+	     	invertYLabelsCB = new JCheckBox(LABEL_ISYLABEL);
+	     	invertYLabelsCB.setText(LABEL_ISYLABEL);
+	     	invertYLabelsCB.setSelected(GridShape.DEFAULT_ISXLABELSOUTH);
+	     	invertYLabelsCB.addActionListener(this);
+	     	invertYLabelsCB.setActionCommand(LABEL_ISYLABEL);
+	     	pLabels.add(invertYLabelsCB, constraint);
+	     	other.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("ParametersGridFrame.0"),  //$NON-NLS-1$
+					  					TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	pLabels.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_8("ParametersAxeFrame.12"),   //$NON-NLS-1$
+	     								TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	pOther.add(other);
+	     	pOther.add(pLabels);
+			
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_OTHERS, pOther);
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Grid))
+				throw new ClassCastException();
+
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+	
+	
+	
+	
+	@Override
+	public void actionPerformed(ActionEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Grid g = (Grid)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JCheckBox)
+			{
+				String label = ((JCheckBox)o).getActionCommand();
+				
+				if(label.equals(LABEL_DRAWLABELS))
+				{
+					boolean mustBeDrawn = drawLabel.isSelected();
+					
+					labelsColorButton.setEnabled(mustBeDrawn);
+					labelSize.setEnabled(mustBeDrawn);
+					
+					if(!mustBeDrawn)
+						g.setGridLabelsSize(0);
+					else  
+						g.setGridLabelsSize(Integer.valueOf(labelSize.getValue().toString()).intValue());
+						
+					setModified(true);
+					glimpsePanel.repaint();
+					return;
+				}
+			}
+			
+			if(o instanceof JButton)
+			{
+				String label = ((JButton)o).getActionCommand();
+				
+				if(label==null)
+					return ;
+				
+				if(label.equals(LABEL_LABELSCOLOR))
+				{
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.17"),  //$NON-NLS-1$
+							((ColorButton)o).getColor());
+						
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						g.setGridLabelsColor(c);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				if(label.equals(LABEL_SUBGRIDCOLOR))
+				{
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("ParametersGridFrame.18"),  //$NON-NLS-1$
+							((ColorButton)o).getColor());
+						
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						g.setSubGridColor(c);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}	
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.actionPerformed(e);
+	}
+	
+	
+	
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Grid g = (Grid)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				
+				if(name.equals(LABEL_GRIDDOTS))
+				{
+					setModified(true);
+					g.setGridDots(Integer.valueOf(gridDots.getValue().toString()).intValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_UNIT))
+				{
+					setModified(true);
+					g.setUnit(Float.valueOf(unit.getValue().toString()).doubleValue());
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_SUBGRIDDOTS))
+				{
+					setModified(true);
+					g.setSubGridDots(Integer.valueOf(subGridDots.getValue().toString()).intValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_SUBGRIDDIV))
+				{
+					setModified(true);
+					g.setSubGridDiv(Integer.valueOf(subGridDiv.getValue().toString()).intValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_LABEL_SIZE))
+				{
+					setModified(true);
+					g.setGridLabelsSize(Integer.valueOf(labelSize.getValue().toString()).intValue());
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+
+				if(name.equals(LABEL_GRIDWIDTH))
+				{
+					setModified(true);
+					g.setGridWidth(Float.valueOf(gridWidth.getValue().toString()).floatValue());
+					g.updateBorders(null);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_SUBGRIDWIDTH))
+				{
+					setModified(true);
+					g.setSubGridWidth(Float.valueOf(subGridWidth.getValue().toString()).floatValue());
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+	
+	
+
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		Grid g = (Grid)figure;
+
+		g.setUnit(Float.valueOf(unit.getValue().toString()).doubleValue());
+		g.setGridDots(Integer.valueOf(gridDots.getValue().toString()).intValue());
+		g.setSubGridDots(Integer.valueOf(subGridDots.getValue().toString()).intValue());
+		g.setSubGridDiv(Integer.valueOf(subGridDiv.getValue().toString()).intValue());
+		g.setGridLabelsColor(labelsColorButton.getColor());
+		if(drawLabel.isSelected())
+			g.setGridLabelsSize(Integer.valueOf(labelSize.getValue().toString()).intValue());
+		else g.setGridLabelsSize(0);
+		g.setGridWidth(Float.valueOf(gridWidth.getValue().toString()).floatValue());
+		g.setSubGridWidth(Float.valueOf(subGridWidth.getValue().toString()).floatValue());
+		g.setSubGridColor(subGridColorButton.getColor());
+		g.updateFonts();
+		g.updateBorders(g.getFontMetrics());
+
+		drawPanel.getFrameParent().setExportAsMenu(true);
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+	
+
+	
+	@Override
+	public void setFigureFrameField()
+	{
+		super.setFigureFrameField();
+		
+		Grid g = (Grid)figure;
+		
+		subGridColorButton.setColor(g.getSubGridColor());
+		labelsColorButton.setColor(g.getGridLabelsColor());
+		subGridDiv.setValue(g.getSubGridDiv());
+		subGridDots.setValue(g.getSubGridDots());
+		subGridWidth.setValue((double)g.getSubGridWidth());
+		gridWidth.setValue((double)g.getGridWidth());
+		gridDots.setValue(g.getGridDots());
+		unit.setValue(g.getUnit());
+		if(g.getGridLabelsSize()>0)
+			labelSize.setValue(g.getGridLabelsSize());
+	}
+
+
+
+	@Override
+	public void setDefaultsValues()
+	{
+		super.setDefaultsValues();
+		
+		Grid g = (Grid)glimpsePanel.glimpseFigure;
+		unit.setValue(PSTricksConstants.DEFAULT_UNIT);
+		subGridColorButton.setColor(PSTricksConstants.DEFAULT_SUB_GRID_COLOR);
+		labelsColorButton.setColor(PSTricksConstants.DEFAULT_LABELGRIDCOLOR);
+		g.setSubGridColor(PSTricksConstants.DEFAULT_SUB_GRID_COLOR);
+		g.setGridLabelsColor(PSTricksConstants.DEFAULT_LABELGRIDCOLOR);
+		subGridDiv.setValue(PSTricksConstants.DEFAULT_SUBGRIDDIV);
+		subGridDots.setValue(PSTricksConstants.DEFAULT_SUBGRIDDOTS);
+		subGridWidth.setValue(PSTricksConstants.DEFAULT_SUB_GRID_WIDTH);
+		gridWidth.setValue(PSTricksConstants.DEFAULT_GRID_WIDTH);
+		gridDots.setValue(PSTricksConstants.DEFAULT_GRIDDOTS);
+		labelSize.setValue(Grid.DEFAULT_LABELSSIZE);
+		drawLabel.setSelected(true);
+		g.setGridLabelsSize(Grid.DEFAULT_LABELSSIZE);
+		labelSize.setEnabled(drawLabel.isSelected());
+		
+		glimpsePanel.repaint();
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersLineFrame.java b/current/latexDraw/ui/dialog/ParametersLineFrame.java
new file mode 100644
index 0000000..0570acf
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersLineFrame.java
@@ -0,0 +1,269 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.Line;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+/** 
+ * This class defines the frame which allows to change the parameters of lines.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersLineFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+	
+	/** The left X-coordinates field */
+	protected JSpinner leftXField;
+	
+	/** The left Y-coordinates field */
+	protected JSpinner leftYField;
+	
+	/** The right X-coordinates field */
+	protected JSpinner rightXField;
+	
+	/** The right Y-coordinates field */
+	protected JSpinner rightYField;
+	
+	/** The label of the left X-coordinate choice */
+	public static final String LABEL_LEFTX = "X left";//$NON-NLS-1$
+	
+	/** The label of the left Y-coordinate choice */
+	public static final String LABEL_LEFTY = "Y left";//$NON-NLS-1$
+	
+	/** The label of the right X-coordinate choice */
+	public static final String LABEL_RIGHTX = "X right";//$NON-NLS-1$
+	
+	/** The label of the right Y-coordinate choice */
+	public static final String LABEL_RIGHTY = "Y right";//$NON-NLS-1$
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public ParametersLineFrame(Frame parent, DrawPanel p, boolean attachToMainFrame)
+	{
+		super(parent, p, attachToMainFrame);
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel pGeneral = new JPanel();
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	  		JPanel coordP = new JPanel(new GridBagLayout());
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.CENTER;
+	     	coordP.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersLineFrame.0")) //$NON-NLS-1$
+	     					, constraint);
+	  		
+	     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	leftXField = new JSpinner(model);
+	     	leftXField.setEditor(new JSpinner.NumberEditor(leftXField, "0.0"));//$NON-NLS-1$
+	     	leftXField.addChangeListener(this);
+	     	leftXField.setName(LABEL_LEFTX);
+	     	constraint.gridx = 1;
+	     	coordP.add(leftXField, constraint);
+	  		
+	    	constraint.gridx++;
+	    	coordP.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersLineFrame.1")), constraint); //$NON-NLS-1$
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	leftYField = new JSpinner(model);
+	     	leftYField.setEditor(new JSpinner.NumberEditor(leftYField, "0.0"));//$NON-NLS-1$
+	     	leftYField.addChangeListener(this);
+	     	leftYField.setName(LABEL_LEFTY);
+	     	constraint.gridx++;
+	     	coordP.add(leftYField, constraint);
+	     	
+	    	constraint.gridx = 0;	constraint.gridy++;
+	    	coordP.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersLineFrame.2")), constraint); //$NON-NLS-1$
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	rightXField = new JSpinner(model);
+	     	rightXField.setEditor(new JSpinner.NumberEditor(rightXField, "0.0"));//$NON-NLS-1$
+	     	rightXField.addChangeListener(this);
+	     	rightXField.setName(LABEL_RIGHTX);
+	     	constraint.gridx++;	
+	     	coordP.add(rightXField, constraint);
+	     	
+	    	constraint.gridx++;
+	    	coordP.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersLineFrame.3")), constraint); //$NON-NLS-1$
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	rightYField = new JSpinner(model);
+	     	rightYField.setEditor(new JSpinner.NumberEditor(rightYField, "0.0"));//$NON-NLS-1$
+	     	rightYField.addChangeListener(this);
+	     	rightYField.setName(LABEL_RIGHTY);
+	     	constraint.gridx++;
+	     	coordP.add(rightYField, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	coordP.add(new JLabel(LABEL_ROTATION), constraint);
+	     	constraint.gridx++;
+	     	coordP.add(rotationField, constraint);
+	     	
+	     	coordP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_POSITION_DIMENSIONS, 
+							  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	
+	     	pGeneral.add(coordP);
+	     	pGeneral.add(createBordersPanel(false));
+	     	pGeneral.add(createDoubleLinePanel());
+	     	pGeneral.add(createShadowPanel());
+	     	tabbedPane.add(LABEL_GENERAL, pGeneral);
+	     	
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(NAME_TABBEDPANE_ARROW, createArrowPanel(false, true));
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	@Override
+	public void setFigureFrameField()
+	{
+		Line l = (Line)figure;
+		LaTeXDrawPoint2D pt1 = l.getPt1(), pt2 = l.getPt2();
+		
+		leftYField.setValue(pt1.y);
+		rightYField.setValue(pt2.y);
+		leftXField.setValue(pt1.x);
+		rightXField.setValue(pt2.x);
+	}
+
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Line l = (Line) glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				LaTeXDrawPoint2D p1 = l.getPt1(), p2 = l.getPt2();
+				
+				if(name.equals(LABEL_LEFTX))
+				{
+					setModified(true);
+					p1.x = Double.valueOf(leftXField.getValue().toString()).doubleValue();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_LEFTY))
+				{
+					setModified(true);
+					p1.y = Double.valueOf(leftYField.getValue().toString()).doubleValue(); 
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_RIGHTX))
+				{
+					setModified(true);
+					p2.x = Double.valueOf(rightXField.getValue().toString()).doubleValue();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_RIGHTY))
+				{
+					setModified(true);
+					p2.y = Double.valueOf(rightYField.getValue().toString()).doubleValue();
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		Line l = (Line)figure;
+		LaTeXDrawPoint2D p1 = l.getPt1(), p2 = l.getPt2();
+
+		p1.x = Double.valueOf(leftXField.getValue().toString()).doubleValue();
+		p2.x = Double.valueOf(rightXField.getValue().toString()).doubleValue();
+		p1.y = Double.valueOf(leftYField.getValue().toString()).doubleValue();
+		p2.y = Double.valueOf(rightYField.getValue().toString()).doubleValue();
+
+		super.saveParameters();
+	}
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Line))
+				throw new ClassCastException();
+			
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersPolygonJoinedLinesFrame.java b/current/latexDraw/ui/dialog/ParametersPolygonJoinedLinesFrame.java
new file mode 100644
index 0000000..994b52a
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersPolygonJoinedLinesFrame.java
@@ -0,0 +1,326 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ItemEvent;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.LaTeXDrawPolygon;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines the frame which allows to change the parameters of polygons.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersPolygonJoinedLinesFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to select the point to change */
+	protected JComboBox pointChoice;
+	
+	/** The X-coordinates of the polygon */
+	protected double xs[];
+	
+	/** The Y-coordinates of the polygon */
+	protected double ys[];
+	
+	/** The number of points of the polygon */
+	protected int nbPoints;
+	
+	/** Allows to set the X-coordinate of a point */
+	protected JSpinner xCoord;
+	
+	/** Allows to set the Y-coordinate of a point */
+	protected JSpinner yCoord;
+	
+	public static final String LABEL_CHOICE_PTS = "ptChoice"; //$NON-NLS-1$
+	
+	
+	
+	/**
+	 * The constructor by default
+	 */
+	public ParametersPolygonJoinedLinesFrame(Frame parent, DrawPanel p, boolean withoutArrow, boolean attachToMainFrame)
+	{
+		super(parent, p, attachToMainFrame);
+		
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	  		
+	     	pGeneral.add(createPositionPanel());
+	     	pGeneral.add(createBordersPanel(false));
+	     	pGeneral.add(createFillPanel());
+	     	pGeneral.add(createHatchingPanel());
+	     	
+	     	JPanel pOther = new JPanel();
+	     	pOther.setLayout(new BoxLayout(pOther, BoxLayout.Y_AXIS));
+	     	pOther.add(createShadowPanel());
+	     	pOther.add(createGradientPanel());
+	     	pOther.add(createDoubleLinePanel());
+	     	
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	
+	     	if(!withoutArrow)
+	     	{
+		     	tabbedPane.addTab(NAME_TABBEDPANE_ARROW, createArrowPanel(true, false));
+		     	updateEnableParamsArrow();
+	     	}
+			
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_OTHERS, pOther);
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	/**
+	 * @return A panel allowing to change the coordinates of the points of the polygon.
+	 * @since 1.9
+	 */
+	protected JPanel createPositionPanel()
+	{
+		JPanel coordP = new JPanel(new GridBagLayout());
+  		GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;
+     	constraint.gridy = 0;
+     	constraint.gridwidth = 1;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.CENTER;
+     	coordP.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersPolygonFrame.1")) //$NON-NLS-1$
+     					, constraint);
+  		
+     	pointChoice = new JComboBox();
+     	pointChoice.addItemListener(this);
+     	pointChoice.setName(LABEL_CHOICE_PTS);
+     	constraint.gridx++;	
+     	coordP.add(pointChoice, constraint);
+  		
+    	constraint.gridx=0; constraint.gridy++;
+     	coordP.add(new JLabel(LABEL_X), constraint);
+  		
+     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+     	xCoord = new JSpinner(model);
+     	xCoord.setEditor(new JSpinner.NumberEditor(xCoord, "0.0"));//$NON-NLS-1$
+		xCoord.addChangeListener(this);
+     	xCoord.setName(LABEL_X);
+     	constraint.gridx++;
+     	coordP.add(xCoord, constraint);
+     	
+    	constraint.gridx++;	
+     	coordP.add(new JLabel(LABEL_Y), constraint);
+  		
+     	model = new SpinnerNumberModel(0,0,10000,0.1);
+     	yCoord = new JSpinner(model);
+     	yCoord.setEditor(new JSpinner.NumberEditor(yCoord, "0.0"));//$NON-NLS-1$
+     	yCoord.addChangeListener(this);
+     	yCoord.setName(LABEL_Y);
+     	constraint.gridx++;	
+     	coordP.add(yCoord, constraint);
+     	
+     	constraint.gridx = 0;	constraint.gridy++;
+     	coordP.add(new JLabel(LABEL_ROTATION), constraint);
+     	constraint.gridx++;
+     	coordP.add(rotationField, constraint);
+     	
+     	coordP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_POSITION_DIMENSIONS, 
+						  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	
+     	return coordP;
+	}
+
+	
+	
+
+	@Override
+	public void setFigureFrameField()
+	{
+		LaTeXDrawPolygon p = ((LaTeXDrawPolygon)figure);
+		
+		nbPoints = p.getNbPoints();
+		xs = new double[nbPoints];
+		ys = new double[nbPoints];
+		LaTeXDrawPoint2D pt;
+		pointChoice.removeItemListener(this);
+		pointChoice.removeAllItems();
+		pointChoice.addItemListener(this);
+		
+		// We copy all points
+		for(int i=0; i<nbPoints; i++)
+		{
+			pt = p.getPoint(i);
+			xs[i] = pt.x;
+			ys[i] = pt.y;
+			pointChoice.addItem(String.valueOf(i+1));		
+		}	
+		
+		pointChoice.setSelectedIndex(0);
+		pointChoice.updateUI();
+		xCoord.setValue(xs[0]);
+		yCoord.setValue(ys[0]);
+	}
+	
+	
+	protected void updatePointsValue(LaTeXDrawPolygon pol) {
+		nbPoints = pol.getNbPoints();
+		LaTeXDrawPoint2D pt;
+		
+		for(int i=0; i<nbPoints; i++) {
+			pt = pol.getPoint(i);
+			xs[i] = pt.x;
+			ys[i] = pt.y;
+		}	
+		
+		xCoord.setValue(xs[pointChoice.getSelectedIndex()]);
+		yCoord.setValue(ys[pointChoice.getSelectedIndex()]);
+	}
+
+	
+
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		LaTeXDrawPolygon p = ((LaTeXDrawPolygon)figure);
+		
+		// We save all the points
+		for(int i=0; i<nbPoints; i++)
+			p.setPoint(xs[i], ys[i], i);
+	}
+	
+	
+	
+
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof LaTeXDrawPolygon))
+				throw new ClassCastException();
+			
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+	
+	
+	
+
+	@Override
+	public void itemStateChanged(ItemEvent e) 
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JComboBox)
+		{
+			if(((JComboBox)o).getName().equals(LABEL_CHOICE_PTS))
+			{
+				// We must change the fields concerning the point 
+				// when the choice change
+				int id = Integer.valueOf(pointChoice.getSelectedItem().toString()).intValue()-1;
+				xCoord.setValue(xs[id]);
+				yCoord.setValue(ys[id]);
+				setModified(true);
+				return ;
+			}
+		}
+		
+		super.itemStateChanged(e);
+	}
+
+	
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JSpinner)
+		{
+			String name = ((JSpinner)o).getName();
+			LaTeXDrawPolygon p = (LaTeXDrawPolygon) glimpsePanel.getGlimpseFigure();
+			
+			if(name.equals(LABEL_X))
+			{
+				int id = Integer.valueOf(pointChoice.getSelectedItem().toString()).intValue()-1;				
+				float x = Float.valueOf(xCoord.getValue().toString()).floatValue();
+				xs[id] = x;
+				p.setPoint(x, p.getPoint(id).y, id);
+				glimpsePanel.repaint();
+				setModified(true);
+				return ;
+			}
+			
+			if(name.equals(LABEL_Y))
+			{
+				int id = Integer.valueOf(pointChoice.getSelectedItem().toString()).intValue()-1;
+				float y = Float.valueOf(yCoord.getValue().toString()).floatValue();
+				ys[id] = y;
+				p.setPoint(p.getPoint(id).x, y, id);
+				glimpsePanel.repaint();
+				setModified(true);
+				return ;
+			}
+			
+			if(name.equals(LaTeXDrawResources.LABEL_ROTATE))
+			{
+				setModified(true);
+				p.setRotationAngle(Math.toRadians( Double.valueOf(((JSpinner)o).getValue().toString()).doubleValue()));
+				updatePointsValue(p);
+				glimpsePanel.repaint();
+				return;
+			}
+		}
+		super.stateChanged(e);
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersRhombusFrame.java b/current/latexDraw/ui/dialog/ParametersRhombusFrame.java
new file mode 100644
index 0000000..d4294a4
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersRhombusFrame.java
@@ -0,0 +1,333 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.Rhombus;
+import latexDraw.ui.DrawPanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+
+
+/** 
+ * This class defines the frame which allows to change the parameters of rhombus.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersRhombusFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to change the x-coordinates of the centre of the figure */
+	protected JSpinner centerXField;
+	
+	/** Allows to change the y-coordinates of the centre of the figure */
+	protected JSpinner centerYField;
+	
+	/** Allows to change the width of the triangle */
+	protected JSpinner widthField;
+	
+	/** Allows to change the height of the triangle */
+	protected JSpinner heightField;
+	
+	
+	
+
+	/**
+	 * The constructor by default
+	 */
+	public ParametersRhombusFrame(Frame parent, DrawPanel p, boolean attachToMainFrame) 
+	{
+		super(parent, p, attachToMainFrame);
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	  		JPanel coordP = new JPanel(new GridBagLayout());
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.CENTER;
+	     	coordP.add(new JLabel(LABEL_CENTER_X), constraint);
+	  		
+	     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerXField = new JSpinner(model);
+			centerXField.setEditor(new JSpinner.NumberEditor(centerXField, "0.0"));//$NON-NLS-1$
+			centerXField.addChangeListener(this);
+	     	centerXField.setName(LABEL_CENTER_X);
+	     	constraint.gridx++;
+	     	coordP.add(centerXField, constraint);
+
+	    	constraint.gridx++;
+	     	coordP.add(new JLabel(LABEL_CENTER_Y), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	centerYField = new JSpinner(model);
+	     	centerYField.setEditor(new JSpinner.NumberEditor(centerYField, "0.0"));//$NON-NLS-1$
+			centerYField.addChangeListener(this);
+	     	centerYField.setName(LABEL_CENTER_Y);
+	     	constraint.gridx++;	
+	     	coordP.add(centerYField, constraint);
+	     	
+	    	constraint.gridx = 0;	constraint.gridy++;
+	     	coordP.add(new JLabel(LABEL_WIDTH), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0.1,0.1,10000,0.1);
+	     	widthField = new JSpinner(model);
+	     	widthField.setEditor(new JSpinner.NumberEditor(widthField, "0.0"));//$NON-NLS-1$
+	     	widthField.addChangeListener(this);
+	     	widthField.setName(LABEL_WIDTH);
+	     	constraint.gridx++;
+	     	coordP.add(widthField, constraint);
+	   
+	     	constraint.gridx++;
+	     	coordP.add(new JLabel(LABEL_HEIGHT), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0.1,0.1,10000,0.1);
+	     	heightField = new JSpinner(model);
+	     	heightField.setEditor(new JSpinner.NumberEditor(heightField, "0.0"));//$NON-NLS-1$
+	     	heightField.addChangeListener(this);
+	     	heightField.setName(LABEL_HEIGHT);
+	     	constraint.gridx++;	
+	     	coordP.add(heightField, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	coordP.add(new JLabel(LABEL_ROTATION), constraint);
+	     	constraint.gridx++;
+	     	coordP.add(rotationField, constraint);
+	     	
+	     	coordP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_POSITION_DIMENSIONS, 
+							  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	pGeneral.add(coordP);
+	     	
+	     	pGeneral.add(createBordersPanel(true));
+	     	pGeneral.add(createDoubleLinePanel());
+	     	pGeneral.add(createFillPanel());
+	     	
+	     	JPanel pOther = new JPanel();
+	     	pOther.setLayout(new BoxLayout(pOther, BoxLayout.Y_AXIS));
+	     	pOther.add(createShadowPanel());
+	     	pOther.add(createGradientPanel());
+	     	pOther.add(createHatchingPanel());
+	     	
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_OTHERS, pOther);
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+	
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		Rhombus r = (Rhombus)figure;
+		LaTeXDrawPoint2D p1 = r.getPoint(0), p2 = r.getPoint(1), p3 = r.getPoint(2), p4 = r.getPoint(3);
+		float demiWidth = (float) (Float.valueOf(widthField.getValue().toString()).floatValue()/2.);
+		float demiHeight = (float) (Float.valueOf(heightField.getValue().toString()).floatValue()/2.);
+		float x = Float.valueOf(centerXField.getValue().toString()).floatValue();
+		float y = Float.valueOf(centerYField.getValue().toString()).floatValue();
+		
+		p1.y = y - demiHeight;
+		p2.y = y - demiHeight;
+		p3.y = y + demiHeight;
+		p4.y = y + demiHeight;
+
+		p1.x = x - demiWidth;
+		p2.x = x + demiWidth;
+		p3.x = x - demiWidth;
+		p4.x = x + demiWidth;
+
+		r.updateShape();
+		r.getBorders().updateNSEWDelimitors();
+		
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+	
+
+	
+
+	@Override
+	public void setFigureFrameField()
+	{
+		Rhombus r = (Rhombus)figure;
+		Rhombus r2 = (Rhombus) glimpsePanel.getGlimpseFigure();
+		LaTeXDrawPoint2D NW = r.getTheNWPoint(), SE = r.getTheSEPoint();
+		
+		centerXField.removeChangeListener(this);
+		centerYField.removeChangeListener(this);
+		widthField.removeChangeListener(this);
+		heightField.removeChangeListener(this);
+		
+		centerXField.setValue((NW.x+SE.x)/2.);
+		centerYField.setValue((NW.y+SE.y)/2.);
+		widthField.setValue(SE.x-NW.x);
+		heightField.setValue(SE.y-NW.y);
+		
+		centerXField.addChangeListener(this);
+		centerYField.addChangeListener(this);
+		widthField.addChangeListener(this);
+		heightField.addChangeListener(this);
+		
+		for(int i=0; i<Rhombus.NB_POINTS_RHOMBUS; i++)
+			r2.getPoint(i).setLocation(r.getPoint(i));
+		
+		r2.updateGravityCenter();
+		r2.updateShape();
+		glimpsePanel.repaint();
+	}
+
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			Rhombus r = (Rhombus) glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				LaTeXDrawPoint2D p1 = r.getPoint(0), p2 = r.getPoint(1), p3 = r.getPoint(2), p4 = r.getPoint(3);
+
+				float demiWidth  = (float)(Float.valueOf(widthField.getValue().toString())/2.);
+				float demiHeight = (float)(Float.valueOf(heightField.getValue().toString())/2.);
+				float x = Float.valueOf(centerXField.getValue().toString());
+				float y = Float.valueOf(centerYField.getValue().toString());
+
+				if(name.equals(LABEL_CENTER_X))
+				{
+					p1.x = x - demiWidth;
+					p2.x = x + demiWidth;
+					p3.x = x - demiWidth;
+					p4.x = x + demiWidth;
+					r.updateGravityCenter();
+					r.updateShape();
+					glimpsePanel.repaint();
+					setModified(true);
+					return ;
+				}
+				
+				if(name.equals(LABEL_CENTER_Y))
+				{
+					p1.y = y - demiHeight;
+					p2.y = y - demiHeight;
+					p3.y = y + demiHeight;
+					p4.y = y + demiHeight;
+					r.updateGravityCenter();
+					r.updateShape();
+					glimpsePanel.repaint();
+					setModified(true);
+					return ;
+				}
+				
+				if(name.equals(LABEL_HEIGHT))
+				{
+					p1.y = y - demiHeight;
+					p2.y = y - demiHeight;
+					p3.y = y + demiHeight;
+					p4.y = y + demiHeight;
+					r.updateGravityCenter();
+					r.updateShape();
+					glimpsePanel.repaint();
+					setModified(true);
+					return ;
+				}
+				
+				if(name.equals(LABEL_WIDTH))
+				{
+					p1.x = x - demiWidth;
+					p2.x = x + demiWidth;
+					p3.x = x - demiWidth;
+					p4.x = x + demiWidth;
+					r.updateGravityCenter();
+					r.updateShape();
+					glimpsePanel.repaint();
+					setModified(true);
+					return ;
+				}
+			}
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+		
+		super.stateChanged(e);
+	}
+	
+	
+	
+
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Rhombus))
+				throw new ClassCastException();
+			
+			if(isFramedBox)
+			{
+				centerXField.setEnabled(false);
+				centerYField.setEnabled(false);
+				widthField.setEnabled(false);
+				heightField.setEnabled(false);
+			}
+			
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersTextFrame.java b/current/latexDraw/ui/dialog/ParametersTextFrame.java
new file mode 100644
index 0000000..42920bb
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersTextFrame.java
@@ -0,0 +1,1711 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.Vector;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.FramedBox;
+import latexDraw.figures.Text;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.psTricks.PSTricksConstants;
+import latexDraw.ui.DrawContainer;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.components.ButtonIcon;
+import latexDraw.ui.components.ColorButton;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class allows to set the parameters of the text<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersTextFrame extends AbstractParametersFrame implements FocusListener, MouseListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** This field allows the set the text */
+	protected JTextField textField;
+	
+	/** This field allows the set the X-coordinate of the first character of the text */
+	protected JSpinner xCoord;
+	
+	/** This field allows the set the Y-coordinate of the first character of the text */
+	protected JSpinner yCoord;
+
+	/** Allows to set the size of the text */
+	protected JComboBox sizeChoice;
+		
+	/** Allows to choice the font */
+	protected JComboBox fontChoice;
+	
+	/** Allows to set the text in italic */
+	protected JToggleButton buttonItalic;
+	
+	/** Allows to set the text in bold */
+	protected JToggleButton buttonBold;
+	
+	/** Allows to set if there is framed box or not. */
+	protected JCheckBox framedBoxCB;
+	
+	/** Allows to set that there is only a simple framed box for the text. */
+	protected JRadioButton simpleRB;
+	
+	/** Allows to set that there is only a several framed boxes for the text. */
+	protected JRadioButton multipleRB;
+	
+	/** Allows to set that the box is a circle. */
+	protected JRadioButton circleRB;
+	
+	/** Allows to set that the box is a rectangle. */
+	protected JRadioButton rectangleRB;
+	
+	/** Allows to set that the box is an ellipse. */
+	protected JRadioButton ellipseRB;
+	
+	/** Allows to set that the box is a triangle. */
+	protected JRadioButton triangleRB;
+	
+	/** Allows to set that the box is a diamond. */
+	protected JRadioButton diamondRB;
+	
+	/** Allows to add a new box. */
+	protected JButton addBox;
+	
+	/** Allows to modify the position of a box. */
+	protected JButton modifyBox;
+	
+	/** Allows to remove a box. */
+	protected JButton removeBox;
+	
+	/** The list of all the boxes. */
+	protected JList boxesList;
+	
+	/** Allows to set the frameSep attribute. */
+	protected JSpinner frameSepField;
+	
+	/** Allows to open the parameters frame of the box. */
+	protected JButton editBoxB;
+	
+	/** Allows to set the boxSep attribute. */
+	protected JCheckBox boxSepCB;
+	
+	/** Allows to set the isOpaque attribute. */
+	protected JCheckBox opaqueCB;
+	
+	/** The label of each box in the list. */
+	protected Vector<FramedBox> boxes;
+	
+	/** Allows to select parts of the text to box. */
+	protected SelectTextFrame textSelFrame;
+	
+	/** Can choose the colour of the opacity. */
+	protected ColorButton opacityColorButton;
+	
+	/** The frame of parameters to change the rectangle and the ellipse. */
+	protected ParametersEllipseRectangleFrame rectFrame;
+	
+	/** The frame of parameters to change the circle. */
+	protected ParametersCircleSquareFrame circleFrame;
+	
+	/** The frame of parameters to change the triangle. */
+	protected ParametersTriangleFrame triangleFrame;
+	
+	/** The frame of parameters to change the diamond. */
+	protected ParametersRhombusFrame diamondFrame;
+	
+	/** The label of the button opacityColorButton. */
+	public static final String LABEL_OPACITY_BUTTON = LaTeXDrawLang.getString1_7("ParametersTextFrame.0"); //$NON-NLS-1$
+	
+	/** The label of simpleRB */
+	public static final String LABEL_BOX_LIST = LaTeXDrawLang.getString1_7("ParametersTextFrame.1"); //$NON-NLS-1$
+	
+	/** The label of opaqueCB */
+	public static final String LABEL_OPAQUE_RB = LaTeXDrawLang.getString1_7("ParametersTextFrame.2"); //$NON-NLS-1$
+	
+	/** The label of circleRB */
+	public static final String LABEL_CIRCLE_RB = LaTeXDrawLang.getString1_7("ParametersTextFrame.3"); //$NON-NLS-1$
+	
+	/** The label of rectangleRB */
+	public static final String LABEL_RECTANGLE_RB = LaTeXDrawLang.getString1_7("ParametersTextFrame.4"); //$NON-NLS-1$
+	
+	/** The label of triangleRB */
+	public static final String LABEL_TRIANGLE_RB = LaTeXDrawLang.getString1_7("ParametersTextFrame.5"); //$NON-NLS-1$
+	
+	/** The label of diamondRB */
+	public static final String LABEL_DIAMOND_RB = LaTeXDrawLang.getString1_7("ParametersTextFrame.6"); //$NON-NLS-1$
+	
+	/** The label of ellipseRB */
+	public static final String LABEL_ELLIPSE_RB = LaTeXDrawLang.getString1_7("ParametersTextFrame.7"); //$NON-NLS-1$
+	
+	/** The label of simpleRB */
+	public static final String LABEL_SINGLE_RB = LaTeXDrawLang.getString1_7("ParametersTextFrame.8"); //$NON-NLS-1$
+	
+	/** The label of multipleRB */
+	public static final String LABEL_MULTIPLE_RB = LaTeXDrawLang.getString1_7("ParametersTextFrame.9"); //$NON-NLS-1$
+	
+	/** The label of framedBoxCB */
+	public static final String LABEL_FRAMED_BOX_CB = LaTeXDrawLang.getString1_7("ParametersTextFrame.10"); //$NON-NLS-1$
+	
+	/** The label of modifyBox */
+	public static final String LABEL_ADD_BOX = LaTeXDrawLang.getString1_7("ParametersTextFrame.11"); //$NON-NLS-1$
+	
+	/** The label of modifyBox */
+	public static final String LABEL_MODIFY_BOX = LaTeXDrawLang.getString1_7("ParametersTextFrame.12"); //$NON-NLS-1$
+	
+	/** The label of removeBox */
+	public static final String LABEL_REMOVE_BOX = LaTeXDrawLang.getString1_7("ParametersTextFrame.13"); //$NON-NLS-1$
+	
+	/** The label of frameSepField */
+	public static final String LABEL_FRAME_SEP = LaTeXDrawLang.getString1_7("ParametersTextFrame.14"); //$NON-NLS-1$
+	
+	/** The label of editBoxB */
+	public static final String LABEL_EDIT_BOX_B = LaTeXDrawLang.getString1_7("ParametersTextFrame.15"); //$NON-NLS-1$
+	
+	/** The label of boxSepCB */
+	public static final String LABEL_BOX_SEP_CB = LaTeXDrawLang.getString1_7("ParametersTextFrame.16"); //$NON-NLS-1$
+	
+	/** The label of the bold button */
+	public static final String LABEL_BOLD = LaTeXDrawLang.getDialogFrameString("ParametersTextFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the italic button */
+	public static final String LABEL_ITALIC = LaTeXDrawLang.getDialogFrameString("ParametersTextFrame.1"); //$NON-NLS-1$
+	
+	/** The label of the font choice */
+	public static final String LABEL_FONT = LaTeXDrawLang.getDialogFrameString("ParametersTextFrame.2"); //$NON-NLS-1$
+	
+	/** The label of the size choice */
+	public static final String LABEL_SIZE = LaTeXDrawLang.getDialogFrameString("ParametersTextFrame.3"); //$NON-NLS-1$
+	
+	/** The label of the text field */
+	public static final String LABEL_TEXT = LaTeXDrawLang.getDialogFrameString("ParametersTextFrame.4"); //$NON-NLS-1$
+	
+	
+	
+	/**
+	 * The constructor by default
+	 * @param p The panel which contains the draw
+	 */
+	public ParametersTextFrame(Frame parent, DrawPanel p, boolean attachToMainFrame)
+	{
+		super(parent, p, attachToMainFrame);
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+
+	  		JToolBar toolbar = new JToolBar();
+	  		toolbar.setLayout(new FlowLayout(FlowLayout.LEFT));
+	  		toolbar.setName("Text toolbar");//$NON-NLS-1$
+	  		toolbar.setPreferredSize(new Dimension(100, 30));
+	  		toolbar.setMaximumSize(new Dimension(600, 30));
+	  		toolbar.setFloatable(false);
+	  		buttonItalic = new JToggleButton(new ImageIcon(getClass().getResource("/res/Italic.png")));//$NON-NLS-1$
+	  		buttonItalic.setActionCommand(LABEL_ITALIC);
+	  		buttonItalic.addActionListener(this);
+	  		buttonBold = new JToggleButton(new ImageIcon(getClass().getResource("/res/Bold.png")));//$NON-NLS-1$
+	  		buttonBold.setActionCommand(LABEL_BOLD);
+	  		buttonBold.addActionListener(this);
+	  		toolbar.add(buttonItalic);
+	  		toolbar.add(buttonBold);
+	  		
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel(new GridBagLayout());
+	  		
+	  		textField = new JTextField();
+	  		textField.setColumns(40);
+	  		textField.setName(LABEL_TEXT);
+	  		textField.addKeyListener(this);
+	  		Dimension dimension = new Dimension(350, 30);//fixes #1562954
+	  		textField.setMinimumSize(dimension);
+	  		textField.setMaximumSize(dimension);
+	  		textField.setPreferredSize(dimension);
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 5;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.CENTER;
+	     	pGeneral.add(textField, constraint);
+	  		
+	     	constraint.anchor = GridBagConstraints.WEST;
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	constraint.gridwidth = 1;
+	     	pGeneral.add(new JLabel(LABEL_X), constraint);
+	     	
+	     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	xCoord = new JSpinner(model);
+	     	xCoord.setEditor(new JSpinner.NumberEditor(xCoord, "0.0"));//$NON-NLS-1$
+			xCoord.addChangeListener(this);
+	     	xCoord.setName(LABEL_X);
+	     	constraint.gridx++;
+	     	pGeneral.add(xCoord, constraint);
+
+	    	constraint.gridx = 0;	constraint.gridy++;
+	     	pGeneral.add(new JLabel(LABEL_Y), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	yCoord = new JSpinner(model);
+	     	yCoord.setEditor(new JSpinner.NumberEditor(yCoord, "0.0"));//$NON-NLS-1$
+	     	yCoord.addChangeListener(this);
+	     	yCoord.setName(LABEL_Y);
+	     	constraint.gridx = 1;
+	     	pGeneral.add(yCoord, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	constraint.gridwidth = 1;
+	     	pGeneral.add(new JLabel(LABEL_ROTATION), constraint);
+	     	
+	     	model = new SpinnerNumberModel(Figure.DEFAULT_ROTATION_ANGLE, 
+					-360, 360,0.1);
+	     	rotationField = new JSpinner(model);
+	     	rotationField.setEditor(new JSpinner.NumberEditor(rotationField, "0.0"));	//$NON-NLS-1$     	
+	     	rotationField.setName(LaTeXDrawResources.LABEL_ROTATE);
+	     	rotationField.addChangeListener(this);
+	     	constraint.gridx = 1;
+	     	pGeneral.add(rotationField, constraint);
+	     	
+	     	bordersButton = new ColorButton(LaTeXDrawResources.LABEL_COLOR_BUTTON, new ButtonIcon(Color.BLACK));
+	     	bordersButton.setActionCommand(LaTeXDrawResources.LABEL_COLOR_BUTTON);
+	     	bordersButton.addActionListener(this);
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	pGeneral.add(bordersButton, constraint);
+	     	
+	     	constraint.gridx=0;		constraint.gridy++;
+	     	pGeneral.add(new JLabel(LABEL_SIZE), constraint);
+	     	
+	     	sizeChoice = Text.getChoiceSize();
+	     	sizeChoice.setName(LABEL_SIZE);
+	     	sizeChoice.addItemListener(this);
+	     	constraint.gridx++;
+	     	pGeneral.add(sizeChoice, constraint);
+	     	
+	     	constraint.gridx=0;		constraint.gridy++;
+	     	pGeneral.add(new JLabel(LABEL_FONT), constraint);
+	     	
+	     	fontChoice = Text.getChoiceFont();
+	     	fontChoice.setName(LABEL_FONT);
+	     	fontChoice.addItemListener(this);
+	     	constraint.gridx++;
+	     	pGeneral.add(fontChoice, constraint);
+	     	
+	     	constraint.gridx=0;		constraint.gridy++;
+	     	opaqueCB = new JCheckBox(LABEL_OPAQUE_RB);
+	     	opaqueCB.setActionCommand(LABEL_OPAQUE_RB);
+	     	opaqueCB.addActionListener(this);
+	     	opaqueCB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.17")); //$NON-NLS-1$
+	     	opaqueCB.setSelected(Text.DEFAULT_IS_OPAQUE);
+	     	pGeneral.add(opaqueCB, constraint);
+	     	
+	     	opacityColorButton = new ColorButton(LABEL_OPACITY_BUTTON, new ButtonIcon(Color.WHITE));
+	     	opacityColorButton.setActionCommand(LABEL_OPACITY_BUTTON);
+	     	opacityColorButton.addActionListener(this);
+	     	constraint.gridx++;
+	     	pGeneral.add(opacityColorButton, constraint);
+	     	
+	     	pGeneral.setBorder(new CompoundBorder(new TitledBorder(null, TITLE_GENERAL, 
+							  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	tabbedPane.add(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.add(LaTeXDrawLang.getString1_7("ParametersTextFrame.18"), createFramedBoxPanel()); //$NON-NLS-1$
+
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(toolbar);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	/**
+	 * @return The panel which set the framed box(es) of the text.
+	 * @since 1.7
+	 */
+	private JPanel createFramedBoxPanel()
+	{
+		JPanel fbP = new JPanel(new GridBagLayout());
+		
+		fbP.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("ParametersTextFrame.18"),  //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+		fbP.setPreferredSize(new Dimension(390, 280));
+		
+  		GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;  		constraint.gridy = 0;
+     	constraint.gridwidth = 2; 	constraint.gridheight = 1;
+     	constraint.weightx = 0.1; 	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.WEST;
+     	ButtonGroup shapeBox = new ButtonGroup();
+     	
+     	framedBoxCB = new JCheckBox(LABEL_FRAMED_BOX_CB);
+     	framedBoxCB.setActionCommand(LABEL_FRAMED_BOX_CB);
+     	framedBoxCB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.20")); //$NON-NLS-1$
+     	framedBoxCB.setSelected(false);
+     	framedBoxCB.addActionListener(this);
+     	framedBoxCB.setEnabled(false);
+     	fbP.add(framedBoxCB, constraint);
+     	
+     	rectangleRB = new JRadioButton(LABEL_RECTANGLE_RB);
+    	rectangleRB.setActionCommand(LABEL_RECTANGLE_RB);
+    	rectangleRB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.21")); //$NON-NLS-1$
+     	rectangleRB.addActionListener(this);
+     	rectangleRB.setEnabled(false);
+     	rectangleRB.setSelected(true);
+     	constraint.gridwidth = 1; 
+     	constraint.gridx=2;
+     	fbP.add(rectangleRB, constraint);
+     	shapeBox.add(rectangleRB);
+     	
+     	triangleRB = new JRadioButton(LABEL_TRIANGLE_RB);
+     	triangleRB.setActionCommand(LABEL_TRIANGLE_RB);
+     	triangleRB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.22")); //$NON-NLS-1$
+     	triangleRB.addActionListener(this);
+     	triangleRB.setEnabled(false);
+     	triangleRB.setSelected(true);
+     	constraint.gridx=3;
+     	fbP.add(triangleRB, constraint);
+     	shapeBox.add(triangleRB);
+     	
+     	constraint.gridy++;	constraint.gridx=0;
+     	constraint.gridwidth = 2; //Fixes #1562954 
+     	ButtonGroup typeBox = new ButtonGroup();
+     	
+     	simpleRB = new JRadioButton(LABEL_SINGLE_RB);
+     	simpleRB.setActionCommand(LABEL_SINGLE_RB);
+     	simpleRB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.23")); //$NON-NLS-1$
+     	simpleRB.addActionListener(this);
+     	simpleRB.setSelected(true);
+     	simpleRB.setEnabled(false);
+     	typeBox.add(simpleRB);
+     	fbP.add(simpleRB, constraint);
+     	
+     	ellipseRB = new JRadioButton(LABEL_ELLIPSE_RB);
+     	ellipseRB.setActionCommand(LABEL_ELLIPSE_RB);
+     	ellipseRB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.24")); //$NON-NLS-1$
+     	ellipseRB.addActionListener(this);
+     	ellipseRB.setEnabled(false);
+     	ellipseRB.setSelected(true);
+     	constraint.gridx=2;	
+     	fbP.add(ellipseRB, constraint);
+     	shapeBox.add(ellipseRB);
+     	
+     	diamondRB = new JRadioButton(LABEL_DIAMOND_RB);
+     	diamondRB.setActionCommand(LABEL_DIAMOND_RB);
+     	diamondRB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.25")); //$NON-NLS-1$
+     	diamondRB.addActionListener(this);
+     	diamondRB.setEnabled(false);
+     	diamondRB.setSelected(true);
+     	constraint.gridx=3;
+     	fbP.add(diamondRB, constraint);
+     	shapeBox.add(diamondRB);
+     	
+     	constraint.gridy++;	constraint.gridx=0;
+     	constraint.gridwidth = 2; 
+     	multipleRB = new JRadioButton(LABEL_MULTIPLE_RB);
+     	multipleRB.setActionCommand(LABEL_MULTIPLE_RB);
+     	multipleRB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.26")); //$NON-NLS-1$
+     	multipleRB.addActionListener(this);
+     	multipleRB.setEnabled(false);
+     	typeBox.add(multipleRB);
+     	fbP.add(multipleRB, constraint);
+     	
+     	circleRB = new JRadioButton(LABEL_CIRCLE_RB);
+     	circleRB.setActionCommand(LABEL_CIRCLE_RB);
+     	circleRB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.27")); //$NON-NLS-1$
+     	circleRB.addActionListener(this);
+     	circleRB.setEnabled(false);
+     	circleRB.setSelected(true);
+     	constraint.gridx=2;		constraint.gridwidth = 1; 
+     	fbP.add(circleRB, constraint);
+     	shapeBox.add(circleRB);
+     	
+     	constraint.gridy++; constraint.gridx=0;	
+     	addBox = new JButton(LABEL_ADD_BOX);
+     	addBox.setActionCommand(LABEL_ADD_BOX);
+     	addBox.addActionListener(this);
+     	addBox.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.28")); //$NON-NLS-1$
+     	fbP.add(addBox, constraint);
+     	addBox.setEnabled(false);
+     	
+     	constraint.gridx+=2; constraint.gridwidth = 4;
+     	constraint.gridheight=3;
+     	boxes = new Vector<FramedBox>();
+     	boxesList = new JList(boxes);
+     	boxesList.setVisibleRowCount(5);
+     	boxesList.setEnabled(false);
+     	boxesList.addFocusListener(this);
+     	boxesList.addMouseListener(this);
+     	boxesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+     	boxesList.setName(LABEL_BOX_LIST);
+     	JScrollPane scrollPane = new JScrollPane(boxesList);
+     	Dimension dimension = new Dimension(250,100);
+     	scrollPane.setPreferredSize(dimension);
+     	scrollPane.setMinimumSize(dimension);
+     	scrollPane.setMaximumSize(dimension);
+     	fbP.add(scrollPane, constraint);
+     	
+     	constraint.gridx=0;	constraint.gridheight=1;
+     	constraint.gridy++; constraint.gridwidth = 2;
+     	modifyBox = new JButton(LABEL_MODIFY_BOX);
+     	modifyBox.setActionCommand(LABEL_MODIFY_BOX);
+     	modifyBox.addActionListener(this);
+     	modifyBox.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.29")); //$NON-NLS-1$
+     	fbP.add(modifyBox, constraint);
+     	modifyBox.setEnabled(false);
+     	
+     	constraint.gridy++;
+     	removeBox = new JButton(LABEL_REMOVE_BOX);
+     	removeBox.setActionCommand(LABEL_REMOVE_BOX);
+     	removeBox.addActionListener(this);
+     	removeBox.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.30")); //$NON-NLS-1$
+     	fbP.add(removeBox, constraint);
+     	removeBox.setEnabled(false);
+     	
+     	constraint.gridy++;
+     	constraint.gridwidth = 1;
+     	fbP.add(new JLabel(LABEL_FRAME_SEP), constraint);
+     	
+     	constraint.gridx++;
+     	SpinnerModel model = new SpinnerNumberModel(
+     			PSTricksConstants.DEFAULT_FRAME_SEP*DrawContainer.DEFAULT_PIXPERCM,0,2000,1);
+     	frameSepField = new JSpinner(model);
+     	frameSepField.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.31")); //$NON-NLS-1$
+     	frameSepField.setEditor(new JSpinner.NumberEditor(frameSepField, "0"));//$NON-NLS-1$
+     	frameSepField.addChangeListener(this);
+     	frameSepField.setName(LABEL_FRAME_SEP);
+     	fbP.add(frameSepField, constraint);	 
+     	frameSepField.setEnabled(false);
+     	
+     	constraint.gridx++;
+     	boxSepCB = new JCheckBox(LABEL_BOX_SEP_CB);
+     	boxSepCB.setActionCommand(LABEL_BOX_SEP_CB);
+     	boxSepCB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.32")); //$NON-NLS-1$
+     	boxSepCB.setSelected(PSTricksConstants.DEFAULT_BOX_SEP);
+     	boxSepCB.addActionListener(this);
+     	fbP.add(boxSepCB, constraint);
+     	boxSepCB.setEnabled(false);
+     	
+     	constraint.gridx++;
+     	editBoxB = new JButton(LABEL_EDIT_BOX_B);
+     	editBoxB.setActionCommand(LABEL_EDIT_BOX_B);
+     	editBoxB.addActionListener(this);
+     	editBoxB.setToolTipText(LaTeXDrawLang.getString1_7("ParametersTextFrame.33")); //$NON-NLS-1$
+     	fbP.add(editBoxB, constraint);
+     	editBoxB.setEnabled(false);
+		
+		return fbP;
+	}
+	
+	
+	
+	@Override
+	public void actionPerformed(ActionEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Text t = (Text) glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof AbstractButton)
+			{
+				String label = ((AbstractButton)o).getActionCommand();
+				
+				if(label.equals(LABEL_ADD_BOX))
+				{
+					if(textSelFrame==null)
+						textSelFrame = new SelectTextFrame(this);
+					
+					textSelFrame.setVisible(true);
+					int[] is 	= textSelFrame.getSelectedIndex();
+					String txt 	= textSelFrame.getSelectedText();
+					
+					if(txt!=null && txt.length()>0 && is!=null && is.length==2)
+					{
+						FramedBox fb = new FramedBox(t);
+						fb.setStart(is[0]);
+						fb.setEnd(is[1]);
+						
+						if(t.addBox(fb))
+						{
+							setModified(true);
+							boxes.add(fb);
+							int id = boxesList.getSelectedIndex();
+							frameSepField.setEnabled(id!=-1);
+							boxSepCB.setEnabled(id!=-1);
+							editBoxB.setEnabled(id!=-1);
+							removeBox.setEnabled(id!=-1);
+							modifyBox.setEnabled(id!=-1);
+							rectangleRB.setEnabled(id!=-1);
+							circleRB.setEnabled(id!=-1);
+							ellipseRB.setEnabled(id!=-1);
+							diamondRB.setEnabled(id!=-1);
+							triangleRB.setEnabled(id!=-1);
+							boxesList.updateUI();
+							glimpsePanel.repaint();
+						}
+					}
+					return;
+				}
+				
+				if(label.equals(LABEL_REMOVE_BOX))
+				{
+					Object selected = boxesList.getSelectedValue();
+					boxes.remove(selected);
+					boxesList.updateUI();
+					boxesList.clearSelection();
+					
+					if(selected instanceof FramedBox)
+						t.removeBox((FramedBox)selected);
+					
+					setModified(true);
+					frameSepField.setEnabled(false);
+					boxSepCB.setEnabled(false);
+					editBoxB.setEnabled(false);
+					removeBox.setEnabled(false);
+					modifyBox.setEnabled(false);
+					rectangleRB.setEnabled(false);
+					circleRB.setEnabled(false);
+					ellipseRB.setEnabled(false);
+					diamondRB.setEnabled(false);
+					triangleRB.setEnabled(false);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(label.equals(LABEL_MODIFY_BOX))
+				{
+					if(textSelFrame==null)
+						textSelFrame = new SelectTextFrame(this);
+					
+					Object selected = boxesList.getSelectedValue();
+					
+					if(selected instanceof FramedBox)
+					{
+						FramedBox fb = (FramedBox)selected;
+						int index = t.getMultipleBox().indexOf(fb);
+						t.getMultipleBox().remove(index);
+						
+						textSelFrame.show(fb.getStart(), fb.getEnd());
+						int[] is = textSelFrame.getSelectedIndex();
+						
+						t.getMultipleBox().add(index, fb);
+						
+						if(is!=null && is.length==2)
+						{
+							setModified(true);
+							fb.setStart(is[0]);
+							fb.setEnd(is[1]);
+							glimpsePanel.repaint();
+							boxesList.updateUI();
+						}
+					}
+					
+					return ;
+				}
+				
+				if(label.equals(LABEL_OPAQUE_RB))
+				{
+					setModified(true);
+					t.setOpaque(opaqueCB.isSelected());
+					glimpsePanel.repaint();
+					return;
+				}
+				
+				if(label.equals(LABEL_TRIANGLE_RB))
+				{
+					if(simpleRB.isSelected())
+						 t.getSimpleBox().setBoxType(FramedBox.BOX_TRIANGLE);
+					else 
+						((FramedBox)boxesList.getSelectedValue()).setBoxType(FramedBox.BOX_TRIANGLE);
+					
+					setModified(true);
+					t.updateFramedBoxes();
+					t.updateBorders();
+					glimpsePanel.repaint();
+					return;
+				}
+				
+				if(label.equals(LABEL_DIAMOND_RB))
+				{
+					if(simpleRB.isSelected())
+						 t.getSimpleBox().setBoxType(FramedBox.BOX_DIAMOND);
+					else 
+						((FramedBox)boxesList.getSelectedValue()).setBoxType(FramedBox.BOX_DIAMOND);
+					
+					setModified(true);
+					t.updateFramedBoxes();
+					t.updateBorders();
+					glimpsePanel.repaint();
+					return;
+				}
+				
+				if(label.equals(LABEL_RECTANGLE_RB))
+				{
+					if(simpleRB.isSelected())
+						 t.getSimpleBox().setBoxType(FramedBox.BOX_RECTANGLE);
+					else 
+						((FramedBox)boxesList.getSelectedValue()).setBoxType(FramedBox.BOX_RECTANGLE);
+					
+					setModified(true);
+					t.updateFramedBoxes();
+					t.updateBorders();
+					glimpsePanel.repaint();
+					return;
+				}
+				
+				if(label.equals(LABEL_ELLIPSE_RB))
+				{
+					if(simpleRB.isSelected())
+						 t.getSimpleBox().setBoxType(FramedBox.BOX_ELLIPSE);
+					else 
+						((FramedBox)boxesList.getSelectedValue()).setBoxType(FramedBox.BOX_ELLIPSE);
+					
+					setModified(true);
+					t.updateFramedBoxes();
+					t.updateBorders();
+					glimpsePanel.repaint();
+					return;
+				}
+				
+				if(label.equals(LABEL_CIRCLE_RB))
+				{
+					if(simpleRB.isSelected())
+						 t.getSimpleBox().setBoxType(FramedBox.BOX_CIRCLE);
+					else 
+						((FramedBox)boxesList.getSelectedValue()).setBoxType(FramedBox.BOX_CIRCLE);
+					
+					setModified(true);
+					t.updateFramedBoxes();
+					t.updateBorders();
+					glimpsePanel.repaint();
+					return;
+				}
+				
+				if(label.equals(LABEL_EDIT_BOX_B))
+				{
+					Figure f;
+					
+					if(simpleRB.isSelected())
+						 f = t.getSimpleBox().getBox();
+					else 
+						f = ((FramedBox)boxesList.getSelectedValue()).getBox();
+						
+					if(rectangleRB.isSelected() || ellipseRB.isSelected())
+					{
+						if(rectFrame==null)
+							rectFrame = new ParametersEllipseRectangleFrame((JFrame)getParent(), drawPanel, false);
+						rectFrame.setVisible(true, f, false, true);
+					}
+					else if(circleRB.isSelected())
+					{
+						if(circleFrame==null)
+							circleFrame = new ParametersCircleSquareFrame((JFrame)getParent(), drawPanel, false);
+						circleFrame.setVisible(true, f, false, true);
+					}
+					else if(diamondRB.isSelected())
+					{
+						if(diamondFrame==null)
+							diamondFrame = new ParametersRhombusFrame((JFrame)getParent(), drawPanel, false);
+						diamondFrame.setVisible(true, f, false, true);
+					}
+					else if(triangleRB.isSelected())
+					{
+						if(triangleFrame==null)
+							triangleFrame = new ParametersTriangleFrame((JFrame)getParent(), drawPanel, false);
+						triangleFrame.setVisible(true, f, false, true);
+					}
+					
+					if(multipleRB.isSelected())
+						t.updateFramedBoxes();
+					
+					setModified(true);
+					glimpsePanel.repaint();
+					return;
+				}
+				
+				if(label.equals(LABEL_FRAMED_BOX_CB))
+				{
+					boolean ok = framedBoxCB.isSelected();
+					int id = boxesList.getSelectedIndex();
+					boolean simple = simpleRB.isSelected();
+					
+					setModified(true);
+					opaqueCB.setEnabled(!ok);
+					simpleRB.setEnabled(ok);
+					boxesList.setEnabled(ok && !simple);
+					multipleRB.setEnabled(ok);
+					frameSepField.setEnabled(ok && ( simple || id!=-1));
+					boxSepCB.setEnabled(ok && id!=-1);
+					editBoxB.setEnabled(ok && (simple || id!=-1));
+					addBox.setEnabled(ok && !simple);
+					removeBox.setEnabled(ok && !simple && id!=-1);
+					modifyBox.setEnabled(ok && !simple && id!=-1);
+					rectangleRB.setEnabled(ok && (simple || id!=-1));
+					circleRB.setEnabled(ok && (simple || id!=-1));
+					ellipseRB.setEnabled(ok && (simple || id!=-1));
+					diamondRB.setEnabled(ok && (simple || id!=-1));
+					triangleRB.setEnabled(ok && (simple || id!=-1));
+					t.setHasFramedBox(ok);
+					t.setHasSimpleFramedBox(simpleRB.isSelected());
+					
+					if(simpleRB.isSelected())
+					{
+						FramedBox fb = t.getSimpleBox();
+						fb.setBoxSep(boxSepCB.isSelected());
+						fb.setFrameSep(Double.valueOf(frameSepField.getValue().toString()).doubleValue());
+						if(rectangleRB.isSelected())
+							 fb.setBoxType(FramedBox.BOX_RECTANGLE);
+						else if(ellipseRB.isSelected())
+							 fb.setBoxType(FramedBox.BOX_ELLIPSE);
+						else if(circleRB.isSelected())
+							 fb.setBoxType(FramedBox.BOX_CIRCLE);
+						else if(diamondRB.isSelected())
+							 fb.setBoxType(FramedBox.BOX_DIAMOND);
+						else fb.setBoxType(FramedBox.BOX_TRIANGLE);
+					}
+					
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(label.equals(LABEL_BOLD))
+				{
+					setModified(true);
+					t.setIsBold(buttonBold.isSelected());
+					if(t.getSimpleBox()!=null) t.getSimpleBox().updateBoxSize();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(label.equals(LABEL_ITALIC))
+				{
+					setModified(true);
+					t.setIsItalic(buttonItalic.isSelected());
+					if(t.getSimpleBox()!=null) t.getSimpleBox().updateBoxSize();
+					glimpsePanel.repaint();
+					return ;
+				}
+
+				if(label.equals(LABEL_SINGLE_RB))
+				{
+					setModified(true);
+					frameSepField.setEnabled(true);
+					boxSepCB.setEnabled(true);
+					editBoxB.setEnabled(true);
+					boxesList.setEnabled(false);
+					addBox.setEnabled(false);
+					removeBox.setEnabled(false);
+					modifyBox.setEnabled(false);
+					t.setHasSimpleFramedBox(true);
+					FramedBox fb = t.getSimpleBox();
+					frameSepField.setValue(fb.getFrameSep());
+					boxSepCB.setEnabled(false);
+					rectangleRB.setEnabled(true);
+					circleRB.setEnabled(true);
+					ellipseRB.setEnabled(true);
+					diamondRB.setEnabled(true);
+					triangleRB.setEnabled(true);
+					
+					int style = fb.getBoxType();
+					if(style==FramedBox.BOX_RECTANGLE)
+						rectangleRB.setSelected(true);
+					else if(style==FramedBox.BOX_CIRCLE)
+						circleRB.setSelected(true);
+					else if(style==FramedBox.BOX_ELLIPSE)
+						ellipseRB.setSelected(true);
+					else if(style==FramedBox.BOX_TRIANGLE)
+						triangleRB.setSelected(true);
+					else if(style==FramedBox.BOX_DIAMOND)
+						diamondRB.setSelected(true);
+					boxSepCB.setSelected(fb.isBoxSep());
+					frameSepField.setValue(fb.getFrameSep());
+					
+					if(t.getSimpleBox()!=null) t.getSimpleBox().updateBoxSize();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(label.equals(LABEL_MULTIPLE_RB))
+				{
+					int id = boxesList.getSelectedIndex();
+					
+					setModified(true);
+					frameSepField.setEnabled(id!=-1);
+					boxSepCB.setEnabled(id!=-1);
+					editBoxB.setEnabled(id!=-1);
+					boxesList.setEnabled(true);
+					addBox.setEnabled(true);
+					removeBox.setEnabled(id!=-1);
+					modifyBox.setEnabled(id!=-1);
+					t.setHasSimpleFramedBox(false);
+					rectangleRB.setEnabled(id!=-1);
+					circleRB.setEnabled(id!=-1);
+					ellipseRB.setEnabled(id!=-1);
+					diamondRB.setEnabled(id!=-1);
+					triangleRB.setEnabled(id!=-1);
+					
+					if(id!=-1)
+					{
+						FramedBox fb = (FramedBox)boxesList.getSelectedValue();
+						int style = fb.getBoxType();
+						if(style==FramedBox.BOX_RECTANGLE)
+							rectangleRB.setSelected(true);
+						else if(style==FramedBox.BOX_CIRCLE)
+							circleRB.setSelected(true);
+						else if(style==FramedBox.BOX_ELLIPSE)
+							ellipseRB.setSelected(true);
+						else if(style==FramedBox.BOX_TRIANGLE)
+							triangleRB.setSelected(true);
+						else if(style==FramedBox.BOX_DIAMOND)
+							diamondRB.setSelected(true);
+						boxSepCB.setSelected(fb.isBoxSep());
+						frameSepField.setValue(fb.getFrameSep());
+					}
+					
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(label.equals(LABEL_BOX_SEP_CB))
+				{
+					if(multipleRB.isSelected())
+					{
+						setModified(true);
+						FramedBox fb = (FramedBox)boxesList.getSelectedValue();
+						fb.setBoxSep(boxSepCB.isSelected());
+						t.updateFramedBoxes();
+						t.updateBorders();
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+				
+				
+				if(label.equals(LABEL_OPACITY_BUTTON))
+				{
+					Color c = JColorChooser.showDialog((Component) e.getSource(), 
+							LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.34"),  //$NON-NLS-1$
+							((ColorButton)o).getColor());
+						
+					if(c!=null)
+					{
+						setModified(true);
+						((ColorButton)o).setColor(c);
+						t.setOpacityColor(c);
+						glimpsePanel.repaint();
+					}
+					return ;
+				}
+			}
+			super.actionPerformed(e);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+
+	@Override
+	public void setFigureFrameField()
+	{
+		try
+		{
+			if(!(figure instanceof Text))
+					throw new ClassCastException();
+			
+			Text t = (Text)figure;
+			LaTeXDrawPoint2D p = t.getPosition();
+			opacityColorButton.setColor(t.getOpacityColor());
+			boxes.clear();
+			Text txt = (Text)glimpsePanel.glimpseFigure;
+			for(FramedBox bf : txt.getMultipleBox())
+				boxes.add(bf);
+			boxesList.clearSelection();
+			boxesList.updateUI();
+			framedBoxCB.setSelected(t.hasFramedBox());
+			framedBoxCB.setEnabled(t.getText().length()>0);
+			simpleRB.setEnabled(framedBoxCB.isEnabled() && framedBoxCB.isSelected());
+			multipleRB.setEnabled(framedBoxCB.isEnabled() && framedBoxCB.isSelected());
+			simpleRB.setSelected(t.hasFramedBox() && t.hasSimpleFramedBox());
+			multipleRB.setSelected(t.hasSeveralBoxes());
+			frameSepField.setEnabled(framedBoxCB.isSelected() && simpleRB.isSelected());
+			boxSepCB.setEnabled(false);
+			circleRB.setEnabled(framedBoxCB.isSelected() && simpleRB.isSelected());
+			rectangleRB.setEnabled(framedBoxCB.isSelected() && simpleRB.isSelected());
+			triangleRB.setEnabled(framedBoxCB.isSelected() && simpleRB.isSelected());
+			diamondRB.setEnabled(framedBoxCB.isSelected() && simpleRB.isSelected());
+			ellipseRB.setEnabled(framedBoxCB.isSelected() && simpleRB.isSelected());
+			editBoxB.setEnabled(framedBoxCB.isSelected() && simpleRB.isSelected());
+			frameSepField.removeChangeListener(this);
+			if(t.hasFramedBox() && t.hasSimpleFramedBox())
+				frameSepField.setValue(t.getSimpleBox().getFrameSep());
+			else frameSepField.setValue(PSTricksConstants.DEFAULT_FRAME_SEP*Figure.PPC);
+			frameSepField.addChangeListener(this);
+			textField.setText(t.getText());
+			xCoord.setValue(p.x);
+			yCoord.setValue(p.y);
+			sizeChoice.setSelectedItem(t.getTextSize().getLabel());
+			buttonItalic.setSelected(t.isItalic());
+			buttonBold.setSelected(t.isBold());
+			fontChoice.setSelectedItem(t.getCurrentTextFont().getName());
+			if(t.getText().length()==0)
+				 buttonOk.setEnabled(false);
+			else buttonOk.setEnabled(true);
+			opaqueCB.setSelected(t.isOpaque());
+			opaqueCB.setEnabled(!t.hasFramedBox());
+			addBox.setEnabled(t.hasSeveralBoxes());
+			boxesList.setEnabled(t.hasSeveralBoxes());
+			
+			if(t.hasSimpleFramedBox() && t.getSimpleBox()!=null)
+			{
+				int style = t.getSimpleBox().getBoxType();
+				if(style==FramedBox.BOX_RECTANGLE)
+					rectangleRB.setSelected(true);
+				else if(style==FramedBox.BOX_CIRCLE)
+					circleRB.setSelected(true);
+				else if(style==FramedBox.BOX_ELLIPSE)
+					ellipseRB.setSelected(true);
+				else if(style==FramedBox.BOX_TRIANGLE)
+					triangleRB.setSelected(true);
+				else if(style==FramedBox.BOX_DIAMOND)
+					diamondRB.setSelected(true);
+			}
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+
+
+	
+	@Override
+	public void setDefaultsValues()
+	{
+		try
+		{
+			super.setDefaultsValues();
+			Text t = (Text)glimpsePanel.getGlimpseFigure();
+			t.setOpacityColor(Text.DEFAULT_OPACITY_COLOR);
+			opacityColorButton.setColor(Text.DEFAULT_OPACITY_COLOR);
+			fontChoice.setSelectedItem(Text.DEFAULT_TEXTFONT.getName());
+			buttonItalic.setSelected(Text.DEFAULT_ISITALIC);
+			buttonBold.setSelected(Text.DEFAULT_ISBOLD);
+			t.setIsBold(Text.DEFAULT_ISBOLD);
+			t.setIsItalic(Text.DEFAULT_ISITALIC);
+			t.setTextFont(Text.DEFAULT_TEXTFONT.getName());
+			t.setSize(Text.DEFAULT_SIZE.getLabel());
+			sizeChoice.setSelectedItem(Text.DEFAULT_SIZE.getLabel());
+			t.setSimpleBox(new FramedBox(t));
+			t.setHasFramedBox(Text.DEFAULT_HAS_BOX);
+			framedBoxCB.setSelected(Text.DEFAULT_HAS_BOX);
+			rectangleRB.setSelected(true);
+			boxSepCB.setSelected(PSTricksConstants.DEFAULT_BOX_SEP);
+			frameSepField.setValue(PSTricksConstants.DEFAULT_FRAME_SEP*Figure.PPC);
+			opaqueCB.setSelected(Text.DEFAULT_IS_OPAQUE);
+			
+			boolean ok = framedBoxCB.isSelected();
+			int id = boxesList.getSelectedIndex();
+			boolean simple = simpleRB.isSelected();
+			
+			opaqueCB.setEnabled(!ok);
+			simpleRB.setEnabled(ok);
+			boxesList.setEnabled(ok && !simple);
+			multipleRB.setEnabled(ok);
+			frameSepField.setEnabled(ok && ( simple || id!=-1));
+			boxSepCB.setEnabled(ok && id!=-1);
+			editBoxB.setEnabled(ok && (simple || id!=-1));
+			addBox.setEnabled(ok && !simple && id!=-1);
+			removeBox.setEnabled(ok && !simple && id!=-1);
+			modifyBox.setEnabled(ok && !simple && id!=-1);
+			rectangleRB.setEnabled(ok && (simple || id!=-1));
+			circleRB.setEnabled(ok && (simple || id!=-1));
+			ellipseRB.setEnabled(ok && (simple || id!=-1));
+			diamondRB.setEnabled(ok && (simple || id!=-1));
+			triangleRB.setEnabled(ok && (simple || id!=-1));
+			boxes.clear();
+			boxesList.updateUI();
+			t.setHasFramedBox(ok);
+			t.setHasSimpleFramedBox(simpleRB.isSelected());
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		if(!(figure instanceof Text))
+				throw new ClassCastException();
+		
+		Text t2 = (Text) glimpsePanel.getGlimpseFigure();
+		Text t = (Text)figure;
+		LaTeXDrawPoint2D p = t.getPosition();
+		
+		t.setOpacityColor(opacityColorButton.getColor());
+		p.x = Double.valueOf(xCoord.getValue().toString());
+		p.y = Double.valueOf(yCoord.getValue().toString());
+		t.setText(textField.getText());
+		t.setSize(sizeChoice.getSelectedItem().toString());
+		t.setIsBold(buttonBold.isSelected());
+		t.setIsItalic(buttonItalic.isSelected());
+		t.setTextFont(fontChoice.getSelectedItem().toString());
+		t.updateFontsBorders();
+		t.setOpaque(opaqueCB.isSelected());
+		t.setHasFramedBox(framedBoxCB.isSelected() && (simpleRB.isSelected() || !t2.getMultipleBox().isEmpty()));
+		if(framedBoxCB.isSelected())
+			t.setHasSimpleFramedBox(simpleRB.isSelected());
+		
+		if(t2.hasSimpleFramedBox())
+		{
+			t2.getSimpleBox().setText(t);
+			t.setSimpleBox(t2.getSimpleBox());
+		}
+		
+		if(t2.hasSeveralBoxes())
+		{
+			t.removeAllBoxes();
+			
+			if(!t2.getMultipleBox().isEmpty())
+				t.setHasFramedBox(true);
+			
+			for(FramedBox fb : t2.getMultipleBox())
+				t.addBox(fb);
+		}
+		
+		t.updateBorders();
+		drawPanel.getFrameParent().setExportAsMenu(true);
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+	
+	
+	
+	
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Text))
+				throw new ClassCastException();
+			
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+	
+	
+	
+	
+	@Override
+	public void itemStateChanged(ItemEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			Text t = (Text) glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JComboBox)
+			{
+				String name = ((JComboBox)o).getName();
+				
+				if(name.equals(LABEL_FONT))
+				{
+					setModified(true);
+					t.setTextFont(fontChoice.getSelectedItem().toString());
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_SIZE))
+				{
+					setModified(true);
+					t.setSize(sizeChoice.getSelectedItem().toString());
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+			
+			super.itemStateChanged(e);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+	
+	
+	
+	
+	@Override
+	public void keyReleased(KeyEvent e)
+	{
+		try
+		{
+			Object o = e.getSource();
+			Text t = (Text)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JTextField)
+			{
+				String name = ((JTextField)o).getName();
+				
+				if(name.equals(LABEL_TEXT))
+				{
+					if(multipleRB.isSelected())
+					{
+						boxes.removeAllElements();
+						boxesList.updateUI();
+						t.getMultipleBox().removeAllElements();
+						t.getTextPos().removeAllElements();
+						editBoxB.setEnabled(false);
+						circleRB.setEnabled(false);
+						ellipseRB.setEnabled(false);
+						rectangleRB.setEnabled(false);
+						triangleRB.setEnabled(false);
+						diamondRB.setEnabled(false);
+						boxSepCB.setEnabled(false);
+						frameSepField.setEnabled(false);
+						modifyBox.setEnabled(false);
+						removeBox.setEnabled(false);
+					}
+					
+					setModified(true);
+					t.setText(textField.getText());
+					buttonOk.setEnabled(textField.getText().length()!=0);
+					framedBoxCB.setEnabled(textField.getText().length()!=0);
+					if(t.getSimpleBox()!=null) t.getSimpleBox().updateBoxSize();
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+			
+			super.keyReleased(e);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			Text t = (Text)glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				
+				if(name.equals(LABEL_X))
+				{
+					setModified(true);
+					t.setX(Double.valueOf(xCoord.getValue().toString()).doubleValue());
+					if(t.getSimpleBox()!=null) t.getSimpleBox().updateBoxSize();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_Y))
+				{
+					setModified(true);
+					t.setY(Double.valueOf(yCoord.getValue().toString()).doubleValue());
+					if(t.getSimpleBox()!=null) t.getSimpleBox().updateBoxSize();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_FRAME_SEP))
+				{
+					double val = Double.valueOf(frameSepField.getValue().toString()).doubleValue();
+					
+					if(simpleRB.isSelected())
+					{
+						t.getSimpleBox().setFrameSep(val);
+						t.getSimpleBox().updateBoxSize();
+					}
+					else
+					{
+						((FramedBox)boxesList.getSelectedValue()).setFrameSep(val);
+						t.updateFramedBoxes();
+					}
+					
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+			
+			if(o instanceof JTextField)
+			{
+				String name = ((JTextField)o).getName();
+				
+				if(name.equals(LABEL_TEXT))
+				{
+					setModified(true);
+					t.setText(textField.getText());
+					if(t.getSimpleBox()!=null) t.getSimpleBox().updateBoxSize();
+					glimpsePanel.repaint();
+					return ;
+				}
+			}
+			
+			super.stateChanged(e);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+
+
+	public void focusGained(FocusEvent e)
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			if(o instanceof JList)
+			{
+				String name = ((JList)o).getName();
+				
+				if(name.equals(LABEL_BOX_LIST))
+				{
+					int id = boxesList.getSelectedIndex();
+					frameSepField.setEnabled(id!=-1);
+					boxSepCB.setEnabled(id!=-1);
+					editBoxB.setEnabled(id!=-1);
+					removeBox.setEnabled(id!=-1);
+					modifyBox.setEnabled(id!=-1);
+					rectangleRB.setEnabled(id!=-1);
+					circleRB.setEnabled(id!=-1);
+					ellipseRB.setEnabled(id!=-1);
+					diamondRB.setEnabled(id!=-1);
+					triangleRB.setEnabled(id!=-1);
+					return ;
+				}
+			}
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+
+
+	public void focusLost(FocusEvent e)
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			if(o instanceof JList)
+			{
+				String name = ((JList)o).getName();
+				
+				if(name.equals(LABEL_BOX_LIST))
+				{
+					int id = boxesList.getSelectedIndex();
+					frameSepField.setEnabled(id!=-1);
+					boxSepCB.setEnabled(id!=-1);
+					editBoxB.setEnabled(id!=-1);
+					removeBox.setEnabled(id!=-1);
+					modifyBox.setEnabled(id!=-1);
+					return ;
+				}
+			}
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace();
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+
+	public void mouseClicked(MouseEvent e)
+	{
+		// Nothing to do.
+	}
+
+	public void mouseEntered(MouseEvent e)
+	{
+		// Nothing to do.
+	}
+
+	public void mouseExited(MouseEvent e)
+	{
+		// Nothing to do.
+	}
+
+	public void mousePressed(MouseEvent e)
+	{
+		// Nothing to do.
+	}
+
+
+	public void mouseReleased(MouseEvent e)
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JList && boxesList!=null)
+		{
+			Object selection = boxesList.getSelectedValue();
+			
+			if(multipleRB.isSelected() && selection instanceof FramedBox)
+			{
+				FramedBox fb = (FramedBox)selection;
+				int style = fb.getBoxType();
+				
+				if(style==FramedBox.BOX_RECTANGLE)
+					rectangleRB.setSelected(true);
+				else if(style==FramedBox.BOX_CIRCLE)
+					circleRB.setSelected(true);
+				else if(style==FramedBox.BOX_ELLIPSE)
+					ellipseRB.setSelected(true);
+				else if(style==FramedBox.BOX_TRIANGLE)
+					triangleRB.setSelected(true);
+				else if(style==FramedBox.BOX_DIAMOND)
+					diamondRB.setSelected(true);
+				
+				setModified(true);
+				frameSepField.setValue(fb.getFrameSep());
+				boxSepCB.setSelected(fb.isBoxSep());
+			}
+		}
+	}
+}
+
+
+
+/**
+ * This class defines a frame to select the text to box.
+ * @since 1.7
+ * @author Arnaud BLOUIN
+ */
+class SelectTextFrame extends JDialog implements ActionListener, MouseListener
+{
+	private static final long serialVersionUID = 1L;
+
+	protected JButton buttonOk;
+	
+	/** This field allows the set the text */
+	protected JTextField textField;
+	
+	/** The frame of parameters. */
+	protected ParametersTextFrame textFrame;
+	
+	/** The framed box use to test the validity of the new box. */
+	protected FramedBox framedBox;
+	
+	/** Allows to display a message in the frame. */
+	protected JLabel msg;
+	
+	/** The position of the first selected character when the frame is displayed. */
+	protected int startPos;
+	
+	/** The position of the last selected character when the frame is displayed. */
+	protected int endPos;
+	
+	
+	
+	/**
+	 * The constructor.
+	 * @param frame The frame of parameters of a text.
+	 */
+	public SelectTextFrame(ParametersTextFrame frame)
+	{
+		super(frame, LaTeXDrawLang.getString1_7("ParametersTextFrame.34"), true); //$NON-NLS-1$
+		startPos = 0;
+		endPos = 0;
+		setResizable(false);
+		textFrame = frame;
+		framedBox = new FramedBox((Text)frame.glimpsePanel.getGlimpseFigure());
+		
+		JPanel pButtons = new JPanel();
+  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+  		setLocation(dim.width*1/3, dim.height*1/3);
+  		
+  		JPanel pGeneral = new JPanel(new GridBagLayout());
+  		
+  		GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;
+     	constraint.gridy = 0;
+     	constraint.gridwidth = 1;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.WEST;
+     	
+     	pGeneral.add(new JLabel(LaTeXDrawLang.getString1_7("ParametersTextFrame.35")), constraint); //$NON-NLS-1$
+     	
+  		textField = new JTextField();
+  		textField.setColumns(40);
+  		textField.setPreferredSize(new Dimension(250, 20));
+  		textField.setMinimumSize(new Dimension(250, 20));
+  		textField.setName(ParametersTextFrame.LABEL_TEXT);
+  		textField.setText(textFrame.textField.getText());
+  		textField.setEditable(false);
+  		textField.addMouseListener(this);
+  		constraint.gridy++;
+  		constraint.gridwidth = 5;
+     	pGeneral.add(textField, constraint);
+		
+     	msg = new JLabel(" ");//$NON-NLS-1$
+     	constraint.gridy++;
+     	pGeneral.add(msg, constraint);
+     	
+     	pGeneral.setBorder(new CompoundBorder(new TitledBorder(null, LaTeXDrawLang.getString1_7("ParametersTextFrame.36"),  //$NON-NLS-1$
+				  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+     	pGeneral.setPreferredSize(new Dimension(270, 100));
+     	
+		buttonOk = new JButton(AbstractParametersFrame.LABEL_OK);
+		JButton buttonCancel  = new JButton(AbstractParametersFrame.LABEL_CANCEL);  		
+		GridLayout gridButton = new GridLayout(1, 2);
+		
+  		buttonOk.setActionCommand(AbstractParametersFrame.NAME_BUTTON_OK);
+  		buttonOk.setEnabled(false);
+  		buttonCancel.setActionCommand(AbstractParametersFrame.NAME_BUTTON_CANCEL);
+  		
+  		pButtons.setLayout(gridButton);
+  		pButtons.add(buttonOk);
+  		pButtons.add(buttonCancel);
+  		buttonOk.addActionListener(this);
+  		buttonCancel.addActionListener(this);
+  		pButtons.setPreferredSize(new Dimension(30, 30));
+  		pButtons.setMaximumSize(new Dimension(30, 30));
+  		
+  		getContentPane().setLayout(new BorderLayout());
+     	getContentPane().add(pGeneral, BorderLayout.CENTER);
+		getContentPane().add(pButtons, BorderLayout.SOUTH);
+  		
+  		setSize(270, 170);
+	}
+
+	
+	
+	/**
+	 * Allows to do actions when an event is created.
+	 */
+	public void actionPerformed(ActionEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			if(o instanceof JButton || o instanceof JCheckBox)
+			{
+				String label = ((AbstractButton)o).getActionCommand();
+				
+				if(label.equals(AbstractParametersFrame.NAME_BUTTON_CANCEL))
+				{
+					textField.select(0, 0);
+					setVisible(false);
+					return;
+				}
+				
+				if(label.equals(AbstractParametersFrame.NAME_BUTTON_OK))
+				{
+					setVisible(false);
+					return;
+				}
+				
+				return ;
+			}
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+	
+	
+	/**
+	 * @return The indexes (start and end) of the selected text.
+	 */
+	public int[] getSelectedIndex()
+	{
+		if(textField!=null)
+		{
+			String text = textField.getSelectedText();
+			
+			if(text==null || text.length()==0)
+				return null;
+			
+			int[] is = {textField.getSelectionStart(), textField.getSelectionEnd()};
+			return is;
+		}
+		return null;
+	}
+	
+	
+	/**
+	 * @return The selected text.
+	 */
+	public String getSelectedText()
+	{
+		if(textField==null) return null;
+		
+		return textField.getSelectedText();
+	}
+	
+	
+
+	
+	public void mouseClicked(MouseEvent e)
+	{
+//		 Nothing to do.
+	}
+
+
+	public void mouseEntered(MouseEvent e)
+	{
+//		 Nothing to do.
+	}
+
+
+	public void mouseExited(MouseEvent e)
+	{
+//		 Nothing to do.
+	}
+
+
+	public void mousePressed(MouseEvent e)
+	{
+		// Nothing to do.
+	}
+
+
+	public void mouseReleased(MouseEvent e)
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JTextField)
+		{
+			String text = textField.getSelectedText();
+			int start = textField.getSelectionStart(), end = textField.getSelectionEnd();
+			Text txt = (Text)textFrame.glimpsePanel.getGlimpseFigure();
+			framedBox.setStart(start);
+			framedBox.setEnd(end);
+			boolean overlap =  framedBox.overlap(txt.getMultipleBox());
+			
+			if(overlap)
+				 msg.setText(LaTeXDrawLang.getString1_7("ParametersTextFrame.37")); //$NON-NLS-1$
+			else msg.setText(" ");//$NON-NLS-1$
+			
+			if(text==null || text.length()==0)
+				msg.setText(" ");//$NON-NLS-1$
+			
+			buttonOk.setEnabled(text!=null && text.length()>0 && !overlap);
+		}
+	}
+
+
+
+	@Override
+	public void setVisible(boolean ok)
+	{
+		if(ok)
+		{
+			textField.setText(((Text)textFrame.glimpsePanel.getGlimpseFigure()).getText());
+			textField.setSelectionStart(0);
+			textField.setSelectionEnd(0);
+			buttonOk.setEnabled(false);
+			msg.setText(" ");//$NON-NLS-1$
+		}
+		super.setVisible(ok);
+	}
+
+
+	
+	/**
+	 * Allows to show the frame and define the selected text.
+	 * @param start The position of the first selected character.
+	 * @param end The position of the last selected character.
+	 */
+	public void show(int start, int end)
+	{
+		startPos = start;
+		endPos = end;
+		textField.select(start, end);
+		buttonOk.setEnabled(start<end && start>=0);
+		
+		setVisible(true);
+	}
+
+
+	
+	@Override
+	public void paint(Graphics g)
+	{
+		textField.select(startPos, endPos);
+		buttonOk.setEnabled(startPos<endPos && startPos>=0);
+		super.paint(g);
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ParametersTriangleFrame.java b/current/latexDraw/ui/dialog/ParametersTriangleFrame.java
new file mode 100644
index 0000000..231ca10
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ParametersTriangleFrame.java
@@ -0,0 +1,358 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+
+import javax.swing.*;
+import javax.swing.border.CompoundBorder;
+import javax.swing.border.EmptyBorder;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+
+import latexDraw.figures.Figure;
+import latexDraw.figures.Triangle;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.util.LaTeXDrawPoint2D;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines the frame which allows to change the parameters of triangles.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ParametersTriangleFrame extends AbstractParametersFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	/** Allows to change the x-coordinates of the centre of the figure */
+	protected JSpinner baseCenterXField;
+	
+	/** Allows to change the y-coordinates of the centre of the figure */
+	protected JSpinner baseCenterYField;
+	
+	/** Allows to change the width of the triangle */
+	protected JSpinner widthField;
+	
+	/** Allows to change the height of the triangle */
+	protected JSpinner heightField;
+	
+
+	
+	/**
+	 * The constructor by default
+	 */
+	public ParametersTriangleFrame(Frame parent, DrawPanel p, boolean attachToMainFrame)
+	{
+		super(parent, p, attachToMainFrame);
+		
+		try
+		{
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel pButton  = createButtonsPanel(this);
+	  		JPanel pGeneral = new JPanel();
+	  		pGeneral.setLayout(new BoxLayout(pGeneral, BoxLayout.Y_AXIS));
+	  		JPanel coordP = new JPanel(new GridBagLayout());
+	  		GridBagConstraints constraint = new GridBagConstraints();
+	    	constraint.gridx = 0;
+	     	constraint.gridy = 0;
+	     	constraint.gridwidth = 1;
+	     	constraint.gridheight = 1;
+	     	constraint.weightx = 0.1;
+	     	constraint.weighty = 0.1;
+	     	constraint.fill = GridBagConstraints.NONE;
+	     	constraint.anchor = GridBagConstraints.CENTER;
+	     	coordP.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersTriangleFrame.0")), constraint); //$NON-NLS-1$
+	  		
+	     	SpinnerModel model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	baseCenterXField = new JSpinner(model);
+	     	baseCenterXField.setEditor(new JSpinner.NumberEditor(baseCenterXField, "0.0"));//$NON-NLS-1$
+			baseCenterXField.addChangeListener(this);
+	     	baseCenterXField.setName(LABEL_CENTER_X);
+	     	constraint.gridx = 1;	
+	     	coordP.add(baseCenterXField, constraint);
+
+	    	constraint.gridx++;
+	    	coordP.add(new JLabel(LaTeXDrawLang.getDialogFrameString("ParametersTriangleFrame.1")), constraint); //$NON-NLS-1$
+	  		
+	     	model = new SpinnerNumberModel(0,0,10000,0.1);
+	     	baseCenterYField = new JSpinner(model);
+	     	baseCenterYField.setEditor(new JSpinner.NumberEditor(baseCenterYField, "0.0"));//$NON-NLS-1$
+	     	baseCenterYField.addChangeListener(this);
+	     	baseCenterYField.setName(LABEL_CENTER_Y);
+	     	constraint.gridx++;	
+	     	coordP.add(baseCenterYField, constraint);
+	     	
+	     	model = new SpinnerNumberModel(Figure.DEFAULT_ROTATION_ANGLE, -360, 360,0.1);
+	     	rotationField = new JSpinner(model);
+	     	rotationField.setEditor(new JSpinner.NumberEditor(rotationField, "0.0"));	//$NON-NLS-1$     	
+	     	rotationField.setName(LaTeXDrawResources.LABEL_ROTATE);
+	     	rotationField.addChangeListener(this);
+	     	rotationField.setName(LaTeXDrawResources.LABEL_ROTATE);
+	     	constraint.gridx = 1;	constraint.gridwidth = 1;
+	     	coordP.add(rotationField, constraint);
+	     	
+	    	constraint.gridx = 0;	constraint.gridy++;
+	    	coordP.add(new JLabel(LABEL_WIDTH), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0.1,0.1,10000,0.1);
+	     	widthField = new JSpinner(model);
+	     	widthField.setEditor(new JSpinner.NumberEditor(widthField, "0.0"));//$NON-NLS-1$
+	     	widthField.addChangeListener(this);
+	     	widthField.setName(LABEL_WIDTH);
+	     	constraint.gridx++;
+	     	coordP.add(widthField, constraint);
+	   
+	     	constraint.gridx++;
+	     	coordP.add(new JLabel(LABEL_HEIGHT), constraint);
+	  		
+	     	model = new SpinnerNumberModel(0.1,0.1,10000,0.1);
+	     	heightField = new JSpinner(model);
+	     	heightField.setEditor(new JSpinner.NumberEditor(heightField, "0.0"));//$NON-NLS-1$
+	     	heightField.addChangeListener(this);
+	     	heightField.setName(LABEL_HEIGHT);
+	     	constraint.gridx++;
+	     	coordP.add(heightField, constraint);
+	     	
+	     	constraint.gridx = 0;	constraint.gridy++;
+	     	coordP.add(new JLabel(LABEL_ROTATION), constraint);
+	     	constraint.gridx++;
+	     	coordP.add(rotationField, constraint);
+	     	
+	     	coordP.setBorder(new CompoundBorder(new TitledBorder(null, LABEL_POSITION_DIMENSIONS, 
+							  TitledBorder.LEFT, TitledBorder.TOP), new EmptyBorder(0,0,0,0)));
+	     	pGeneral.add(coordP);
+	     	
+	     	pGeneral.add(createBordersPanel(true));
+	     	pGeneral.add(createDoubleLinePanel());
+	     	pGeneral.add(createFillPanel());
+	     	
+	     	JPanel pOther = new JPanel();
+	     	pOther.setLayout(new BoxLayout(pOther, BoxLayout.Y_AXIS));
+	     	pOther.add(createShadowPanel());
+	     	pOther.add(createGradientPanel());
+	     	pOther.add(createHatchingPanel());
+	     	
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_GENERAL, pGeneral);
+	     	tabbedPane.addTab(TITLE_TABBED_PANE_OTHERS, pOther);
+	     	BoxLayout bl = new BoxLayout(getContentPane(), BoxLayout.Y_AXIS);
+	     	getContentPane().setLayout(bl);
+	     	getContentPane().add(glimpsePanelZoom);
+	     	getContentPane().add(tabbedPane);
+			getContentPane().add(pButton);
+	  		pack();
+	  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+			setVisible(false);
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	@Override
+	public void saveParameters()
+	{
+		super.saveParameters();
+		
+		Triangle t = (Triangle)figure;
+		LaTeXDrawPoint2D p1 = t.getPoint(0), p2 = t.getPoint(1), 
+			  p3 = t.getPoint(2), p4 = t.getPoint(3);
+		double width = Double.valueOf(widthField.getValue().toString()).doubleValue();
+		double height = Double.valueOf(heightField.getValue().toString()).doubleValue();
+		double x = Double.valueOf(baseCenterXField.getValue().toString()).doubleValue();
+		double y = Double.valueOf(baseCenterYField.getValue().toString()).doubleValue();
+		
+		if(p1.y<p3.y)
+		{
+			p1.y = y - height;
+			p2.y = y - height;
+			p3.y = y;
+			p4.y = y;
+		}
+		else
+		{
+			p1.y = y;
+			p2.y = y;
+			p3.y = y - height;
+			p4.y = y - height;
+		}
+		
+		p1.x = x - width/2.;
+		p2.x = x + width/2.;
+		p3.x = x - width/2.;
+		p4.x = x + width/2.;
+
+		t.updateShape();
+		t.getBorders().updateNSEWDelimitors();
+		
+		drawPanel.getDraw().updateBorders();
+		drawPanel.updateDraw(true);
+	}
+
+	
+	
+
+	@Override
+	public void setFigureFrameField()
+	{
+		Triangle t = (Triangle)figure;
+		Triangle t2 = (Triangle) glimpsePanel.getGlimpseFigure();
+		LaTeXDrawPoint2D NW = t.getTheNWPoint(), SE = t.getTheSEPoint();
+		
+		baseCenterXField.removeChangeListener(this);
+		baseCenterYField.removeChangeListener(this);
+		widthField.removeChangeListener(this);
+		heightField.removeChangeListener(this);
+		
+		baseCenterXField.setValue((NW.x+SE.x)/2.);
+		baseCenterYField.setValue(SE.y);
+		widthField.setValue((SE.x-NW.x));
+		heightField.setValue(SE.y-NW.y);
+		
+		widthField.addChangeListener(this);
+		heightField.addChangeListener(this);
+		baseCenterXField.addChangeListener(this);
+		baseCenterYField.addChangeListener(this);
+		
+		for(int i=0; i<Triangle.NB_PTS_TRIANGLE; i++)
+			t2.getPoint(i).setLocation(t.getPoint(i));
+		
+		t2.updateGravityCenter();
+		t2.updateShape();
+		glimpsePanel.repaint();
+	}
+
+	
+	
+	@Override
+	public void stateChanged(ChangeEvent e) 
+	{
+		try
+		{
+			Object o = e.getSource();
+			
+			Triangle f = (Triangle) glimpsePanel.getGlimpseFigure();
+			
+			if(o instanceof JSpinner)
+			{
+				String name = ((JSpinner)o).getName();
+				LaTeXDrawPoint2D p1 = f.getPoint(0), p2 = f.getPoint(1), p3 = f.getPoint(2), p4 = f.getPoint(3);
+				double width = Double.valueOf(widthField.getValue().toString()).doubleValue();
+				double height = Double.valueOf(heightField.getValue().toString()).doubleValue();
+				double x = Double.valueOf(baseCenterXField.getValue().toString()).doubleValue();
+				double y = Double.valueOf(baseCenterYField.getValue().toString()).doubleValue();
+
+				if(name.equals(LABEL_CENTER_X))
+				{	
+					setModified(true);
+					f.shift(x-(p3.x+p4.x)/2., 0);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_CENTER_Y))
+				{
+					if(p1.y<p3.y)
+						f.shift(0, y-(p3.y+p4.y)/2.);
+					else
+						f.shift(0, y-(p1.y+p2.y)/2.);
+
+					setModified(true);
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_HEIGHT))
+				{
+					if(p1.y<p3.y)
+					{
+						p1.y = y - height;
+						p2.y = y - height;
+						p3.y = y;
+						p4.y = y;
+					}
+					else
+					{
+						p1.y = y;
+						p2.y = y;
+						p3.y = y - height;
+						p4.y = y - height;
+					}
+					
+					setModified(true);
+					f.updateShape();
+					glimpsePanel.repaint();
+					return ;
+				}
+				
+				if(name.equals(LABEL_WIDTH))
+				{					
+					p1.x = x - width/2.;
+					p2.x = x + width/2.;
+					p3.x = x - width/2.;
+					p4.x = x + width/2.;		
+					
+					setModified(true);
+					f.updateShape();
+					glimpsePanel.repaint();
+					return ;
+				}
+			}			
+				
+			super.stateChanged(e);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+
+	@Override
+	public void setVisible(boolean visible, Figure selected, boolean deleteOnCancel, boolean isFramedBox) 
+	{
+		try
+		{
+			if(!(selected instanceof Triangle))
+				throw new ClassCastException();
+			
+			if(isFramedBox)
+			{
+				baseCenterXField.setEnabled(false);
+				baseCenterYField.setEnabled(false);
+				widthField.setEnabled(false);
+				heightField.setEnabled(false);
+			}
+			
+			super.setVisible(visible, selected, deleteOnCancel, isFramedBox);
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}	
+	}
+}
diff --git a/current/latexDraw/ui/dialog/PictureChooser.java b/current/latexDraw/ui/dialog/PictureChooser.java
new file mode 100644
index 0000000..b73971a
--- /dev/null
+++ b/current/latexDraw/ui/dialog/PictureChooser.java
@@ -0,0 +1,263 @@
+package latexDraw.ui.dialog;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.File;
+
+import javax.swing.*;
+import javax.swing.border.BevelBorder;
+
+import latexDraw.filters.*;
+import latexDraw.lang.LaTeXDrawLang;
+
+
+/** 
+ * This class defines a file chooser for pictures; some elements come from
+ * the JavaSwing.jar demo code source Copyright (c) 2004 Sun Microsystems.<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 04/11/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class PictureChooser extends JDialog implements ActionListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The file chooser. */
+	JFileChooser fileChooser;
+	
+	/** The command name of the button cancel. */
+	public static final String CMD_CANCEL = "PICTURE_CHOSSER_CANCEL";//$NON-NLS-1$
+	
+	/** The command name of the button ok. */
+	public static final String CMD_OK = "PICTURE_CHOOSER_OK";//$NON-NLS-1$
+	
+	
+	
+	
+	/**
+	 * The constructor.
+	 * @param parent The parent of the frame.
+	 */
+	public PictureChooser(JFrame parent, String msg, boolean preview, String title)
+	{
+		super(parent, title, true); 
+		
+		fileChooser = new JFileChooser(); 
+ 		// add preview accessory 
+		if(preview)
+			fileChooser.setAccessory(new FilePreviewer(fileChooser)); 
+ 		// remove the approve/cancel buttons 
+		fileChooser.setControlButtonsAreShown(false); 
+ 		fileChooser.setApproveButtonText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.199")); //$NON-NLS-1$
+ 		fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+ 		fileChooser.addChoosableFileFilter(new BMPFilter());
+ 		fileChooser.addChoosableFileFilter(new PNGFilter());
+ 		fileChooser.addChoosableFileFilter(new PPMFilter());
+ 		fileChooser.addChoosableFileFilter(new GIFFilter());
+ 		fileChooser.addChoosableFileFilter(new JPGFilter());
+ 		fileChooser.setAcceptAllFileFilterUsed(true);
+ 		
+ 		// make custom controls 
+ 		JPanel custom = new JPanel(); 
+ 		custom.setLayout(new BoxLayout(custom, BoxLayout.Y_AXIS)); 
+ 		JLabel description = new JLabel(msg); 
+ 		description.setAlignmentX(Component.CENTER_ALIGNMENT); 
+ 		custom.add(description); 
+ 		custom.add(fileChooser); 
+  
+ 		JPanel buttonsPanel = new JPanel();
+ 		buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS)); 
+ 		
+ 		JButton cancel = new JButton(AbstractParametersFrame.LABEL_CANCEL);
+ 		cancel.setActionCommand(CMD_CANCEL);
+ 		cancel.addActionListener(this);
+ 		
+ 		JButton ok = new JButton(AbstractParametersFrame.LABEL_OK);
+ 		ok.setActionCommand(CMD_OK);
+ 		ok.addActionListener(this);
+ 		
+ 		buttonsPanel.add(ok);
+ 		buttonsPanel.add(cancel);
+ 		
+ 		custom.add(buttonsPanel);
+ 		
+ 		// show the filechooser 
+ 		setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 
+ 		getContentPane().add(custom, BorderLayout.CENTER); 
+ 		
+ 		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+  		pack();
+  		setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
+	}
+
+
+	
+	
+	/**
+	 * Allows to get the file chooser.
+	 * @return The file chooser.
+	 */
+	public synchronized JFileChooser getFileChooser()
+	{
+		return fileChooser;
+	}
+	
+	
+	
+	/**
+	 * Allows to display the frame.
+	 * @return The selected file.
+	 */
+	public File displayFrame()
+	{
+		super.setVisible(true);
+		return fileChooser.getSelectedFile();
+	}
+
+
+
+
+	public void actionPerformed(ActionEvent e)
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JButton)
+		{
+			String cmd = ((JButton)o).getActionCommand();
+			
+			if(cmd==null) return;
+			
+			if(cmd.equals(CMD_CANCEL))
+			{
+				fileChooser.setSelectedFile(null);
+				dispose();
+				return ;
+			}
+			
+			if(cmd.equals(CMD_OK))
+			{
+				dispose();
+				return ;
+			}
+		}
+		
+	}
+}
+
+
+
+/** 
+ *	1.14 04/07/26 
+ * Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved. 
+ *  
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions are met: 
+ *  
+ * -Redistribution of source code must retain the above copyright notice, this 
+ *  list of conditions and the following disclaimer. 
+ *  
+ * -Redistribution in binary form must reproduce the above copyright notice,  
+ *  this list of conditions and the following disclaimer in the documentation 
+ *  and/or other materials provided with the distribution. 
+ *  
+ * Neither the name of Sun Microsystems, Inc. or the names of contributors may  
+ * be used to endorse or promote products derived from this software without  
+ * specific prior written permission. 
+ *  
+ * This software is provided "AS IS," without a warranty of any kind. ALL  
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING 
+ * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 
+ * OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") 
+ * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE 
+ * AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS 
+ * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST  
+ * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,  
+ * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY  
+ * OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,  
+ * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 
+ *  
+ * You acknowledge that this software is not designed, licensed or intended 
+ * for use in the design, construction, operation or maintenance of any 
+ * nuclear facility. 
+ */ 
+class FilePreviewer extends JComponent implements PropertyChangeListener 
+{ 
+	private static final long serialVersionUID = 1L;
+	
+	ImageIcon thumbnail = null; 
+     
+	
+	
+    public FilePreviewer(JFileChooser fc) 
+    { 
+		setPreferredSize(new Dimension(100, 50)); 
+		fc.addPropertyChangeListener(this); 
+		setBorder(new BevelBorder(BevelBorder.LOWERED)); 
+    } 
+     
+    
+    public void loadImage(File f) 
+    { 
+        if(f == null)
+            thumbnail = null; 
+        else 
+        { 
+		    ImageIcon tmpIcon = new ImageIcon(f.getPath()); 
+		    
+		    if(tmpIcon.getIconWidth() > 90)
+		    	 thumbnail = new ImageIcon(tmpIcon.getImage().getScaledInstance(90, -1, Image.SCALE_DEFAULT)); 
+		    else 
+		    	thumbnail = tmpIcon; 
+        } 
+    } 
+     
+    public void propertyChange(PropertyChangeEvent e) 
+    { 
+		String prop = e.getPropertyName(); 
+		if(prop == JFileChooser.SELECTED_FILE_CHANGED_PROPERTY) 
+		{ 
+		    if(isShowing()) 
+		    { 
+		    	loadImage((File) e.getNewValue()); 
+	            repaint(); 
+		    } 
+		} 
+    } 
+     
+    
+    @Override
+	public void paint(Graphics g) 
+    { 
+		super.paint(g); 
+		if(thumbnail != null) 
+		{ 
+		    int x = getWidth()/2 - thumbnail.getIconWidth()/2; 
+		    int y = getHeight()/2 - thumbnail.getIconHeight()/2; 
+		    
+		    if(y < 0) y = 0; 
+		    if(x < 5) x = 5; 
+		    
+		    thumbnail.paintIcon(this, g, x, y); 
+		}
+	} 
+}
diff --git a/current/latexDraw/ui/dialog/PreferencesFrame.java b/current/latexDraw/ui/dialog/PreferencesFrame.java
new file mode 100644
index 0000000..9dee8cc
--- /dev/null
+++ b/current/latexDraw/ui/dialog/PreferencesFrame.java
@@ -0,0 +1,1513 @@
+package latexDraw.ui.dialog;
+
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.*;
+import java.util.Vector;
+
+import javax.swing.*;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.CodePanel;
+import latexDraw.ui.DrawContainer;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.components.Delimitor;
+import latexDraw.ui.components.MagneticGrid;
+import latexDraw.ui.components.XScale;
+import latexDraw.util.*;
+
+import org.w3c.dom.*;
+
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+
+
+/**
+ * This frame allows the user to set his preferences concerning the program and its components.<br>
+ * <br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/14/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class PreferencesFrame extends JFrame implements ActionListener
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The current drawing */
+	private DrawContainer draw;
+	
+	/** The main frame of the program */ 
+	private LaTeXDrawFrame mainFrame;
+		
+	/** The file chooser of paths selection */
+	private JFileChooser fileChooser;
+	
+	/** The title of the frame */
+	public static final String TITLE = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.Pref"); //$NON-NLS-1$
+	
+	/** The name of the button ok */
+	public static final String NAME_BUTTON_OK = "BUTTON_OK";//$NON-NLS-1$
+	
+	/** The name of the button cancel */
+	public static final String NAME_BUTTON_CANCEL = "BUTTON_CANCEL";//$NON-NLS-1$
+	
+	/** The name of the button default */
+	public static final String NAME_BUTTON_DEFAULT = "BUTTON_DEFAULT";//$NON-NLS-1$
+	
+	/** The label of the X-Scale checkBox */
+	public static final String LABEL_CHECKBOX_XSCALE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.38"); //$NON-NLS-1$
+	
+	/** The label of the Y-Scale checkBox */
+	public static final String LABEL_CHECKBOX_YSCALE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.39"); //$NON-NLS-1$
+	
+	/** The label of the Grid checkBox */
+	public static final String LABEL_CHECKBOX_GRID = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.grid"); //$NON-NLS-1$
+	
+	/** The label of the codePanel checkBox */
+	public static final String LABEL_CHECKBOX_CODEPANEL = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.codePanel"); //$NON-NLS-1$
+	
+	/** The label of the anti-aliasing checkBox */
+	public static final String LABEL_CHECKBOX_ANTIALIASING = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.antiAl"); //$NON-NLS-1$
+	
+	/** The label of the rendering checkBox */
+	public static final String LABEL_CHECKBOX_RENDERING = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.rendQ"); //$NON-NLS-1$
+	
+	/** The label of the colour rendering checkBox */
+	public static final String LABEL_CHECKBOX_COLORRENDER = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.colRendQ"); //$NON-NLS-1$
+	
+	/** The label of the alpha-interpolation checkBox */
+	public static final String LABEL_CHECKBOX_ALPHAINTER = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.AlphaQ"); //$NON-NLS-1$
+	
+	/** The label of the drawBorders checkBox */
+	public static final String LABEL_CHECKBOX_DISPLAY_BORDERS = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.bordersDraw"); //$NON-NLS-1$
+	
+	/** The name of the button which allows to select a directory for the commands open/save.*/
+	public static final String NAME_BUTTON_OPENFIELD = "BUTTON_OPENFIELD";//$NON-NLS-1$
+	
+	/** The name of the button which allows t select a directory for the exportation of the code. */
+	public static final String NAME_BUTTON_EXPORTFIELD = "BUTTON_EXPORTFIELD";//$NON-NLS-1$
+
+	public static final String NAME_BUTTON_TEX_EDITOR = "BUTTON_TEX_EDITOR";//$NON-NLS-1$
+
+	public static final String NAME_BUTTON_LATEX_DISTRIB = "BUTTON_LATEX";//$NON-NLS-1$
+
+	/** The label of the check-box code auto-update */
+	public static final String LABEL_AUTOUPDATE = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.codeAuto"); //$NON-NLS-1$
+	
+	/** The label of the Check-box checkNewVersion */
+	public static final String LABEL_CHECK_VERSION = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.newVers"); //$NON-NLS-1$
+	
+	public static final String LABEL_LANG = LaTeXDrawLang.getDialogFrameString("PreferencesFrame.lge"); //$NON-NLS-1$
+	
+	public static final int NB_RECENT_FILES = 5;
+	
+	/** The label of the preferences */
+	public static final String LABEL_PREFERENCES = "TEX_DRAW_PREFERENCES";//$NON-NLS-1$
+	
+	/** This check-box allows to set if antialiasing must be used */
+	private JCheckBox antialiasingCheckBox;
+	
+	/** This check-box allows to set if rendering quality must be used */
+	private JCheckBox renderingCheckBox;
+	
+	/** This check-box allows to set if colour rendering quality must be used */
+	private JCheckBox colorRenderCheckBox;
+	
+	/** This check-box allows to set if the user wants to display the grid */
+	private JCheckBox displayGridCB;
+	
+	private JCheckBox magneticGridCB;
+	
+	/** This check-box allows to set if the user wants to display the X-scale */
+	private JCheckBox displayXScaleCB;
+	
+	/** This check-box allows to set if the user wants to display the Y-scale */
+	private JCheckBox displayYScaleCB;
+	
+	/** Allows to update or not in real time the PSTricks code */
+	private JCheckBox codeAutoUpdateCB;
+	
+	/** Allows the set if the program must check new version on start up */
+	private JCheckBox checkNewVersion;
+	
+	/** This check-box allows to set if the user wants to display the codepanel */
+	private JCheckBox displayCodePanelCB;
+	
+	/** This check-box allows to set if the user wants to the borders
+	 * of the drawing */
+	private JCheckBox displayBordersCB;
+	
+	/** This check-box allows to set if alpha-interpolation must be used */
+	private JCheckBox alpaInterCheckBox;
+	
+	/** This textField allows to set the default directories for open/save
+	 * actions */
+	private JTextField pathOpenField;
+	
+	/** This textField allows to set the default directories for exportations
+	 * actions */
+	private JTextField pathExportField;
+
+	private JTextField pathTexEditorField;
+	
+	private JTextField pathLatexDistribField;
+	
+	private JTextArea latexIncludes;
+	
+	/** Allows to set the unit of length by default */
+	private JComboBox unitChoice;
+	
+	private JComboBox themeList;
+	
+	private JComboBox langList;
+	
+	private JRadioButton classicGridRB;
+
+	private JRadioButton persoGridRB;
+	
+	private JSpinner persoGridGapField;
+	
+	private JSpinner nbRecentFilesField;
+
+	private Vector<String> recentFilesName;
+	
+	/** Define if the main frame is maximised or not. @since 2.0.0 */
+	private boolean isFrameMaximized;
+	
+	/** Define the size of the main frame. @since 2.0.0 */
+	private Dimension frameSize;
+	
+	/** Define the position of the main frame. @since 2.0.0 */
+	private Point framePosition;
+	
+	/** Define the position of the divider. @since 2.0.0 */
+	private double dividerPosition = 1;
+	
+	/* These attributes are used to be able to restore the fields value when cancelling modifications. */
+	private int curNbRecentFiles;
+	private int curGridGap;
+	private boolean curClassicGrid;
+	private String curLang;
+	private String curTheme;
+	private String curUnit;
+	private String curTexPath;
+	private String curExportPath;
+	private String curOpenPath;
+	private boolean curAlpha;
+	private boolean curDisplayBord;
+	private boolean curDisplayCode;
+	private boolean curCheckVers;
+	private boolean curAutoUpdte;
+	private boolean curYScale;
+	private boolean curXScale;
+	private boolean curDisplayGrid;
+	private boolean curMagnetic;
+	private boolean curColRender;
+	private boolean curRendering;
+	private boolean curAntiAlias;
+	private String curLatexDistrib;
+	private String curLatexIncludes;
+	
+
+	
+	/**
+	 * The constructor using a frame.
+	 * @param d The current drawing.
+	 * @param frame The LaTeXDrawFrame (used to set the preferences).
+	 */
+	public PreferencesFrame(DrawContainer d, LaTeXDrawFrame frame) 
+	{
+		try
+		{
+			draw = d;
+			mainFrame = frame;
+	  		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
+
+	  		setIconImage(LaTeXDrawResources.propertiesIcon.getImage());
+		  		
+		  	setTitle(TITLE);
+	  		setLocation(dim.width*1/3, dim.height*1/4);
+	  		
+	  		recentFilesName = new Vector<String>();
+	  		JTabbedPane tabbedPane = new JTabbedPane();
+	  		JPanel pButton  = new JPanel(new BorderLayout());
+	  		JPanel pGeneral = new JPanel(new BorderLayout());
+	  		
+	  		tabbedPane.add(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.general"), createGeneralPanel()); //$NON-NLS-1$
+	  		tabbedPane.add(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.folders"), createFoldersPanel()); //$NON-NLS-1$
+	  		tabbedPane.add(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.quality"), createQualityPanel()); //$NON-NLS-1$
+	  		tabbedPane.add(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.90"), createDisplayPanel()); //$NON-NLS-1$
+	  		tabbedPane.add(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.92"), createCodePanel()); //$NON-NLS-1$
+	  		tabbedPane.add(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.grid"), createGridPanel()); //$NON-NLS-1$
+	  		tabbedPane.add("LaTeX", createLatexPanel()); //$NON-NLS-1$
+	  		
+	  		JButton buttonOk  = new JButton(AbstractParametersFrame.LABEL_OK), 
+				buttonCancel  = new JButton(AbstractParametersFrame.LABEL_CANCEL),
+				buttonDefault = new JButton(AbstractParametersFrame.LABEL_DEFAULT);  		
+	  		GridLayout  gridButton = new GridLayout(1, 3);
+	  		
+	  		buttonOk.setActionCommand(NAME_BUTTON_OK);
+	  		buttonCancel.setActionCommand(NAME_BUTTON_CANCEL);
+	  		buttonDefault.setActionCommand(NAME_BUTTON_DEFAULT);
+	  		buttonOk.addActionListener(this);
+			buttonCancel.addActionListener(this);
+			buttonDefault.addActionListener(this);
+			
+			pButton.setLayout(gridButton);
+			pButton.add(buttonOk);
+			pButton.add(buttonCancel);
+			pButton.add(buttonDefault);
+			pGeneral.add(tabbedPane, BorderLayout.CENTER);
+			pGeneral.add(pButton, BorderLayout.SOUTH);
+	  		
+			getContentPane().add(pGeneral);
+	  		setSize(480, 310);//Fixes #1562954
+			setVisible(false);
+			
+			readXMLPreferences();
+			
+			fileChooser = new JFileChooser();
+			fileChooser.setApproveButtonText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.171"));	//$NON-NLS-1$
+			fileChooser.setDialogTitle(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.selectFolder"));	//$NON-NLS-1$
+			fileChooser.setMultiSelectionEnabled(false);
+			
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create the panel which allows the user to set the general preferences of latexdraw.
+	 * @return The panel.
+	 */	
+	private JPanel createGeneralPanel()
+	{
+		JPanel pGeneral = new JPanel();
+		JPanel pLang 	= new JPanel();
+		JPanel pEditor 	= new JPanel();
+  		JPanel pRecent 	= new JPanel();
+  		JPanel pTheme	= new JPanel();
+	
+  		pTheme.setLayout(new BoxLayout(pTheme, BoxLayout.X_AXIS));
+		pEditor.setLayout(new BoxLayout(pEditor, BoxLayout.X_AXIS));
+		pLang.setLayout(new GridLayout(1, 2));
+  		pGeneral.setLayout(new GridLayout(6, 1));
+  		pRecent.setLayout(new FlowLayout(FlowLayout.LEFT));
+  		
+  		JButton bChooseEditor = new JButton(LaTeXDrawResources.openIcon);
+  		bChooseEditor.addActionListener(this);
+  		bChooseEditor.setActionCommand(NAME_BUTTON_TEX_EDITOR);
+  		pathTexEditorField = new JTextField();
+  		pathTexEditorField.setMaximumSize(new Dimension(300,30));
+  		checkNewVersion = new JCheckBox(LABEL_CHECK_VERSION);
+  		langList = new JComboBox();
+  		langList.addItem(LaTeXDrawLang.LANG_DE);
+  		langList.addItem(LaTeXDrawLang.LANG_EN);
+  		langList.addItem(LaTeXDrawLang.LANG_EN_US);
+  		langList.addItem(LaTeXDrawLang.LANG_ES);
+  		langList.addItem(LaTeXDrawLang.LANG_FR);
+  		langList.addItem(LaTeXDrawLang.LANG_IT);
+  		langList.addItem(LaTeXDrawLang.LANG_PL);
+  		langList.setSelectedItem(LaTeXDrawLang.getlangCurrent());
+  		langList.setPreferredSize(new Dimension(75, 30));
+  		langList.setSize(new Dimension(75, 30));
+  		langList.setMaximumSize(new Dimension(75, 30));
+  		langList.setMinimumSize(new Dimension(75, 30));
+     	
+  		SpinnerModel model = new SpinnerNumberModel(NB_RECENT_FILES,0,20,1);
+  		nbRecentFilesField = new JSpinner(model);
+  		nbRecentFilesField.setEditor(new JSpinner.NumberEditor(nbRecentFilesField, "0"));//$NON-NLS-1$
+  		nbRecentFilesField.setPreferredSize(new Dimension(45,25));
+  		nbRecentFilesField.setMaximumSize(new Dimension(45,25));
+  		pRecent.add(new JLabel(LaTeXDrawLang.getString1_9("PreferencesFrame.0"))); //$NON-NLS-1$
+  		pRecent.add(nbRecentFilesField);
+  		
+  		UIManager.LookAndFeelInfo[] info = UIManager.getInstalledLookAndFeels();
+  		String[] nameThemes = new String[info.length];
+  		
+  		for(int i=0; i<info.length;i++)
+  			nameThemes[i] = info[i].getName();
+  		
+  		themeList = new JComboBox(nameThemes);
+  		themeList.setMaximumSize(new Dimension(120, 30));
+  		themeList.setMinimumSize(new Dimension(120, 30));
+  		pTheme.add(new JLabel(LaTeXDrawLang.getString1_9("PreferencesFrame.1"))); //$NON-NLS-1$
+  		pTheme.add(themeList);
+     	
+  		pLang.add(new JLabel(LABEL_LANG));
+  		pLang.add(langList);
+  		pEditor.add(pathTexEditorField);
+  		pEditor.add(bChooseEditor);
+  		pGeneral.add(pLang);
+  		
+  		if(LaTeXDrawFrame.WITH_UPDATE)
+	  		pGeneral.add(checkNewVersion);
+  		
+  		pGeneral.add(new JLabel(LaTeXDrawLang.getString1_8("PreferencesFrame.3"))); //$NON-NLS-1$
+  		pGeneral.add(pEditor);
+  		pGeneral.add(pRecent);
+  		pGeneral.add(pTheme);
+  		
+		return pGeneral;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create the panel which allows the user to set the code panel preferences.
+	 * @return The panel.
+	 */	
+	private JPanel createCodePanel()
+	{
+		JPanel pCode = new JPanel(new GridLayout(6, 1));
+  		
+  		codeAutoUpdateCB = new JCheckBox(LABEL_AUTOUPDATE);
+  		
+  		pCode.add(codeAutoUpdateCB);
+  		
+		return pCode;
+	}
+	
+	
+	
+	
+	/**
+	 * Creates a JPanel containing elements allowing the set of the grid parameters.
+	 * @return The created JPanel.
+	 */
+	private JPanel createGridPanel()
+	{
+		JPanel pGrid = new JPanel(new GridLayout(5, 1)), pGap = new JPanel(new FlowLayout(FlowLayout.LEFT));
+
+  		ButtonGroup bg = new ButtonGroup();
+  		classicGridRB  = new JRadioButton(LaTeXDrawLang.getString1_8("PreferencesFrame.4")); //$NON-NLS-1$
+  		persoGridRB    = new JRadioButton(LaTeXDrawLang.getString1_8("PreferencesFrame.5")); //$NON-NLS-1$
+  		bg.add(classicGridRB);
+  		bg.add(persoGridRB);
+  		classicGridRB.setSelected(true);
+  		displayGridCB      = new JCheckBox(LABEL_CHECKBOX_GRID);
+  		magneticGridCB	   = new JCheckBox(LaTeXDrawLang.getString1_8("PreferencesFrame.6")); //$NON-NLS-1$
+     	SpinnerModel model = new SpinnerNumberModel(MagneticGrid.DEFAULT_PERSONAL_GRID_GAP, 2, 100000, 1);
+     	persoGridGapField = new JSpinner(model);
+     	persoGridGapField.setEditor(new JSpinner.NumberEditor(persoGridGapField, "0"));//$NON-NLS-1$
+     	persoGridGapField.setPreferredSize(new Dimension(45,25));
+     	persoGridGapField.setMaximumSize(new Dimension(45,25));
+     	pGap.add(new JLabel(LaTeXDrawLang.getString1_8("PreferencesFrame.7"))); //$NON-NLS-1$
+     	pGap.add(persoGridGapField);
+     	
+  		pGrid.add(displayGridCB);
+  		pGrid.add(classicGridRB);
+  		pGrid.add(persoGridRB);
+  		pGrid.add(magneticGridCB);
+  		pGrid.add(pGap);
+  		
+		return pGrid;
+
+	}
+	
+	
+	
+	private JPanel createLatexPanel()
+	{
+		JPanel pLatex 		 = new JPanel();
+		JPanel pLatexDistrib = new JPanel();
+		JLabel label         =  new JLabel("The path of the latex binaires:");
+		
+		label.setAlignmentX(Component.RIGHT_ALIGNMENT);
+		pLatex.setLayout(new BoxLayout(pLatex, BoxLayout.Y_AXIS));
+		pLatexDistrib.setLayout(new BoxLayout(pLatexDistrib, BoxLayout.X_AXIS));
+  		pathLatexDistribField = new JTextField();
+  		pathLatexDistribField.setMaximumSize(new Dimension(700,30));
+  		pathLatexDistribField.setMinimumSize(new Dimension(300,30));
+  		
+  		JButton bChooseLatex  = new JButton(LaTeXDrawResources.openIcon);
+  		bChooseLatex.addActionListener(this);
+  		bChooseLatex.setActionCommand(NAME_BUTTON_LATEX_DISTRIB);
+  		
+  		latexIncludes = new JTextArea();
+  		latexIncludes.setToolTipText("<html>Include in this list the latex packages you regularly use in your drawing, e.g. :<br>\\usepackage[frenchb]{babel}<br>\\usepackage[utf8]{inputenc}</html>");
+  		JScrollPane scrollPane = new JScrollPane(latexIncludes); 
+  		
+  		pLatexDistrib.add(pathLatexDistribField);
+  		pLatexDistrib.add(bChooseLatex);
+  		pLatex.add(label);
+  		pLatex.add(pLatexDistrib);
+  		pLatex.add(scrollPane);
+  		
+		return pLatex;
+	}
+	
+	
+	
+	/**
+	 * Allows to create the panel which allows the user to set the preferences about displayable elements.
+	 * @return The panel.
+	 */	
+	private JPanel createDisplayPanel()
+	{
+  		JPanel pDisplay = new JPanel(new GridLayout(5, 1));
+  		 		
+   		displayCodePanelCB = new JCheckBox(LABEL_CHECKBOX_CODEPANEL);
+  		displayXScaleCB    = new JCheckBox(LABEL_CHECKBOX_XSCALE);
+  		displayYScaleCB    = new JCheckBox(LABEL_CHECKBOX_YSCALE);
+  		displayBordersCB   = new JCheckBox(LABEL_CHECKBOX_DISPLAY_BORDERS);
+  		unitChoice = new JComboBox();
+  		unitChoice.addItem(XScale.LABEL_CM);
+  		unitChoice.addItem(XScale.LABEL_INCH);
+  		
+  		pDisplay.add(displayCodePanelCB);
+  		pDisplay.add(displayXScaleCB);
+  		pDisplay.add(displayYScaleCB);
+  		pDisplay.add(displayBordersCB);
+  		pDisplay.add(unitChoice);
+  		
+  		return pDisplay;
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to create the panel which allows the user to set preferences about paths.
+	 * @return The panel.
+	 */	
+	private JPanel createFoldersPanel()
+	{
+  		JPanel pFolders  = new JPanel(new GridBagLayout());
+  		pathExportField  = new JTextField();
+  		pathOpenField    = new JTextField();
+  		JButton bExport  = new JButton(LaTeXDrawResources.openIcon);
+  		JButton bOpen    = new JButton(LaTeXDrawResources.openIcon);
+  		
+  		bExport.setActionCommand(NAME_BUTTON_EXPORTFIELD);
+  		bOpen.setActionCommand(NAME_BUTTON_OPENFIELD);
+  		bExport.addActionListener(this);
+  		bOpen.addActionListener(this);
+  		
+  		GridBagConstraints constraint = new GridBagConstraints();
+    	constraint.gridx = 0;
+     	constraint.gridy = 0;
+     	constraint.gridwidth = 6;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.HORIZONTAL;
+     	constraint.anchor = GridBagConstraints.EAST;
+     	pFolders.add(new JLabel(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.defOpenSave")), constraint); //$NON-NLS-1$
+     	
+  		constraint = new GridBagConstraints();
+    	constraint.gridx = 0;
+     	constraint.gridy = 1;
+     	constraint.gridwidth = 6;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 10;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.HORIZONTAL;
+     	constraint.anchor = GridBagConstraints.EAST;
+     	pFolders.add(pathOpenField, constraint);
+  		
+     	constraint = new GridBagConstraints();
+    	constraint.gridx = 6;
+     	constraint.gridy = 1;
+     	constraint.gridwidth = 1;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.EAST;
+     	pFolders.add(bOpen, constraint);
+ 
+     	constraint = new GridBagConstraints();
+    	constraint.gridx = 0;
+     	constraint.gridy = 2;
+     	constraint.gridwidth = 6;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.HORIZONTAL;
+     	constraint.anchor = GridBagConstraints.EAST;
+     	pFolders.add(new JLabel(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.defFold")), constraint); //$NON-NLS-1$
+     	
+  		constraint = new GridBagConstraints();
+    	constraint.gridx = 0;
+     	constraint.gridy = 3;
+     	constraint.gridwidth = 6;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 10;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.HORIZONTAL;
+     	constraint.anchor = GridBagConstraints.EAST;
+     	pFolders.add(pathExportField, constraint);
+  		
+     	constraint = new GridBagConstraints();
+    	constraint.gridx = 6;
+     	constraint.gridy = 3;
+     	constraint.gridwidth = 1;
+     	constraint.gridheight = 1;
+     	constraint.weightx = 0.1;
+     	constraint.weighty = 0.1;
+     	constraint.fill = GridBagConstraints.NONE;
+     	constraint.anchor = GridBagConstraints.EAST;
+     	pFolders.add(bExport, constraint);
+     
+  		return pFolders;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to create the panel which allows the user to set preferences about the rendering.
+	 * @return The panel.
+	 */
+	private JPanel createQualityPanel()
+	{
+  		JPanel pQuality  = new JPanel(new GridLayout(4, 1));
+
+  		antialiasingCheckBox = new JCheckBox(LABEL_CHECKBOX_ANTIALIASING);
+  		renderingCheckBox    = new JCheckBox(LABEL_CHECKBOX_RENDERING);
+  		colorRenderCheckBox  = new JCheckBox(LABEL_CHECKBOX_COLORRENDER);
+  		alpaInterCheckBox    = new JCheckBox(LABEL_CHECKBOX_ALPHAINTER);
+  		
+  		pQuality.add(antialiasingCheckBox);
+  		pQuality.add(renderingCheckBox);
+  		pQuality.add(colorRenderCheckBox);
+  		pQuality.add(alpaInterCheckBox);
+  		
+  		return pQuality;
+	}
+	
+
+	
+	public void actionPerformed(ActionEvent e) 
+	{
+		Object o = e.getSource();
+		
+		try
+		{
+			if(o instanceof JButton)
+			{
+				String label = ((JButton)o).getActionCommand();
+				
+				if(label==null)
+					return ;
+				
+				
+				if(label.equals(NAME_BUTTON_CANCEL))
+				{
+					super.setVisible(false);
+					nbRecentFilesField.setValue(curNbRecentFiles);
+					persoGridGapField.setValue(curGridGap);
+					classicGridRB.setSelected(curClassicGrid);
+					langList.setSelectedItem(curLang);
+					themeList.setSelectedItem(curTheme);
+					unitChoice.setSelectedItem(curUnit);
+					pathTexEditorField.setText(curTexPath);
+					pathExportField.setText(curExportPath);
+					pathOpenField.setText(curOpenPath);
+					alpaInterCheckBox.setSelected(curAlpha);
+					antialiasingCheckBox.setSelected(curAntiAlias);
+					renderingCheckBox.setSelected(curRendering);
+					colorRenderCheckBox.setSelected(curColRender);
+					magneticGridCB.setSelected(curMagnetic);
+					displayGridCB.setSelected(curDisplayGrid);
+					displayXScaleCB.setSelected(curXScale);
+					displayYScaleCB.setSelected(curYScale);
+					codeAutoUpdateCB.setSelected(curAutoUpdte);
+					checkNewVersion.setSelected(curCheckVers);
+					displayCodePanelCB.setSelected(curDisplayCode);
+					displayBordersCB.setSelected(curDisplayBord);
+					latexIncludes.setText(curLatexIncludes);
+					pathLatexDistribField.setText(curLatexDistrib);
+					
+					return;
+				}
+				
+				if(label.equals(NAME_BUTTON_DEFAULT))
+				{					
+					setDefaultValues();
+					return;
+				}
+				
+				if(label.equals(NAME_BUTTON_OK))
+				{
+					writeXMLPreferences(true);
+					mainFrame.setLatexIncludes(latexIncludes.getText());
+					mainFrame.setPathDistribLatex(pathLatexDistribField.getText());
+					mainFrame.setPathTexEditor(pathTexEditorField.getText());
+					mainFrame.setPathExport(pathExportField.getText());
+					mainFrame.setPathOpen(pathOpenField.getText());
+					draw.setAntiAliasingValue(antialiasingCheckBox.isSelected());
+					draw.setRenderingcolorValue(colorRenderCheckBox.isSelected());
+					draw.setAlphaInterValue(alpaInterCheckBox.isSelected());
+					draw.setRenderingValue(renderingCheckBox.isSelected());
+					setVisible(false);
+					return;
+				}
+				
+				if(label.equals(NAME_BUTTON_TEX_EDITOR))
+				{ 
+					fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+					fileChooser.showSaveDialog(this);
+					File file = fileChooser.getSelectedFile();
+					
+					if(file!=null && file.exists() && file.isFile())
+							pathTexEditorField.setText(file.getPath());
+
+					return;
+				}
+				
+				if(label.equals(NAME_BUTTON_LATEX_DISTRIB))
+				{ 
+					fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+					fileChooser.showSaveDialog(this);
+					File file = fileChooser.getSelectedFile();
+					
+					if(file!=null && file.exists() && file.isFile())
+						pathLatexDistribField.setText(file.getPath());
+					
+					return;
+				}
+				
+				if(label.equals(NAME_BUTTON_OPENFIELD))
+				{ 
+					fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+					fileChooser.setCurrentDirectory(new File(pathOpenField.getText()));
+					fileChooser.showSaveDialog(this);
+					File file = fileChooser.getSelectedFile();
+					
+					if(file!=null)
+						if(file.isDirectory())
+							pathOpenField.setText(file.getPath());
+					
+					return;
+				}
+				
+				if(label.equals(NAME_BUTTON_EXPORTFIELD))
+				{
+					fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+					fileChooser.setCurrentDirectory(new File(pathExportField.getText()));
+					fileChooser.showSaveDialog(this);
+					File file = fileChooser.getSelectedFile();
+					
+					if(file!=null)
+						if(file.isDirectory())
+							pathExportField.setText(file.getPath());
+
+					return;
+				}
+			} // if(o instanceof JButton)
+		}catch(Exception ex) 
+		{ 
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+
+	
+	
+	
+	/**
+	 * Reads the preferences of latexdraw defined in XML.
+	 * @since 2.0.0
+	 */
+	public void readXMLPreferences()
+	{
+        File xml = new File(LaTeXDrawPath.PATH_PREFERENCES_XML_FILE);
+    	File prefOld = new File(LaTeXDrawPath.PATH_PREFERENCES_FILE_OLD);
+    	
+        setDefaultValues();
+        
+        if(!xml.exists())
+        {
+        	if(prefOld.exists())
+        	{
+        		readPreferences();
+        		writeXMLPreferences(false);
+        	}
+        	else
+        		updateDrawPreferences();
+        	
+        	return ;
+        }
+        
+		prefOld.delete();
+        
+		try
+		{
+            DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();
+            DocumentBuilder constructeur = fabrique.newDocumentBuilder();
+            Document document = constructeur.parse(xml);
+            Node n = document.getFirstChild(), n2;
+            NodeList nl;
+            int size, i;
+            String name, content;
+           
+            isFrameMaximized = true;
+            
+            if(n==null || !n.getNodeName().equals(LaTeXDrawNamespace.XML_ROOT_PREFERENCES))
+            	throw new NullPointerException();
+            
+            nl = n.getChildNodes();
+            
+            for(i=0, size=nl.getLength(); i<size; i++)
+            {
+            	n = nl.item(i);
+            	name = n.getNodeName();
+            	content = n.getTextContent();
+            	
+            	if(name==null || name.length()==0)
+            		continue;
+            	
+            	if(name.equals(LaTeXDrawNamespace.XML_LATEX_INCLUDES)) latexIncludes.setText(content);
+            	else if(name.equals(LaTeXDrawNamespace.XML_PATH_LATEX_DISTRIB)) pathLatexDistribField.setText(content);
+            	else if(name.equals(LaTeXDrawNamespace.XML_ALPHA_INTER)) alpaInterCheckBox.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_ANTI_ALIAS)) antialiasingCheckBox.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_AUTO_UPDATE)) codeAutoUpdateCB.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_CHECK_VERSION)) checkNewVersion.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_CLASSIC_GRID))
+            	{
+            		classicGridRB.setSelected(Boolean.valueOf(content).booleanValue());
+            		persoGridRB.setSelected(!Boolean.valueOf(content).booleanValue());
+            	}
+            	else if(name.equals(LaTeXDrawNamespace.XML_COLOR_RENDERING)) colorRenderCheckBox.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_DRAW_BORDERS)) displayBordersCB.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_DISPLAY_CODE_PANEL)) displayCodePanelCB.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_DISPLAY_GRID)) displayGridCB.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_DISPLAY_X)) displayXScaleCB.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_DISPLAY_Y)) displayYScaleCB.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_GRID_GAP)) persoGridGapField.setValue(Integer.valueOf(content).intValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_LAF))
+            	{
+    				int count = themeList.getItemCount(), j=0;
+    				boolean again = true;
+    				
+    				while(j<count && again)
+    					if(themeList.getItemAt(j).toString().equals(content))
+    						again = false;
+    					else
+    						j++;
+    			
+    				if(again)
+    					 themeList.setSelectedItem(UIManager.getCrossPlatformLookAndFeelClassName());
+    				else themeList.setSelectedIndex(j);
+            	}
+            	else if(name.equals(LaTeXDrawNamespace.XML_LANG)) langList.setSelectedItem(content);
+            	else if(name.equals(LaTeXDrawNamespace.XML_MAGNETIC_GRID)) magneticGridCB.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_PATH_EXPORT)) pathExportField.setText(content);
+            	else if(name.equals(LaTeXDrawNamespace.XML_PATH_OPEN)) pathOpenField.setText(content);
+            	else if(name.equals(LaTeXDrawNamespace.XML_PATH_TEX_EDITOR)) pathTexEditorField.setText(content);
+            	else if(name.equals(LaTeXDrawNamespace.XML_RENDERING)) renderingCheckBox.setSelected(Boolean.valueOf(content).booleanValue());
+            	else if(name.equals(LaTeXDrawNamespace.XML_UNIT)) unitChoice.setSelectedItem(content);
+            	else if(name.equals(LaTeXDrawNamespace.XML_RECENT_FILES))
+            	{
+            		NodeList nl2 = n.getChildNodes();
+            		NamedNodeMap nnm = n.getAttributes();
+            		recentFilesName.clear();
+            		
+            		if(nnm!=null && nnm.getNamedItem(LaTeXDrawNamespace.XML_NB_RECENT_FILES)!=null)
+            		{
+            			Node attr = nnm.getNamedItem(LaTeXDrawNamespace.XML_NB_RECENT_FILES);
+            			
+            			if(attr!=null)
+            				nbRecentFilesField.setValue(Integer.valueOf(attr.getTextContent()).intValue());
+            		}
+            		
+            		for(int j=0, size2=nl2.getLength(); j<size2; j++)
+            		{
+            			n2 = nl2.item(j);
+            			
+            			if(n2.getNodeName().equals(LaTeXDrawNamespace.XML_RECENT_FILE) && n2.getTextContent()!=null)
+            				recentFilesName.add(n2.getTextContent());
+            		}
+            	}
+            	else if(name.equals(LaTeXDrawNamespace.XML_MAXIMISED)) isFrameMaximized = Boolean.valueOf(content).booleanValue();
+            	else if(name.equals(LaTeXDrawNamespace.XML_SIZE))
+            	{
+            		NodeList nl2 = n.getChildNodes();
+            		frameSize = new Dimension();
+            		
+            		for(int j=0, size2=nl2.getLength(); j<size2; j++)
+            		{
+            			n2 = nl2.item(j);
+            			
+            			if(n2.getNodeName().equals(LaTeXDrawNamespace.XML_WIDTH)) 
+            				frameSize.width = Integer.valueOf(n2.getTextContent()).intValue();
+            			else 
+            				if(n2.getNodeName().equals(LaTeXDrawNamespace.XML_HEIGHT)) 
+            					frameSize.height = Integer.valueOf(n2.getTextContent()).intValue();
+            		}
+            	}
+            	else if(name.equals(LaTeXDrawNamespace.XML_POSITION))
+            	{
+            		NodeList nl2 = n.getChildNodes();
+            		framePosition = new Point();
+            		
+            		for(int j=0, size2=nl2.getLength(); j<size2; j++)
+            		{
+            			n2 = nl2.item(j);
+            			
+            			if(n2.getNodeName().equals(LaTeXDrawNamespace.XML_POSITION_X)) 
+            				framePosition.x = Math.max(0, Integer.valueOf(n2.getTextContent()).intValue());
+            			else 
+            				if(n2.getNodeName().equals(LaTeXDrawNamespace.XML_POSITION_Y)) 
+            					framePosition.y = Math.max(0, Integer.valueOf(n2.getTextContent()).intValue());
+            		}
+            	}
+            	else if(name.equals(LaTeXDrawNamespace.XML_DIVIDER_POSITION))
+            		dividerPosition = Double.valueOf(content).doubleValue();
+            	else if(name.equals(LaTeXDrawNamespace.XML_DELIMITOR_OPACITY))
+            		Delimitor.setOpacity(Double.valueOf(content).intValue());
+            }
+		}catch(Exception ex) { ex.printStackTrace(); }
+		
+		updateDrawPreferences();
+		mainFrame.setIsModified(false);
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Writes the preferences of latexdraw in XML. 
+	 * @since 2.0.0
+	 */
+	public void writeXMLPreferences(boolean withNotification)
+	{
+		try
+		{
+			FileOutputStream fos = new FileOutputStream(LaTeXDrawPath.PATH_PREFERENCES_XML_FILE);
+			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder builder = factory.newDocumentBuilder();
+            Document document = builder.newDocument();
+            Element root, elt, elt2;
+            OutputFormat of;
+            XMLSerializer xmls;
+            
+            document.setXmlVersion("1.0");//$NON-NLS-1$
+            document.setXmlStandalone(true);
+            root = document.createElement(LaTeXDrawNamespace.XML_ROOT_PREFERENCES);
+            
+            Attr attr = document.createAttribute(LaTeXDrawNamespace.XML_VERSION);
+            attr.setTextContent(LaTeXDrawFrame.VERSION);
+            root.setAttributeNode(attr);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_RENDERING);
+            elt.setTextContent(String.valueOf(renderingCheckBox.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_COLOR_RENDERING);
+            elt.setTextContent(String.valueOf(colorRenderCheckBox.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_ALPHA_INTER);
+            elt.setTextContent(String.valueOf(alpaInterCheckBox.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_ANTI_ALIAS);
+            elt.setTextContent(String.valueOf(antialiasingCheckBox.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_PATH_EXPORT);
+            elt.setTextContent(pathExportField.getText());
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_PATH_OPEN);
+            elt.setTextContent(pathOpenField.getText());
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_DISPLAY_CODE_PANEL);
+            elt.setTextContent(String.valueOf(displayCodePanelCB.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_DISPLAY_GRID);
+            elt.setTextContent(String.valueOf(displayGridCB.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_DISPLAY_X);
+            elt.setTextContent(String.valueOf(displayXScaleCB.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_DISPLAY_Y);
+            elt.setTextContent(String.valueOf(displayYScaleCB.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_DRAW_BORDERS);
+            elt.setTextContent(String.valueOf(displayBordersCB.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_UNIT);
+            elt.setTextContent(unitChoice.getSelectedItem().toString());
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_AUTO_UPDATE);
+            elt.setTextContent(String.valueOf(codeAutoUpdateCB.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_CHECK_VERSION);
+            elt.setTextContent(String.valueOf(checkNewVersion.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_LANG);
+            elt.setTextContent(langList.getSelectedItem().toString());
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_MAGNETIC_GRID);
+            elt.setTextContent(String.valueOf(magneticGridCB.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_CLASSIC_GRID);
+            elt.setTextContent(String.valueOf(classicGridRB.isSelected()));
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_GRID_GAP);
+            elt.setTextContent(persoGridGapField.getValue().toString());
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_PATH_TEX_EDITOR);
+            elt.setTextContent(pathTexEditorField.getText());
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_PATH_LATEX_DISTRIB);
+            elt.setTextContent(pathLatexDistribField.getText());
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_LATEX_INCLUDES);
+            elt.setTextContent(latexIncludes.getText());
+            root.appendChild(elt);
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_RECENT_FILES);
+            elt.setAttribute(LaTeXDrawNamespace.XML_NB_RECENT_FILES, nbRecentFilesField.getValue().toString());
+            root.appendChild(elt);
+            
+            for(String recentFile : recentFilesName)
+            {
+	            elt2 = document.createElement(LaTeXDrawNamespace.XML_RECENT_FILE);
+	            elt2.setTextContent(recentFile);
+	            elt.appendChild(elt2); 
+            }
+            
+            elt = document.createElement(LaTeXDrawNamespace.XML_LAF);
+            elt.setTextContent(themeList.getSelectedItem().toString());
+            root.appendChild(elt);
+            
+            if(mainFrame!=null)
+            {
+	            elt = document.createElement(LaTeXDrawNamespace.XML_MAXIMISED);
+	            elt.setTextContent(String.valueOf(mainFrame.getExtendedState()==Frame.MAXIMIZED_BOTH));
+	            root.appendChild(elt);
+	            
+	            elt = document.createElement(LaTeXDrawNamespace.XML_SIZE);
+	            root.appendChild(elt);
+	            
+	            elt2 = document.createElement(LaTeXDrawNamespace.XML_WIDTH);
+	            elt2.setTextContent(String.valueOf(mainFrame.getWidth()));
+	            elt.appendChild(elt2);
+	            
+	            elt2 = document.createElement(LaTeXDrawNamespace.XML_HEIGHT);
+	            elt2.setTextContent(String.valueOf(mainFrame.getHeight()));
+	            elt.appendChild(elt2);
+	            
+	            elt = document.createElement(LaTeXDrawNamespace.XML_POSITION);
+	            root.appendChild(elt);
+	            
+	            elt2 = document.createElement(LaTeXDrawNamespace.XML_POSITION_X);
+	            elt2.setTextContent(String.valueOf(mainFrame.getLocation().x));
+	            elt.appendChild(elt2);
+	            
+	            elt2 = document.createElement(LaTeXDrawNamespace.XML_POSITION_Y);
+	            elt2.setTextContent(String.valueOf(mainFrame.getLocation().y));
+	            elt.appendChild(elt2);
+	            
+	            elt = document.createElement(LaTeXDrawNamespace.XML_DIVIDER_POSITION);
+	            
+	            double divLoc = mainFrame.isCodePanelDisplayed() ? mainFrame.getDividerCurrentLocation() : mainFrame.getFormerDividerLocation();
+	            elt.setTextContent(String.valueOf(divLoc<mainFrame.getWidth() && divLoc>=0 ? divLoc/mainFrame.getWidth() : 1.));
+	            root.appendChild(elt);
+	            
+	            elt = document.createElement(LaTeXDrawNamespace.XML_DELIMITOR_OPACITY);
+	            elt.setTextContent(String.valueOf(Delimitor.getOpacity()));
+	            root.appendChild(elt);
+            }
+			
+            of = new OutputFormat(document);
+            of.setIndenting(true);
+            xmls = new XMLSerializer(fos, of);
+            xmls.serialize(root);
+			fos.close();
+			
+			if(withNotification)
+				mainFrame.setStatusBarText(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.prefSaved")); //$NON-NLS-1$
+			
+		}catch(Exception ex) { ex.printStackTrace(); }
+	}
+	
+	
+	
+	/**
+	 * Allows to read the file of preferences.<br>
+	 */
+	public void readPreferences()
+	{
+		try // We save the project in the file
+		{
+			InputStream is = new FileInputStream(new File(LaTeXDrawPath.PATH_PREFERENCES_FILE_OLD));
+			ObjectInputStream in = new ObjectInputStream(is);
+			Object o = in.readObject();
+			
+			if(!(o instanceof String) || !((String)o).equals(LABEL_PREFERENCES))
+				throw new LaTeXDrawException(LaTeXDrawException.NOT_TEXDRAW_FILE);
+			
+			o = in.readObject();
+
+			renderingCheckBox.setSelected(in.readBoolean());
+			colorRenderCheckBox.setSelected(in.readBoolean());
+			alpaInterCheckBox.setSelected(in.readBoolean());
+			antialiasingCheckBox.setSelected(in.readBoolean());
+			pathExportField.setText((String)in.readObject());
+			pathOpenField.setText((String)in.readObject());
+			displayCodePanelCB.setSelected(in.readBoolean());
+			displayGridCB.setSelected(in.readBoolean());
+			displayXScaleCB.setSelected(in.readBoolean());
+			displayYScaleCB.setSelected(in.readBoolean());
+			displayBordersCB.setSelected(in.readBoolean());
+			unitChoice.setSelectedItem(in.readObject());
+			
+			codeAutoUpdateCB.setSelected(in.readBoolean());
+		
+			if(((String)o).compareTo(LaTeXDrawFrame.VERSION)>0)
+			{
+				checkNewVersion.setSelected(LaTeXDrawFrame.DEFAULT_CHECK_VERSION);
+				langList.setSelectedItem(LaTeXDrawLang.getlangCurrent());
+			}
+			else
+			{
+				checkNewVersion.setSelected(in.readBoolean());
+				langList.setSelectedItem(in.readObject());
+			}
+			
+			if(((String)o).compareTo("1.8")>=0) //$NON-NLS-1$
+			{
+				magneticGridCB.setSelected(in.readBoolean());
+				boolean classic = in.readBoolean();
+				classicGridRB.setSelected(classic);
+				persoGridRB.setSelected(!classic);
+				persoGridGapField.setValue(in.readInt());
+				pathTexEditorField.setText((String)in.readObject());
+			}
+			else
+			{
+				persoGridRB.setSelected(MagneticGrid.DEFAULT_TYPE==MagneticGrid.TYPE_PERSONAL);
+				classicGridRB.setSelected(MagneticGrid.DEFAULT_TYPE!=MagneticGrid.TYPE_PERSONAL);
+				persoGridGapField.setValue(MagneticGrid.DEFAULT_PERSONAL_GRID_GAP);
+				magneticGridCB.setSelected(false);
+			}
+			
+			if(((String)o).compareTo("1.9")>=0) //$NON-NLS-1$
+			{
+				nbRecentFilesField.setValue(in.readInt());
+				int nb = in.readInt(), i;
+				
+				recentFilesName.clear();
+				for(i=0; i<nb; i++)
+					recentFilesName.add((String)in.readObject());
+				
+				int count = themeList.getItemCount();
+				boolean again = true;
+				String theme = in.readObject().toString();
+				i=0;
+				
+				while(i<count && again)
+					if(themeList.getItemAt(i).toString().equals(theme))
+						again = false;
+					else
+						i++;
+			
+				if(again)
+					 themeList.setSelectedItem(UIManager.getCrossPlatformLookAndFeelClassName());
+				else themeList.setSelectedIndex(i);
+				
+			}
+			else
+			{
+				nbRecentFilesField.setValue(NB_RECENT_FILES);
+				themeList.setSelectedItem(UIManager.getCrossPlatformLookAndFeelClassName());
+			}
+			
+			in.close();
+			is.close();
+			
+			updateDrawPreferences();			
+		}
+		catch (LaTeXDrawException e)
+		{
+			System.out.println(LaTeXDrawLang.getDialogFrameString("PreferencesFrame.errorReadPref")); //$NON-NLS-1$
+			setDefaultValues();	
+		}
+		catch (Exception e) { setDefaultValues(); }
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to set default values to the components of this frame.
+	 */
+	public void setDefaultValues()
+	{
+		alpaInterCheckBox.setSelected(
+				DrawContainer.DEFAULT_ALPHAINTER_VAL==RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+			
+		renderingCheckBox.setSelected(
+				DrawContainer.DEFAULT_RENDERING_VAL==RenderingHints.VALUE_RENDER_QUALITY);
+		
+		antialiasingCheckBox.setSelected(
+				DrawContainer.DEFAULT_ANTIALIASING_VAL==RenderingHints.VALUE_ANTIALIAS_ON);
+		
+		colorRenderCheckBox.setSelected(
+				DrawContainer.DEFAULT_COLORRENDER_VAL==RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+		
+		pathOpenField.setText(LaTeXDrawFrame.DEFAULT_PATH);
+		pathExportField.setText(LaTeXDrawFrame.DEFAULT_PATH);
+		
+		if(LaTeXDrawFrame.WITH_UPDATE)
+			checkNewVersion.setSelected(LaTeXDrawFrame.DEFAULT_CHECK_VERSION);
+		
+		displayCodePanelCB.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_CODEPANEL);
+		displayGridCB.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_GRID);
+		displayXScaleCB.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_XSCALE);
+		displayYScaleCB.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_YSCALE);
+		displayBordersCB.setSelected(LaTeXDrawFrame.DEFAULT_DISPLAY_BORDERS);
+		unitChoice.setSelectedItem(XScale.DEFAULT_UNIT);
+		codeAutoUpdateCB.setSelected(CodePanel.DEFAULT_AUTO_UPDATE);
+		classicGridRB.setSelected(MagneticGrid.DEFAULT_TYPE!=MagneticGrid.TYPE_PERSONAL);
+		persoGridRB.setSelected(MagneticGrid.DEFAULT_TYPE==MagneticGrid.TYPE_PERSONAL);
+		persoGridGapField.setValue(MagneticGrid.DEFAULT_PERSONAL_GRID_GAP);
+		nbRecentFilesField.setValue(NB_RECENT_FILES);
+		magneticGridCB.setSelected(false);
+		
+		UIManager.LookAndFeelInfo[] info = UIManager.getInstalledLookAndFeels();
+		boolean again = true;
+		int i = 0;
+		String laf;
+		
+        if(System.getProperty("os.name").toLowerCase().equals("linux") && System.getProperty("java.version").toLowerCase().compareTo("1.6")>=0)//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+			laf = "GTK+";//$NON-NLS-1$
+		else
+			laf = "Windows";//$NON-NLS-1$
+		
+		while(i < info.length && again)
+			if(laf.compareTo(info[i].getName()) == 0)
+				again = false;
+			else
+				i++;
+		
+		if(again)
+		{
+			String basic = UIManager.getCrossPlatformLookAndFeelClassName();
+			i = 0;
+			while(i < info.length && again)
+				if(basic.compareTo(info[i].getClassName()) == 0)
+					again = false;
+				else
+					i++;
+			
+			if(!again)
+				themeList.setSelectedItem(info[i].getName());
+		}
+		else
+			themeList.setSelectedItem(laf); 
+		
+		isFrameMaximized 	= false;
+		frameSize 			= new Dimension();
+		frameSize.height 	= 3*Toolkit.getDefaultToolkit().getScreenSize().height/2;
+		frameSize.width 	= 3*Toolkit.getDefaultToolkit().getScreenSize().width/2;
+		framePosition 		= new Point();
+		dividerPosition 	= 0.8;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to update the concerned attributes of the drawPanel.
+	 */
+	public void updateDrawPreferences()
+	{
+		try 
+		{
+			boolean isMod = draw.isModified();
+			
+			draw.setAntiAliasingValue(antialiasingCheckBox.isSelected());
+			draw.setRenderingcolorValue(colorRenderCheckBox.isSelected());
+			draw.setAlphaInterValue(alpaInterCheckBox.isSelected());
+			draw.setRenderingValue(renderingCheckBox.isSelected());
+			
+			mainFrame.setLatexIncludes(latexIncludes.getText());
+			mainFrame.setPathDistribLatex(pathLatexDistribField.getText());
+			mainFrame.setMagneticGrid(magneticGridCB.isSelected());
+			mainFrame.setPathExport(pathExportField.getText());
+			mainFrame.setPathOpen(pathOpenField.getText());
+			mainFrame.displayCodePanel(displayCodePanelCB.isSelected());
+			mainFrame.setFormerIsInAutoUpdate(codeAutoUpdateCB.isSelected());
+			mainFrame.setIsInAutoUpdate(codeAutoUpdateCB.isSelected());
+			
+			if(LaTeXDrawFrame.WITH_UPDATE)
+				
+				mainFrame.setCheckNewVersion(checkNewVersion.isSelected());
+			mainFrame.displayGrid(displayGridCB.isSelected(), classicGridRB.isSelected());
+			mainFrame.setPersoGridGap(Integer.valueOf(persoGridGapField.getValue().toString()).intValue());
+			mainFrame.displayXScale(displayXScaleCB.isSelected());
+			mainFrame.displayYScale(displayYScaleCB.isSelected());
+			mainFrame.displayBorders(displayBordersCB.isSelected());
+			mainFrame.setUnitForPixelsPerCm(unitChoice.getSelectedItem().toString());
+			mainFrame.setPathTexEditor(pathTexEditorField.getText());
+			String lAfName = themeList.getSelectedItem().toString();
+	  		UIManager.LookAndFeelInfo[] info = UIManager.getInstalledLookAndFeels();
+	  		boolean again = true;
+	  		int i=0;
+	  		while(i<info.length && again)
+	  			if(lAfName.equals(info[i].getName()))
+	  				again = false;
+	  			else
+	  				i++;
+	  		
+	  		if(again)// Problem with the look & feel
+	  			LaTeXDrawFrame.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
+	  		else
+	  			LaTeXDrawFrame.setLookAndFeel(info[i].getClassName());
+	  		
+			draw.setIsModified(isMod);
+			LaTeXDrawLang.setlangCurrent((String)langList.getSelectedItem());
+			
+			if(framePosition!=null)
+				mainFrame.setLocation(framePosition);
+			
+			if(isFrameMaximized || frameSize==null || frameSize.width==0 || frameSize.height==0)
+				mainFrame.setExtendedState(Frame.MAXIMIZED_BOTH);
+			
+			if(frameSize!=null)
+			{
+				mainFrame.setSize(frameSize.width, frameSize.height);
+				mainFrame.setDividerPosition(dividerPosition);
+			}
+			
+		} catch (Exception e) {e.printStackTrace();}
+
+	}
+	
+	
+	
+	
+	/**
+	 * @return the recentFilesName.
+	 */
+	public synchronized Vector<String> getRecentFilesName()
+	{
+		return recentFilesName;
+	}
+
+
+
+
+	/**
+	 * Adds a recent file.
+	 * @since 1.9
+	 * @param absolutePath The absolute path of the file to add.
+	 */
+	public void addRecentFile(String absolutePath)
+	{
+		int i = recentFilesName.indexOf(absolutePath);
+		int max = Float.valueOf(nbRecentFilesField.getValue().toString()).intValue();
+	
+		if(i!=-1)
+			recentFilesName.remove(i);
+		
+		while(recentFilesName.size()>=max)
+			recentFilesName.remove(max-1);
+		
+		recentFilesName.add(0, absolutePath);
+		writeXMLPreferences(false);
+	}	
+	
+	
+	
+	
+	/**
+	 * @since 1.9
+	 * @return True if the code is in auto update mode.
+	 */
+	public boolean isCodeInAutoUpdate()
+	{
+		return codeAutoUpdateCB.isSelected();
+	}
+	
+	
+	
+	/**
+	 * Allows to get the theme of the program.<br>
+	 * @since 1.9
+	 * @return The class of the theme.
+	 */
+	public static String readTheme()
+	{
+		String laf=null;
+		
+		try 
+		{
+			File xml = new File(LaTeXDrawPath.PATH_PREFERENCES_XML_FILE);
+			
+			if(xml.exists())
+			{
+	            DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();
+	            DocumentBuilder constructeur = fabrique.newDocumentBuilder();
+	            Document document = constructeur.parse(xml);
+	            Node n = document.getFirstChild();
+	            NodeList nl;
+	            boolean again = true;
+	            
+	            if(n==null || !n.getNodeName().equals(LaTeXDrawNamespace.XML_ROOT_PREFERENCES))
+	            	throw new NullPointerException();
+	            
+	            nl = n.getChildNodes();
+	            
+	            for(int i=0, size=nl.getLength() ; i<size && again; i++)
+	            	if(nl.item(i).getNodeName().equals(LaTeXDrawNamespace.XML_LAF))
+	            	{
+	            		laf = nl.item(i).getTextContent();
+	            		again = false;
+	            	}
+			}
+			else
+			{
+				InputStream is = new FileInputStream(new File(LaTeXDrawPath.PATH_PREFERENCES_FILE_OLD));
+				ObjectInputStream in = new ObjectInputStream(is);
+				Object o = in.readObject();
+	
+				if(!(o instanceof String) || !((String)o).equals(LABEL_PREFERENCES))
+					throw new LaTeXDrawException(LaTeXDrawException.NOT_TEXDRAW_FILE);
+				
+				o = in.readObject();
+				
+				if(((String)o).compareTo("1.9")<0) //$NON-NLS-1$
+					return UIManager.getCrossPlatformLookAndFeelClassName();
+				
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readObject();
+				in.readObject();
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readBoolean();
+				in.readObject();
+				in.readBoolean();
+				in.readBoolean();
+				in.readObject();
+				in.readBoolean();
+				in.readBoolean();
+				in.readInt();
+				in.readObject();
+				in.readInt();
+				int nb = in.readInt(), i;
+				for(i=0; i<nb; i++)
+					in.readObject();
+				
+				laf = (String)in.readObject();
+				
+				in.close();
+				is.close();
+			}
+		}
+		catch(Exception e) { /* Nothing to do. */ }
+		
+		if(laf==null)
+		{
+			if(System.getProperty("os.name").toLowerCase().equals("linux") && System.getProperty("java.version").toLowerCase().compareTo("1.6")>=0)//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+				return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"; //$NON-NLS-1$
+
+			if(System.getProperty("os.name").toLowerCase().contains("win"))//$NON-NLS-1$//$NON-NLS-2$
+				return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";//$NON-NLS-1$
+			
+  			return UIManager.getCrossPlatformLookAndFeelClassName();  
+		}
+		
+		UIManager.LookAndFeelInfo[] info = UIManager.getInstalledLookAndFeels();
+		boolean again = true;
+		int i=0;
+		
+		while(i<info.length && again)
+			if(laf.equals(info[i].getName()))
+				again = false;
+			else
+				i++;
+		
+		if(again)// Problem with the look & feel
+			return UIManager.getCrossPlatformLookAndFeelClassName();
+		
+		return info[i].getClassName();
+	}
+
+
+
+
+	@Override
+	public void setVisible(boolean b)
+	{
+		try
+		{
+			curNbRecentFiles = Double.valueOf(nbRecentFilesField.getValue().toString()).intValue();
+			curGridGap		 = Double.valueOf(persoGridGapField.getValue().toString()).intValue();
+			curClassicGrid	 = classicGridRB.isSelected();
+			curLang			 = langList.getSelectedItem()==null ? null : langList.getSelectedItem().toString();
+			curTheme		 = themeList.getSelectedItem()==null ? null : themeList.getSelectedItem().toString();
+			curUnit			 = unitChoice.getSelectedItem()==null ? null : unitChoice.getSelectedItem().toString();
+			curTexPath		 = pathTexEditorField.getText();
+			curExportPath	 = pathExportField.getText();
+			curOpenPath		 = pathOpenField.getText();
+			curAlpha		 = alpaInterCheckBox.isSelected();
+			curDisplayBord	 = displayBordersCB.isSelected();
+			curDisplayCode	 = displayCodePanelCB.isSelected();
+			curCheckVers	 = checkNewVersion.isSelected();
+			curAutoUpdte	 = codeAutoUpdateCB.isSelected();
+			curYScale		 = displayYScaleCB.isSelected();
+			curXScale		 = displayXScaleCB.isSelected();
+			curDisplayGrid	 = displayGridCB.isSelected();
+			curMagnetic	 	 = magneticGridCB.isSelected();
+			curColRender	 = colorRenderCheckBox.isSelected();
+			curRendering	 = renderingCheckBox.isSelected();
+			curAntiAlias	 = antialiasingCheckBox.isSelected();
+			curLatexDistrib  = pathLatexDistribField.getText();
+			curLatexIncludes = latexIncludes.getText();
+		}
+		catch(Exception e) { e.printStackTrace(); }
+		
+		super.setVisible(b);
+	}
+}
diff --git a/current/latexDraw/ui/dialog/ShortcutsFrame.java b/current/latexDraw/ui/dialog/ShortcutsFrame.java
new file mode 100644
index 0000000..3cf7338
--- /dev/null
+++ b/current/latexDraw/ui/dialog/ShortcutsFrame.java
@@ -0,0 +1,186 @@
+package latexDraw.ui.dialog;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+
+import javax.swing.*;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.TableColumnModel;
+import javax.swing.table.TableModel;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.util.LaTeXDrawResources;
+
+
+/** 
+ * This class defines a frame containing the shortcuts of the program.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/18/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.9<br>
+ */
+public class ShortcutsFrame extends JFrame
+{
+	private static final long serialVersionUID = 1L;
+
+	
+	/**
+	 * The constructor creates a frame containing a table with all the shortcuts.
+	 */
+	public ShortcutsFrame()
+	{
+		super(LaTeXDrawLang.getString1_9("LaTeXDrawFrame.3")); //$NON-NLS-1$
+
+		setIconImage(LaTeXDrawResources.latexdrawIcon.getImage());
+		
+		JTable table;
+		final String[] titles = {LaTeXDrawLang.getString1_9("ShortcutsFrame.1"),  //$NON-NLS-1$
+				LaTeXDrawLang.getString1_6("ParserMessagesFrame.0"),  //$NON-NLS-1$
+				LaTeXDrawLang.getString1_9("ShortcutsFrame.3")};  //$NON-NLS-1$
+		String catEdit	= LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.89"); //$NON-NLS-1$
+		String catNav	= LaTeXDrawLang.getString1_9("ShortcutsFrame.4"); //$NON-NLS-1$
+		String catTran	= LaTeXDrawLang.getString1_9("ShortcutsFrame.5"); //$NON-NLS-1$
+		String catDraw	= LaTeXDrawLang.getString1_9("ShortcutsFrame.6"); //$NON-NLS-1$
+		String catFile	= LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.88"); //$NON-NLS-1$
+		String cathelp	= LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.93"); //$NON-NLS-1$
+		String move = LaTeXDrawLang.getString1_9("ShortcutsFrame.7"); //$NON-NLS-1$
+		JButton okB 	= new JButton(LaTeXDrawLang.getString1_8("LaTeXDrawFrame.23")); //$NON-NLS-1$
+		JPanel panel 	= new JPanel();
+		Dimension dim 	= Toolkit.getDefaultToolkit().getScreenSize();
+		
+		String ctrl = KeyEvent.getKeyModifiersText(InputEvent.CTRL_MASK);
+		String shift = KeyEvent.getKeyModifiersText(InputEvent.SHIFT_MASK);
+		String leftClick = LaTeXDrawLang.getString1_9("ShortcutsFrame.8"); //$NON-NLS-1$
+		final String st1 = LaTeXDrawLang.getString1_9("ShortcutsFrame.9"); //$NON-NLS-1$
+		final String st2 = LaTeXDrawLang.getString1_9("ShortcutsFrame.10"); //$NON-NLS-1$
+		final String st3 = LaTeXDrawLang.getString1_9("ShortcutsFrame.11"); //$NON-NLS-1$
+		final String st4 = LaTeXDrawLang.getString1_9("ShortcutsFrame.12"); //$NON-NLS-1$
+		final Object[][] data = 
+		{
+			{ctrl+"+C", LaTeXDrawResources.LABEL_COPY, catEdit},//$NON-NLS-1$
+			{ctrl+"+V", LaTeXDrawResources.LABEL_PASTE, catEdit},//$NON-NLS-1$
+			{ctrl+"+X", LaTeXDrawResources.LABEL_CUT, catEdit},//$NON-NLS-1$
+			{ctrl+"+Z", LaTeXDrawResources.LABEL_UNDO, catEdit},//$NON-NLS-1$
+			{ctrl+"+Y", LaTeXDrawResources.LABEL_REDO, catEdit},//$NON-NLS-1$
+			{ctrl+"+N", LaTeXDrawResources.LABEL_NEW, catFile},//$NON-NLS-1$
+			{ctrl+"+O", LaTeXDrawResources.LABEL_OPEN, catFile},//$NON-NLS-1$
+			{ctrl+"+S", LaTeXDrawResources.LABEL_SAVE, catFile},//$NON-NLS-1$
+			{ctrl+"+E", LaTeXDrawResources.LABEL_PRINT_CODE, catFile},//$NON-NLS-1$
+			{ctrl+"+D", LaTeXDrawResources.LABEL_PRINT_DRAW, catFile},//$NON-NLS-1$
+			{ctrl+"+W", LaTeXDrawResources.LABEL_QUIT, catFile},//$NON-NLS-1$
+			{KeyEvent.getKeyText(KeyEvent.VK_F9), LaTeXDrawResources.LABEL_ZOOM_DEFAULT, catNav},
+			{KeyEvent.getKeyText(KeyEvent.VK_ADD), LaTeXDrawResources.LABEL_ZOOM_IN, catNav},
+			{KeyEvent.getKeyText(KeyEvent.VK_SUBTRACT), LaTeXDrawResources.LABEL_ZOOM_OUT, catNav},
+			{'L', LaTeXDrawResources.LABEL_LINE, catDraw},
+			{'J', LaTeXDrawResources.LABEL_JOINED_LINES, catDraw},
+			{'P', LaTeXDrawResources.LABEL_POLY, catDraw},
+			{'D', LaTeXDrawResources.LABEL_DOT, catDraw},
+			{'R', LaTeXDrawResources.LABEL_RECT, catDraw},
+			{'S', LaTeXDrawResources.LABEL_SQUARE, catDraw},
+			{'H', LaTeXDrawResources.LABEL_RHOMBUS, catDraw},
+			{'T', LaTeXDrawResources.LABEL_TRIANGLE, catDraw},
+			{'E', LaTeXDrawResources.LABEL_ELLIPSE, catDraw},
+			{'C', LaTeXDrawResources.LABEL_CIRCLE, catDraw},
+			{'A', LaTeXDrawResources.LABEL_ARC,	catDraw},
+			{'W', LaTeXDrawResources.LABEL_WEDGE, catDraw},
+			{'O', LaTeXDrawResources.LABEL_CHORD, catDraw},
+			{'B', LaTeXDrawResources.LABEL_BEZIER_CURVE, catDraw},
+			{'G', LaTeXDrawResources.LABEL_GRID, catDraw},
+			{'Z', LaTeXDrawResources.LABEL_AXES, catDraw},
+			{'K', LaTeXDrawResources.LABEL_POINTS_AKIN, catDraw},
+			{'X', LaTeXDrawResources.LABEL_TEXT, catDraw},
+			{'F', LaTeXDrawResources.LABEL_SELECT_FIGURE, catDraw},
+			{KeyEvent.getKeyText(KeyEvent.VK_DELETE), LaTeXDrawResources.LABEL_DELETE, catDraw},
+			{KeyEvent.getKeyText(KeyEvent.VK_F1), LaTeXDrawResources.LABEL_HELP, cathelp},
+			{KeyEvent.getKeyText(KeyEvent.VK_F2), LaTeXDrawLang.getString1_9("LaTeXDrawFrame.3"), cathelp}, //$NON-NLS-1$
+			{KeyEvent.getKeyText(KeyEvent.VK_RIGHT), st1, catNav},
+			{KeyEvent.getKeyText(KeyEvent.VK_LEFT), st2, catNav},
+			{KeyEvent.getKeyText(KeyEvent.VK_UP), st3, catNav},
+			{KeyEvent.getKeyText(KeyEvent.VK_DOWN), st4, catNav},
+			{ctrl+'+'+KeyEvent.getKeyText(KeyEvent.VK_RIGHT), st1+move, catNav},
+			{ctrl+'+'+KeyEvent.getKeyText(KeyEvent.VK_LEFT), st2+move, catNav},
+			{ctrl+'+'+KeyEvent.getKeyText(KeyEvent.VK_UP), st3+move, catNav},
+			{ctrl+'+'+KeyEvent.getKeyText(KeyEvent.VK_DOWN), st4+move, catNav},
+			{shift+'+'+ctrl+'+'+KeyEvent.getKeyText(KeyEvent.VK_RIGHT), LaTeXDrawLang.getString1_9("ShortcutsFrame.14"), catNav}, //$NON-NLS-1$
+			{shift+'+'+ctrl+'+'+KeyEvent.getKeyText(KeyEvent.VK_LEFT), LaTeXDrawLang.getString1_9("ShortcutsFrame.15"), catNav}, //$NON-NLS-1$
+			{shift+'+'+ctrl+'+'+KeyEvent.getKeyText(KeyEvent.VK_UP), LaTeXDrawLang.getString1_9("ShortcutsFrame.16"), catNav}, //$NON-NLS-1$
+			{shift+'+'+ctrl+'+'+KeyEvent.getKeyText(KeyEvent.VK_DOWN), LaTeXDrawLang.getString1_9("ShortcutsFrame.17"), catNav}, //$NON-NLS-1$
+			{shift+'+'+KeyEvent.getKeyText(KeyEvent.VK_RIGHT), LaTeXDrawLang.getString1_9("ShortcutsFrame.18"), catNav}, //$NON-NLS-1$
+			{shift+'+'+KeyEvent.getKeyText(KeyEvent.VK_LEFT), LaTeXDrawLang.getString1_9("ShortcutsFrame.19"), catNav}, //$NON-NLS-1$
+			{shift+'+'+KeyEvent.getKeyText(KeyEvent.VK_UP), LaTeXDrawLang.getString1_9("ShortcutsFrame.20"), catNav}, //$NON-NLS-1$
+			{shift+'+'+KeyEvent.getKeyText(KeyEvent.VK_DOWN), LaTeXDrawLang.getString1_9("ShortcutsFrame.21"), catNav}, //$NON-NLS-1$
+			{ctrl+"+U", LaTeXDrawLang.getString1_9("ShortcutsFrame.23"), catTran}, //$NON-NLS-1$ //$NON-NLS-2$
+			{ctrl+"+A", LaTeXDrawLang.getString1_9("ShortcutsFrame.25"), catDraw}, //$NON-NLS-1$ //$NON-NLS-2$
+			{ctrl+'+'+leftClick, LaTeXDrawLang.getString1_9("ShortcutsFrame.26"), catDraw}, //$NON-NLS-1$
+			{shift+'+'+leftClick, LaTeXDrawLang.getString1_9("ShortcutsFrame.27"), catDraw}, //$NON-NLS-1$
+			{KeyEvent.getKeyText(KeyEvent.VK_SPACE), 
+				LaTeXDrawLang.getString1_9("ShortcutsFrame.28"), catDraw}, //$NON-NLS-1$
+			{ctrl+'+'+LaTeXDrawLang.getString1_9("ShortcutsFrame.29"), LaTeXDrawLang.getString1_9("ShortcutsFrame.30"), catDraw} //$NON-NLS-1$ //$NON-NLS-2$
+		};
+		
+        TableModel dataModel = new AbstractTableModel() 
+        { 
+			private static final long serialVersionUID = 1L;
+			public int getColumnCount() { return titles.length; } 
+            public int getRowCount() { return data.length;} 
+            public Object getValueAt(int row, int col) {return data[row][col];} 
+            
+            @Override
+			public String getColumnName(int column) {return titles[column];} 
+            
+            @Override
+			public Class<? extends Object> getColumnClass(int c) {return getValueAt(0, c).getClass();} 
+            
+		    @Override
+			public boolean isCellEditable(int row, int col) {return false;} 
+		    
+            @Override
+			public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; } 
+         }; 
+         
+		table = new JTable(dataModel);
+ 		table.getTableHeader().setReorderingAllowed(false);
+ 		TableColumnModel colmodel = table.getColumnModel();
+
+ 		colmodel.getColumn(0).setPreferredWidth(30);
+ 		colmodel.getColumn(1).setPreferredWidth(200);
+ 		colmodel.getColumn(2).setPreferredWidth(40);
+ 		
+ 		JScrollPane scrollPane = new JScrollPane();
+ 		JViewport vp = scrollPane.getViewport(); 
+	 	vp.add(table); 
+	 	
+		okB.addActionListener(new ActionListener()
+		{
+			public void actionPerformed(ActionEvent e)
+			{
+				setVisible(false);
+			}
+		});
+		panel.add(okB);
+		
+		getContentPane().setLayout(new BorderLayout());
+ 		getContentPane().add(scrollPane, BorderLayout.CENTER);
+ 		getContentPane().add(panel, BorderLayout.SOUTH);
+ 		setSize(550, 500);
+ 		setLocation((dim.width-getWidth())/2, (dim.height-getHeight())/2);
+	}
+}
diff --git a/current/latexDraw/ui/listeners/AbstractListener.java b/current/latexDraw/ui/listeners/AbstractListener.java
new file mode 100644
index 0000000..47bb7dd
--- /dev/null
+++ b/current/latexDraw/ui/listeners/AbstractListener.java
@@ -0,0 +1,42 @@
+package latexDraw.ui.listeners;
+
+import latexDraw.ui.LaTeXDrawFrame;
+
+
+/** 
+ * This class defines an abstract listener for the program.<br>
+ * It contains a reference to the main frame.
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 
+ * 09/18/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.9<br>
+ */
+public class AbstractListener
+{
+	/** The main frame of the program. */
+	LaTeXDrawFrame mainFrame;
+	
+	
+	/**
+	 * The constructor.
+	 * @param frame A reference to the main frame of the program. 
+	 */
+	public AbstractListener(LaTeXDrawFrame frame)
+	{
+		mainFrame = frame;
+	}
+}
diff --git a/current/latexDraw/ui/listeners/InstallerListener.java b/current/latexDraw/ui/listeners/InstallerListener.java
new file mode 100644
index 0000000..fc54f20
--- /dev/null
+++ b/current/latexDraw/ui/listeners/InstallerListener.java
@@ -0,0 +1,105 @@
+package latexDraw.ui.listeners;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JFileChooser;
+
+import latexDraw.installer.InstallerUI;
+
+
+/** 
+ * This class defines the listener of the installer.
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 01/21/08<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.9<br>
+ */
+public class InstallerListener implements ActionListener
+{
+	protected InstallerUI installer;
+	
+	protected JFileChooser fileChooser;
+	
+	
+	public InstallerListener(InstallerUI installerUI)
+	{
+		if(installerUI==null)
+			throw new IllegalArgumentException();
+		
+		installer = installerUI;
+		
+		fileChooser = new JFileChooser();
+		fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+		fileChooser.setMultiSelectionEnabled(false);
+	}
+
+	
+	
+	public void actionPerformed(ActionEvent e)
+	{
+		Object o = e.getSource();
+		
+		if(o instanceof JButton)
+		{
+			String actionCmd = ((JButton)o).getActionCommand();
+			
+			if(actionCmd==null)
+				return ;
+			
+			if(actionCmd.equals(InstallerUI.ACTION_CANCEL))
+			{
+				if(installer.isContinueInstall())
+					installer.setContinueInstall(false);
+				else
+					System.exit(0);
+				
+				return ;
+			}
+			
+			if(actionCmd.equals(InstallerUI.ACTION_TERMINATE))
+			{
+				System.exit(0);
+				return ;
+			}
+			
+			if(actionCmd.equals(InstallerUI.ACTION_NEXT))
+			{
+				installer.incrementSlidePosition();
+				return ;
+			}
+			
+			if(actionCmd.equals(InstallerUI.ACTION_PREVIOUS))
+			{
+				installer.decrementSlidePosition();
+				return ;
+			}
+			
+			if(actionCmd.equals(InstallerUI.ACTION_CHOOSE_FOLDER))
+			{
+				int id = fileChooser.showDialog(installer, "Select");
+				
+				if(id == JFileChooser.APPROVE_OPTION)
+					installer.setPathInstall(fileChooser.getSelectedFile().getPath());
+				
+				return ;
+			}
+			
+			return ;
+		}
+	}
+}
diff --git a/current/latexDraw/ui/listeners/MenusListener.java b/current/latexDraw/ui/listeners/MenusListener.java
new file mode 100644
index 0000000..9ecb979
--- /dev/null
+++ b/current/latexDraw/ui/listeners/MenusListener.java
@@ -0,0 +1,662 @@
+package latexDraw.ui.listeners;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.*;
+
+import latexDraw.figures.Draw;
+import latexDraw.figures.Figure;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+import latexDraw.util.LaTeXDrawResources;
+import latexDraw.util.VersionChecker;
+
+
+/** 
+ * This class defines a listener for the menu of the program.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 
+ * 09/18/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.9<br>
+ */
+public class MenusListener extends AbstractListener implements ActionListener
+{
+	public static final String ACTION_CMD_SHORTCUTS 		= "shortcut";//$NON-NLS-1$
+	
+	public static final String ACTION_VISIBLE_ALL_FIGURES 	= "visibleAll";//$NON-NLS-1$
+	
+	public static final String LABEL_CHECK_UPDATE 			= "checkupdate";//$NON-NLS-1$
+	
+	
+	
+	public MenusListener(LaTeXDrawFrame frame)
+	{
+		super(frame);
+	}
+
+
+
+	public void actionPerformed(ActionEvent e)
+	{
+    	Object src = e.getSource();
+    	
+    	if(src instanceof AbstractButton)
+    	{
+    		AbstractButton ab = ((AbstractButton)src);
+    		String label = ab.getActionCommand();
+    		DrawPanel drawPanel = mainFrame.getDrawPanel();
+    		boolean ok = ab.isSelected();
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_SAVE))
+    		{
+    			mainFrame.save(false);
+    			mainFrame.requestFocus();
+    			return;
+    		}   		
+    		    		
+    		if(label.equals(LaTeXDrawResources.LABEL_SAVE_AS))
+    		{
+    			mainFrame.save(true);
+    			mainFrame.requestFocus();
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_OPEN))
+    		{
+    			try
+    			{
+    		    	if(drawPanel.isModified())
+    		    		switch(JOptionPane.showConfirmDialog(mainFrame,
+    							LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.156"), //$NON-NLS-1$
+    							LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.10"),  //$NON-NLS-1$
+    							JOptionPane.YES_NO_CANCEL_OPTION))
+    					{
+    		    			case JOptionPane.YES_OPTION:
+    		    					boolean saved = mainFrame.save(true);
+    		    					if(saved) mainFrame.open(null, true);
+    		    					break;
+    		    			case JOptionPane.NO_OPTION:
+    		    				mainFrame.open(null, true);
+    								break;
+    						case JOptionPane.CANCEL_OPTION:
+    								break;				
+    					}
+    		    	else
+    		    		mainFrame.open(null, true);
+    			}catch(Exception ex)
+    			{	    				
+    				ex.printStackTrace(); 
+    				ExceptionFrameDialog.showExceptionDialog(ex);
+    			}
+    			mainFrame.requestFocus();
+    			return;
+    		}      		
+    		
+    		if(label.equals(ACTION_VISIBLE_ALL_FIGURES))
+    		{
+    			drawPanel.getDraw().recenterFigures();
+    			drawPanel.updateDraw(false);
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_ZOOM_IN))
+    		{
+    			drawPanel.zoomIn();
+    			drawPanel.getFrameParent().getToolbar().getZoomField().setValue(drawPanel.getZoom()*100);
+    			mainFrame.getXScale().repaint();
+    			mainFrame.getYScale().repaint();
+    			mainFrame.requestFocus();
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_ZOOM_OUT))
+    		{
+    			drawPanel.zoomOut();
+    			drawPanel.getFrameParent().getToolbar().getZoomField().setValue(drawPanel.getZoom()*100);
+    			mainFrame.getXScale().repaint();
+    			mainFrame.getYScale().repaint();
+    			mainFrame.requestFocus();
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_ZOOM_DEFAULT))
+    		{
+    			drawPanel.zoomDefault();
+    			drawPanel.getFrameParent().getToolbar().getZoomField().setValue(drawPanel.getZoom()*100);
+    			mainFrame.getXScale().repaint();
+    			mainFrame.getYScale().repaint();
+    			mainFrame.requestFocus();
+    			return;
+    		}
+    		
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_REDO))
+    		{
+    			mainFrame.getUndoManager().redo();
+    			drawPanel.updateDraw(true);
+    			mainFrame.setSelection(!drawPanel.getDraw().getSelected().isEmpty());
+    			mainFrame.updateUndoRedo();
+    			mainFrame.updateFrameFields();
+    			mainFrame.setExportAsMenu(drawPanel.getDraw().getNbFigures()>0);
+				mainFrame.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.158")); //$NON-NLS-1$
+    			mainFrame.setIsModified(true);
+    			mainFrame.requestFocus();
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_UNDO))
+    		{
+    			mainFrame.getUndoManager().undo();
+    			drawPanel.updateDraw(true);
+    			mainFrame.setSelection(!drawPanel.getDraw().getSelected().isEmpty());
+    			mainFrame.updateUndoRedo();
+    			mainFrame.updateFrameFields();
+    			mainFrame.setExportAsMenu(drawPanel.getDraw().getNbFigures()>0);
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.159")); //$NON-NLS-1$
+    			mainFrame.setIsModified(true);
+    			mainFrame.requestFocus();
+    			return;
+    		}
+    		
+			if(label.equals(ACTION_CMD_SHORTCUTS))
+			{
+				mainFrame.showShortcutsFrame();
+				return ;
+			}
+			
+			
+			if(label.equals(LaTeXDrawResources.LABEL_COPY))
+    		{  
+				drawPanel.copy();
+				mainFrame.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.146")); //$NON-NLS-1$
+    			return;    			
+    		}
+			
+			if(label.equals(LaTeXDrawResources.LABEL_PASTE))
+    		{   			
+				drawPanel.paste();
+				mainFrame.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.147")); //$NON-NLS-1$
+    			return;    			
+    		}
+			
+			if(label.equals(LaTeXDrawResources.LABEL_CUT))
+    		{   			
+				drawPanel.cut();
+				mainFrame.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.148")); //$NON-NLS-1$
+    			return;    			
+    		}
+			
+    		if(label.equals(LaTeXDrawResources.LABEL_DISPLAY_BORDERS))
+    		{   			
+    			mainFrame.displayBorders(ok);
+    			mainFrame.requestFocus();
+    			return;    			
+    		}
+
+    		if(label.equals(LaTeXDrawResources.LABEL_SELECT_FIGURE))
+    		{
+    			mainFrame.getLMenuBar().getMenuSelect().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageSelect().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_SELECT_FIGURE);
+    			drawPanel.isSelection(true);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_LINE))
+    		{
+    			mainFrame.getLMenuBar().getMenuLine().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageLine().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_LINE);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.0")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_JOINED_LINES))
+    		{
+    			mainFrame.getLMenuBar().getMenuJoinedLines().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageJoinedLines().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_JOINED_LINES);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.1")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_RECT))
+    		{
+    			mainFrame.getLMenuBar().getMenuRect().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageRect().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_RECT);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.4")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_POLY))
+    		{
+    			mainFrame.getLMenuBar().getMenuPoly().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImagePoly().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_POLY);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.1")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_SQUARE))
+    		{
+    			mainFrame.getLMenuBar().getMenuSquare().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageSquare().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_SQUARE);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.4")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_TEXT))
+    		{
+    			mainFrame.getLMenuBar().getMenuText().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageText().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_TEXT);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.5")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_GRID))
+    		{
+    			mainFrame.getLMenuBar().getMenuGrid().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageGrid().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_GRID);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.6")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_AXES))
+    		{
+    			mainFrame.getLMenuBar().getMenuAxes().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageAxes().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_AXES);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.7")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_POINTS_AKIN))
+    		{
+    			mainFrame.getLMenuBar().getMenuPointsAkin().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImagePointsAkin().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_POINTS_AKIN);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.8")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_DOT))
+    		{
+    			mainFrame.getLMenuBar().getMenuDot().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageDot().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_DOT);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.9")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_RHOMBUS))
+    		{
+    			mainFrame.getLMenuBar().getMenuRhombus().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageRhombus().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_RHOMBUS);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.4")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_TRIANGLE))
+    		{
+    			mainFrame.getLMenuBar().getMenuTriangle().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageTriangle().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_TRIANGLE);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.4")); //$NON-NLS-1$
+    			return;
+    		}
+    		    		
+    		if(label.equals(LaTeXDrawResources.LABEL_CIRCLE))
+    		{
+    			mainFrame.getLMenuBar().getMenuCircle().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageCircle().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_CIRCLE);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.4")); //$NON-NLS-1$
+    			return;
+    		}
+    		   		
+    		if(label.equals(LaTeXDrawResources.LABEL_ELLIPSE))
+    		{
+    			mainFrame.getLMenuBar().getMenuEllipse().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageEllipse().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_ELLIPSE);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.4")); //$NON-NLS-1$
+    			return;
+    		}
+    		    		
+    		if(label.equals(LaTeXDrawResources.LABEL_ARC))
+    		{
+    			mainFrame.getLMenuBar().getMenuArc().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageArc().setSelected(true);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_ARC);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.4")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_CHORD))
+    		{
+    			mainFrame.getLMenuBar().getMenuChord().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageChord().setSelected(true);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_CHORD);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.4")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_WEDGE))
+    		{
+    			mainFrame.getLMenuBar().getMenuWedge().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageWedge().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_WEDGE);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.4")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_BEZIER_CURVE))
+    		{
+    			mainFrame.getLMenuBar().getMenuBezierCurve().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageBezierCurve().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_BEZIER_CURVE);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.1")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE))
+    		{
+    			mainFrame.getLMenuBar().getMenuClosedBezierCurve().setSelected(ok);
+    			mainFrame.getToolbar().getButtonImageClosedBezierCurve().setSelected(ok);
+    			LaTeXDrawFrame.setCurrentChoice(LaTeXDrawResources.LABEL_CLOSED_BEZIER_CURVE);
+    			drawPanel.isSelection(false);
+    			mainFrame.setSelection(false);
+    			drawPanel.setMenuSelectedPopupGeneral(label, true);
+    			mainFrame.requestFocus();
+    			mainFrame.setStatusBarText(LaTeXDrawLang.getString1_9("MenusListener.1")); //$NON-NLS-1$
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_DELETE))
+    		{
+    			if(drawPanel.deleteSelection()==0)
+    			{
+    				mainFrame.setExportAsMenu(false);
+    				drawPanel.setIsModified(true);
+    				mainFrame.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.149")); //$NON-NLS-1$
+    			}
+    			mainFrame.setSelection(false);
+    			mainFrame.requestFocus();
+    			return;
+    		}    	
+			
+    		if(label.equals(LaTeXDrawResources.LABEL_INSERT_PIX))
+    		{
+    			mainFrame.insertPicture();	
+    			mainFrame.requestFocus();
+    			return ;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_TEMPLATE_EXPORT))
+    		{
+    			mainFrame.exportAsTemplate();
+    			mainFrame.requestFocus();
+    			return ;
+    		}
+    		
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_NEW) || label.equals(LaTeXDrawResources.LABEL_NEW_WITH_SEL))
+    		{
+    			Draw selection = null;
+    			
+    			if(label.equals(LaTeXDrawResources.LABEL_NEW_WITH_SEL))
+					try { selection = (Draw) mainFrame.getDrawPanel().getDraw().getSelected().clone(); }
+    				catch(CloneNotSupportedException e1) { /**/ }
+    			
+    			mainFrame.newProject();
+    			
+				if(selection!=null && !selection.isEmpty())
+				{
+					for(Figure f : selection.getFigures())
+						mainFrame.getDrawPanel().getDraw().addFigure(f, null);
+					
+					mainFrame.setIsModified(true);
+					mainFrame.getDrawPanel().updateDraw(true);
+					mainFrame.updateFrameFields();
+				}
+    			
+    			mainFrame.requestFocus();
+    			return;
+    		}    		
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_BATCH_CONVERT))
+    		{
+    			mainFrame.batchConvertion();
+    			return;
+    		}   
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_EXPORT_TRICKS))
+    		{
+    			mainFrame.exportAsPsTricks();
+    			return;
+    		}    		
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_EXPORT_PDF_LATEX)) {
+    			mainFrame.exportAsPicture(LaTeXDrawResources.LABEL_EXPORT_PDF_LATEX);
+    			return;
+    		}  
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_EXPORT_EPS_LATEX)) {
+    			mainFrame.exportAsPicture(LaTeXDrawResources.LABEL_EXPORT_EPS_LATEX);
+    			return;
+    		}    
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_EXPORT_BMP))
+    		{
+    			mainFrame.exportAsPicture(LaTeXDrawResources.LABEL_EXPORT_BMP);
+    			return;
+    		}  
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_EXPORT_JPG))
+    		{
+    			mainFrame.exportAsPicture(LaTeXDrawResources.LABEL_EXPORT_JPG);
+    			return;
+    		}    
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_EXPORT_PNG))
+    		{
+    			mainFrame.exportAsPicture(LaTeXDrawResources.LABEL_EXPORT_PNG);
+    			return;
+    		}    
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_EXPORT_EPS))
+    		{
+    			mainFrame.exportAsPicture(LaTeXDrawResources.LABEL_EXPORT_EPS);
+    			return;
+    		}    
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_EXPORT_PPM))
+    		{
+    			mainFrame.exportAsPicture(LaTeXDrawResources.LABEL_EXPORT_PPM);
+    			return;
+    		}
+    		
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_PRINT_CODE))
+    		{
+    			mainFrame.printCode();
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_PRINT_DRAW))
+    		{
+    			mainFrame.printDraw();
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_FIGURE_PROPERTIES))
+    		{
+    			Draw listSelected = drawPanel.getDraw().getSelected();
+    			
+    			if(listSelected.size()!=1)
+    				return;
+
+    			mainFrame.showParamFrame(listSelected.getFigureAt(0), false);
+				return ;
+    		}
+    		
+    		if(label.equals(LABEL_CHECK_UPDATE))
+    		{
+    			VersionChecker vc = new VersionChecker(mainFrame);
+	     		vc.start();
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_QUIT))
+    			mainFrame.onWindowClosing(); 		
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_AUTO_ADJUST_BORDERS))
+    		{
+    			drawPanel.setAutoAdjustement(ab.isSelected());
+    			drawPanel.setIsModified(true);
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_DISPLAY_XSCALE))
+    		{
+    			mainFrame.displayXScale(ab.isSelected());
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_DISPLAY_YSCALE))
+    		{
+    			mainFrame.displayYScale(ab.isSelected());
+    			return;
+    		}
+    		
+    		if(label.equals(LaTeXDrawResources.LABEL_IMPORT_TEX))
+    		{
+    			try
+    			{
+    		    	if(drawPanel.isModified())
+    		    		switch(JOptionPane.showConfirmDialog(mainFrame,
+    							LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.156"), //$NON-NLS-1$
+    							LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.110"),  //$NON-NLS-1$
+    							JOptionPane.YES_NO_CANCEL_OPTION))
+    					{
+    		    			case JOptionPane.YES_OPTION:
+    		    					boolean saved = mainFrame.save(true);
+    		    					if(saved) mainFrame.importPSTricksFile();
+    		    					break;
+    		    			case JOptionPane.NO_OPTION:
+    		    				mainFrame.importPSTricksFile();
+    		    					break;
+    						case JOptionPane.CANCEL_OPTION:
+    								break;				
+    					}
+    		    	else
+    		    		mainFrame.importPSTricksFile();
+    			}catch(Exception ex)
+    			{	    				
+    				ex.printStackTrace(); 
+    				ExceptionFrameDialog.showExceptionDialog(ex);
+    			}
+    			mainFrame.requestFocus();
+    			return;
+    		}
+    		
+    		return ;
+    	}
+	}
+}
diff --git a/current/latexDraw/ui/listeners/RecentFilesListener.java b/current/latexDraw/ui/listeners/RecentFilesListener.java
new file mode 100644
index 0000000..866ebe7
--- /dev/null
+++ b/current/latexDraw/ui/listeners/RecentFilesListener.java
@@ -0,0 +1,146 @@
+package latexDraw.ui.listeners;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.AbstractButton;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+
+import latexDraw.filters.TeXFilter;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.dialog.PreferencesFrame;
+
+/** 
+ * This class allows the program to listen interaction with the menu items concerning
+ * the recent files management.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 
+ * 09/15/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.9<br>
+ */
+public class RecentFilesListener extends AbstractListener implements ActionListener
+{
+	public static final String ACTION_CMD_RECENT_CLEAR = "clearRecents";//$NON-NLS-1$
+	
+	/** The prefix of the action command of "recent files" menus. */
+	public static final String RECENT_PREFIX_CMD = "RECENT_";//$NON-NLS-1$
+	
+	
+	protected PreferencesFrame preferencesFrame;
+	
+	
+	
+	
+	/**
+	 * The constructor.
+	 * @param prefFrame The frame of preferences.
+	 * @param frame The main frame of the program.
+	 */
+	public RecentFilesListener(PreferencesFrame prefFrame, LaTeXDrawFrame frame)
+	{
+		super(frame);
+		preferencesFrame = prefFrame;
+		mainFrame = frame;
+	}
+	
+	
+	
+	public void actionPerformed(ActionEvent e)
+	{
+    	Object src = e.getSource();
+
+    	if(src instanceof JMenuItem)
+    	{
+    		AbstractButton ab = ((AbstractButton)src);
+    		String label = ab.getActionCommand();
+    		
+    		if(label.equals(ACTION_CMD_RECENT_CLEAR))
+    		{
+    			preferencesFrame.getRecentFilesName().clear();
+    			preferencesFrame.writeXMLPreferences(false);
+    			mainFrame.getLMenuBar().updateRecentFilesMenu();
+    			
+    			return ;
+    		}
+    		
+    		if(label.compareTo(RECENT_PREFIX_CMD)>0)
+    		{
+    			String path = label.substring(RECENT_PREFIX_CMD.length());
+    			boolean ok = false;
+    			
+    			if(path.toLowerCase().endsWith(TeXFilter.TEX_EXTENSION))
+    			{
+    		    	if(mainFrame.getDrawPanel().isModified())
+    		    		switch(JOptionPane.showConfirmDialog(mainFrame,
+    							LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.156"), //$NON-NLS-1$
+    							LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.110"),  //$NON-NLS-1$
+    							JOptionPane.YES_NO_CANCEL_OPTION))
+    					{
+    		    			case JOptionPane.YES_OPTION:
+    		    					boolean saved = mainFrame.save(true);
+    		    					
+    		    					ok = saved ? mainFrame.importPSTricksFile(path) : false;
+    		    					break;
+    		    					
+    		    			case JOptionPane.NO_OPTION:
+    		    					ok = mainFrame.importPSTricksFile(path);
+    		    					break;
+    		    					
+    						case JOptionPane.CANCEL_OPTION:
+    								ok = true;
+    								break;				
+    					}
+    		    	else
+    		    		ok = mainFrame.importPSTricksFile(path);
+    			}
+    			else
+    		    	if(mainFrame.getDrawPanel().isModified())
+    		    		switch(JOptionPane.showConfirmDialog(mainFrame,
+    							LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.156"), //$NON-NLS-1$
+    							LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.110"),  //$NON-NLS-1$
+    							JOptionPane.YES_NO_CANCEL_OPTION))
+    					{
+    		    			case JOptionPane.YES_OPTION:
+    		    					boolean saved = mainFrame.save(true);
+    		    					
+    		    					ok = saved ? mainFrame.open(path, false) : false ;
+    		    					break;
+    		    					
+    		    			case JOptionPane.NO_OPTION:
+    		    					ok = mainFrame.open(path, false);
+    								break;
+    								
+    						case JOptionPane.CANCEL_OPTION:
+    								ok = true;
+    								break;				
+    					}
+    		    	else
+    		    		ok = mainFrame.open(path, false);
+    			
+    			if(!ok)
+					JOptionPane.showMessageDialog(mainFrame, 
+				 		   LaTeXDrawLang.getString1_9("RecentFilesListener.0"), //$NON-NLS-1$
+				 		   LaTeXDrawLang.getString1_9("RecentFilesListener.1"),  //$NON-NLS-1$
+				 		    JOptionPane.WARNING_MESSAGE); 
+    			
+    			return ;
+    		}
+    	}
+	}
+}
diff --git a/current/latexDraw/ui/listeners/ShortcutsListener.java b/current/latexDraw/ui/listeners/ShortcutsListener.java
new file mode 100644
index 0000000..bce61da
--- /dev/null
+++ b/current/latexDraw/ui/listeners/ShortcutsListener.java
@@ -0,0 +1,279 @@
+package latexDraw.ui.listeners;
+
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.util.Vector;
+
+import latexDraw.figures.Draw;
+import latexDraw.figures.Figure;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.util.UndoRedoManager;
+
+
+/** 
+ * This class allows the program to listen the shortcuts the user want to do.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 09/15/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.9<br>
+ */
+public class ShortcutsListener extends AbstractListener implements KeyListener
+{
+	public static final int INTERVAL_SCROLLBAR = 5;
+	
+	/** This set of figures is used when the selection is moved for the undo/redo manager. @since 1.9.1 */
+	protected Draw clone;
+	
+	private long oldTime;
+	
+	
+	/**
+	 * The constructor.
+	 * @param frame The main frame of the program; cannot be null.
+	 */
+	public ShortcutsListener(LaTeXDrawFrame frame)
+	{
+		super(frame);
+		
+		clone = null;
+		oldTime = 0;
+	}
+
+	
+	
+	
+	public void keyPressed(KeyEvent e)
+	{
+		int key = e.getKeyCode();
+
+		if(key==KeyEvent.VK_SPACE)
+		{// Back space select the first or the next figure (if a single figure is already selected).
+			if(mainFrame.isOnSelection())
+				mainFrame.getDrawPanel().getDraw().selectNextFigure();
+			return ;
+		}
+
+		if(key==KeyEvent.VK_A)// ctrl+A = select of the figures.
+		{
+			if(e.getModifiers()==InputEvent.CTRL_MASK)
+			{
+				mainFrame.selectAllFigures();
+				return ;
+			}
+			return ;
+		}
+		
+		if(key==KeyEvent.VK_U)// ctrl+U = update the selected figures to the magnetic grid.
+		{
+			if(e.getModifiers()==InputEvent.CTRL_MASK)
+			{
+				mainFrame.getDrawPanel().updateSelectionToGrid();
+				return ;
+			}
+			return ;
+		}
+		
+		if(key==KeyEvent.VK_RIGHT)
+		{
+			if(e.getModifiers()==0)// Right arrow = move the horizontal scrollbar to the right.
+			{
+				mainFrame.getDrawPanel().moveHorizontalScrollbar(INTERVAL_SCROLLBAR);
+				return ;
+			}
+			
+			if(e.getModifiers()==InputEvent.CTRL_MASK)
+			{// Right arrow + ctrl = move strongly the horizontal scrollbar to the right.
+				mainFrame.getDrawPanel().moveHorizontalScrollbar(mainFrame.getDrawPanel().getWidth());
+				return ;
+			}
+			
+			
+			if(e.getModifiers()==(InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK))
+			{// Right arrow + ctrl + shift = move at the end of the horizontal scrollbar.
+				mainFrame.getDrawPanel().getHorizontalScrollBar().setValue(
+									mainFrame.getDrawPanel().getHorizontalScrollBar().getMaximum());
+				return ;
+			}
+			
+			if(e.getModifiers()==InputEvent.ALT_MASK)
+			{// alt + right arrow = move the selected figures to the right.
+				if(clone==null)
+					try 
+					{ 
+						oldTime = e.getWhen();
+						clone = (Draw)mainFrame.getDrawPanel().getDraw().getSelected().clone(); 
+					}
+					catch(CloneNotSupportedException e1) { clone = null; }
+				
+				mainFrame.getDrawPanel().moveSelectedFiguresHorizontally(1);
+				return ;
+			}
+			return ;
+		}
+		
+		
+		if(key==KeyEvent.VK_LEFT)
+		{
+			if(e.getModifiers()==0)// left arrow = move the horizontal scrollbar to the left.
+			{
+				mainFrame.getDrawPanel().moveHorizontalScrollbar(-INTERVAL_SCROLLBAR);
+				return ;
+			}
+			
+			if(e.getModifiers()==InputEvent.CTRL_MASK)
+			{// left arrow + ctrl = move strongly the horizontal scrollbar to the left.
+				mainFrame.getDrawPanel().moveHorizontalScrollbar(-mainFrame.getDrawPanel().getWidth());
+				return ;
+			}
+			
+			if(e.getModifiers()==(InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK))
+			{// left arrow + ctrl + shift = move at the beginning of the horizontal scrollbar.
+				mainFrame.getDrawPanel().getHorizontalScrollBar().setValue(
+								mainFrame.getDrawPanel().getHorizontalScrollBar().getMinimum());
+				return ;
+			}
+			
+			if(e.getModifiers()==InputEvent.ALT_MASK)
+			{// alt + right arrow = move the selected figures to the left.
+				try 
+				{ 
+					oldTime = e.getWhen();
+					clone = (Draw)mainFrame.getDrawPanel().getDraw().getSelected().clone(); 
+				}
+				catch(CloneNotSupportedException e1) { clone = null; }
+					
+				mainFrame.getDrawPanel().moveSelectedFiguresHorizontally(-1);
+				return ;
+			}
+			return ;
+		}
+		
+		if(key==KeyEvent.VK_UP)
+		{
+			if(e.getModifiers()==0)// up arrow = move the vertical scrollbar to the top.
+			{
+				mainFrame.getDrawPanel().moveVerticalScrollbar(-INTERVAL_SCROLLBAR);
+				return ;
+			}
+			
+			if(e.getModifiers()==InputEvent.CTRL_MASK)
+			{// up arrow + ctrl = move strongly the vertical scrollbar to the top.
+				mainFrame.getDrawPanel().moveVerticalScrollbar(-mainFrame.getDrawPanel().getWidth());
+				return ;
+			}
+			
+			if(e.getModifiers()==(InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK))
+			{// up arrow + ctrl + shift = move at the beginning of the vertical scrollbar.
+				mainFrame.getDrawPanel().getVerticalScrollBar().setValue(
+									mainFrame.getDrawPanel().getHorizontalScrollBar().getMinimum());
+				return ;
+			}
+			
+			if(e.getModifiers()==InputEvent.ALT_MASK)
+			{// alt + right arrow = move the selected figures to the top.
+				try 
+				{ 
+					oldTime = e.getWhen();
+					clone = (Draw)mainFrame.getDrawPanel().getDraw().getSelected().clone(); 
+				}
+				catch(CloneNotSupportedException e1) { clone = null; }
+					
+				mainFrame.getDrawPanel().moveSelectedFiguresVertically(-1);
+				return ;
+			}
+			return ;
+		}
+		
+		
+		if(key==KeyEvent.VK_DOWN)
+		{
+			if(e.getModifiers()==0)// down arrow = move the vertical scrollbar to the bottom.
+			{
+				mainFrame.getDrawPanel().moveVerticalScrollbar(INTERVAL_SCROLLBAR);
+				return ;
+			}
+			
+			if(e.getModifiers()==InputEvent.CTRL_MASK)
+			{// down arrow + ctrl = move strongly the vertical scrollbar to the bottom.
+				mainFrame.getDrawPanel().moveVerticalScrollbar(mainFrame.getDrawPanel().getWidth());
+				return ;
+			}
+			
+			if(e.getModifiers()==(InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK))
+			{// down arrow + ctrl + shift = move at the end of the horizontal scrollbar.
+				mainFrame.getDrawPanel().getVerticalScrollBar().setValue(
+									mainFrame.getDrawPanel().getHorizontalScrollBar().getMaximum());
+				return ;
+			}
+			
+			if(e.getModifiers()==InputEvent.ALT_MASK)
+			{// alt + right arrow = move the selected figures to the bottom.
+				try 
+				{ 
+					oldTime = e.getWhen();
+					clone = (Draw)mainFrame.getDrawPanel().getDraw().getSelected().clone(); 
+				}
+				catch(CloneNotSupportedException e1) { clone = null; }
+					
+				mainFrame.getDrawPanel().moveSelectedFiguresVertically(1);
+				return ;
+			}
+			return ;
+		}
+	}
+
+	
+	
+	
+	public void keyReleased(KeyEvent e)
+	{
+		if(clone!=null && e.getWhen()-oldTime>100)
+		{
+			Draw selection = mainFrame.getDrawPanel().getDraw().getSelected();
+			
+			if(selection!=null && !selection.isEmpty())
+			{
+				Vector<Figure> figures = mainFrame.getDrawPanel().getDraw().getFigures();
+				int[] id = new int[selection.size()];
+				
+				for(int i=0, size=selection.size(); i<size; i++)
+				{
+					id[i] = figures.indexOf(selection.getFigureAt(i));
+					
+					if(id[i]<0)
+						throw new IndexOutOfBoundsException();
+				}
+				
+				mainFrame.getUndoManager().add(UndoRedoManager.LABEL_CHANGE_MOVE, id, clone, false);
+				mainFrame.updateUndoRedo();
+				clone = null;
+				mainFrame.setIsModified(true);
+			}
+		}
+		
+		oldTime = e.getWhen();
+	}
+
+	
+	
+	public void keyTyped(KeyEvent e)
+	{
+		/*
+		 * Nothing to do.
+		 */
+	}
+}
diff --git a/current/latexDraw/ui/listeners/ToolbarListener.java b/current/latexDraw/ui/listeners/ToolbarListener.java
new file mode 100644
index 0000000..a165976
--- /dev/null
+++ b/current/latexDraw/ui/listeners/ToolbarListener.java
@@ -0,0 +1,196 @@
+package latexDraw.ui.listeners;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.*;
+
+import latexDraw.ui.DrawPanel;
+import latexDraw.ui.LaTeXDrawFrame;
+
+/** 
+ * Defines a listener for the latexdraw toolbar.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ * <br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ * <br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 08/14/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class ToolbarListener extends AbstractListener implements ActionListener
+{
+
+	public static final String LABEL_ALIGN_LEFT 	= "alignLeft"; 		//$NON-NLS-1$
+	public static final String LABEL_ALIGN_RIGHT 	= "alignRight"; 	//$NON-NLS-1$
+	public static final String LABEL_ALIGN_TOP 		= "alignTop"; 		//$NON-NLS-1$
+	public static final String LABEL_ALIGN_BOTTOM	= "alignBottom"; 	//$NON-NLS-1$
+	public static final String LABEL_ALIGN_MIDDLE_H	= "alignMiddleH"; 	//$NON-NLS-1$
+	public static final String LABEL_ALIGN_MIDDLE_V	= "alignMiddleV"; 	//$NON-NLS-1$
+	
+	public static final String LABEL_DISTRIB_H_EQ 		= "distribHEq";	//$NON-NLS-1$
+	public static final String LABEL_DISTRIB_H_LEFT		= "distribHLe";	//$NON-NLS-1$
+	public static final String LABEL_DISTRIB_H_RIGHT	= "distribHRi";	//$NON-NLS-1$
+	public static final String LABEL_DISTRIB_H_MID		= "distribHMi";	//$NON-NLS-1$
+	public static final String LABEL_DISTRIB_V_EQ 		= "distribVEq";	//$NON-NLS-1$
+	public static final String LABEL_DISTRIB_V_BOTTOM	= "distribVBo";	//$NON-NLS-1$
+	public static final String LABEL_DISTRIB_V_TOP		= "distribVTo";	//$NON-NLS-1$
+	public static final String LABEL_DISTRIB_V_MID		= "distribVMi";	//$NON-NLS-1$
+	
+	
+	/**
+	 * The constructor.
+	 * @param frame The latexdraw frame.
+	 */
+	public ToolbarListener(LaTeXDrawFrame frame)
+	{
+		super(frame);
+	}
+
+	
+	public void actionPerformed(ActionEvent e)
+	{
+    	Object src = e.getSource();
+    	
+    	if(src instanceof JMenuItem || src instanceof JButton || src instanceof JToggleButton || src instanceof JCheckBox)
+    	{
+    		String label 		= ((AbstractButton)src).getActionCommand();
+    		DrawPanel drawPanel = mainFrame.getDrawPanel();
+    		
+    		if(label.equals(LABEL_ALIGN_LEFT))
+    		{
+    			drawPanel.getDraw().align(0);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_ALIGN_RIGHT))
+    		{
+    			drawPanel.getDraw().align(1);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_ALIGN_TOP))
+    		{
+    			drawPanel.getDraw().align(2);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_ALIGN_BOTTOM))
+    		{
+    			drawPanel.getDraw().align(3);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_ALIGN_MIDDLE_H))
+    		{
+    			drawPanel.getDraw().align(5);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_ALIGN_MIDDLE_V))
+    		{
+    			drawPanel.getDraw().align(4);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_DISTRIB_H_LEFT))
+    		{
+    			drawPanel.getDraw().distribute(4);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_DISTRIB_H_MID))
+    		{
+    			drawPanel.getDraw().distribute(5);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_DISTRIB_H_RIGHT))
+    		{
+    			drawPanel.getDraw().distribute(6);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_DISTRIB_H_EQ))
+    		{
+    			drawPanel.getDraw().distribute(7);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_DISTRIB_V_BOTTOM))
+    		{
+    			drawPanel.getDraw().distribute(0);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_DISTRIB_V_MID))
+    		{
+    			drawPanel.getDraw().distribute(1);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_DISTRIB_V_TOP))
+    		{
+    			drawPanel.getDraw().distribute(2);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    		
+    		if(label.equals(LABEL_DISTRIB_V_EQ))
+    		{
+    			drawPanel.getDraw().distribute(3);
+    			drawPanel.updateDraw(true);
+    			mainFrame.requestFocus();
+    			
+    			return ;
+    		}
+    	}
+	}
+}
diff --git a/current/latexDraw/util/LaTeXDrawCursor.java b/current/latexDraw/util/LaTeXDrawCursor.java
new file mode 100644
index 0000000..a6c29da
--- /dev/null
+++ b/current/latexDraw/util/LaTeXDrawCursor.java
@@ -0,0 +1,58 @@
+package latexDraw.util;
+
+import java.awt.Cursor;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.Toolkit;
+import java.awt.image.BufferedImage;
+import java.net.URL;
+
+import javax.swing.ImageIcon;
+
+
+/** 
+ * This class contains defined several cursors using in LaTeXDraw.<br>
+ *<br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.9<br>
+ */
+public abstract class LaTeXDrawCursor
+{
+	public static final Cursor ROTATE_CURSOR = getCursor("/res/cursors/RotCWDown.gif", "rotate");//$NON-NLS-1$//$NON-NLS-2$
+
+	
+	
+	/**
+	 * Create a cursor define by the picture corresponding to the path.
+	 * @param path The path of the picture of the cursor.
+	 * @param name The name which will be given to the cursor.
+	 * @return The created cursor.
+	 * @since 1.9
+	 */
+	public static Cursor getCursor(String path, String name)
+	{
+        BufferedImage bi = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D graphic = (Graphics2D)bi.getGraphics();
+        URL url = LaTeXDrawCursor.class.getClass().getResource(path);
+        ImageIcon img = new ImageIcon(url);
+		
+        graphic.drawImage(img.getImage(), null, null);
+		
+		return Toolkit.getDefaultToolkit().createCustomCursor(bi,new Point(0,0), name);
+	}
+
+}
diff --git a/current/latexDraw/util/LaTeXDrawException.java b/current/latexDraw/util/LaTeXDrawException.java
new file mode 100644
index 0000000..230ec2e
--- /dev/null
+++ b/current/latexDraw/util/LaTeXDrawException.java
@@ -0,0 +1,71 @@
+package latexDraw.util;
+
+import latexDraw.lang.LaTeXDrawLang;
+
+/** 
+ * This class allows the management of exceptions.
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class LaTeXDrawException extends Exception
+{
+	private static final long serialVersionUID = 1L;
+
+	/** The code of the exception generated */
+	private int errorCode;
+	
+	public static final short INCORRECT_VALUE      = 0;
+	public static final short NOT_TEXDRAW_FILE     = 1;
+	public static final short INVALID_TEXDRAW_VERSION = 2;
+	public static final short INVALID_PICTURE 		= 3;
+	
+	
+	/**
+	 * The constructor using the identifier of the error
+	 * @param errorCode The identifier of the error
+	 */
+	public LaTeXDrawException(int errorCode)
+	{ 
+		this.errorCode = errorCode; 
+	}
+	
+	
+	
+	/**
+	 * Allows to get the code of the error
+	 * @return The code of the error
+	 */
+	public int getErrorCode() 
+	{ 
+		return errorCode; 
+	}
+	
+	
+	
+	@Override
+	public String toString()
+	{
+		switch(errorCode)
+		{			
+			case INCORRECT_VALUE      		: return LaTeXDrawLang.getOthersString("LaTeXDrawException.valueInc"); //$NON-NLS-1$
+			case NOT_TEXDRAW_FILE   		: return LaTeXDrawLang.getOthersString("LaTeXDrawException.invFile"); //$NON-NLS-1$
+			case INVALID_TEXDRAW_VERSION 	: return LaTeXDrawLang.getOthersString("LaTeXDrawException.invLaTeXDrawVer"); //$NON-NLS-1$
+			case INVALID_PICTURE 			: return LaTeXDrawLang.getString1_7("LaTeXDrawException.0"); //$NON-NLS-1$
+			
+			default  : return LaTeXDrawLang.getOthersString("LaTeXDrawException.invException"); //$NON-NLS-1$
+		}
+	}
+}
diff --git a/current/latexDraw/util/LaTeXDrawNamespace.java b/current/latexDraw/util/LaTeXDrawNamespace.java
new file mode 100644
index 0000000..8df9b11
--- /dev/null
+++ b/current/latexDraw/util/LaTeXDrawNamespace.java
@@ -0,0 +1,133 @@
+package latexDraw.util;
+
+
+/**
+ * Defines the elements of the latexdraw namespace.<br>
+ *<br>
+ * This file is part of LaTeXDraw.<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 11/06/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class LaTeXDrawNamespace
+{
+	public static final String LATEXDRAW_NAMESPACE_URI 	= "http://latexdraw.sourceforge.net/namespaces/latexdraw";	//$NON-NLS-1$
+	public static final String LATEXDRAW_NAMESPACE 		= "latexdraw";				//$NON-NLS-1$
+	
+	public static final String XML_TYPE					= "type";				//$NON-NLS-1$
+	
+	public static final String XML_TYPE_RECT 			= "rectangle";			//$NON-NLS-1$
+	public static final String XML_TYPE_AKIN_PTS		= "akinPoints";			//$NON-NLS-1$
+	public static final String XML_TYPE_ARC 			= "arc";				//$NON-NLS-1$
+	public static final String XML_TYPE_ARROWHEAD 		= "arrowhead";			//$NON-NLS-1$
+	public static final String XML_TYPE_AXE 			= "axe";				//$NON-NLS-1$
+	public static final String XML_TYPE_BEZIER_CURVE	= "bezierCurve";		//$NON-NLS-1$
+	public static final String XML_TYPE_CIRCLE			= "circle";				//$NON-NLS-1$
+	public static final String XML_TYPE_DOT				= "dot";				//$NON-NLS-1$
+	public static final String XML_TYPE_DRAWING			= "drawing";			//$NON-NLS-1$
+	public static final String XML_TYPE_ELLIPSE			= "ellipse";			//$NON-NLS-1$
+	public static final String XML_TYPE_FRAMEDBOX		= "framedbox";			//$NON-NLS-1$
+	public static final String XML_TYPE_GRID			= "grid";				//$NON-NLS-1$
+	public static final String XML_TYPE_JOINED_LINES	= "joinedLines";		//$NON-NLS-1$
+	public static final String XML_TYPE_POLYGON			= "polygon";			//$NON-NLS-1$
+	public static final String XML_TYPE_PICTURE			= "picture";			//$NON-NLS-1$
+	public static final String XML_TYPE_RHOMBUS			= "rhombus";			//$NON-NLS-1$
+	public static final String XML_TYPE_SQUARE			= "square";				//$NON-NLS-1$
+	public static final String XML_TYPE_TEXT			= "text";				//$NON-NLS-1$
+	public static final String XML_TYPE_TRIANGLE		= "triangle";			//$NON-NLS-1$
+	public static final String XML_TYPE_LINE			= "line";				//$NON-NLS-1$
+	public static final String XML_TYPE_DBLE_BORDERS	= "dbleborders";		//$NON-NLS-1$
+	public static final String XML_TYPE_SHOW_PTS		= "showPoints";			//$NON-NLS-1$
+	public static final String XML_BORDERS_POS			= "borderPos";			//$NON-NLS-1$
+	public static final String XML_TYPE_SHADOW			= "shadow";				//$NON-NLS-1$
+	public static final String XML_ROTATION 			= "rotationAngle";		//$NON-NLS-1$
+	public static final String XML_DOT_SHAPE			= "dotShape";			//$NON-NLS-1$
+	public static final String XML_TYPE_GRID_SUB		= "subGrid";			//$NON-NLS-1$
+	public static final String XML_TYPE_BG				= "background";			//$NON-NLS-1$
+	
+	public static final String XML_BORDER				= "border";				//$NON-NLS-1$
+	public static final String XML_CAPTION				= "caption";			//$NON-NLS-1$
+	public static final String XML_LABEL				= "label";				//$NON-NLS-1$
+	public static final String XML_POSITION_VERT		= "positionVert";		//$NON-NLS-1$
+	public static final String XML_POSITION_HORIZ		= "positionHoriz";		//$NON-NLS-1$
+	public static final String XML_COMMENTS				= "comments";			//$NON-NLS-1$
+	public static final String XML_DRAW_BORDERS			= "displayBorders";		//$NON-NLS-1$
+	public static final String XML_AUTO_ADJUST			= "autoAdjust";			//$NON-NLS-1$
+	public static final String XML_PPC					= "ppc";				//$NON-NLS-1$
+	public static final String XML_ZOOM					= "zoom";				//$NON-NLS-1$
+	public static final String XML_UNIT					= "unit";				//$NON-NLS-1$
+	public static final String XML_CLASSIC_GRID			= "classicGrid";		//$NON-NLS-1$
+	public static final String XML_GRID_GAP				= "gridGap";			//$NON-NLS-1$
+	public static final String XML_CODE					= "code";				//$NON-NLS-1$
+	public static final String XML_MAGNETIC_GRID		= "magneticGrid";		//$NON-NLS-1$
+	public static final String XML_VERSION				= "version";			//$NON-NLS-1$
+	public static final String XML_POSITION 			= "position";			//$NON-NLS-1$
+	public static final String XML_POSITION_X 			= "x";					//$NON-NLS-1$
+	public static final String XML_POSITION_Y 			= "y";					//$NON-NLS-1$
+	public static final String XML_SIZE 				= "size";				//$NON-NLS-1$
+	public static final String XML_HEIGHT 				= "height";				//$NON-NLS-1$
+	public static final String XML_WIDTH 				= "width";				//$NON-NLS-1$
+	public static final String XML_MAXIMISED 			= "maximised";			//$NON-NLS-1$
+	public static final String XML_DIVIDER_POSITION 	= "dividerPosition";	//$NON-NLS-1$
+	public static final String XML_AUTO_UPDATE 			= "autoUpdate";			//$NON-NLS-1$
+	public static final String XML_DISPLAY_GRID 		= "displayGrid";		//$NON-NLS-1$
+	public static final String XML_ROOT_PREFERENCES 	= "preferences";		//$NON-NLS-1$
+	public static final String XML_RENDERING 			= "rendering";			//$NON-NLS-1$
+	public static final String XML_COLOR_RENDERING 		= "colorRendering";		//$NON-NLS-1$
+	public static final String XML_ALPHA_INTER 			= "alphaInter";			//$NON-NLS-1$
+	public static final String XML_ANTI_ALIAS 			= "antiAlias";			//$NON-NLS-1$
+	public static final String XML_PATH_EXPORT 			= "pathExport";			//$NON-NLS-1$
+	public static final String XML_PATH_OPEN 			= "pathOpen";			//$NON-NLS-1$
+	public static final String XML_DISPLAY_CODE_PANEL 	= "displayCodePanel";	//$NON-NLS-1$
+	public static final String XML_DISPLAY_X 			= "displayXScale";		//$NON-NLS-1$
+	public static final String XML_DISPLAY_Y 			= "displayYScale";		//$NON-NLS-1$
+	public static final String XML_CHECK_VERSION 		= "checkVersion";		//$NON-NLS-1$
+	public static final String XML_LANG 				= "lang";				//$NON-NLS-1$
+	public static final String XML_PATH_TEX_EDITOR 		= "pathTexEditor";		//$NON-NLS-1$
+	public static final String XML_PATH_LATEX_DISTRIB	= "latexDistrib";		//$NON-NLS-1$
+	public static final String XML_LATEX_INCLUDES		= "latexIncludes";		//$NON-NLS-1$
+	public static final String XML_RECENT_FILES 		= "recentFiles";		//$NON-NLS-1$
+	public static final String XML_NB_RECENT_FILES 		= "nb";					//$NON-NLS-1$
+	public static final String XML_RECENT_FILE 			= "recentFile";			//$NON-NLS-1$
+	public static final String XML_LAF 					= "laf";				//$NON-NLS-1$
+	public static final String XML_DELIMITOR_OPACITY	= "delimitorOpacity";	//$NON-NLS-1$
+	public static final String XML_PATH_TYPE			= "pathType";			//$NON-NLS-1$
+	public static final String XML_INTERVAL				= "interval";			//$NON-NLS-1$
+	public static final String XML_STYLE				= "style";				//$NON-NLS-1$
+	public static final String XML_POINTS				= "points";				//$NON-NLS-1$
+	
+	public static final String XML_GRID_X_SOUTH			= "XLabelsSouth";		//$NON-NLS-1$
+	public static final String XML_GRID_Y_WEST			= "YLabelsWest";		//$NON-NLS-1$
+	public static final String XML_GRID_DOTS			= "gridDots";			//$NON-NLS-1$
+	public static final String XML_GRID_UNIT			= "gridUnit";			//$NON-NLS-1$
+	public static final String XML_GRID_END				= "gridEnd";			//$NON-NLS-1$
+	public static final String XML_GRID_START			= "gridStart";			//$NON-NLS-1$
+	public static final String XML_GRID_ORIGIN			= "origin";				//$NON-NLS-1$
+	public static final String XML_GRID_SUB_DIV			= "subDiv";				//$NON-NLS-1$
+	public static final String XML_GRID_WIDTH			= "Gridwidth";			//$NON-NLS-1$
+
+	public static final String XML_ARROW_DOT_SIZE_NUM	= "dotSizeNum";			//$NON-NLS-1$
+	public static final String XML_ARROW_TBAR_SIZE_NUM	= "tbarSizeNum";		//$NON-NLS-1$
+	public static final String XML_ARROW_SIZE_NUM		= "arrSizeNum";			//$NON-NLS-1$
+	
+	public static final String XML_AXE_IS_WEST			= "isWest";				//$NON-NLS-1$
+	public static final String XML_AXE_IS_SOUTH			= "isSouth";			//$NON-NLS-1$
+	public static final String XML_AXE_INCREMENT		= "increment";			//$NON-NLS-1$
+	public static final String XML_AXE_TICKS_SIZE		= "ticksSize";			//$NON-NLS-1$
+	public static final String XML_AXE_SHOW_ORIGIN		= "showOrigin";			//$NON-NLS-1$
+	public static final String XML_AXE_SHOW_TICKS		= "showTicks";			//$NON-NLS-1$
+	public static final String XML_AXE_LABELS_STYLE		= "showLabels";			//$NON-NLS-1$
+	public static final String XML_AXE_DIST_LABELS		= "distLabels";			//$NON-NLS-1$
+	public static final String XML_AXE_TICKS_STYLE		= "ticksStyle";			//$NON-NLS-1$
+}
diff --git a/current/latexDraw/util/LaTeXDrawNumber.java b/current/latexDraw/util/LaTeXDrawNumber.java
new file mode 100644
index 0000000..e8e51d9
--- /dev/null
+++ b/current/latexDraw/util/LaTeXDrawNumber.java
@@ -0,0 +1,56 @@
+package latexDraw.util;
+
+
+/**
+ * The class define some useful methods to manage numbers.
+ * 
+ * This file is part of LaTeXDraw.<br>
+ * Copyright(c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 12/18/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class LaTeXDrawNumber
+{
+	/**
+	 * This method allows to set a threshold that if a number is under it, it will be considered as valuing 0; 
+	 * for instance, given the numbers 2E-10 and 0.002 and the
+	 * threshold 0.00001; then this method will cut the first number and will return 0. The absolute value of
+	 * the second number is not lesser than the threshold so it will be returned intact.
+	 * @param value The number to check.
+	 * @param threshold The minimum threshold of the value.
+	 * @return The cut or the intact number.
+	 * @since 1.9
+	 */
+	public static float getCutNumber(float value, double threshold)
+	{
+		return Math.abs(value) < threshold ? 0f : value;
+	}
+	
+	
+	
+	/**
+	 * This method allows to set a threshold that if a number is under it, it will be considered as valuing 0; 
+	 * for instance, given the numbers 2E-10 and 0.002 and the
+	 * threshold 0.00001; then this method will cut the first number and will return 0. The absolute value of
+	 * the second number is not lesser than the threshold so it will be returned intact.
+	 * @param value The number to check.
+	 * @param threshold The minimum threshold of the value.
+	 * @return The cut or the intact number.
+	 * @since 1.9
+	 */
+	public static double getCutNumber(double value, double threshold)
+	{
+		return Math.abs(value) < threshold ? 0. : value;
+	}
+}
diff --git a/current/latexDraw/util/LaTeXDrawPath.java b/current/latexDraw/util/LaTeXDrawPath.java
new file mode 100644
index 0000000..03cced9
--- /dev/null
+++ b/current/latexDraw/util/LaTeXDrawPath.java
@@ -0,0 +1,191 @@
+package latexDraw.util;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLDecoder;
+
+
+/** 
+ * This class defines paths used in LaTeXDraw.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 05/11/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public abstract class LaTeXDrawPath
+{
+	/** The name of the cache directory */
+	public static final String CACHE_DIR = ".cache";//$NON-NLS-1$
+	
+	/** The name of the cache directory for shared templates */
+	public static final String CACHE_SHARED_DIR = ".cacheShared";//$NON-NLS-1$
+	
+	/** The name of the templates directory */
+	public static final String TEMPLATE_DIR = "templates";//$NON-NLS-1$
+	
+	public static final String PATH_LOCAL_USER = getPathLocalUser();
+	public static final String PATH_TEMPLATES_DIR_USER = PATH_LOCAL_USER + File.separator + TEMPLATE_DIR;
+	public static final String PATH_PREFERENCES_FILE_OLD   = PATH_LOCAL_USER + File.separator + ".preferences";//$NON-NLS-1$
+	public static final String PATH_PREFERENCES_XML_FILE   = PATH_PREFERENCES_FILE_OLD+".xml";//$NON-NLS-1$
+	public static final String PATH_CACHE_DIR      	   = PATH_LOCAL_USER + File.separator + CACHE_DIR;
+	public static final String PATH_CACHE_SHARE_DIR	   = PATH_LOCAL_USER + File.separator + CACHE_SHARED_DIR;
+	public static final String PATH_TEMPLATES_SHARED   = getPathTemplatesShared();
+	public static final String PATH_SHARED 			   = getPathShared();
+	
+	
+	private static String getPathLocalUser()
+	{
+		String os   = System.getProperty("os.name").toLowerCase();//$NON-NLS-1$
+		String home = System.getProperty("user.home");//$NON-NLS-1$
+		
+		if(os.equals("windows vista"))//$NON-NLS-1$
+			return home + "\\AppData\\Local\\latexdraw";//$NON-NLS-1$
+		else
+			if(os.equals("windows xp") || os.contains("win"))//$NON-NLS-1$ //$NON-NLS-2$
+				return home + "\\Application Data\\latexdraw";//$NON-NLS-1$
+			else
+				if(os.equals("mac os x"))//$NON-NLS-1$
+					return home + "/Library/Preferences/latexdraw";//$NON-NLS-1$
+
+		return home + "/.latexdraw";//$NON-NLS-1$
+	}
+	
+	
+	
+	private static String getPathTemplatesShared()
+	{
+		String path = getPathShared();
+		
+		if(path==null)
+			return null;
+		
+		return path+File.separator+TEMPLATE_DIR;
+	}
+	
+	
+	private static String getPathShared()
+	{
+		String os   = System.getProperty("os.name").toLowerCase();//$NON-NLS-1$
+		String home = System.getProperty("user.home");//$NON-NLS-1$
+		
+		if(os.equals("mac os x"))//$NON-NLS-1$
+			return "/Users/Shared/latexdraw";//$NON-NLS-1$
+		else
+			if(os.equals("windows vista"))//$NON-NLS-1$
+			{
+				File dir = new File("C:\\ProgramData");//$NON-NLS-1$
+				int cpt = 0, max = 10;
+				
+				while(!dir.exists() && cpt<max)
+					dir = new File((char)('C'+cpt++)+":\\ProgramData");//$NON-NLS-1$
+				
+				if(dir.exists())
+					return dir.getPath()+"\\latexdraw";//$NON-NLS-1$
+				
+				dir = new File(home.substring(0, 1+home.lastIndexOf('\\'))+"All Users\\Application Data");//$NON-NLS-1$
+				dir.mkdir();
+				
+				return dir.getPath()+"\\latexdraw";//$NON-NLS-1$
+			}
+		else
+			if(os.contains("win"))//$NON-NLS-1$
+			{
+				File dir = new File(home.substring(0, 1+home.lastIndexOf('\\'))+"All Users\\Application Data");//$NON-NLS-1$
+				dir.mkdir();
+				
+				return dir.getPath()+"\\latexdraw";//$NON-NLS-1$
+			}
+
+		return "/usr/share/latexdraw";//$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * Creates the necessary directories for the installation of LaTeXDraw.
+	 * @since 1.9.2
+	 */
+	public static void checkInstallDirectories()
+	{
+		try
+		{
+			(new File(PATH_SHARED)).mkdir();
+			(new File(PATH_TEMPLATES_SHARED)).mkdir();
+		}
+		catch(Exception e) { e.printStackTrace(); }
+	}
+	
+	
+	/**
+	 * Creates the necessary directories for the execution of LaTeXDraw.
+	 * @since 1.9.2
+	 */
+	public static void checkDirectories()
+	{
+		try
+		{
+			(new File(PATH_LOCAL_USER)).mkdir();
+			(new File(PATH_TEMPLATES_DIR_USER)).mkdir();
+			(new File(PATH_CACHE_DIR)).mkdir();
+			(new File(PATH_CACHE_SHARE_DIR)).mkdir();
+		}
+		catch(Exception e) { e.printStackTrace(); }
+	}
+
+	
+	
+	/**
+	 * Allows to get the path of the project where the class LaTeXDrawPath is located.
+	 * @return The path or null.
+	 * @since 1.9.2
+	 */
+	public static String getPathJar()
+	{
+		try
+		{
+			String path = LaTeXDrawPath.class.getSimpleName() + ".class";//$NON-NLS-1$
+		    URL url = LaTeXDrawPath.class.getResource(path);
+		    path = URLDecoder.decode(url.toString(), "UTF-8");//$NON-NLS-1$
+		    int index = path.lastIndexOf('/');
+		    path = path.substring(0, index);
+		    String jar = "jar:file:", file = "file:";//$NON-NLS-1$//$NON-NLS-2$
+	
+		    if(path.startsWith(jar))
+		    {
+		    	index = path.lastIndexOf("!");//$NON-NLS-1$
+		    	path = path.substring(jar.length(), path.substring(0, index).lastIndexOf('/'));
+		    }
+		    else
+		    {
+		    	path = path.substring(file.length(), path.length());
+		    	Package pack = LaTeXDrawPath.class.getPackage();
+		    	
+		    	if(null != pack)
+		    	{
+		    		String packPath = pack.getName().replace('.', '/');
+		    		
+		    		if(path.endsWith(packPath))
+		    			path = path.substring(0, (path.length() - packPath.length()));
+		      }
+		    }
+		   
+		    return path;
+		    
+		}catch(Exception e)
+		{
+			return null;
+		}
+	}
+}
diff --git a/current/latexDraw/util/LaTeXDrawPoint2D.java b/current/latexDraw/util/LaTeXDrawPoint2D.java
new file mode 100644
index 0000000..a3a7db1
--- /dev/null
+++ b/current/latexDraw/util/LaTeXDrawPoint2D.java
@@ -0,0 +1,249 @@
+package latexDraw.util;
+
+import static java.lang.Math.PI;
+
+import java.awt.geom.Point2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+import latexDraw.figures.Line;
+
+
+/** 
+ * This class allows a LaTeXDrawPoint2D to be serializable (it's not the case for java 1.5)<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class LaTeXDrawPoint2D extends Point2D.Double
+{
+	private static final long serialVersionUID = 1L;
+
+	
+	/**
+	 * Constructs a point from a java point2D
+	 * @param pt The java point2D
+	 */
+	public LaTeXDrawPoint2D(Point2D pt)
+	{
+		if(pt==null)
+			x = y = 0.;
+		else
+			setLocation(pt);
+	}
+	
+	
+	
+	/**
+	 * Constructs and initialises a Point2D with the specified coordinates.
+	 * @param x The X-coordinate to which to set the newly constructed Point2D
+	 * @param y The Y-coordinate to which to set the newly constructed Point2D
+	 */
+	public LaTeXDrawPoint2D(double x, double y)
+	{
+		super(x, y);
+	}
+	
+	
+	
+	/**
+	 * Constructs and initialises a Point2D with coordinates (0, 0).
+	 */
+	public LaTeXDrawPoint2D()
+	{
+		super();
+	}
+	
+	
+	
+	/**
+	 * Allows to deserialize the point2D.Double
+	 * @param ois The input stream
+	 */
+	private void readObject(ObjectInputStream ois) throws IOException
+	{
+		x = ois.readDouble();
+		y = ois.readDouble();
+	}
+	
+	
+	
+	/**
+	 * Allows to know if the point p is equal to "this" considering a gap.
+	 * @param p The point to compare
+	 * @param gap The approximation gap
+	 * @return True if they are equals
+	 * @exception IllegalArgumentException When <code>gap<0</code>
+	 */
+	public boolean equals(LaTeXDrawPoint2D p, double gap)
+	{
+		if(gap<0)
+			throw new IllegalArgumentException();
+		
+		if(p==null) return false;
+		//Fixed: < and > are replaced by <= and >=
+		return p.x-gap<=x && p.x+gap>=x && p.y-gap<=y && p.y+gap>=y;
+	}
+	
+	
+	
+	/**
+	 * Allows to get middle point of these two points
+	 * @param p The second point
+	 * @return The middle point
+	 */
+	public LaTeXDrawPoint2D getMiddlePoint(LaTeXDrawPoint2D p)
+	{
+		return new LaTeXDrawPoint2D((x+p.x)/2., (y+p.y)/2.);
+	}
+	
+	
+	
+	/**
+	 * Allows to move a point with the difference between a the former position
+	 * of a point p and its new.
+	 * @param oldP The old position of the point of reference
+	 * @param newP The new position of the point of reference
+	 */
+	public synchronized void move(LaTeXDrawPoint2D oldP, LaTeXDrawPoint2D newP)
+	{
+		x+=newP.x-oldP.x;
+		y+=newP.y-oldP.y;
+	}
+
+
+	
+	/**
+	 * Returns vertically the point.
+	 * @param origin The location of the vertical axe.
+	 */
+	public Point2D verticalSymmetry(LaTeXDrawPoint2D origin)
+	{
+		try
+		{
+			Line l = new Line(origin.y, (LaTeXDrawPoint2D)origin.clone(), false);
+			LaTeXDrawPoint2D o2 = new LaTeXDrawPoint2D(x, origin.y);
+			double distance = distance(o2);
+			Line perp = l.getPerpendicularLine(o2, false);
+			LaTeXDrawPoint2D[] pts = perp.findPoints(o2, distance);
+			
+			if(pts==null)
+				return null;
+			
+			if(pts.length==1)
+				return pts[0];
+			
+			return distance(pts[0])>distance(pts[1]) ? pts[0] : pts[1];
+			
+		}catch(Exception e) { return null; }
+	}
+
+
+
+	/**
+	 * Returns horizontally the point.
+	 * @param origin The location of the horizontal axe.
+	 */
+	public Point2D horizontalSymmetry(LaTeXDrawPoint2D origin)
+	{
+		try
+		{
+			Line l = new Line((LaTeXDrawPoint2D)origin.clone(), 
+								new LaTeXDrawPoint2D(origin.x, origin.y-10), false);
+			LaTeXDrawPoint2D o2 = new LaTeXDrawPoint2D(origin.x, y);
+			double distance = distance(o2);
+			Line perp = l.getPerpendicularLine(o2, false);
+			LaTeXDrawPoint2D[] pts = perp.findPoints(o2, distance);
+			
+			if(pts==null)
+				return null;
+			
+			if(pts.length==1)
+				return pts[0];
+			
+			return distance(pts[0])>distance(pts[1]) ? pts[0] : pts[1];
+			
+		}catch(Exception e) { return null; }
+	}
+	
+	
+	
+	
+	/**
+	 * Get a point by central symmetry.
+	 * @param centre The centre of the symmetry.
+	 * @return The resulting point.
+	 * @since 1.9
+	 */
+	public LaTeXDrawPoint2D centralSymmetry(LaTeXDrawPoint2D centre)
+	{
+		return rotatePoint(centre, Math.PI);
+	}
+	
+	
+	
+	/**
+	 * Allows to rotate a point with as reference an other point.
+	 * @param gravityC The point of reference.
+	 * @param theta The angle of rotation (in rad).
+	 * @return The rotated point.
+	 * @since 1.9
+	 */
+	public LaTeXDrawPoint2D rotatePoint(LaTeXDrawPoint2D gravityC, double theta)
+	{
+		LaTeXDrawPoint2D pt = new LaTeXDrawPoint2D();
+		double cosTheta;
+		double sinTheta;
+
+		if(theta<0.)
+			theta = 2.*PI + theta;
+		
+		if((theta%(2.*PI))==0.)
+			return (LaTeXDrawPoint2D)clone();
+		
+		if((theta%(2.*PI))==(PI/2.))
+		{	
+			cosTheta = 0.;
+			sinTheta = 1.;
+		}
+		else
+		{
+			if((theta%(2.*PI))==PI)
+			{
+				cosTheta = -1.;
+				sinTheta = 0.;
+			}
+			else
+			{
+				if((theta%(2.*PI))==(3.*PI/2.))
+				{
+					cosTheta = 0.;
+					sinTheta = -1.;
+				}
+				else
+				{
+					cosTheta = Math.cos(theta);
+					sinTheta = Math.sin(theta);
+				}
+			}
+		}
+		
+		pt.x = cosTheta * (x - gravityC.x) - sinTheta * (y - gravityC.y) + gravityC.x;
+		pt.y = sinTheta * (x - gravityC.x) + cosTheta * (y - gravityC.y) + gravityC.y;
+
+		return pt;
+	}
+}
diff --git a/current/latexDraw/util/LaTeXDrawResources.java b/current/latexDraw/util/LaTeXDrawResources.java
new file mode 100644
index 0000000..88f0944
--- /dev/null
+++ b/current/latexDraw/util/LaTeXDrawResources.java
@@ -0,0 +1,619 @@
+package latexDraw.util;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.swing.ImageIcon;
+
+import latexDraw.lang.LaTeXDrawLang;
+
+/**
+ * Contains all the icons and the labels used by latexdraw.<br>
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ * <br>
+ * 09/21/07<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0
+ * @since 2.0.0
+ */
+public abstract class LaTeXDrawResources
+{
+	/** The e-mail of the latexdraw developer */
+	public static final String MAIL_ME = "arno_b at users.sourceforge.net"; //$NON-NLS-1$
+	
+	public static final String LABEL_ZOOM_CHANGE = "zoomChange";//$NON-NLS-1$
+
+	/** The label of the menuItem zoomIn */
+	public static final String LABEL_ZOOM_IN = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.57"); //$NON-NLS-1$
+	
+	/** The label of the menuItem zoomOut */
+	public static final String LABEL_ZOOM_OUT = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.58"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawLineMenu */
+	public final static String LABEL_LINE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.2"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawRectMenu */
+	public final static String LABEL_RECT = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.3"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawDotMenu */
+	public final static String LABEL_DOT = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.4"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawRectMenu */
+	public final static String LABEL_SQUARE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.5"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawRhombMenu */
+	public final static String LABEL_RHOMBUS = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.6"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawRhombMenu */
+	public final static String LABEL_POINTS_AKIN = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.7"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawTrianMenu */
+	public final static String LABEL_TRIANGLE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.8"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawJoinedLinesMenu */
+	public final static String LABEL_JOINED_LINES = LaTeXDrawLang.getString1_6("LaTeXDrawFrame.4");  //$NON-NLS-1$
+	
+	/** The label of the menu item drawCircleMenu */
+	public final static String LABEL_CIRCLE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.9"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawGridMenu */
+	public final static String LABEL_GRID = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.10"); //$NON-NLS-1$
+	
+	public final static String LABEL_AXES = LaTeXDrawLang.getString1_8("LaTeXDrawFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawEllipseMenu */
+	public final static String LABEL_ELLIPSE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.11"); //$NON-NLS-1$
+	
+	/** The label of the menu item drawPolyMenu */
+	public final static String LABEL_POLY = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.12"); //$NON-NLS-1$
+	
+    /** The name of the choice dotChoice */
+    public static final String CHOICE_DOT_NAME = "dotChoice";//$NON-NLS-1$
+    
+    /** The name of the choice lineChoice */
+    public static final String CHOICE_LINE_NAME = "lineChoice";//$NON-NLS-1$
+    
+    /** The name of the choice lineArrowLChoice */
+    public static final String CHOICE_ARROW_LEFT_NAME = "arrowLChoice";//$NON-NLS-1$
+    
+    public static final String CHOICE_ARROW_RIGHT_NAME = "arrowRChoice";//$NON-NLS-1$
+    
+    /** The name of the extension of LaTeXDraw filenames (LaTeXDraw Project)*/
+    public final static String PROJECT_EXTENSION = ".ldp"; //$NON-NLS-1$
+    
+    /** The name of the extension of LaTeXDraw templates */
+    public static final String TEMPLATE_EXTENSION = ".ldt";//$NON-NLS-1$
+    
+    /** The beginning of the action command of templates */
+    public static final String TEMPLATE_START_ACTION_CMD = "template_";//$NON-NLS-1$
+    
+    public final static String LABEL_EXPORT_EPS_LATEX = "EPS_LATEX_EXPORT";//$NON-NLS-1$
+    
+    public final static String LABEL_EXPORT_PDF_LATEX = "PDF_LATEX_EXPORT";//$NON-NLS-1$
+    	
+    /** The name of the extension of GIF file */
+	public static final String GIF_EXTENSION = ".gif";//$NON-NLS-1$
+	
+    /** The name of the extension of PPM file */
+    public final static String PPM_EXTENSION = ".ppm";//$NON-NLS-1$
+    
+    /** The name of the extension of bmp file*/
+    public final static String BMP_EXTENSION = ".bmp";//$NON-NLS-1$
+    
+    /** The name of the extension of png file */
+    public final static String PNG_EXTENSION = ".png";//$NON-NLS-1$
+    
+    /** The name of the extension of jpg file */
+    public final static String JPG_EXTENSION = ".jpg";//$NON-NLS-1$
+    
+    /** The name of the extension of EPS file */
+    public final static String EPS_EXTENSION = ".eps";//$NON-NLS-1$
+    
+	/** The name of the application */
+	public final static String LABEL_APP = "LaTeXDraw";//$NON-NLS-1$
+	
+	/** The label of the menu insert PSTricks code */
+	public final static String LABEL_INSERT_CODE = LaTeXDrawLang.getString1_6("LaTeXDrawFrame.0"); //$NON-NLS-1$
+
+	/** The label of the menu insert picture */
+	public final static String LABEL_INSERT_PIX = LaTeXDrawLang.getString1_6("LaTeXDrawFrame.1"); //$NON-NLS-1$
+
+	/** The label of the menu "convert picture" */
+	public static final String LABEL_BATCH_CONVERT = LaTeXDrawLang.getString1_6("LaTeXDrawFrame.2"); //$NON-NLS-1$
+	
+	/** The label of the button stop */
+	public final static String LABEL_STOP = LaTeXDrawLang.getString1_6("LaTeXDrawFrame.3"); //$NON-NLS-1$
+	
+	/** The label of the menu help */
+	public final static String LABEL_HELP = LABEL_APP + LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the menu "aboutTexDraw" */
+	public final static String LABEL_ABOUT = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.1")+ LABEL_APP+ " ..."; //$NON-NLS-1$//$NON-NLS-2$
+
+	/** The label of the menu item selectFigure */
+	public final static String LABEL_SELECT_FIGURE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.13"); //$NON-NLS-1$
+	
+	/** The label of the menu item displayBorders */
+	public final static String LABEL_DISPLAY_BORDERS = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.14"); //$NON-NLS-1$
+	
+	/** The label of the menu item displayBorders */
+	public final static String LABEL_AUTO_ADJUST_BORDERS = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.15"); //$NON-NLS-1$
+	
+	/** The label of the menu export as */
+	public final static String LABEL_EXPORT_AS = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.16"); //$NON-NLS-1$
+	
+	/** The label of the menu import */
+	public final static String LABEL_IMPORT = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.229"); //$NON-NLS-1$
+	
+	/** The label of the menu item "import from TeX file" */
+	public static final String LABEL_IMPORT_TEX = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.230"); //$NON-NLS-1$
+	
+	/** The label of the menu item deleteFigure */
+	public final static String LABEL_DELETE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.17"); //$NON-NLS-1$
+	
+	/** The label of the menu item which allows the user to quit the application*/
+	public final static String LABEL_QUIT = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.18"); //$NON-NLS-1$
+	
+	/** The label of the exportCodeMenu item */
+	public final static String LABEL_EXPORT_TRICKS = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.19"); //$NON-NLS-1$
+	
+	/** The label of the exportAsPNMFile item */
+	public final static String LABEL_EXPORT_PPM = LaTeXDrawLang.getString1_6("LaTeXDrawFrame.5"); //$NON-NLS-1$
+	
+	/** The label of the exportAsBMPFile item */
+	public final static String LABEL_EXPORT_BMP = LaTeXDrawLang.getString1_6("LaTeXDrawFrame.6"); //$NON-NLS-1$
+	
+	/** The label of the exportAsPNGFile item */
+	public final static String LABEL_EXPORT_PNG = LaTeXDrawLang.getString1_6("LaTeXDrawFrame.7"); //$NON-NLS-1$
+	
+	/** The label of the exportDrawMenu item */
+	public final static String LABEL_EXPORT_JPG = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.20"); //$NON-NLS-1$
+	
+	/** The label of the exportEPSMenu item */
+	public final static String LABEL_EXPORT_EPS = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.21"); //$NON-NLS-1$
+	
+	/** The label of the menuItem redoMenu */
+	public final static String LABEL_REDO = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.22"); //$NON-NLS-1$
+	
+	/** The label of the menuItem undoMenu */
+	public final static String LABEL_UNDO = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.23"); //$NON-NLS-1$
+	
+	/** The name of the thickness field */
+	public final static String NAME_THICKNESS_FIELD = "thicknessField"; //$NON-NLS-1$
+	
+	public final static String NAME_DOT_SIZE_FIELD = "dotSizeField"; //$NON-NLS-1$
+	
+	/** The label of the saveMenu item */
+	public final static String LABEL_SAVE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.25"); //$NON-NLS-1$
+	
+	/** The label of the saveAsMenu item */
+	public final static String LABEL_SAVE_AS = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.26"); //$NON-NLS-1$
+
+	public final static String LABEL_RECENT_FILES = LaTeXDrawLang.getString1_9("LaTeXDrawFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the openMenu item */
+	public final static String LABEL_OPEN = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.27"); //$NON-NLS-1$
+	
+	/** The label of the newMenu item */
+	public final static String LABEL_NEW = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.28"); //$NON-NLS-1$
+	
+	public final static String LABEL_NEW_WITH_SEL =LaTeXDrawLang.getStringLaTeXDrawFrame("LFrame2.26"); //$NON-NLS-1$
+	
+	/** The label of the printCodeMenu item */
+	public final static String LABEL_PRINT_CODE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.29"); //$NON-NLS-1$
+	
+	/** The label of the printDrawMenu item */
+	public final static String LABEL_PRINT_DRAW = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.30"); //$NON-NLS-1$
+	
+	/** The label of the ImageButton behindSel */
+	public static final String LABEL_BEHIND_SEL = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.31"); //$NON-NLS-1$
+	
+	/** The label of the ImageButton inFrontOfSel */
+	public static final String LABEL_FRONT_SEL = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.32"); //$NON-NLS-1$
+	
+	/** The label of the button join */
+	public static final String LABEL_JOIN = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.33"); //$NON-NLS-1$
+	
+	/** The label of the button separate */
+	public static final String LABEL_SEPARATE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.34"); //$NON-NLS-1$
+	
+	/** The label of the arcMenu item */
+	public final static String LABEL_ARC = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.35"); //$NON-NLS-1$
+	
+	/** The label of the wedgeMenu item */
+	public final static String LABEL_WEDGE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.36"); //$NON-NLS-1$
+	
+	/** The label of the chordMenu item */
+	public final static String LABEL_CHORD = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.37"); //$NON-NLS-1$
+	
+	/** The label of the menuItem displayXScale */
+	public static final String LABEL_DISPLAY_XSCALE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.38"); //$NON-NLS-1$
+	
+	/** The label of the menuItem Y */
+	public static final String LABEL_DISPLAY_YSCALE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.39"); //$NON-NLS-1$
+	
+	/** The label of the menu copy */
+	public static final String LABEL_COPY = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.40"); //$NON-NLS-1$
+	
+	/** The label of the menuItem updateTemplates */
+	public static final String LABEL_TEMPLATE_UPDATE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.41"); //$NON-NLS-1$
+	
+	/** The label of the menuItem exportAsTemplate */
+	public static final String LABEL_TEMPLATE_EXPORT = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.42"); //$NON-NLS-1$
+	
+	/** The label of the menu paste */
+	public static final String LABEL_PASTE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.43"); //$NON-NLS-1$
+	
+	/** The label of the menu cut */
+	public static final String LABEL_CUT = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.44"); //$NON-NLS-1$
+	
+	public static final String LABEL_DISPLAY_PERSO_GRID = LaTeXDrawLang.getString1_8("PreferencesFrame.5"); //$NON-NLS-1$
+	
+	/** The label of the menuItem displayGrid */
+	public static final String LABEL_DISPLAY_GRID = LaTeXDrawLang.getString1_8("PreferencesFrame.4"); //$NON-NLS-1$
+	
+	/** The label of the menuItem codePanel */
+	public static final String LABEL_DISPLAY_CODE_PANEL = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.46"); //$NON-NLS-1$
+	
+	/** The label of the JButton buttonBordersColor */
+	public static final String LABEL_COLOR_BUTTON = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.47"); //$NON-NLS-1$
+	
+	/** The label of the JButton buttonInteriorColor */
+	public static final String LABEL_COLOR_INTERIOR_BUTTON = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.48"); //$NON-NLS-1$
+	
+	/** The label of the JButton buttonHatchColor */
+	public static final String LABEL_COLOR_HATCH = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.49"); //$NON-NLS-1$
+	
+	/** The label of the JButton buttonDbleBoundColor */
+	public static final String LABEL_COLOR_DBLE_BOUND = "dbleColBound"; //$NON-NLS-1$
+	
+	/** The label of the JButton buttonShadowColor. */
+	public static final String LABEL_COLOR_SHADOW = LaTeXDrawLang.getString1_7("LaTeXDrawFrame.0"); //$NON-NLS-1$
+
+	public static final String NAME_COLOR_SHADOW = "SHA_COL_BUT";//$NON-NLS-1$
+	
+	/** The label of the JCheckBox @see filledCheckBox */
+	public static final String LABEL_FILLED_CHECKBOX = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.51"); //$NON-NLS-1$
+	
+	/** The label of the JCheckBox @see dbleBoundCheckBox */
+	public static final String LABEL_DBLE_BOUND_CHECKBOX = LaTeXDrawLang.getDialogFrameString("AbstractParametersFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the button which allows to choose the first colour of a gradient. */
+	public static final String LABEL_COLOR_GRADIENT_FIRST = LaTeXDrawLang.getString1_7("LaTeXDrawFrame.1"); //$NON-NLS-1$
+	
+	/** The label of the button which allows to choose the second colour of a gradient. */
+	public static final String LABEL_COLOR_GRADIENT_SECOND = LaTeXDrawLang.getString1_7("LaTeXDrawFrame.2"); //$NON-NLS-1$
+	
+	/** The label of the JCheckBox shadowCheckBox. */
+	public static final String LABEL_SHADOW_CHECKBOX = LaTeXDrawLang.getString1_7("LaTeXDrawFrame.0"); //$NON-NLS-1$
+	
+	/** The label of the menu properties of the selected figure*/
+	public static final String LABEL_FIGURE_PROPERTIES = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.53"); //$NON-NLS-1$
+	
+	/** The label of the menu properties of the drawing*/
+	public static final String LABEL_DRAW_PROPERTIES = LaTeXDrawLang.getDialogFrameString("DrawPropertiesFrame.2"); //$NON-NLS-1$
+		
+	/** The label of the menu "addCommentsMenu" */
+	public static final String LABEL_COMMENTS = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.55"); //$NON-NLS-1$
+	
+	/** The label of the menuItem "preferencesMenu" */
+	public static final String LABEL_PREFERENCES = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.56"); //$NON-NLS-1$
+	
+	public static final String LABEL_MAGNETIC_CB = "MagneticCB";//$NON-NLS-1$
+	
+	public static final String LABEL_PERSO_GRID_GAP_FIELD = "PersoGridGapFD";//$NON-NLS-1$
+	
+	/** The label of the menuItem "bézier curve" */
+	public static final String LABEL_BEZIER_CURVE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.63"); //$NON-NLS-1$
+	
+	public static final String LABEL_CLOSED_BEZIER_CURVE = LaTeXDrawLang.getString1_9("LaTeXDrawFrame.1"); //$NON-NLS-1$
+	
+	/** Allows the user the zoom at 100 % */
+	public static final String LABEL_ZOOM_DEFAULT = "Zoom 100%"; //$NON-NLS-1$
+	
+	/** This token allows the program to identify LaTeXDraw template files */
+	public static final String TOKEN_TEMPLATE_FILE = "LaTeXDraw template"; //$NON-NLS-1$
+	
+	public static final String LABEL_TEX_EDITOR = "texEditor";//$NON-NLS-1$
+	
+	/** The label of the menuItem menuText */
+	public static final String LABEL_TEXT = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.60"); //$NON-NLS-1$
+	
+	/** The label of the menus which allow to put a figure in the foreground */
+	public static final String LABEL_FOREGROUND = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.61"); //$NON-NLS-1$
+	
+	/** The label of the menus which allow to put a figure in the background */
+	public static final String LABEL_BACKGROUND = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.62"); //$NON-NLS-1$
+	
+	/** The label of the button which allow to rotate a figure with the mouse */
+	public static final String LABEL_ROTATE = LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.64"); //$NON-NLS-1$
+	
+	public static final String LABEL_ROTATE_90 = "rotation90"; //$NON-NLS-1$
+	
+	public static final String LABEL_ROTATE_180 = "rotation180"; //$NON-NLS-1$
+	
+	public static final String LABEL_ROTATE_270 = "rotation270"; //$NON-NLS-1$
+	
+	public static final String LABEL_MIRROR_H = "mirrorH"; //$NON-NLS-1$
+	
+	public static final String LABEL_MIRROR_V = "mirrorV"; //$NON-NLS-1$
+	
+	public static final String NAME_SLIDER_DELIMITOR = "sliderDel";//$NON-NLS-1$
+	
+	public final static ImageIcon pdfIcon ;
+	public final static ImageIcon bezierCurveIcon; 			public final static ImageIcon chordIcon;
+	public final static ImageIcon newIcon;					public final static ImageIcon lineStyleNoneIcon;
+	public final static ImageIcon openIcon; 				public final static ImageIcon lineStyleDashedIcon;
+	public final static ImageIcon saveIcon ;				public final static ImageIcon lineStyleDottedIcon;
+	public final static ImageIcon saveAsIcon;  				public final static ImageIcon dotStyleNoneIcon;
+	public final static ImageIcon circleIcon;				public final static ImageIcon dotStyleSquareIcon;
+	public final static ImageIcon delIcon; 					public final static ImageIcon dotStyleSquareFIcon;
+	public final static ImageIcon dotIcon; 					public final static ImageIcon dotStylePentagonIcon;
+	public final static ImageIcon ellipseIcon; 				public final static ImageIcon dotStylePentagonFIcon;
+	public final static ImageIcon emptyIcon;				public final static ImageIcon dotStyleTriangleIcon;
+	public final static ImageIcon lineIcon; 				public final static ImageIcon dotStyleTriangleFIcon;
+	public final static ImageIcon rectIcon;					public final static ImageIcon dotStyleBarIcon;
+	public final static ImageIcon rhombusIcon; 				public final static ImageIcon dotStyleAsteriskIcon;
+	public final static ImageIcon selectIcon; 				public final static ImageIcon dotStyleCrossIcon;
+	public final static ImageIcon squareIcon; 				public final static ImageIcon dotStyleDiamondIcon;
+	public final static ImageIcon triangleIcon;				public final static ImageIcon dotStyleDiamondFIcon;
+	public final static ImageIcon propertiesIcon; 			public final static ImageIcon dotStyleOIcon;
+	public final static ImageIcon printIcon;	 			public final static ImageIcon dotStyleOPlusIcon;
+	public final static ImageIcon dotStyleOCrossIcon; 		public final static ImageIcon updateIcon;
+	public final static ImageIcon bordersIcon;	 			public final static ImageIcon dotStylePlusIcon;
+	public final static ImageIcon autoBordersIcon; 			public final static ImageIcon arrowStyleArcLIcon;
+	public final static ImageIcon exportIcon;				public final static ImageIcon arrowStyleArcRIcon;
+	public final static ImageIcon arrowStyleArcRRIcon; 		public final static ImageIcon arrowStyleArcLRIcon;
+	public final static ImageIcon aboutIcon;				public final static ImageIcon arrowStyleArrowLIcon;
+	public final static ImageIcon helpIcon;					public final static ImageIcon arrowStyleArrowRIcon;
+	public final static ImageIcon preferencesIcon; 			public final static ImageIcon arrowStyleBarEndLIcon;
+	public final static ImageIcon arrowStyleBarEndRIcon; 	public final static ImageIcon drawingPropIcon;
+	public final static ImageIcon arcIcon;					public final static ImageIcon arrowStyleBarInLIcon;
+	public final static ImageIcon wedgeIcon;				public final static ImageIcon arrowStyleBarInRIcon;
+	public final static ImageIcon zoomInIcon;				public final static ImageIcon arrowStyleBrackLIcon;
+	public final static ImageIcon arrowStyleBrackLRIcon; 	public final static ImageIcon arrowStyleBrackRRIcon;
+	public final static ImageIcon zoomOutIcon;				public final static ImageIcon arrowStyleBrackRIcon;
+	public final static ImageIcon zoomDefaultIcon; 			public final static ImageIcon arrowStyleCircleEndLIcon;
+	public final static ImageIcon undoIcon;					public final static ImageIcon arrowStyleCircleEndRIcon;
+	public final static ImageIcon redoIcon;					public final static ImageIcon arrowStyleCircleInLIcon;
+	public final static ImageIcon backgroundIcon;   		public final static ImageIcon arrowStyleCircleInRIcon;
+	public final static ImageIcon foregroundIcon;   		public final static ImageIcon arrowStyleDbleArrowLIcon;
+	public final static ImageIcon behindSelIcon;	   		public final static ImageIcon arrowStyleDbleArrowRIcon;
+	public final static ImageIcon inFrontOfSelIcon; 		public final static ImageIcon arrowStyleDiskEndLIcon;
+	public final static ImageIcon rotateIcon;	 			public final static ImageIcon arrowStyleDiskEndRIcon;
+	public final static ImageIcon polygonIcon;	 			public final static ImageIcon arrowStyleDiskInLIcon;
+	public final static ImageIcon textIcon;		 			public final static ImageIcon arrowStyleDiskInRIcon;
+	public final static ImageIcon pointsAkinIcon; 			public final static ImageIcon arrowStyleNoneLIcon;
+	public final static ImageIcon arrowStyleNoneRIcon; 		public final static ImageIcon arrowStyleRDbleArrowLIcon;
+	public final static ImageIcon arrowStyleRDbleArrowRIcon; public final static ImageIcon arrowStyleRArrowLIcon;
+	public final static ImageIcon arrowStyleRArrowRIcon; 	public final static ImageIcon copyIcon;
+	public final static ImageIcon pasteIcon;				public final static ImageIcon cutIcon;
+	public final static ImageIcon arrowStyleRoundInLIcon;	public final static ImageIcon arrowStyleRoundInRIcon;
+	public final static ImageIcon hatchNoneIcon;
+	public final static ImageIcon hatchHorizIcon;			public final static ImageIcon hatchVertIcon;
+	public final static ImageIcon hatchCrossIcon;			public final static ImageIcon gridIcon;
+	public final static ImageIcon joinIcon;					public final static ImageIcon separateIcon;
+	public final static ImageIcon middleIcon;				public final static ImageIcon innerIcon;
+	public final static ImageIcon outerIcon;		    	public final static ImageIcon copySelIcon;
+	public final static ImageIcon importIcon;				public final static ImageIcon commentIcon;
+	public final static ImageIcon joinedLinesIcon; 			public final static ImageIcon latexdrawIcon;
+	public final static ImageIcon okIcon;					public final static ImageIcon errIcon;
+	public final static ImageIcon minusIcon;				public final static ImageIcon plusIcon;
+	public final static ImageIcon stopIcon;					public final static ImageIcon reloadIcon;
+	public final static ImageIcon insertPicIcon; 			public final static ImageIcon insertPSTricksIcon;
+	public final static ImageIcon thicknessIcon; 			public final static ImageIcon gradientIcon;
+	public final static ImageIcon displayGridIcon; 			public final static ImageIcon rotate270Icon;
+	public final static ImageIcon rotate180Icon; 			public final static ImageIcon rotate90Icon;
+	public final static ImageIcon mirrorVIcon;				public final static ImageIcon mirrorHIcon;
+	public final static ImageIcon axesIcon;					public final static ImageIcon texEditorIcon;
+	public final static ImageIcon delimitorIcon; 			public final static ImageIcon curvesFreehandIcon;
+	public final static ImageIcon linesFreehandIcon; 		public final static ImageIcon closeLineIcon;
+	public final static ImageIcon closeCurveIcon; 			public final static ImageIcon closedBezierIcon;
+	public final static ImageIcon alignBottomIcon; 			public final static ImageIcon alignLeftIcon;
+	public final static ImageIcon alignMiddleHorizIcon; 	public final static ImageIcon alignMiddleVertIcon;
+	public final static ImageIcon alignRightIcon; 			public final static ImageIcon alignTopIcon;
+	public final static ImageIcon distVertBottomIcon; 		public final static ImageIcon distHorizEqualIcon;
+	public final static ImageIcon distVertMiddleIcon; 		public final static ImageIcon distVertTopIcon;
+	public final static ImageIcon distVertEqualIcon; 		public final static ImageIcon distHorizMiddleIcon;
+	public final static ImageIcon distHorizLeftIcon;		public final static ImageIcon distHorizRightIcon;
+	
+	
+	static
+	{
+		hatchNoneIcon  = loadImageIcon("/res/hatch/hatch.none.png");//$NON-NLS-1$
+		hatchVertIcon  = loadImageIcon("/res/hatch/hatch.vert.png");//$NON-NLS-1$
+		hatchHorizIcon = loadImageIcon("/res/hatch/hatch.horiz.png");//$NON-NLS-1$
+		hatchCrossIcon = loadImageIcon("/res/hatch/hatch.cross.png");//$NON-NLS-1$
+		
+		arrowStyleArcLIcon = loadImageIcon("/res/arrowStyles/line.arc.left.png");//$NON-NLS-1$
+		arrowStyleArcRIcon = loadImageIcon("/res/arrowStyles/line.arc.right.png");//$NON-NLS-1$
+		arrowStyleArcLRIcon = loadImageIcon("/res/arrowStyles/line.arc.r.left.png");//$NON-NLS-1$
+		arrowStyleArcRRIcon = loadImageIcon("/res/arrowStyles/line.arc.r.right.png");//$NON-NLS-1$
+		arrowStyleArrowLIcon = loadImageIcon("/res/arrowStyles/line.arrow.left.png");//$NON-NLS-1$
+		arrowStyleArrowRIcon = loadImageIcon("/res/arrowStyles/line.arrow.right.png");//$NON-NLS-1$
+		arrowStyleBarEndLIcon = loadImageIcon("/res/arrowStyles/line.barEnd.left.png");//$NON-NLS-1$
+		arrowStyleBarEndRIcon = loadImageIcon("/res/arrowStyles/line.barEnd.right.png");//$NON-NLS-1$
+		arrowStyleBarInLIcon = loadImageIcon("/res/arrowStyles/line.barIn.left.png");//$NON-NLS-1$
+		arrowStyleBarInRIcon = loadImageIcon("/res/arrowStyles/line.barIn.right.png");//$NON-NLS-1$
+		arrowStyleBrackLIcon = loadImageIcon("/res/arrowStyles/line.bracket.left.png");//$NON-NLS-1$
+		arrowStyleBrackRIcon = loadImageIcon("/res/arrowStyles/line.bracket.right.png");//$NON-NLS-1$
+		arrowStyleBrackLRIcon = loadImageIcon("/res/arrowStyles/line.bracket.r.left.png");//$NON-NLS-1$
+		arrowStyleBrackRRIcon = loadImageIcon("/res/arrowStyles/line.bracket.r.right.png");//$NON-NLS-1$
+		arrowStyleCircleEndLIcon = loadImageIcon("/res/arrowStyles/line.circle.end.left.png");//$NON-NLS-1$
+		arrowStyleCircleEndRIcon = loadImageIcon("/res/arrowStyles/line.circle.end.right.png");//$NON-NLS-1$
+		arrowStyleCircleInLIcon = loadImageIcon("/res/arrowStyles/line.circle.in.left.png");//$NON-NLS-1$
+		arrowStyleCircleInRIcon = loadImageIcon("/res/arrowStyles/line.circle.in.right.png");//$NON-NLS-1$
+		arrowStyleDbleArrowLIcon = loadImageIcon("/res/arrowStyles/line.dbleArrow.left.png");//$NON-NLS-1$
+		arrowStyleDbleArrowRIcon = loadImageIcon("/res/arrowStyles/line.dbleArrow.right.png");//$NON-NLS-1$
+		arrowStyleDiskEndLIcon = loadImageIcon("/res/arrowStyles/line.disk.end.left.png");//$NON-NLS-1$
+		arrowStyleDiskEndRIcon = loadImageIcon("/res/arrowStyles/line.disk.end.right.png");//$NON-NLS-1$
+		arrowStyleDiskInLIcon = loadImageIcon("/res/arrowStyles/line.disk.in.left.png");//$NON-NLS-1$
+		arrowStyleDiskInRIcon = loadImageIcon("/res/arrowStyles/line.disk.in.right.png");//$NON-NLS-1$
+		arrowStyleNoneLIcon = loadImageIcon("/res/arrowStyles/line.none.left.png");//$NON-NLS-1$
+		arrowStyleNoneRIcon = loadImageIcon("/res/arrowStyles/line.none.right.png");//$NON-NLS-1$
+		arrowStyleRArrowLIcon = loadImageIcon("/res/arrowStyles/line.rarrow.left.png");//$NON-NLS-1$
+		arrowStyleRArrowRIcon = loadImageIcon("/res/arrowStyles/line.rarrow.right.png");//$NON-NLS-1$
+		arrowStyleRDbleArrowLIcon = loadImageIcon("/res/arrowStyles/line.rdbleArrow.left.png");//$NON-NLS-1$
+		arrowStyleRDbleArrowRIcon = loadImageIcon("/res/arrowStyles/line.rdbleArrow.right.png");//$NON-NLS-1$
+		arrowStyleRoundInLIcon = loadImageIcon("/res/arrowStyles/line.roundIn.left.png");//$NON-NLS-1$
+		arrowStyleRoundInRIcon = loadImageIcon("/res/arrowStyles/line.roundIn.right.png");//$NON-NLS-1$
+		
+		dotStyleAsteriskIcon = loadImageIcon("/res/dotStyles/dot.asterisk.png");//$NON-NLS-1$
+		dotStyleNoneIcon = loadImageIcon("/res/dotStyles/dot.none.png");//$NON-NLS-1$
+		dotStyleBarIcon = loadImageIcon("/res/dotStyles/dot.bar.png");//$NON-NLS-1$
+		dotStyleOIcon = loadImageIcon("/res/dotStyles/dot.o.png");//$NON-NLS-1$
+		dotStyleCrossIcon = loadImageIcon("/res/dotStyles/dot.cross.png");//$NON-NLS-1$
+		dotStyleDiamondIcon = loadImageIcon("/res/dotStyles/dot.diamond.png");//$NON-NLS-1$
+		dotStyleDiamondFIcon = loadImageIcon("/res/dotStyles/dot.diamondF.png");//$NON-NLS-1$
+		dotStyleOCrossIcon = loadImageIcon("/res/dotStyles/dot.ocross.png");//$NON-NLS-1$
+		dotStyleOPlusIcon = loadImageIcon("/res/dotStyles/dot.oplus.png");//$NON-NLS-1$
+		dotStylePentagonIcon = loadImageIcon("/res/dotStyles/dot.pentagon.png");//$NON-NLS-1$
+		dotStylePentagonFIcon = loadImageIcon("/res/dotStyles/dot.pentagonF.png");//$NON-NLS-1$
+		dotStylePlusIcon = loadImageIcon("/res/dotStyles/dot.plus.png");//$NON-NLS-1$
+		dotStyleSquareIcon = loadImageIcon("/res/dotStyles/dot.square.png");//$NON-NLS-1$
+		dotStyleSquareFIcon = loadImageIcon("/res/dotStyles/dot.squareF.png");//$NON-NLS-1$
+		dotStyleTriangleIcon = loadImageIcon("/res/dotStyles/dot.triangle.png");//$NON-NLS-1$
+		dotStyleTriangleFIcon = loadImageIcon("/res/dotStyles/dot.triangleF.png");//$NON-NLS-1$
+
+		lineStyleNoneIcon 	= loadImageIcon("/res/lineStyles/lineStyle.none.png");//$NON-NLS-1$
+		lineStyleDashedIcon = loadImageIcon("/res/lineStyles/lineStyle.dashed.png");//$NON-NLS-1$
+		lineStyleDottedIcon = loadImageIcon("/res/lineStyles/lineStyle.dotted.png");//$NON-NLS-1$
+
+		middleIcon = loadImageIcon("/res/doubleBoundary/double.boundary.middle.png");//$NON-NLS-1$
+		innerIcon  = loadImageIcon("/res/doubleBoundary/double.boundary.inner.png");//$NON-NLS-1$
+		outerIcon  = loadImageIcon("/res/doubleBoundary/double.boundary.outer.png");//$NON-NLS-1$
+		
+		gridIcon		= loadImageIcon("/res/grid.png");//$NON-NLS-1$
+		copyIcon  		= loadImageIcon("/res/Copy.png");//$NON-NLS-1$
+		pasteIcon 		= loadImageIcon("/res/Paste.png");//$NON-NLS-1$
+		cutIcon   		= loadImageIcon("/res/Cut.png");//$NON-NLS-1$
+		pointsAkinIcon 	= loadImageIcon("/res/Draw.png");	//$NON-NLS-1$
+		textIcon 		= loadImageIcon("/res/text.png");		//$NON-NLS-1$
+		polygonIcon 	= loadImageIcon("/res/polygon.png");	//$NON-NLS-1$	
+		rotateIcon 		= loadImageIcon("/res/rotation.png");	//$NON-NLS-1$	
+		inFrontOfSelIcon= loadImageIcon("/res/InFrontSelect.png");	//$NON-NLS-1$	
+		behindSelIcon 	= loadImageIcon("/res/behindSelect.png");	//$NON-NLS-1$	
+		backgroundIcon 	= loadImageIcon("/res/background.png");	//$NON-NLS-1$	
+		foregroundIcon 	= loadImageIcon("/res/foreground.png");//$NON-NLS-1$		
+		undoIcon 		= loadImageIcon("/res/Undo.png");//$NON-NLS-1$
+		redoIcon 		= loadImageIcon("/res/Redo.png");	//$NON-NLS-1$
+		zoomDefaultIcon = loadImageIcon("/res/Magnify.png");	//$NON-NLS-1$	
+		zoomInIcon 		= loadImageIcon("/res/MagnifyPlus.png");	//$NON-NLS-1$	
+		zoomOutIcon 	= loadImageIcon("/res/MagnifyMinus.png");//$NON-NLS-1$		
+		wedgeIcon 		= loadImageIcon("/res/wedge.png");//$NON-NLS-1$		
+		arcIcon 		= loadImageIcon("/res/Arc.png");	//$NON-NLS-1$	
+		preferencesIcon = loadImageIcon("/res/preferences-system.png");	//$NON-NLS-1$	
+		newIcon 		= loadImageIcon("/res/New.png");	//$NON-NLS-1$		
+		openIcon 		= loadImageIcon("/res/document-open.png");	//$NON-NLS-1$	
+		saveIcon 		= loadImageIcon("/res/document-save.png");	//$NON-NLS-1$	
+		saveAsIcon 		= loadImageIcon("/res/document-save-as.png");//$NON-NLS-1$		
+		circleIcon 		= loadImageIcon("/res/circle.png");	//$NON-NLS-1$	
+		delIcon 		= loadImageIcon("/res/del.png");		//$NON-NLS-1$
+		dotIcon 		= loadImageIcon("/res/dot.png");	//$NON-NLS-1$	
+		ellipseIcon 	= loadImageIcon("/res/ellipse.png");//$NON-NLS-1$		
+		emptyIcon 		= loadImageIcon("/res/empty.png");	//$NON-NLS-1$	
+		lineIcon 		= loadImageIcon("/res/line.png");	//$NON-NLS-1$	
+		rectIcon 		= loadImageIcon("/res/rectangle.png");	//$NON-NLS-1$	
+		rhombusIcon 	= loadImageIcon("/res/rhombus.png");//$NON-NLS-1$		
+		selectIcon 		= loadImageIcon("/res/select.png");	//$NON-NLS-1$		
+		squareIcon 		= loadImageIcon("/res/square.png");	//$NON-NLS-1$	
+		triangleIcon 	= loadImageIcon("/res/triangle.png");//$NON-NLS-1$		
+		propertiesIcon 	= loadImageIcon("/res/preferences-desktop-theme.png");	//$NON-NLS-1$	
+		printIcon 		= loadImageIcon("/res/Print.png");//$NON-NLS-1$		
+		bordersIcon 	= loadImageIcon("/res/Object.png");	//$NON-NLS-1$	
+		helpIcon 		= loadImageIcon("/res/help-browser.png");	//$NON-NLS-1$	
+		aboutIcon 		= loadImageIcon("/res/emblem-important.png");	//$NON-NLS-1$	
+		autoBordersIcon = loadImageIcon("/res/AutoBorders.png");//$NON-NLS-1$		
+		exportIcon 		= loadImageIcon("/res/go-previous.png");//$NON-NLS-1$
+		joinIcon 		= loadImageIcon("/res/join.png");//$NON-NLS-1$
+		separateIcon 	= loadImageIcon("/res/separate.png");//$NON-NLS-1$
+		reloadIcon 		= loadImageIcon("/res/view-refresh.png");//$NON-NLS-1$
+		bezierCurveIcon = loadImageIcon("/res/bezierCurve.png");//$NON-NLS-1$
+		chordIcon 		= loadImageIcon("/res/chord.png"); //$NON-NLS-1$
+		copySelIcon 	= loadImageIcon("/res/CopySel.png"); //$NON-NLS-1$
+		importIcon 		= loadImageIcon("/res/go-next.png"); //$NON-NLS-1$
+		commentIcon 	= loadImageIcon("/res/comment.png"); //$NON-NLS-1$
+		joinedLinesIcon = loadImageIcon("/res/joinedLines.png"); //$NON-NLS-1$
+		okIcon 			= loadImageIcon("/res/ok.png"); //$NON-NLS-1$
+		errIcon 		= loadImageIcon("/res/emblem-unreadable.png"); //$NON-NLS-1$
+		plusIcon 		= loadImageIcon("/res/list-add.png"); //$NON-NLS-1$
+		minusIcon 		= loadImageIcon("/res/list-remove.png"); //$NON-NLS-1$
+		stopIcon 		= loadImageIcon("/res/stop.png"); //$NON-NLS-1$
+		insertPicIcon 	= loadImageIcon("/res/image-x-generic.png"); //$NON-NLS-1$
+		insertPSTricksIcon = loadImageIcon("/res/text-x-generic.png"); //$NON-NLS-1$
+		thicknessIcon 	= loadImageIcon("/res/thickness.png"); //$NON-NLS-1$
+		gradientIcon 	= loadImageIcon("/res/hatch/gradient.png"); //$NON-NLS-1$
+		displayGridIcon = loadImageIcon("/res/displayGrid.png"); //$NON-NLS-1$
+		rotate180Icon 	= loadImageIcon("/res/rotation180.png"); //$NON-NLS-1$
+		rotate90Icon 	= loadImageIcon("/res/rotation90.png"); //$NON-NLS-1$
+		rotate270Icon 	= loadImageIcon("/res/rotation270.png"); //$NON-NLS-1$
+		mirrorHIcon 	= loadImageIcon("/res/mirrorH.png"); //$NON-NLS-1$
+		mirrorVIcon 	= loadImageIcon("/res/mirrorV.png"); //$NON-NLS-1$
+		axesIcon		= loadImageIcon("/res/axes.png"); //$NON-NLS-1$
+		texEditorIcon	= loadImageIcon("/res/texEditor.png"); //$NON-NLS-1$
+		delimitorIcon	= loadImageIcon("/res/delimitor.png"); //$NON-NLS-1$
+		curvesFreehandIcon	= loadImageIcon("/res/freehand/curve.png"); //$NON-NLS-1$
+		linesFreehandIcon	= loadImageIcon("/res/freehand/line.png"); //$NON-NLS-1$
+		closeCurveIcon		= loadImageIcon("/res/BezierCurves/closeCurve.png"); //$NON-NLS-1$
+		closeLineIcon		= loadImageIcon("/res/BezierCurves/closeLine.png"); //$NON-NLS-1$
+		closedBezierIcon	= loadImageIcon("/res/closedBezier.png"); //$NON-NLS-1$
+		updateIcon			= loadImageIcon("/res/system-software-update.png"); //$NON-NLS-1$
+		drawingPropIcon		= loadImageIcon("/res/document-properties.png"); //$NON-NLS-1$
+		latexdrawIcon		= loadImageIcon("/res/LaTeXDrawIcon.png"); //$NON-NLS-1$
+		pdfIcon				= loadImageIcon("/res/pdf.png"); //$NON-NLS-1$
+		
+		alignBottomIcon		= loadImageIcon("/res/align/alignBottom.png"); //$NON-NLS-1$
+		alignLeftIcon		= loadImageIcon("/res/align/alignLeft.png"); //$NON-NLS-1$
+		alignMiddleHorizIcon= loadImageIcon("/res/align/alignMiddleHoriz.png"); //$NON-NLS-1$
+		alignMiddleVertIcon	= loadImageIcon("/res/align/alignMiddleVert.png"); //$NON-NLS-1$
+		alignRightIcon		= loadImageIcon("/res/align/alignRight.png"); //$NON-NLS-1$
+		alignTopIcon		= loadImageIcon("/res/align/alignTop.png"); //$NON-NLS-1$
+		
+		distVertBottomIcon	= loadImageIcon("/res/distrib/distVertBottom.png"); //$NON-NLS-1$
+		distVertEqualIcon	= loadImageIcon("/res/distrib/distVertEqual.png"); //$NON-NLS-1$
+		distVertMiddleIcon	= loadImageIcon("/res/distrib/distVertMiddle.png"); //$NON-NLS-1$
+		distVertTopIcon		= loadImageIcon("/res/distrib/distVertTop.png"); //$NON-NLS-1$
+		distHorizEqualIcon	= loadImageIcon("/res/distrib/distHorizEqual.png"); //$NON-NLS-1$
+		distHorizMiddleIcon	= loadImageIcon("/res/distrib/distHorizMiddle.png"); //$NON-NLS-1$
+		distHorizRightIcon	= loadImageIcon("/res/distrib/distHorizRight.png"); //$NON-NLS-1$
+		distHorizLeftIcon	= loadImageIcon("/res/distrib/distHorizLeft.png"); //$NON-NLS-1$
+	}
+	
+	
+	
+	/**
+	 * Allows to load a image icon from a path.
+	 * @param path The path.
+	 * @return The image icon or null.
+	 */
+	public static ImageIcon loadImageIcon(String path)
+	{
+		URL url;
+		
+		try
+		{
+			url = Class.class.getResource(path);
+			
+			if(url==null)
+				throw new MalformedURLException();
+			
+			return new ImageIcon(url);
+		}
+		catch(Exception e) 		
+		{
+			e.printStackTrace(); 
+			return null; 
+		}	
+	}
+}
diff --git a/current/latexDraw/util/StreamExecReader.java b/current/latexDraw/util/StreamExecReader.java
new file mode 100644
index 0000000..c95fbf1
--- /dev/null
+++ b/current/latexDraw/util/StreamExecReader.java
@@ -0,0 +1,78 @@
+package latexDraw.util;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+/**
+ * Defines a thread for managing command execution. While the process is running, 
+ * the log is gathered from it.
+ * 
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2009 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE. See the GNU General Public License for more details.<br>
+ *<br>
+ * 09/14/09<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.4<br>
+ */
+public class StreamExecReader extends Thread {
+	/** The stream to listen. */
+	private InputStream stream;
+
+	/** The read log. */
+	private String log;
+	
+	
+	/**
+	 * Default constructor.
+	 * @param is The stream to listen.
+	 */
+	public StreamExecReader(InputStream is) {
+		stream = is;
+	}
+
+	
+	@Override
+	public void run() {
+		InputStreamReader isr = null;
+        BufferedReader br     = null;
+        
+		try {
+			if(stream!=null) {
+	            isr 		= new InputStreamReader(stream);
+	            br 	  		= new BufferedReader(isr);
+	            String line = null;
+	            log			= "";
+	            
+	            while((line = br.readLine()) != null)
+	                log += line;
+			}
+        }catch(IOException ioe) { ioe.printStackTrace(); }
+        try {
+        	if(br!=null)
+        		br.close();
+        }catch(IOException ioe) { ioe.printStackTrace(); }
+        try {
+        	if(isr!=null)
+        		isr.close();
+        }catch(IOException ioe) { ioe.printStackTrace(); }
+	}
+
+
+	/**
+	 * @return The read log.
+	 */
+	public synchronized String getLog() {
+		return log;
+	}
+}
diff --git a/current/latexDraw/util/UndoRedoManager.java b/current/latexDraw/util/UndoRedoManager.java
new file mode 100644
index 0000000..bb37123
--- /dev/null
+++ b/current/latexDraw/util/UndoRedoManager.java
@@ -0,0 +1,825 @@
+package latexDraw.util;
+
+import java.awt.Color;
+import java.util.Vector;
+
+import latexDraw.figures.Dot;
+import latexDraw.figures.Draw;
+import latexDraw.figures.Figure;
+import latexDraw.figures.Line;
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.DrawContainer;
+import latexDraw.ui.LaTeXDrawFrame;
+import latexDraw.ui.dialog.ExceptionFrameDialog;
+
+
+/** 
+ * A simple way to implement undo/redo management (contrary to java :s)<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ *<br>
+ * 
+ * 01/20/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ */
+public class UndoRedoManager 
+{
+	/** This label corresponds to a change of parameters of a figure */
+	public static final String LABEL_CHANGE_PARAM = LaTeXDrawLang.getOthersString("UndoRedoManager.changeParams"); //$NON-NLS-1$
+
+	/** This label corresponds to a change in the disposition of 
+	 * some figures (i.e. put in background, foreground, ...)*/
+	public static final String LABEL_CHANGE_DISPOSITION = LaTeXDrawLang.getOthersString("UndoRedoManager.changeDispo"); //$NON-NLS-1$
+	
+	public static final String LABEL_TRANSFORM  = LaTeXDrawLang.getString1_8("UndoRedoManager.0"); //$NON-NLS-1$
+	
+	public static final String LABEL_ALIGN  = LaTeXDrawLang.getOthersString("UndoRedoManager.align"); //$NON-NLS-1$
+	
+	public static final String LABEL_DISTRIB  = LaTeXDrawLang.getOthersString("UndoRedoManager.distrib"); //$NON-NLS-1$
+	
+	/** This label corresponds to a change of position of a figure */
+	public static final String LABEL_CHANGE_MOVE  = LaTeXDrawLang.getOthersString("UndoRedoManager.move"); //$NON-NLS-1$
+	
+	/** This label corresponds to the deletion of a figure */
+	public static final String LABEL_DEL          = LaTeXDrawLang.getOthersString("UndoRedoManager.delete"); //$NON-NLS-1$
+	
+	/** This label corresponds to the creation of a figure */
+	public static final String LABEL_CREATE       = LaTeXDrawLang.getOthersString("UndoRedoManager.create"); //$NON-NLS-1$
+	
+	/** This label corresponds to a join of several figures */
+	public static final String LABEL_JOIN = LaTeXDrawLang.getOthersString("UndoRedoManager.join"); //$NON-NLS-1$
+	
+	/** This label corresponds to a separation of several joined figures */
+	public static final String LABEL_SEPARATE = LaTeXDrawLang.getOthersString("UndoRedoManager.seperate"); //$NON-NLS-1$
+	
+	/** This label corresponds to a change of the attribute fill
+	 * of the class figure */
+	public static final String LABEL_CHANGE_FILL  = LaTeXDrawLang.getOthersString("UndoRedoManager.filled"); //$NON-NLS-1$
+
+	/** This label corresponds to a change of colour of the interior
+	 * of the figure */
+	public static final String LABEL_CHANGE_INT_COL = LaTeXDrawLang.getOthersString("UndoRedoManager.intCol"); //$NON-NLS-1$
+	
+	/** This label corresponds to a change of colour of the borders
+	 * of the figure */
+	public static final String LABEL_CHANGE_BORD_COL = LaTeXDrawLang.getOthersString("UndoRedoManager.bordCol"); //$NON-NLS-1$
+	
+	/** This label corresponds to a change of thickness of the figure */
+	public static final String LABEL_CHANGE_THICKNESS = LaTeXDrawLang.getOthersString("UndoRedoManager.thick"); //$NON-NLS-1$
+	
+	/** This label corresponds to a change of style the figure */
+	public static final String LABEL_CHANGE_STYLE = LaTeXDrawLang.getOthersString("UndoRedoManager.style"); //$NON-NLS-1$
+	
+	/** This label corresponds to a change of arrow style of the line */
+	public static final String LABEL_CHANGE_LARROW_STYLE = LaTeXDrawLang.getOthersString("UndoRedoManager.lArrow"); //$NON-NLS-1$
+	
+	/** This label corresponds to a change of arrow style of the line */
+	public static final String LABEL_CHANGE_RARROW_STYLE = LaTeXDrawLang.getOthersString("UndoRedoManager.rArrow"); //$NON-NLS-1$
+	
+	/** This label corresponds to a change of the style of the dot */
+	public static final String LABEL_CHANGE_DOT_STYLE = LaTeXDrawLang.getOthersString("UndoRedoManager.dotStyle"); //$NON-NLS-1$
+	
+	/** The label display when there is no redo possible */
+	public static final String EMPTY_REDO = LaTeXDrawLang.getOthersString("UndoRedoManager.noRedo"); //$NON-NLS-1$
+	
+	/** The label display when there is no undo action */
+	public static final String EMPTY_UNDO = LaTeXDrawLang.getOthersString("UndoRedoManager.noUndo"); //$NON-NLS-1$
+	
+	/** This vector contains all labels of redo actions */
+	protected Vector<String> textRedo;
+	
+	/** This vector contains positions of figures, in the vector figures,
+	 * concerned by the redo */
+	protected Vector<int[]> idRedo;
+	
+	/** This vector contains all figures, values, ... concerned by the
+	 * redo */
+	protected Vector<Object> objectRedo;
+	
+	/** This vector contains all labels of undo actions */
+	protected Vector<String> textUndo;
+	
+	/** This vector contains positions of figures, in the vector figures,
+	 * concerned by the undo */
+	protected Vector<int[]> idUndo;
+	
+	/** This vector contains all figures, values, ... concerned by the
+	 * undo */
+	protected Vector<Object> objectUndo;
+	
+	/** This vector contains all the figures of the drawing : in this case, this
+	 * vector is pointer of the vector "figures" of the class DrawContainer */
+	protected Vector<Figure> figures;
+	
+	/** The current drawing which contains the figures */
+	protected DrawContainer draw;
+	
+	/** The main frame (which contains buttons, ...) */
+	protected LaTeXDrawFrame mainFrame;
+	
+	
+	
+	
+	
+	/**
+	 * The constructor by default
+	 * @param f The vector containing all the figures of the drawing
+	 */
+	public UndoRedoManager(Vector<Figure> f, DrawContainer d, LaTeXDrawFrame frame)
+	{
+		textRedo   = new Vector<String>();
+		idRedo     = new Vector<int[]>();
+		objectRedo = new Vector<Object>();
+		textUndo   = new Vector<String>();
+		idUndo     = new Vector<int[]>();
+		objectUndo = new Vector<Object>();
+		
+		mainFrame = frame;
+		figures = f;
+		draw = d;
+	}
+	
+	
+	
+	public void setFigures(Vector<Figure> f)
+	{
+		if(f!=null)
+			figures = f;
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to get the name of the next undo actions
+	 * @return The name of the next undo actions
+	 */
+	public String getTextNextUndo()
+	{
+		if(textUndo.isEmpty())
+			return null;
+		return textUndo.lastElement();
+	}
+	
+
+	
+	
+
+	/**
+	 * Allows to get the name of the next redo actions
+	 * @return The name of the next redo actions
+	 */
+	public String getTextNextRedo()
+	{
+		if(textRedo.isEmpty())
+			return null;
+		return textRedo.lastElement();
+	}
+	
+	
+	
+	
+	/**
+	 * Allows to add a event to manage by undo/redo
+	 * @param label The kind of event (add, deletion, rotation, ...)
+	 * @param id The position of the concerned figure in the vector "figures"
+	 * @param o For some actions (like deletion) we need to have to concerned
+	 * figure in order to keep it until a redo
+	 */
+	public void add(String label, int id, Object o)
+	{
+		int[] id2 = new int[1];
+		id2[0] = id;
+		add(label, id2, o, false);
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to add a event to manage by undo/redo
+	 * @param label The kind of event (add, deletion, rotation, ...)
+	 * @param id The indices of the concerned figures in the vector "figures"
+	 * @param o For some actions (like deletion) we need to have to concerned
+	 * figure in order to keep it until a redo.
+	 * @param fromRedo True if the call of the function comes from the method redo (useful to clear the redo).
+	 */
+	public void add(String label, int[] id, Object o, boolean fromRedo)
+	{
+		try
+		{
+			if(!fromRedo)
+				clearRedo();
+			
+			for(int i=0, size=id.length; i<size; i++)
+				if(id[i]<0)
+					throw new ArrayIndexOutOfBoundsException(id[i]);
+
+			if(id.length==0)
+				throw new IllegalArgumentException();
+
+			if(isValidLabel(label))
+			{
+				if(label.equals(LABEL_CREATE) || label.equals(LABEL_CHANGE_FILL)
+						|| label.equals(LABEL_JOIN))
+				{
+					textUndo.add(label);
+					idUndo.add(id);
+				}else
+				if(label.equals(LABEL_DEL) || label.equals(LABEL_CHANGE_RARROW_STYLE) || 
+					label.equals(LABEL_CHANGE_LARROW_STYLE) || 
+					label.equals(LABEL_CHANGE_BORD_COL) || label.equals(LABEL_CHANGE_DOT_STYLE) || 
+					label.equals(LABEL_CHANGE_THICKNESS) || label.equals(LABEL_CHANGE_INT_COL) || 
+					label.equals(LABEL_CHANGE_MOVE) || label.equals(LABEL_CHANGE_PARAM) || 
+					label.equals(LABEL_CHANGE_STYLE) || label.equals(LABEL_CHANGE_DISPOSITION) ||
+					label.equals(LABEL_SEPARATE) || label.equals(LABEL_TRANSFORM) || label.equals(LABEL_ALIGN) || 
+					label.equals(LABEL_DISTRIB))
+				{
+					textUndo.add(label);
+					idUndo.add(id);
+					objectUndo.add(o);					
+				}
+				else
+					throw new IllegalArgumentException();
+			}//if(isValidLabel(label))
+			else
+				throw new IllegalArgumentException();
+		}catch(Exception e)
+		{
+			e.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(e);
+		}
+
+	}
+	
+	
+	
+	
+	/**
+	 * Undo an action
+	 */
+	public void undo()
+	{
+		try
+		{
+			if(!textUndo.isEmpty() && !idUndo.isEmpty())
+			{
+				String label = textUndo.remove(textUndo.size()-1);
+				int[] id = idUndo.remove(idUndo.size()-1);
+				int i;
+				
+				if(label.equals(LABEL_CHANGE_DISPOSITION))
+				{
+					Object o = objectUndo.remove(objectUndo.size()-1);	
+					
+					if(!(o instanceof int[]))
+						throw new ClassCastException(o.getClass().getName());
+					
+					if(((int[])o).length!=id.length)
+						throw new LaTeXDrawException(LaTeXDrawException.INCORRECT_VALUE);						
+					
+					int[] oldId =  (int[])o;
+					Figure f;
+					for(i=0; i<id.length; i++)
+					{
+						f = figures.remove(id[i]);
+						figures.add(oldId[i], f);
+					}
+					objectRedo.add(id);
+					id = oldId;					
+				}else				
+				if(label.equals(LABEL_CREATE))
+				{
+					if(draw.getSelected().contains(figures.elementAt(id[0])))
+					{
+						mainFrame.setSelection(false);
+						draw.setSelected(null);
+					}
+					objectRedo.add(figures.remove(id[0]));
+				}
+				else
+				if(label.equals(LABEL_DEL))
+				{
+					Object o = objectUndo.remove(objectUndo.size()-1);	
+					
+					if(!(o instanceof Figure))
+						throw new ClassCastException(o.getClass().getName());
+					
+					draw.getSelected().setSelected(false);
+					draw.getSelected().clear();
+					if(id.length==1)
+					{
+						Figure f;
+						if(o instanceof Draw) f = ((Draw)o).getFigureAt(0);
+						else f = (Figure)o;
+						figures.add(id[0], f);		
+						f.setSelected(true);
+						draw.setSelected(f);
+						mainFrame.setSelection(true);
+					}
+					else
+					{
+						if(!(o instanceof Draw))
+							throw new ClassCastException();
+						Draw d = (Draw)o;	
+						
+						if(id.length!=d.size())
+							throw new LaTeXDrawException(LaTeXDrawException.INCORRECT_VALUE);
+						
+						for(i=0; i<id.length; i++)
+							figures.add(id[i], d.getFigureAt(i));
+						
+						d.setSelected(true);
+						draw.setSelected(d);
+						mainFrame.setSelection(true);
+					}
+				}
+				else
+				if(label.equals(LABEL_CHANGE_FILL))
+					figures.elementAt(id[0]).setIsFilled(!figures.elementAt(id[0]).isFilled());		
+				else
+				if(label.equals(LABEL_CHANGE_RARROW_STYLE))
+				{
+					Line l = (Line)figures.elementAt(id[0]);
+					String style = l.getArrow2Style();
+					l.setArrow2Style((String)objectUndo.remove(objectUndo.size()-1));
+					objectRedo.add(style);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_LARROW_STYLE))
+				{
+					Line l = (Line)figures.elementAt(id[0]);
+					String style = l.getArrow1Style();
+					l.setArrow1Style((String)objectUndo.remove(objectUndo.size()-1));
+					objectRedo.add(style);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_DOT_STYLE))
+				{
+					Dot d = (Dot)figures.elementAt(id[0]);
+					String style = d.getCurrentStyle();
+					d.setCurrentStyle((String)objectUndo.remove(objectUndo.size()-1));
+					objectRedo.add(style);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_INT_COL))
+				{
+					Figure f = figures.elementAt(id[0]);
+					Color c = f.getInteriorColor();
+					f.setInteriorColor((Color)objectUndo.remove(objectUndo.size()-1));
+					objectRedo.add(c);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_BORD_COL))
+				{
+					Figure f = figures.elementAt(id[0]);
+					Color c = f.getLinesColor();
+					f.setLinesColor((Color)objectUndo.remove(objectUndo.size()-1));
+					objectRedo.add(c);
+				}else
+				if(label.equals(LABEL_CHANGE_MOVE) || label.equals(LABEL_TRANSFORM) || label.equals(LABEL_ALIGN) ||
+					label.equals(LABEL_DISTRIB))
+				{
+					Object o = objectUndo.remove(objectUndo.size()-1);
+					if(!(o instanceof Draw)) throw new ClassCastException();
+
+					Draw fOld = (Draw)o;
+		
+					if(id.length != fOld.size()) 
+						throw new LaTeXDrawException(LaTeXDrawException.INCORRECT_VALUE);
+						
+					Draw d = new Draw(false, false);
+					int size = fOld.size();
+					
+					for(i=0; i<size; i++)
+					{
+						d.addFigure(figures.remove(id[i]));
+						figures.add(id[i], fOld.getFigureAt(i));
+					}
+
+					draw.getSelected().setSelected(false);
+					draw.getSelected().clear();
+					fOld.setSelected(true);
+					draw.setSelected(fOld);
+					objectRedo.add(d);
+				}else
+				if(label.equals(LABEL_CHANGE_PARAM))
+				{
+					Object o = objectUndo.remove(objectUndo.size()-1);
+
+					if(!(o instanceof Figure))
+							throw new ClassCastException();
+					
+					Figure fOld;
+					if(o instanceof Draw)
+						fOld = ((Draw)o).getFigureAt(0);
+					else
+						fOld = (Figure)o;
+						
+					Figure f = figures.elementAt(id[0]);
+					figures.remove(id[0]);
+					figures.add(id[0], fOld);
+					
+					draw.getSelected().setSelected(false);
+					draw.getSelected().clear();
+					fOld.setSelected(true);
+					draw.setSelected(fOld);
+
+					objectRedo.add(f);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_STYLE))
+				{
+					Figure f = figures.elementAt(id[0]);
+					String style = f.getLineStyle();
+					f.setLineStyle((String)objectUndo.remove(objectUndo.size()-1));
+					objectRedo.add(style);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_THICKNESS))
+				{
+					Figure f = figures.elementAt(id[0]);
+					float thickness;
+					if(f instanceof Dot)
+					{
+						thickness = ((Dot)f).getWidth();
+						  ((Dot)f).setWidth((Float)objectUndo.remove(objectUndo.size()-1));
+					}
+					else  
+					{
+						thickness = f.getThickness();
+						f.setThickness((Float)objectUndo.remove(objectUndo.size()-1));
+					}
+					objectRedo.add(thickness);
+				}else
+				if(label.equals(LABEL_JOIN))
+				{	
+					int min = id[0];
+					i = 1;
+					
+					while(i<id.length)
+					{
+						if(id[i]<min)
+							min = id[i];
+						i++;
+					}
+				
+					Draw d = (Draw)figures.remove(min);
+					
+					for(i=id.length-1; i>=0; i--)
+						if(figures.size()==0 || id[i]==figures.size())
+							figures.add(d.getFigureAt(i));
+						else
+							figures.add(id[i], d.getFigureAt(i));
+					
+					d.setDrawFigures(false);
+					draw.setSelected(d);
+					objectRedo.add(d.clone());
+				}else
+				if(label.equals(LABEL_SEPARATE))
+				{	
+					Object o = objectUndo.remove(objectUndo.size()-1);
+					
+					if(!(o instanceof Draw))
+						throw new ClassCastException();
+					
+					Draw d = (Draw)o;
+					
+					int size = d.size();
+					for(i=0; i<size; i++)
+						figures.remove(id[0]);
+					d.setDrawFigures(true);
+					figures.add(id[0], d);
+					draw.setSelected(d);
+				}
+				
+				idRedo.add(id);
+				textRedo.add(label);
+			}
+			else throw new LaTeXDrawException(LaTeXDrawException.INCORRECT_VALUE);
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to know if there is actions in the redo stack
+	 * @return True if there is actions in the redo stack 
+	 */
+	public boolean isEmptyRedo()
+	{
+		if(textRedo==null) return true;
+		return textRedo.isEmpty();
+	}
+	
+	
+	
+
+	
+	/**
+	 * Allows to know if there is actions in the undo stack
+	 * @return True if there is actions in the undo stack 
+	 */
+	public boolean isEmptyUndo()
+	{
+		if(textUndo==null) return true;
+		return textUndo.isEmpty();
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Redo an action
+	 */
+	public void redo()
+	{
+		try
+		{
+			if(!textRedo.isEmpty() && !idRedo.isEmpty())
+			{
+				String label = textRedo.remove(textRedo.size()-1);
+				int[] id = idRedo.remove(idRedo.size()-1);
+				int i;
+				
+				if(label.equals(LABEL_CHANGE_DISPOSITION))
+				{
+					Object o = objectRedo.remove(objectRedo.size()-1);	
+					
+					if(!(o instanceof int[]))
+						throw new ClassCastException(o.getClass().getName());
+					
+					if(((int[])o).length!=id.length)
+						throw new LaTeXDrawException(LaTeXDrawException.INCORRECT_VALUE);						
+					
+					int[] oldId =  (int[])o;
+					Figure f;
+					for(i=id.length-1; i>=0; i--)
+					{
+						f = figures.remove(id[i]);
+						figures.add(oldId[i], f);
+					}								
+					add(LABEL_CHANGE_DISPOSITION, oldId, id, true);
+					
+				}else
+				if(label.equals(LABEL_CREATE))
+				{			
+					Figure f = (Figure) objectRedo.remove(objectRedo.size()-1);
+					
+					if(f.isSelected())
+						if(!draw.getSelected().contains(f))
+							draw.setSelected(f);
+						else f.onRelease();
+					
+					figures.add(id[0], f);
+					add(LABEL_CREATE, id, null, true);
+				}else
+				if(label.equals(LABEL_DEL))
+				{
+					Draw d = new Draw(false, false); 
+					Draw listSelected = draw.getSelected();					
+
+					for(i=id.length-1; i>=0; i--)
+					{
+						Figure f = figures.remove(id[i]);
+						if(listSelected.contains(f))
+							listSelected.removeFigure(f);
+						d.addFigure(f);
+					}
+		
+					for(i=id.length-2; i>=0;  i--)
+						d.addFigure(d.removeFigureAt(i));
+				
+					add(LABEL_DEL, id, d, true);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_FILL))
+				{
+					figures.elementAt(id[0]).setIsFilled(!
+							figures.elementAt(id[0]).isFilled());
+					add(LABEL_CHANGE_FILL, id, null, true);	
+				}
+				else
+				if(label.equals(LABEL_CHANGE_RARROW_STYLE))
+				{
+					Line l = (Line)figures.elementAt(id[0]);
+					String style = l.getArrow2Style();
+					l.setArrow2Style(
+							(String)objectRedo.remove(objectRedo.size()-1));
+					add(LABEL_CHANGE_RARROW_STYLE, id, style, true);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_LARROW_STYLE))
+				{
+					Line l = (Line)figures.elementAt(id[0]);
+					String style = l.getArrow1Style();
+					l.setArrow1Style(
+							(String)objectRedo.remove(objectRedo.size()-1));
+					add(LABEL_CHANGE_LARROW_STYLE, id, style, true);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_BORD_COL))
+				{
+					Figure f = figures.elementAt(id[0]);
+					Color c = f.getLinesColor();
+					f.setLinesColor((Color)objectRedo.remove(objectRedo.size()-1));
+					add(LABEL_CHANGE_BORD_COL, id, c, true);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_INT_COL))
+				{
+					Figure f = figures.elementAt(id[0]);
+					Color c = f.getInteriorColor();
+					f.setInteriorColor(
+							(Color) objectRedo.remove(objectRedo.size()-1));
+					add(LABEL_CHANGE_INT_COL, id, c, true);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_STYLE))
+				{
+					Figure f = figures.elementAt(id[0]);
+					String style = f.getLineStyle();
+					f.setLineStyle((String)objectRedo.remove(objectRedo.size()-1));
+					add(LABEL_CHANGE_STYLE,id,style, true);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_MOVE) || label.equals(LABEL_TRANSFORM) || label.equals(LABEL_ALIGN) ||
+					label.equals(LABEL_DISTRIB))
+				{
+					Object o = objectRedo.remove(objectRedo.size()-1);
+					if(!(o instanceof Draw)) throw new ClassCastException();
+
+					Draw fOld = (Draw)o;
+				
+					if(id.length != fOld.size()) 
+						throw new LaTeXDrawException(LaTeXDrawException.INCORRECT_VALUE);
+						
+					Draw d = new Draw(false, false);
+					for(i=0; i<fOld.size(); i++)
+					{
+						Figure f = figures.elementAt(id[i]);
+						d.addFigure(f);
+						figures.remove(id[i]);
+						figures.add(id[i], fOld.getFigureAt(i));
+					}
+
+					draw.getSelected().setSelected(false);
+					draw.getSelected().clear();
+					fOld.setSelected(true);
+					draw.setSelected(fOld);
+					add(label.equals(LABEL_CHANGE_MOVE) ? LABEL_CHANGE_MOVE : LABEL_TRANSFORM, id, d, true);
+				}else
+				if(label.equals(LABEL_CHANGE_PARAM))
+				{
+					Figure f = figures.elementAt(id[0]);
+					figures.remove(id[0]);
+					Figure f2 = (Figure) objectRedo.remove(objectRedo.size()-1);
+					figures.add(id[0], f2);
+					draw.getSelected().setSelected(false);
+					draw.getSelected().clear();
+					
+					add(LABEL_CHANGE_PARAM,id,f, true);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_DOT_STYLE))
+				{
+					Dot d = (Dot)figures.elementAt(id[0]);
+					String style = d.getCurrentStyle();
+					d.setCurrentStyle((String)objectRedo.remove(objectRedo.size()-1));
+					add(LABEL_CHANGE_DOT_STYLE,id,style, true);
+				}
+				else
+				if(label.equals(LABEL_CHANGE_THICKNESS))
+				{
+					Figure f = figures.elementAt(id[0]);
+					float thickness;
+					if(f instanceof Dot)
+					{
+						thickness = ((Dot)f).getWidth();
+						((Dot)f).setWidth((Float)objectRedo.remove(objectRedo.size()-1));
+					}
+					else 
+					{
+						thickness = f.getThickness();
+						f.setThickness((Float)objectRedo.remove(objectRedo.size()-1));
+					}
+					
+					add(LABEL_CHANGE_THICKNESS,id,thickness, true);
+				}else
+				if(label.equals(LABEL_SEPARATE))
+				{	
+					Draw d = (Draw)figures.remove(id[0]);
+					int size = d.size();
+					for(i=size-1; i>=0; i--)
+						figures.add(id[0], d.getFigureAt(i));
+					
+					d.setDrawFigures(false);
+					draw.setSelected(d);
+					add(LABEL_SEPARATE, id, d.clone(), true);
+					
+				}else
+				if(label.equals(LABEL_JOIN))
+				{	
+					Object o = objectRedo.remove(objectRedo.size()-1);
+					int min = id[0];
+					i = 1;
+					
+					while(i<id.length)
+					{
+						if(id[i]<min)
+							min = id[i];
+						i++;
+					}
+					
+					if(!(o instanceof Draw))
+						throw new ClassCastException();
+					
+					Draw d = (Draw)o;
+					
+					for(i=0; i<id.length; i++)
+						figures.remove(id[i]);
+					
+					d.setDrawFigures(true);
+					figures.add(min, d);
+					draw.setSelected(d);
+					add(LABEL_JOIN, id, null, true);
+				}
+						
+			}
+			
+			Draw select = mainFrame.getDrawPanel().getDraw().getSelected();
+			mainFrame.setSelection(select!=null && !select.isEmpty());
+		}catch(Exception ex)
+		{
+			ex.printStackTrace(); 
+			ExceptionFrameDialog.showExceptionDialog(ex);
+		}
+	}
+	
+	
+	
+	
+	
+	/**
+	 * Allows to know if the label is valid
+	 * @param label The label to check
+	 * @return True : is the label is valid
+	 */
+	public boolean isValidLabel(String label)
+	{
+		return label.equals(LABEL_CREATE) || label.equals(LABEL_CHANGE_MOVE) ||
+				label.equals(LABEL_CHANGE_PARAM) || label.equals(LABEL_DEL) ||
+				label.equals(LABEL_CHANGE_BORD_COL) || label.equals(LABEL_CHANGE_THICKNESS) ||
+				label.equals(LABEL_CHANGE_DOT_STYLE) || label.equals(LABEL_CHANGE_STYLE) ||
+				label.equals(LABEL_CHANGE_INT_COL) || label.equals(LABEL_CHANGE_LARROW_STYLE) ||
+				label.equals(LABEL_CHANGE_RARROW_STYLE) || label.equals(LABEL_CHANGE_FILL) ||
+				label.equals(LABEL_CHANGE_DISPOSITION) || label.equals(LABEL_JOIN) ||
+				label.equals(LABEL_SEPARATE) || label.equals(LABEL_TRANSFORM) || label.equals(LABEL_ALIGN) ||
+				label.equals(LABEL_DISTRIB);
+	}
+
+	
+	
+	/**
+	 * Clean the manager.
+	 * @since 2.0.0
+	 */
+	public void clear()
+	{
+		idUndo.clear();
+		objectUndo.clear();
+		textUndo.clear();
+		clearRedo();
+	}
+	
+	
+	/**
+	 * Allow to clear the redo when an action, different than undo occurred.
+	 */
+	private void clearRedo()
+	{
+		idRedo.clear();
+		objectRedo.clear();
+		textRedo.clear();
+		mainFrame.updateUndoRedo();
+	}
+}
diff --git a/current/latexDraw/util/VersionChecker.java b/current/latexDraw/util/VersionChecker.java
new file mode 100644
index 0000000..cbb1df5
--- /dev/null
+++ b/current/latexDraw/util/VersionChecker.java
@@ -0,0 +1,111 @@
+package latexDraw.util;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.swing.JOptionPane;
+
+import latexDraw.lang.LaTeXDrawLang;
+import latexDraw.ui.LaTeXDrawFrame;
+
+/** 
+ * This class allows to check if a new version of LaTeXDraw is out. This class is a child of Thread
+ * to avoid a freeze when the application start.<br>
+ * <br>
+ * This file is part of LaTeXDraw<br>
+ * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
+ *<br>
+ *  LaTeXDraw is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.<br>
+ *<br>
+ *  LaTeXDraw is distributed without any warranty; without even the 
+ *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ *  PURPOSE.  See the GNU General Public License for more details.<br>
+ * <br>
+ * 
+ * 09/11/06<br>
+ * @author Arnaud BLOUIN<br>
+ * @version 2.0.0<br>
+ * @since 1.8<br>
+ */
+public class VersionChecker extends Thread
+{
+    /** The path of the file containing the news */
+    public static final String PATH_MSG = "http://latexdraw.sourceforge.net/news.txt"; //$NON-NLS-1$
+    
+    protected LaTeXDrawFrame parent;
+    
+    
+	/**
+	 * The constructor.
+	 * @param frame The main frame of LaTeXDraw.
+	 */
+	public VersionChecker(LaTeXDrawFrame frame)
+	{
+		parent = frame;
+	}
+
+	
+	
+	@Override
+	public void run() 
+	{
+        try 
+        {
+        	checkNewVersion();
+        	
+        }catch(Exception e) 
+		{
+        	parent.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.213")); //$NON-NLS-1$
+		}
+	}
+	
+	
+	
+ 	/**
+  	 * Allows to check if a new version of latexdraw is out.
+  	 */
+	protected void checkNewVersion()
+  	{
+  		try
+  		{
+  			URL url = new URL(PATH_MSG);
+  			InputStream is = url.openStream();
+  			DataInputStream dis = new DataInputStream(is);
+  			InputStreamReader isr = new InputStreamReader(dis);
+  			BufferedReader br = new BufferedReader(isr);
+  			String[] div = null;
+  			String line = br.readLine();
+  			
+  			if(line!=null)
+  				div = line.split("_");//$NON-NLS-1$
+  			
+			if(div!=null && div.length>3)
+				if(div[3].compareTo(LaTeXDrawFrame.VERSION)>0)
+				{
+					JOptionPane.showMessageDialog(parent, 
+			 		    "<html><span style=\"color: rgb(204, 0, 0); font-weight: bold;\">"//$NON-NLS-1$
+			 		    +div[1]+ '/'+div[2]+'/'+div[0]+LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.208") //$NON-NLS-1$
+			 		    +div[3]+LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.209"),  //$NON-NLS-1$
+				 		   LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.210"),  //$NON-NLS-1$
+				 		    JOptionPane.WARNING_MESSAGE); 
+					parent.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.211")); //$NON-NLS-1$
+				}
+				else parent.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.212")); //$NON-NLS-1$
+  			
+			br.close();
+			isr.close();
+   			dis.close();
+   			is.close();
+  			
+  		}catch(Exception e)
+  		{
+  			parent.setStatusBarText(LaTeXDrawLang.getStringLaTeXDrawFrame("LaTeXDrawFrame.213")); //$NON-NLS-1$
+  		}
+  	}
+}
diff --git a/current/license.txt b/current/license.txt
new file mode 100644
index 0000000..b860267
--- /dev/null
+++ b/current/license.txt
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+

+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+

+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+

+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+

+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+

+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/current/readme.txt b/current/readme.txt
new file mode 100644
index 0000000..69a5b61
--- /dev/null
+++ b/current/readme.txt
@@ -0,0 +1,44 @@
+
+This installer will install LaTeXDraw in the selected directory and create a directory for shared templates. 
+This last action can require administrator privileges.
+
+*** Windows Vista ***
+
+For Windows Vista you must use the install_vista.vbs to install LaTeXDraw; 
+this script activates the "run as administrator" feature in order to install 
+files in protected directories such as "Program Files". It will ask you your password.
+
+However, it seems to have some problem while using the installer on Vista Ultimate. For
+the moment, a workaround is to install latexdraw manually (see at the bottom of this page).
+
+
+*** Debian/Ubuntu ***
+
+The script install_debian_ubuntu will ask administrator privileges before launching the installer.
+
+
+*** Running the installer ***
+
+If you want to launch the installer in a console, the command is "java -jar installer.jar".
+
+The shared templates is:
+ - for Unix, /usr/share/latexdraw
+ - for Mac OS X, /Users/Shared/latexdraw
+ - for Vista, ProgramData\latexdraw
+ - for other Windows, All Users\Application Data\latexdraw 
+ 
+For Linux, a script will be created in /usr/bin to launch LaTeXDraw (needs to be root).
+No shortcut is created for Windows.
+
+The first execution of LaTeXDraw will create the profile of the current user in:
+ - for Unix, ~/.latexdraw
+ - for Max OS X, <user>/Library/Preferences/latexdraw
+ - for Vista, <user>\AppData\Local\latexdraw
+ - for other Windows, <user>\Application Data\latexdraw
+
+This profile contains the preferences of the user and its templates.
+
+
+*** HOW TO INSTALL LATEXDRAW MANUALLY ***
+
+If you want to install LaTeXDraw without using the installer you must place "LaTeXDraw.jar", "release_notes.txt", "licence.txt", "help/" and "lib/" in the same directory/
diff --git a/current/readme_compile b/current/readme_compile
new file mode 100644
index 0000000..1a63c06
--- /dev/null
+++ b/current/readme_compile
@@ -0,0 +1,5 @@
+To compile you need at least the Sun jdk 1.5 (in order to have the javac program).
+
+Just run ./compile to launch the compilation. The warnings come from the libraries, not from the LaTeXDraw sources ... ;)
+
+The most efficient way to use the sources, is to use eclipse 3.3 (www.eclipse.org) and to import the LaTeXDraw project (with the file .project)
diff --git a/current/release_note.txt b/current/release_note.txt
new file mode 100644
index 0000000..288441b
--- /dev/null
+++ b/current/release_note.txt
@@ -0,0 +1,682 @@
+Version 2.0.4
+
+- added: new localisation, Polish
+
+- fixed #428405: freeze while exporting as pdf on Vista/XP
+- fixed #402096: use alternative runtime.exec()
+- fixed #402099: improve management of temp files
+- fixed #402104: pdf/ps files have a weird title
+
+
+*******************************************************************
+Version 2.0.3 - July 3rd 2009
+
+- added: latex EPS and PDF export (need a latex distribution to work)
+- added: new localisation, Italian
+
+- fixed #268988: widgets not updated when loading an SVG doc
+- fixed #305154: bad parsing of points path for SVG-polygon and SVG-polylines
+- fixed #305413: cannot parse CSS styles with WSP or comments
+- fixed #392168: crash while changing cm to inch in drawing preferences
+- fixed: in some cases, wrong floating-point syntax was generated (e.g. 14E-01) 
+- fixed: on Ubuntu Jaunty the Palatino font is not well managed
+- fixed: the rotation field did not really work for polygons and lines
+- fixed: exported EPS drawings can hide, in some cases, the text of a tex document
+- fixed: desorganisation of some shapes while joining them
+- translations updated
+
+
+*******************************************************************
+Version 2.0.2
+
+- added: a field to change and view the zoom
+
+- fixed #292090: crash when undoing the joining of two shapes
+- fixed #295577: crash while creating a grid with gtk laf
+- fixed #296970: SVG: bad management of attributes inheritance
+- fixed #296248: SVG: the attribute 'fill' must be by default to 'black'
+- fixed #181513: freeze while opening SVG document that contains DOCTYPE
+- fixed #291507: crash while opening some SVG files
+- fixed #289943: cannot undo a change of coordinates (Bezier curve/polygon)
+- fixed #289936: can open parameters panel while several figures are selected
+- fixed #291489: no name when exporting a saved drawing
+- fixed #293194: no name when saving as a saved drawing
+- fixed #293190: no label for undoing distribution/alignment but an error message
+- fixed #268090: cannot open a file that contains a space in command line
+- fixed #294746: problem with the grid menus when a drawing is open
+- fixed #294724: some changes does not set the drawing as "modified"
+- fixed #287404: misspelling for group/separate figures and strings updated
+- fixed #238142: inverted round bracket arrow not well plotted
+
+
+*******************************************************************
+Version 2.0.1 - October 31th 2008
+
+- added: hatchings angle is now managed
+
+- fixed #289881: crash when joining figures
+- fixed #264270: text font and text size not loaded from SVG documents
+- fixed #268037: italic and bold text not loaded from SVG documents
+- fixed #268979: borders of the auto adjustment not saved
+- fixed #267117: translation error
+- fixed #268973: borders cannot be selected when in auto adjustment
+
+*******************************************************************
+Version 2.0 - July 25th 2008
+
+- added: SVG import/export
+- added: can align (left, right, top,...) figures
+- added: can distribute figures
+- added: a menu item to create a new drawing with the selected figures
+- added: a button to copy the code of the selected figures
+- added: US English language (clear distinction between US and British English)
+- added: German translation
+- added: the latex command 'put' is managed. But its use is not advice since it is not a PSTricks command and it creates some problems with rput and uput commands. You should use the rput command instead
+
+- improvement: new icons;
+- improvement: better performance when the grid is displayed
+- improvement: can open latexdraw with a pstricks file
+- improvement: preferences are now stored in an XML file
+- improvement: the position of the main frame, its size and position of the slidebar are now saved in the preferences file
+- improvement: better plotting of rhombus, triangle and polygon
+
+- change: the default format of latexdraw is now SVG, files with the old format can still be opened
+- change: closed bézier-curves cannot have a second arrow anymore
+- change: the shape handlers are more simply drawn in order to be less CPU and memory consumers
+
+- fixed #1884433: changing rotation angle in the parameters panel do nothing (for lines and polygons)
+- fixed: while saving, wrong dialog title displayed when the interface ask if the drawing must be replaced
+- fixed: it was impossible to select a item of a toolbar with Compiz activated on Linux
+- fixed: problem of focus with toolbars on Linux
+- fixed: rotation field in the freehand parameters panel
+- fixed: no warning when quitting and when the drawing was modified via a parameters frame
+- fixed: some dot shapes were badly plotted
+- fixed: bezier curves and lines have their borders not well drawn when having a shadow
+- fixed: the cancel button of the preferences panel had no effect
+- fixed: a lot of minor bugs
+
+PSTricks parser 0.5:
+- added: rotatebox, rotateleft, rotateright and rotatedown commands are managed
+- added: definecolor{name}{cmyk}{c m y k} is supported
+- added: newrgbcolor, newcmykcolor, newgray and newhsbcolor commands are supported
+
+- fixed: false error report when some unknown commands are parsed
+- fixed: when importing a document, figures can be inserted several times
+- fixed: freeze when importing a lot of Bézier curves because of the code optimisations
+- fixed: crash when importing a bad formed piece of code containing too many closing braces
+- fixed: crash when importing a pscustom block composed of Bézier curves
+- fixed: crash when importing a Bézier curve having only two equal points
+- fixed: unit definition was not considered while parsing rput command
+- fixed: \} not well parsed
+
+
+***************************************************************
+Version 1.9.5 - October 20th 2007
+
+- fixed: transparency not always managed in imported pictures;
+- fixed: problem when trying to select a figure to put behind/in front of the selected figure;
+- fixed: crash when undo "join figures";
+- fixed: crash when putting a figure behind one another;
+- fixed: cannot open a .ldp containing a picture;
+- fixed: crash when joining several figures;
+- fixed: cannot change the parameters of joined figures;
+- fixed: a selected figure can be exported with its border.
+
+
+***************************************************************
+Version 1.9.4 - September 1st 2007
+
+- fixed: an error occurred when using alt-right/left/... and no figure was selected;
+- fixed: saving a drawing froze the program under gtk theme under Linux;
+- fixed: the size of an elliptic framed box was badly computed (again!);
+- fixed: bezier curves: arrow colour not exported in PSTricks;
+- fixed: joined-lines arrows can be in the wrong side;
+- fixed: "joined-lines" menu was missing in the popup-menu;
+- fixed: too small figures cannot be created;
+- fixed: problems with arrows and line/joined-lines;
+- fixed: a line/joined-lines/arc/bezier curve/circle is not visible when all its points are at the same location;
+- fixed: the code is never updated before its printing;
+- fixed: the grid was printed with the drawing;
+- fixed: grid: the dotted sub-grid not well defined;
+- fixed: the pstricks code of a grid can generate number such as 1E-07;
+- fixed: the dot-size field is not updated when resizing a dot;
+- fixed: an error can occurred when using mirrors/position buttons with no selected figure; 
+- fixed: the printed code is always a unique page;
+
+- change: jlibeps replaces EPSGraphics;
+- change: importation of a WMF picture is removed.
+
+PSTricks parser 0.4.2:
+
+- fixed: parameters beginning with '9' cannot be parsed;
+- fixed #1703716: origin={...} in parameters does not work. 
+
+
+***************************************************************
+Version 1.9.3 - June 20th 2007
+
+- fixed: wrong colour definition for carnationPink;
+- fixed: undo/redo manager not always well updated;
+- fixed: sometimes, no warning appears when the drawing is modified and the user leaves LaTeXDraw;
+- fixed: choices list do nothing when selecting the same choice;
+- fixed: export menu not updated when cutting and pasting;
+- fixed: problem with toolbar, gtk "look and feel" and java 6;
+- fixed: buttons not well updated with ctrl-A;
+- fixed: in rare case, joined figures can launch exceptions;
+- fixed: when separating joined figures, the code is not updated;
+- fixed: freehand: if first point=last point, the figure is not created;
+- fixed: user comments can be truncated.
+
+PSTricks parser 0.4.1:
+
+- fixed #1703713: {} and {>} arrows command should be parsed. 
+
+
+****************************************************************
+Version 1.9.2 - May 31th 2007
+
+- added: a button in the frame of errors to copy the log;
+
+- improvement: preferences and templates are stored in the profile of the user
+- improvement: templates are not loaded at start-up;
+- improvement: double line for joined-lines;
+- improvement: can define the compression rate when exporting in jpg format;
+- improvement: in the frame of parameters, the glimpse panel automatically
+               zoom in/out to view to whole figure and the figure is always
+               placed in the centre of the panel;
+- improvement: in the frame of parameters, you can move the glimpse figure
+               with the mouse;
+- improvement: in the frame of parameters for Bézier curve, you can choose
+               if, when moving a point, its control points are moved too;
+
+- fixed #1703723: figure not always well filled;
+- fixed: the stroke of double-line was badly used for bezier curves/joined-lines
+- fixed: when importing a picture, its eps version is saved in the profile if
+         we can save it in the folder;
+- fixed: exception and some problems when undo/redo joined figures;
+- fixed: scalebox{1} must be placed before begin{pspicture};
+- fixed: exception when rotating several joined figures;
+- fixed: a template menu item will not be created if its .ldt file does not exist;
+- fixed: template thumbnails were not always updated;
+- fixed: selection did not always work with arcs and Bézier curves.
+
+PSTricks parser 0.4:
+
+- added: \pspicture and \endpspicture are managed;
+- added: \normalcolor is managed;
+- added: arrows=<-| is managed;
+
+- fixed: an invalid \begin{pspicture} command must launch a fatal error;
+- fixed: unknown command not always well parsed;
+- fixed: a single end{pspicture} command must launch a fatal error;
+
+
+****************************************************************************
+Version 1.9.1 - April 4th 2007
+
+- added: more shortcuts:
+           - "space" selects the first or the next figure (in selection mode);
+           - ctrl+mouse wheel zoom in/out;
+- added: comment explaining how to rescale the whole drawing (request #1628137);
+
+- improvement: can change the parameters of several selected figures in the
+               same time;
+- improvement: can define the parameters before creating a figure;
+- improvement: all the frames can be easily resized; 
+- improvement: the definition of a dot is almost totally rewritten to improve 
+               the selection and to fix several bugs;
+
+- fixed #1681687: the parameters toolbar is not updated when importing a tex file;
+- fixed #1690426: figure not deleted when cancelling its creation with to top-right button;
+- fixed #1691145: freezes when a wrong file is given in command line;
+- fixed: exception in some cases when the frame of parameters of a dot is open;
+- fixed: the selection of figures works better now;
+- fixed: a rotated dot doesn't correctly move after loading a project;
+- fixed: problem when exporting a drawing as picture;
+- fixed: the drawing is no more affected when the number of pixels per 
+         cm changes (only the generated code);
+- fixed: problem when redoing after having cut several figures;
+- fixed: the size of the ellipse framed box was badly computed;
+- fixed: minor bugs.
+
+
+****************************************************************************
+Version 1.9 - February 8th 2007
+
+- added: a splash screen;
+- added: recent files manager;
+- added: more shortcuts:
+            - ctrl+A select all the figures;
+            - ctrl/shift key can be used to add/remove a figure to the selection;
+            - can move scrollbars and figures with left, up, shift,...;
+- added: can update figures to the displayed grid;
+- added: a shortcuts frame;
+- added: when the code panel is closed, a button, copying the all the generated 
+         code, is visible in the toolbar;
+- added: a menu item to set visible all the hidden figures;
+- added: can choose the look and feel;
+- added: can change the transparency of the delimiters;
+- added: a menu to check update;
+- added: a popup menu to cut/paste/copy text from/to "insert PSTricks code" and
+         "add comment" frames;
+- added: "move"/"resize/rotate" cursor is displayed when move/resize/rotate figures;
+- added: "code" menu now contains all code options;
+
+- improvement: free hand can be either curves or lines;
+- improvement: free hand can be closed or opened;
+- improvement: you can define the interval between each point of free hand;
+- improvement: akin points can be dotted/dashed;
+- improvement: akin points can be filled/hatched and can have a gradient;
+- improvement: a Bézier curve can be closed with a line or a curve;
+- improvement: can equilibrate the control points of a Bézier curve;
+- improvement: update jiu to 0.14.1;
+- improvement: a right-click doesn't remove the last point anymore (during the 
+               creation of a polygon/joined-lines/Bézier curve;
+
+- fixed #1621630: figures were not updated to the magnetic grid when rotated;
+- fixed #1621632: a very small rectangle can disappear when rotated of 90°;
+- fixed #1621633: cannot select a too small rectangle;
+- fixed #1621634: the selection of a text without framed box didn't work very well;
+- fixed #1621635: figures not always follow the magnetic grid when dragged;
+- fixed #1624345: cannot stop the creation of a polygon on Mac (mouse has one button);
+- fixed #1644659: the main frame lost the focus when a ListJToogleButton is displayed;
+- fixed #1644660: the gravity centre of a set of figures was badly computed;
+- fixed #1644660: polygons move when violently rotated;
+- fixed #1644662: problem when closing and displaying the code panel;
+- fixed #1644663: the parameters of the second arrow of joined lines/Bézier curve are never generated;
+- fixed #1645157: joined-lines are automatically filled when having a shadow;
+- fixed #1645158: space between dots of a dotted polygon with double boundaries was badly computed;
+- fixed #1645160: the fact that a dot can be filled or not was badly managed;
+- fixed: the size of delimiters (polygons, Bézier curves) aren't always updated;
+- fixed: arrows are not moved when mirrors are used (Bézier curve);
+- fixed: cut and paste doesn't work;
+- fixed: for axes, in some cases the labels are badly placed;
+- fixed: a lot of minor bugs;
+
+PSTricks parser 0.3:
+- added: \begin{figure} and \begin{center} are managed;
+- added: \pscustom is partially managed;
+
+- improvement: Can parse a Bézier curve with more than two points;
+- improvement: squared psframe is now converted in square;
+- improvement: arc with a line at the start to the end point is transformed in chord;
+
+
+***********************************************************************************
+Version 1.8.2 - November 15th 2006
+
+- fixed #1580023: the printed code doesn't take care about the width of the page;
+- fixed #1538675: Bézier curve/polygons/joined lines still rotate badly;
+- fixed #1581400: you can select a empty Bézier curve by clicking at the interior;
+- fixed #1591309: borders of a Bézier curve were not displayed;
+- fixed #1591310: can move a figure by using its borders;
+- fixed #1593762: parameters panel - undo has no effect when modifying a Bézier curve;
+- fixed #1591312: not enable to select a too small rectangle/ellipse;
+- fixed #1596421: a too small rectangle/ellipse is not visible;
+- fixed #       : we must not be able to select a figure with its shadow;
+- fixed #       : can select joinedlines/arc with the line joining their extremities;
+- fixed: minor bugs.
+
+PSTricks parser 0.2.3:
+- fixed #1579820: parser freezes when the code has { ...  };
+- fixed #1586013: problem when parsing a line or a polygon like \psline(2,2)(2,2)(2,2).
+
+
+***********************************************************************************
+Version 1.8.1 - October 17th 2006
+
+- fixed #1554750: problem with round corner (frame and square);
+- fixed #1561789: "code autoupdate" field (in the preferences frame) had not effect;
+- fixed #1562954: problem with the look & feel "metal";
+- fixed #1564478: vertical mirror was horizontal mirror for text;
+- fixed #1564477: picture was not moved when using mirrors;
+- fixed #1573703: problem with checkboxes and jre 1.5.0_09 with XP look & feel;
+- fixed #1508200: delimiters of triangles and rhombus are sometimes badly updated;
+- fixed #1538675: polygons move when rotating violently;
+- fixed #1508202: Bézier curves rotate badly;
+- fixed: a lot of minor bugs.
+
+PSTricks parser 0.2.2:
+- fixed #1573706: problem when having both unit and xunit/yunit in the parameters.
+
+
+***********************************************************************************
+Version 1.8 - September 13th 2006
+
+- added: new localisation, Spanish;
+- added: new shape, axes;
+- added: magnetic grid;
+- added: mirrors to move figures;
+- added: buttons to rotate figures of 90, 180 and 270°;
+- added: a button to launch your LaTeX editor;
+
+- improvement: the help can be loaded with you browser: help/index.html;
+- improvement: Bézier curve can have arrows;
+- improvement: a button to close the mini-toolbars;
+- improvement: Bézier curve can have a double boundary;
+- improvement: Bézier curve can be filled, hatched and can have a gradient;
+- improvement: an arrow with the 'dot' shape can have its interior colour changed;
+- improvement: hatchsep attribute is managed;
+- improvement: new "About LaTeXDraw" frame;
+
+- fixed #1555339: the ilk of an arc (open, pie or chord) was never saved;
+- fixed #1554729: dotted/dashed double line has not it good background colour (for polygon);
+- fixed #1554162: the borders of the drawing are not always updated (with auto adjustment
+                  disable);
+- fixed #1553683: with command line, preferences and templates are not loaded;
+- fixed #1540561: crashing when launching the help;
+- fixed #1536603: eps exported files were not vectorial;
+- fixed #1528919: shadow for a polygon with double boundary is too small;
+- fixed #1528562: joined lines parameters frame: a change has no effect;
+- fixed #1538724: bad rotation in the frame of parameters of a drawing;
+- fixed #1547234: the 'draw labels' checkbox doesn't work very well in the frame
+                  of parameters of the grid;
+- fixed #1547235: default buttons did not always reinitialise values;
+- fixed #1547236: crashing when clicking on the default button of the dot frame;
+- fixed #1547239: round panel, for rectangle and square, is not always visible;
+- fixed #1548699: with JRE 1.5_08, the buttons of the toolbars are too big;
+- fixed #1556362: sometimes LaTeXDraw froze at startup when it checked new version;
+- fixed #1557509: vertical and horizontal line can be difficulty selected;
+- fixed: minor bugs.
+
+PSTricks parser 0.2.1:
+- added: axes management;
+
+- fixed #1556340: rotation angle was not managed (since 1.7) for triangle;
+- fixed #1556544: inversion of positions between X-labels and Y-labels;
+- fixed #1556548: a rotated grid (with unit not equal to 1) was badly placed.
+
+
+**************************************************************************************
+Version 1.7 - July 23th 2006
+
+- added: shadow management;
+- added: colour shifting management;
+- added: framed box management;
+- added: buttons in the frames of parameters to zoom in/out the figure;
+
+- improvement: the background of a text can be opaque;
+- improvement: polygons can have doubles lines;
+- improvement: can change the size of the rounds corners for rectangles and squares;
+- improvement: the frames of parameters have a better interface;
+- improvement: gif can be included or converted;
+- improvement: batch conversion: a check box define if the pictures must be converted
+               in their directory or not;
+- improvement: new icons;
+
+- fixed #1404791: when refreshing the templates, there thumbnails were not updated;
+- fixed #1487192: when a frame of parameters is opened, the figure can be deleted or modified;
+- fixed #1481272: the colour of the interior of the arrows with the circle shape must be as the 
+                  interior of the figure;
+- fixed #1487185: scrollbars are not updated when changing the font or the size of a text;
+- fixed #1489350: the size of a text change when zooming in and zooming out;
+- fixed #1489644: scrollbars of the parameters frame of grids are not always updated.
+- fixed #1489551: labels of grids and texts are not resized when you change the number 
+                  of pixels per cm/inch of the draw;
+- fixed #1502040: when subgriddiv=1, borders must not be drawn;
+- fixed #1502043: some defaults values of lines' parameters were false;
+- fixed #1502048: for arcs, the start angle can be greater than the end angle to avoid problems
+                  during the drawing and the parsing (\pswedge(2,1){1.5}{300}{200});
+- fixed #1502046: for Bézier curves, the controls points had a wrong size;
+- fixed #1502049: we must be able to fill the dot shape 'o';
+- fixed #1512530: LaTeXDraw files containing picture cannot be loaded;
+- fixed #1512533: undo/redo: bad undo management when creating and cancelling a text/grid;
+- fixed #1512537: undo/redo: toolbar still active when redo a 'delete' action ;
+- fixed #1512538: undo/redo: the redo was never cleared when an action, different than 
+                  redo, occurred;
+- fixed #1515149: bug in the method Line.getPerpendicularLine(): when the x-coordinate of a 
+                  point of a triangle/rhombus is 0 a problem in the display occurred;
+- fixed #1516288: % not always replaced by \% during the code generation;
+- fixed #1523877: when a file is loaded, the undo/redo manager is not cleared;
+- fixed #1524381: batch conversion: output path was never used;
+- fixed #1525086: for rhombus, hatchings did not rotate because of gangle;
+- fixed #1526315: when "show points" option for a Bézier curve is selected, the curve must
+                  be dashed too;
+- fixed #       : exception in Polygon.getBorders when three points have the same X-coordinate;
+- fixed: minor bugs.
+         
+
+PSTricks parser 0.2:
+- added: shadow management;
+- added: colour shifting management;
+- added: framed box management;
+- added: millimetres are managed;
+- added: support +1 number (positive sign);
+- added: support numbers like ++++1, -----1, ++-+--+1;
+- added: support unit parameter;
+
+- fixed #1488716: linewidth=-1 must be understood as linewidth=1, idem for dotsize, ...;
+- fixed #1502052: for lines and arcs, arrows were not read in some cases (\psline{*->}(0,3)(5,5));
+- fixed #1502053: dots was never filled;
+- fixed #1502711: when parsing a polygon with only two points, the third point was not created;
+- fixed #1502712: parsing the command \psset{origin={1,1}} launched an exception;
+- fixed #1502713: coordinate like (1pt, 2in) and size like {1cm} must be parsed;
+- fixed #1502714: when insert PSTricks code with \begin{pspicture} in comment, this commented
+                  command was understood like an uncommented command;
+- fixed #1502715: the format \pswedge{3}{0}{70} was not supported;
+- fixed #1515871: when you insert pstricks code like \begin{center}\begin{pspicture} the
+                  \begin{pspicture} was ignored;
+- fixed #1516165:  the \% command was ignored;
+- fixed #1519847: pink colour not managed;
+- fixed #1519934: text not always parsed;
+- fixed #1520384: \bf and \it have no effect;
+- fixed #1523726: error during the parsing of the command \psgrid; for instance \rput(0,0){\psgrid}
+                  didn't work.
+
+
+**************************************************************************************
+Version 1.6 - May 2nd 2006:
+
+WARNING: YOU MUST REPLACE THE FORMER 'Classic grid.ldp' OF THE TEMPLATES DIRECTORY BY THE NEW
+         'Classic grid.ldp' OF THE LaTeXDraw1.6_bin.zip.
+
+- fixed: several fields were exported to be localisable, while they should not to be (1);
+- fixed: polygon: borders was not updated when the thickness was changed;
+- fixed: problem when check the version of the preferences file;
+- fixed: grids did not rotate very when rotating several figures;
+- fixed: when paste, the scrollbars were not updated;
+- fixed: the grid was exported with the draw;
+- fixed: the packages  \usepackage{color} and \usepackage{pstricks} are replaced by
+          \usepackage[usenames,dvipsnames]{pstricks};
+- fixed: "move figure" was badly managed by the undo/redo manager;
+- fixed: a problem when resize several selected figures containing polygons or 
+          derived figures;
+- fixed: when loading a file, the delimiters of severals figures were not updated;
+- fixed: when paste, toolbar was still activated;
+- fixed: for rectangles, delimiters were not updated when paste;
+- fixed: for circles and ellipses, borders were not updated when the thickness changed;
+- fixed: toolbar was still activated when click in a empty place when searching a figure
+          to put behind/in front;
+- fixed: \caption{fig: is replaced by \caption{;
+- fixed: { and } were replaced by \string \{ ... So no command was possible;
+- fixed: the description of the draw was not saved (label, caption ,...);
+- fixed: when load a file with comments, the comments are too much '%';
+- fixed: the borders of the selection was not updated when pasted several texts;
+- fixed: not able to have French translation;
+- fixed: the borders of the texts and of the grids were not always updated -> bad
+          position of texts;
+- fixed: if a text was empty, you could not select it but it existed in the code panel;
+- fixed: problem in the management of the position of grids;
+- fixed: grids had not read/write stream methods (2);
+- fixed: when change a coordinate in a parameters frame and close the frame, the modified
+          figure is not updated whereas;
+- fixed: glimpse figures (rectangle, square, ..) were not updated when change their width, ...
+          in their parameters frame;
+- fixed: the grid was exported when exporting in eps;
+- fixed: in several cases, a figure does not rotate when the angle is 180°;
+- fixed: figures can move during the resizement of several polygons ;
+- fixed: the zoom was not managed when loading a file;
+- fixed: "dot-in" arrows change of position when the arrows is moved;
+- fixed: space between a double arrow must be like the arrows not like the line;
+- fixed: one of the doubles arrows for arc was not updated by the parameters of the arrow;
+- fixed: if the arrows are of the same kind, there parameters must be the same;
+- fixed: when you save a drawing and a figure is selected, it was hardly to unselect it;
+- fixed: it was possible to have an code for arrows like '{>>--}...' instead of '{>>-}';
+- fixed: space between two lines of an hatching was badly managed;
+- fixed: problem when copy/paste a rhombus or a triangle;
+- fixed: problem when editing points of rhombus/triangle with their frame of parameters;
+- fixed: scrollbars not updated when cut/delete the unique figure of a drawing; 
+- fixed: problem when resize several figures;
+- fixed: option "showpoints" was not save for arcs;
+- fixed: several minor bugs;
+- improvement: for dot, 'rput' is replaced by 'dotangle';
+- improvement: more shapes for arrows: )-( and ]-[ are managed;
+- improvement: better management of the arrowheads and the grids;
+- improvement: for rhombus, 'rput' is replaced by 'gangle';
+- improvement: can change the position of the labels of the grids;
+- improvement: CPU, memory, speed optimisation;
+- improvement: akin points code generator generates less points;
+- added: export as PNG;
+- added: export as BMP; 
+- added: export as PPM;
+- added: can insert pictures;
+- added: new figure, joined lines;
+- added: LaTeXDraw can be used to convert jpeg|png|wmf|bmp|ppm pictures in 
+          eps|jpeg|png|ppm pictures with a batch processing;
+- added: the LaTeXDraw manual;
+- added: import PSTricks code (PSTricks parser version 0.1);
+- added: can insert PSTricks code in a draw (use the PSTricks parser).
+
+
+- regression: if, you load a saved project with 1.5.1 or 1.5.1.1 , the language is 
+               French and several figures of the draw have doubles boundaries, then 
+               the position of the doubles boundaries will be always 'inner'; because 
+               of the bug (1);
+- regression: because of the bug (2), LaTeXDraw can not open file from 1.5.1.1 and older
+               with grids. By the same way, old templates with grids are not compatible with
+               LaTeXDraw 1.6.       
+
+
+**************************************************************************************
+Version 1.5.1.1 - January 28th 2006:
+
+- fixed: minor bug with the isModified attribute;
+- fixed: ellipse didn't rotate very well;
+- fixed: error during the read of templates: templates could not be loaded;
+- fixed: when put '%' in comments or in a text, it was considered as a start of a 
+          comment by the TeX parser;
+- fixed: when a '\' was in a text, the label, ... it was considered as a command;
+- fixed: an exception appeared during the selection of figures when the draw was empty;
+- fixed: display->grid was not updated when change the unit of length (always in cm);
+- fixed: an exception occurred when drawing a triangle;
+- fixed: borders could not move;
+- fixed: problem when clicking on a triangle or on a rhombus;
+- fixed: problem when change a triangle or a rhombus;
+- fixed: the rectangle was not updated when dragging one of these delimiters;
+- fixed: polygon generate now a pspolygon, not a psline;
+- fixed: error when testing the version of the software.
+
+
+
+**************************************************************************************
+Version 1.5.1 - January 20th 2006:
+
+- fixed: figure id could be as big as 12982109 for example;
+- fixed: params button was active when several figures were selected;
+- fixed: the rotation of several selected or joined figures didn't
+          rotated the gravity centre of these figures;
+- fixed: error when shifting a triangle or a rhombus (shift method
+          not overridden);
+- fixed: a dotted line began before the first point;
+- fixed: the delimiters of a square could not be selected (pb in isIn);
+- fixed: isModified was activated when we confirmed preferences frame;
+- fixed: a problem when loading a template from former version;
+- fixed: arc choice created a problem of display in the parameters frame;
+- fixed: cut/paste managed in the undo/redo;
+- fixed: cut figures didn't remove them from the selection;
+- fixed: change cm to inch, didn't update the scales;
+- fixed: an error when initialise components of the square parameters frame;
+- fixed: dble boundaries weren't filled very well with round rectangle/square;
+- fixed: getBorders(..) not overridden in the class BézierCurve;
+- fixed: menu "export as template" was never activated;
+- improvement: better rotation of the figures;
+- improvement: CPU, memory, speed optimisation;
+- improvement: better management of the resizing of rotated figures;
+- added: can check new version;
+- added: status bar;
+- added: support localisation;
+- added: new localisation, French.
+
+
+**************************************************************************************
+Version 1.5 - January 13th 2006:
+
+- fixed: bug in intersect method;
+- fixed: bug with the default button in the parameters frames;
+- fixed: when we click the button default during the creation of a text or a
+          grid, the figure wasn't deleted;
+- fixed: bug when saving parameters of a line in the parameters frame;
+- fixed: problem with the rescale methods;
+- fixed: minor bug in the code generation methods with the interior colour;
+- fixed: an horizontal line cannot be selected with the rectangle selector;
+- fixed: in the draw method of ArrowHead; round bracket used wrong attribute;
+- fixed: bugs in the ArrowHead code generator method;
+- fixed: bug in the arc code generator method;
+- fixed: problem when resize several figures containing at least a non-resizable
+          figure like grid or text;
+- fixed: problem during the first selection akin points: the borders were wrong;
+- fixed: problem when resize several figures after a rotation;
+- fixed: wrong management of the bounds of the figures;
+- fixed: North-East-South-West rectangle's delimiters where managed with squares;
+- fixed: problem of approximations in the code generator methods: values 
+          like 10E-4 could appeared;
+- fixed: problem when drawing a line, in the setLastPoint method;
+- fixed: a bug in the method line.findPoints(Point p, double distance) with 
+          horizontal line; 
+- fixed: in the method Figure.getBordersPoint(int), if id=-1, the function didn't 
+          return the good point;
+- fixed: It was possible to create a polygon with 2 points; it's not the goal of 
+          a polygon but a line;
+- fixed: with wedge and pie, the interiors line were not managed in the isIn method;
+- fixed: the borders of a text were too small;
+- fixed: when launch a new project, the name of the former project still remain;
+- fixed: print draw: if several figures were selected, they weren't printed;
+- fixed: print draw: zoom was activated;
+- fixed: when export as PSTricks, the code was not updated;
+- fixed: Delimiter write method didn't save the dimension of the delimiter;
+- fixed: PSTricks position of a text was wrong;
+- fixed: error when redo;
+- fixed: the draw method of a dot didn't display round shape well;
+- fixed: bug with links in the help frame;
+- fixed: Figure class could not be deserialisable;
+- fixed: several minor bugs;
+- improvement: new icons;
+- improvement: improvement of the exceptions management;
+- improvement: changes in the parameters toolbar;
+- improvement: use of spinners;
+- improvement: new kind of buttons;
+- improvement: code optimisations (thanks to Eclipse);
+- improvement: a lots of more parameters for figures;
+- improvement: "showpoints" function is now enable for arc;
+- improvement: arrowheads for arc;
+- improvement: the PSTricks code is updated only on the mouse released (speed 
+                optimisation);
+- added: a panel is into the parameters frames in order to have a glimpse
+          of the modified figure;
+- added: new figure, grid;
+- added: hatching management;
+- added: can join/separate several figures;
+- added: can create and import patterns (groups of figures) ;
+- added: new figure, Bézier curve;
+- added: a frame for the properties of the draw: can add label, caption, position;
+- added: double boundary;
+- added: the borders of the figures can be in the position "inner", "outer" or "middle";
+- added: a button in the codepanel in order to close the panel;
+- added: a button to copy all the text and one to copy the selected text in the clipboard.
+
+
+**************************************************************************************
+Version 1.0.2 - 10/22/2005:
+
+- TeXDraw is now LaTeXDraw
+- fixed: bug in the polygon code generation method
+- fixed: bug in all code generation methods
+- fixed: bug in the ellipse, circle, arc code generation methods
+
+
+
+**************************************************************************************
+Version 1.0.1 - 10/10/2005: 
+
+- fixed: bug with isModified attribute
+- fixed: a possible bug with open/save actions
diff --git a/current/res/Arc.png b/current/res/Arc.png
new file mode 100644
index 0000000..6c1dc01
Binary files /dev/null and b/current/res/Arc.png differ
diff --git a/current/res/AutoBorders.png b/current/res/AutoBorders.png
new file mode 100644
index 0000000..78e7b37
Binary files /dev/null and b/current/res/AutoBorders.png differ
diff --git a/current/res/BezierCurves/closeCurve.png b/current/res/BezierCurves/closeCurve.png
new file mode 100644
index 0000000..86e44f6
Binary files /dev/null and b/current/res/BezierCurves/closeCurve.png differ
diff --git a/current/res/BezierCurves/closeLine.png b/current/res/BezierCurves/closeLine.png
new file mode 100644
index 0000000..3edeac7
Binary files /dev/null and b/current/res/BezierCurves/closeLine.png differ
diff --git a/current/res/Bold.png b/current/res/Bold.png
new file mode 100644
index 0000000..7166e3d
Binary files /dev/null and b/current/res/Bold.png differ
diff --git a/current/res/Copy.png b/current/res/Copy.png
new file mode 100644
index 0000000..345b2f1
Binary files /dev/null and b/current/res/Copy.png differ
diff --git a/current/res/CopySel.png b/current/res/CopySel.png
new file mode 100644
index 0000000..e6331c6
Binary files /dev/null and b/current/res/CopySel.png differ
diff --git a/current/res/Cut.png b/current/res/Cut.png
new file mode 100644
index 0000000..7017d1b
Binary files /dev/null and b/current/res/Cut.png differ
diff --git a/current/res/Draw.png b/current/res/Draw.png
new file mode 100644
index 0000000..eb40211
Binary files /dev/null and b/current/res/Draw.png differ
diff --git a/current/res/InFrontSelect.png b/current/res/InFrontSelect.png
new file mode 100644
index 0000000..f1f9ae2
Binary files /dev/null and b/current/res/InFrontSelect.png differ
diff --git a/current/res/Italic.png b/current/res/Italic.png
new file mode 100644
index 0000000..ef68fb3
Binary files /dev/null and b/current/res/Italic.png differ
diff --git a/current/res/LaTeXDrawIcon.png b/current/res/LaTeXDrawIcon.png
new file mode 100644
index 0000000..b8015c2
Binary files /dev/null and b/current/res/LaTeXDrawIcon.png differ
diff --git a/current/res/LaTeXDrawSmall.png b/current/res/LaTeXDrawSmall.png
new file mode 100644
index 0000000..8aabfc4
Binary files /dev/null and b/current/res/LaTeXDrawSmall.png differ
diff --git a/current/res/Magnify.png b/current/res/Magnify.png
new file mode 100644
index 0000000..40b1b9a
Binary files /dev/null and b/current/res/Magnify.png differ
diff --git a/current/res/MagnifyMinus.png b/current/res/MagnifyMinus.png
new file mode 100644
index 0000000..923d2f8
Binary files /dev/null and b/current/res/MagnifyMinus.png differ
diff --git a/current/res/MagnifyPlus.png b/current/res/MagnifyPlus.png
new file mode 100644
index 0000000..0c8c8fa
Binary files /dev/null and b/current/res/MagnifyPlus.png differ
diff --git a/current/res/New.png b/current/res/New.png
new file mode 100644
index 0000000..e3808a1
Binary files /dev/null and b/current/res/New.png differ
diff --git a/current/res/Object.png b/current/res/Object.png
new file mode 100644
index 0000000..5881571
Binary files /dev/null and b/current/res/Object.png differ
diff --git a/current/res/Paste.png b/current/res/Paste.png
new file mode 100644
index 0000000..f6a625c
Binary files /dev/null and b/current/res/Paste.png differ
diff --git a/current/res/Print.png b/current/res/Print.png
new file mode 100644
index 0000000..52dd67e
Binary files /dev/null and b/current/res/Print.png differ
diff --git a/current/res/Redo.png b/current/res/Redo.png
new file mode 100644
index 0000000..576cfc7
Binary files /dev/null and b/current/res/Redo.png differ
diff --git a/current/res/Undo.png b/current/res/Undo.png
new file mode 100644
index 0000000..f37c696
Binary files /dev/null and b/current/res/Undo.png differ
diff --git a/current/res/align/alignBottom.png b/current/res/align/alignBottom.png
new file mode 100644
index 0000000..b4c02ec
Binary files /dev/null and b/current/res/align/alignBottom.png differ
diff --git a/current/res/align/alignLeft.png b/current/res/align/alignLeft.png
new file mode 100644
index 0000000..df8b85c
Binary files /dev/null and b/current/res/align/alignLeft.png differ
diff --git a/current/res/align/alignMiddleHoriz.png b/current/res/align/alignMiddleHoriz.png
new file mode 100644
index 0000000..1eaf329
Binary files /dev/null and b/current/res/align/alignMiddleHoriz.png differ
diff --git a/current/res/align/alignMiddleVert.png b/current/res/align/alignMiddleVert.png
new file mode 100644
index 0000000..8582ba9
Binary files /dev/null and b/current/res/align/alignMiddleVert.png differ
diff --git a/current/res/align/alignRight.png b/current/res/align/alignRight.png
new file mode 100644
index 0000000..5c83963
Binary files /dev/null and b/current/res/align/alignRight.png differ
diff --git a/current/res/align/alignTop.png b/current/res/align/alignTop.png
new file mode 100644
index 0000000..d26dda4
Binary files /dev/null and b/current/res/align/alignTop.png differ
diff --git a/current/res/arrowStyles/line.arc.left.png b/current/res/arrowStyles/line.arc.left.png
new file mode 100644
index 0000000..75c9137
Binary files /dev/null and b/current/res/arrowStyles/line.arc.left.png differ
diff --git a/current/res/arrowStyles/line.arc.r.left.png b/current/res/arrowStyles/line.arc.r.left.png
new file mode 100644
index 0000000..1801504
Binary files /dev/null and b/current/res/arrowStyles/line.arc.r.left.png differ
diff --git a/current/res/arrowStyles/line.arc.r.right.png b/current/res/arrowStyles/line.arc.r.right.png
new file mode 100644
index 0000000..e2ed070
Binary files /dev/null and b/current/res/arrowStyles/line.arc.r.right.png differ
diff --git a/current/res/arrowStyles/line.arc.right.png b/current/res/arrowStyles/line.arc.right.png
new file mode 100644
index 0000000..cbf3592
Binary files /dev/null and b/current/res/arrowStyles/line.arc.right.png differ
diff --git a/current/res/arrowStyles/line.arrow.left.png b/current/res/arrowStyles/line.arrow.left.png
new file mode 100644
index 0000000..0e4da73
Binary files /dev/null and b/current/res/arrowStyles/line.arrow.left.png differ
diff --git a/current/res/arrowStyles/line.arrow.right.png b/current/res/arrowStyles/line.arrow.right.png
new file mode 100644
index 0000000..715c9bf
Binary files /dev/null and b/current/res/arrowStyles/line.arrow.right.png differ
diff --git a/current/res/arrowStyles/line.barEnd.left.png b/current/res/arrowStyles/line.barEnd.left.png
new file mode 100644
index 0000000..14bd2de
Binary files /dev/null and b/current/res/arrowStyles/line.barEnd.left.png differ
diff --git a/current/res/arrowStyles/line.barEnd.right.png b/current/res/arrowStyles/line.barEnd.right.png
new file mode 100644
index 0000000..9d93bb8
Binary files /dev/null and b/current/res/arrowStyles/line.barEnd.right.png differ
diff --git a/current/res/arrowStyles/line.barIn.left.png b/current/res/arrowStyles/line.barIn.left.png
new file mode 100644
index 0000000..20a7b34
Binary files /dev/null and b/current/res/arrowStyles/line.barIn.left.png differ
diff --git a/current/res/arrowStyles/line.barIn.right.png b/current/res/arrowStyles/line.barIn.right.png
new file mode 100644
index 0000000..76269e8
Binary files /dev/null and b/current/res/arrowStyles/line.barIn.right.png differ
diff --git a/current/res/arrowStyles/line.bracket.left.png b/current/res/arrowStyles/line.bracket.left.png
new file mode 100644
index 0000000..3e0ff6e
Binary files /dev/null and b/current/res/arrowStyles/line.bracket.left.png differ
diff --git a/current/res/arrowStyles/line.bracket.r.left.png b/current/res/arrowStyles/line.bracket.r.left.png
new file mode 100644
index 0000000..a74cad4
Binary files /dev/null and b/current/res/arrowStyles/line.bracket.r.left.png differ
diff --git a/current/res/arrowStyles/line.bracket.r.right.png b/current/res/arrowStyles/line.bracket.r.right.png
new file mode 100644
index 0000000..8fb7242
Binary files /dev/null and b/current/res/arrowStyles/line.bracket.r.right.png differ
diff --git a/current/res/arrowStyles/line.bracket.right.png b/current/res/arrowStyles/line.bracket.right.png
new file mode 100644
index 0000000..9a8b06c
Binary files /dev/null and b/current/res/arrowStyles/line.bracket.right.png differ
diff --git a/current/res/arrowStyles/line.circle.end.left.png b/current/res/arrowStyles/line.circle.end.left.png
new file mode 100644
index 0000000..b1748c8
Binary files /dev/null and b/current/res/arrowStyles/line.circle.end.left.png differ
diff --git a/current/res/arrowStyles/line.circle.end.right.png b/current/res/arrowStyles/line.circle.end.right.png
new file mode 100644
index 0000000..b310e47
Binary files /dev/null and b/current/res/arrowStyles/line.circle.end.right.png differ
diff --git a/current/res/arrowStyles/line.circle.in.left.png b/current/res/arrowStyles/line.circle.in.left.png
new file mode 100644
index 0000000..55a7c36
Binary files /dev/null and b/current/res/arrowStyles/line.circle.in.left.png differ
diff --git a/current/res/arrowStyles/line.circle.in.right.png b/current/res/arrowStyles/line.circle.in.right.png
new file mode 100644
index 0000000..aabfe1f
Binary files /dev/null and b/current/res/arrowStyles/line.circle.in.right.png differ
diff --git a/current/res/arrowStyles/line.dbleArrow.left.png b/current/res/arrowStyles/line.dbleArrow.left.png
new file mode 100644
index 0000000..29342ff
Binary files /dev/null and b/current/res/arrowStyles/line.dbleArrow.left.png differ
diff --git a/current/res/arrowStyles/line.dbleArrow.right.png b/current/res/arrowStyles/line.dbleArrow.right.png
new file mode 100644
index 0000000..9d15e43
Binary files /dev/null and b/current/res/arrowStyles/line.dbleArrow.right.png differ
diff --git a/current/res/arrowStyles/line.disk.end.left.png b/current/res/arrowStyles/line.disk.end.left.png
new file mode 100644
index 0000000..f292816
Binary files /dev/null and b/current/res/arrowStyles/line.disk.end.left.png differ
diff --git a/current/res/arrowStyles/line.disk.end.right.png b/current/res/arrowStyles/line.disk.end.right.png
new file mode 100644
index 0000000..fa4f397
Binary files /dev/null and b/current/res/arrowStyles/line.disk.end.right.png differ
diff --git a/current/res/arrowStyles/line.disk.in.left.png b/current/res/arrowStyles/line.disk.in.left.png
new file mode 100644
index 0000000..6ca65b6
Binary files /dev/null and b/current/res/arrowStyles/line.disk.in.left.png differ
diff --git a/current/res/arrowStyles/line.disk.in.right.png b/current/res/arrowStyles/line.disk.in.right.png
new file mode 100644
index 0000000..981e6f1
Binary files /dev/null and b/current/res/arrowStyles/line.disk.in.right.png differ
diff --git a/current/res/arrowStyles/line.none.left.png b/current/res/arrowStyles/line.none.left.png
new file mode 100644
index 0000000..f8a6c9f
Binary files /dev/null and b/current/res/arrowStyles/line.none.left.png differ
diff --git a/current/res/arrowStyles/line.none.right.png b/current/res/arrowStyles/line.none.right.png
new file mode 100644
index 0000000..d651846
Binary files /dev/null and b/current/res/arrowStyles/line.none.right.png differ
diff --git a/current/res/arrowStyles/line.rarrow.left.png b/current/res/arrowStyles/line.rarrow.left.png
new file mode 100644
index 0000000..683ae18
Binary files /dev/null and b/current/res/arrowStyles/line.rarrow.left.png differ
diff --git a/current/res/arrowStyles/line.rarrow.right.png b/current/res/arrowStyles/line.rarrow.right.png
new file mode 100644
index 0000000..afa4821
Binary files /dev/null and b/current/res/arrowStyles/line.rarrow.right.png differ
diff --git a/current/res/arrowStyles/line.rdbleArrow.left.png b/current/res/arrowStyles/line.rdbleArrow.left.png
new file mode 100644
index 0000000..d47a3a8
Binary files /dev/null and b/current/res/arrowStyles/line.rdbleArrow.left.png differ
diff --git a/current/res/arrowStyles/line.rdbleArrow.right.png b/current/res/arrowStyles/line.rdbleArrow.right.png
new file mode 100644
index 0000000..801f838
Binary files /dev/null and b/current/res/arrowStyles/line.rdbleArrow.right.png differ
diff --git a/current/res/arrowStyles/line.roundIn.left.png b/current/res/arrowStyles/line.roundIn.left.png
new file mode 100644
index 0000000..0f5850a
Binary files /dev/null and b/current/res/arrowStyles/line.roundIn.left.png differ
diff --git a/current/res/arrowStyles/line.roundIn.right.png b/current/res/arrowStyles/line.roundIn.right.png
new file mode 100644
index 0000000..8d1af48
Binary files /dev/null and b/current/res/arrowStyles/line.roundIn.right.png differ
diff --git a/current/res/axes.png b/current/res/axes.png
new file mode 100644
index 0000000..e34c29c
Binary files /dev/null and b/current/res/axes.png differ
diff --git a/current/res/background.png b/current/res/background.png
new file mode 100644
index 0000000..0da9faa
Binary files /dev/null and b/current/res/background.png differ
diff --git a/current/res/behindSelect.png b/current/res/behindSelect.png
new file mode 100644
index 0000000..1a923f2
Binary files /dev/null and b/current/res/behindSelect.png differ
diff --git a/current/res/bezierCurve.png b/current/res/bezierCurve.png
new file mode 100644
index 0000000..7dd402e
Binary files /dev/null and b/current/res/bezierCurve.png differ
diff --git a/current/res/chord.png b/current/res/chord.png
new file mode 100644
index 0000000..8242f81
Binary files /dev/null and b/current/res/chord.png differ
diff --git a/current/res/circle.png b/current/res/circle.png
new file mode 100644
index 0000000..58254ad
Binary files /dev/null and b/current/res/circle.png differ
diff --git a/current/res/closeIn.png b/current/res/closeIn.png
new file mode 100644
index 0000000..3d2e50e
Binary files /dev/null and b/current/res/closeIn.png differ
diff --git a/current/res/closeOut.png b/current/res/closeOut.png
new file mode 100644
index 0000000..7eaebce
Binary files /dev/null and b/current/res/closeOut.png differ
diff --git a/current/res/closedBezier.png b/current/res/closedBezier.png
new file mode 100644
index 0000000..c55e9a4
Binary files /dev/null and b/current/res/closedBezier.png differ
diff --git a/current/res/comment.png b/current/res/comment.png
new file mode 100644
index 0000000..5d7c0db
Binary files /dev/null and b/current/res/comment.png differ
diff --git a/current/res/cursors/RotCWDown.gif b/current/res/cursors/RotCWDown.gif
new file mode 100644
index 0000000..dbb390c
Binary files /dev/null and b/current/res/cursors/RotCWDown.gif differ
diff --git a/current/res/del.png b/current/res/del.png
new file mode 100644
index 0000000..0faea32
Binary files /dev/null and b/current/res/del.png differ
diff --git a/current/res/delimitor.png b/current/res/delimitor.png
new file mode 100644
index 0000000..c30b597
Binary files /dev/null and b/current/res/delimitor.png differ
diff --git a/current/res/dialog-warning.png b/current/res/dialog-warning.png
new file mode 100644
index 0000000..45b64a7
Binary files /dev/null and b/current/res/dialog-warning.png differ
diff --git a/current/res/displayGrid.png b/current/res/displayGrid.png
new file mode 100644
index 0000000..6b1324e
Binary files /dev/null and b/current/res/displayGrid.png differ
diff --git a/current/res/distrib/distHorizEqual.png b/current/res/distrib/distHorizEqual.png
new file mode 100644
index 0000000..b369ea9
Binary files /dev/null and b/current/res/distrib/distHorizEqual.png differ
diff --git a/current/res/distrib/distHorizLeft.png b/current/res/distrib/distHorizLeft.png
new file mode 100644
index 0000000..30fd539
Binary files /dev/null and b/current/res/distrib/distHorizLeft.png differ
diff --git a/current/res/distrib/distHorizMiddle.png b/current/res/distrib/distHorizMiddle.png
new file mode 100644
index 0000000..5fbec17
Binary files /dev/null and b/current/res/distrib/distHorizMiddle.png differ
diff --git a/current/res/distrib/distHorizRight.png b/current/res/distrib/distHorizRight.png
new file mode 100644
index 0000000..387a8a3
Binary files /dev/null and b/current/res/distrib/distHorizRight.png differ
diff --git a/current/res/distrib/distVertBottom.png b/current/res/distrib/distVertBottom.png
new file mode 100644
index 0000000..62baed5
Binary files /dev/null and b/current/res/distrib/distVertBottom.png differ
diff --git a/current/res/distrib/distVertEqual.png b/current/res/distrib/distVertEqual.png
new file mode 100644
index 0000000..b4b0ac2
Binary files /dev/null and b/current/res/distrib/distVertEqual.png differ
diff --git a/current/res/distrib/distVertMiddle.png b/current/res/distrib/distVertMiddle.png
new file mode 100644
index 0000000..c3ce99c
Binary files /dev/null and b/current/res/distrib/distVertMiddle.png differ
diff --git a/current/res/distrib/distVertTop.png b/current/res/distrib/distVertTop.png
new file mode 100644
index 0000000..b814a96
Binary files /dev/null and b/current/res/distrib/distVertTop.png differ
diff --git a/current/res/document-open.png b/current/res/document-open.png
new file mode 100644
index 0000000..7c4ee79
Binary files /dev/null and b/current/res/document-open.png differ
diff --git a/current/res/document-properties.png b/current/res/document-properties.png
new file mode 100644
index 0000000..a5ad728
Binary files /dev/null and b/current/res/document-properties.png differ
diff --git a/current/res/document-save-as.png b/current/res/document-save-as.png
new file mode 100644
index 0000000..340a87e
Binary files /dev/null and b/current/res/document-save-as.png differ
diff --git a/current/res/document-save.png b/current/res/document-save.png
new file mode 100644
index 0000000..a94e0ea
Binary files /dev/null and b/current/res/document-save.png differ
diff --git a/current/res/dot.png b/current/res/dot.png
new file mode 100644
index 0000000..1d445d1
Binary files /dev/null and b/current/res/dot.png differ
diff --git a/current/res/dotStyles/dot.asterisk.png b/current/res/dotStyles/dot.asterisk.png
new file mode 100644
index 0000000..4ffd9cb
Binary files /dev/null and b/current/res/dotStyles/dot.asterisk.png differ
diff --git a/current/res/dotStyles/dot.bar.png b/current/res/dotStyles/dot.bar.png
new file mode 100644
index 0000000..be6821a
Binary files /dev/null and b/current/res/dotStyles/dot.bar.png differ
diff --git a/current/res/dotStyles/dot.cross.png b/current/res/dotStyles/dot.cross.png
new file mode 100644
index 0000000..6f4346e
Binary files /dev/null and b/current/res/dotStyles/dot.cross.png differ
diff --git a/current/res/dotStyles/dot.diamond.png b/current/res/dotStyles/dot.diamond.png
new file mode 100644
index 0000000..cf4bc0f
Binary files /dev/null and b/current/res/dotStyles/dot.diamond.png differ
diff --git a/current/res/dotStyles/dot.diamondF.png b/current/res/dotStyles/dot.diamondF.png
new file mode 100644
index 0000000..5f74a0d
Binary files /dev/null and b/current/res/dotStyles/dot.diamondF.png differ
diff --git a/current/res/dotStyles/dot.none.png b/current/res/dotStyles/dot.none.png
new file mode 100644
index 0000000..17e9462
Binary files /dev/null and b/current/res/dotStyles/dot.none.png differ
diff --git a/current/res/dotStyles/dot.o.png b/current/res/dotStyles/dot.o.png
new file mode 100644
index 0000000..66e4f44
Binary files /dev/null and b/current/res/dotStyles/dot.o.png differ
diff --git a/current/res/dotStyles/dot.ocross.png b/current/res/dotStyles/dot.ocross.png
new file mode 100644
index 0000000..5010f08
Binary files /dev/null and b/current/res/dotStyles/dot.ocross.png differ
diff --git a/current/res/dotStyles/dot.oplus.png b/current/res/dotStyles/dot.oplus.png
new file mode 100644
index 0000000..484b6e4
Binary files /dev/null and b/current/res/dotStyles/dot.oplus.png differ
diff --git a/current/res/dotStyles/dot.pentagon.png b/current/res/dotStyles/dot.pentagon.png
new file mode 100644
index 0000000..414633a
Binary files /dev/null and b/current/res/dotStyles/dot.pentagon.png differ
diff --git a/current/res/dotStyles/dot.pentagonF.png b/current/res/dotStyles/dot.pentagonF.png
new file mode 100644
index 0000000..d6b7e00
Binary files /dev/null and b/current/res/dotStyles/dot.pentagonF.png differ
diff --git a/current/res/dotStyles/dot.plus.png b/current/res/dotStyles/dot.plus.png
new file mode 100644
index 0000000..b53b0ae
Binary files /dev/null and b/current/res/dotStyles/dot.plus.png differ
diff --git a/current/res/dotStyles/dot.square.png b/current/res/dotStyles/dot.square.png
new file mode 100644
index 0000000..6fa0dbb
Binary files /dev/null and b/current/res/dotStyles/dot.square.png differ
diff --git a/current/res/dotStyles/dot.squareF.png b/current/res/dotStyles/dot.squareF.png
new file mode 100644
index 0000000..7295fcf
Binary files /dev/null and b/current/res/dotStyles/dot.squareF.png differ
diff --git a/current/res/dotStyles/dot.triangle.png b/current/res/dotStyles/dot.triangle.png
new file mode 100644
index 0000000..0efdbb6
Binary files /dev/null and b/current/res/dotStyles/dot.triangle.png differ
diff --git a/current/res/dotStyles/dot.triangleF.png b/current/res/dotStyles/dot.triangleF.png
new file mode 100644
index 0000000..5c674cb
Binary files /dev/null and b/current/res/dotStyles/dot.triangleF.png differ
diff --git a/current/res/doubleBoundary/double.boundary.inner.png b/current/res/doubleBoundary/double.boundary.inner.png
new file mode 100644
index 0000000..3ad9366
Binary files /dev/null and b/current/res/doubleBoundary/double.boundary.inner.png differ
diff --git a/current/res/doubleBoundary/double.boundary.middle.png b/current/res/doubleBoundary/double.boundary.middle.png
new file mode 100644
index 0000000..a4336f7
Binary files /dev/null and b/current/res/doubleBoundary/double.boundary.middle.png differ
diff --git a/current/res/doubleBoundary/double.boundary.outer.png b/current/res/doubleBoundary/double.boundary.outer.png
new file mode 100644
index 0000000..a2159a3
Binary files /dev/null and b/current/res/doubleBoundary/double.boundary.outer.png differ
diff --git a/current/res/ellipse.png b/current/res/ellipse.png
new file mode 100644
index 0000000..37a9bca
Binary files /dev/null and b/current/res/ellipse.png differ
diff --git a/current/res/emblem-important.png b/current/res/emblem-important.png
new file mode 100644
index 0000000..0437a0d
Binary files /dev/null and b/current/res/emblem-important.png differ
diff --git a/current/res/emblem-unreadable.png b/current/res/emblem-unreadable.png
new file mode 100644
index 0000000..372e427
Binary files /dev/null and b/current/res/emblem-unreadable.png differ
diff --git a/current/res/empty.png b/current/res/empty.png
new file mode 100644
index 0000000..7e61fe0
Binary files /dev/null and b/current/res/empty.png differ
diff --git a/current/res/foreground.png b/current/res/foreground.png
new file mode 100644
index 0000000..803adce
Binary files /dev/null and b/current/res/foreground.png differ
diff --git a/current/res/freehand/curve.png b/current/res/freehand/curve.png
new file mode 100644
index 0000000..cd379b9
Binary files /dev/null and b/current/res/freehand/curve.png differ
diff --git a/current/res/freehand/line.png b/current/res/freehand/line.png
new file mode 100644
index 0000000..236ebb6
Binary files /dev/null and b/current/res/freehand/line.png differ
diff --git a/current/res/go-next.png b/current/res/go-next.png
new file mode 100644
index 0000000..6f3f65d
Binary files /dev/null and b/current/res/go-next.png differ
diff --git a/current/res/go-previous.png b/current/res/go-previous.png
new file mode 100644
index 0000000..93be3d1
Binary files /dev/null and b/current/res/go-previous.png differ
diff --git a/current/res/grid.png b/current/res/grid.png
new file mode 100644
index 0000000..4b2d327
Binary files /dev/null and b/current/res/grid.png differ
diff --git a/current/res/gridGap.png b/current/res/gridGap.png
new file mode 100644
index 0000000..534e7c9
Binary files /dev/null and b/current/res/gridGap.png differ
diff --git a/current/res/hatch/gradient.png b/current/res/hatch/gradient.png
new file mode 100644
index 0000000..f634cf1
Binary files /dev/null and b/current/res/hatch/gradient.png differ
diff --git a/current/res/hatch/hatch.cross.png b/current/res/hatch/hatch.cross.png
new file mode 100644
index 0000000..2e545fe
Binary files /dev/null and b/current/res/hatch/hatch.cross.png differ
diff --git a/current/res/hatch/hatch.horiz.png b/current/res/hatch/hatch.horiz.png
new file mode 100644
index 0000000..8097d07
Binary files /dev/null and b/current/res/hatch/hatch.horiz.png differ
diff --git a/current/res/hatch/hatch.none.png b/current/res/hatch/hatch.none.png
new file mode 100644
index 0000000..e3f3baf
Binary files /dev/null and b/current/res/hatch/hatch.none.png differ
diff --git a/current/res/hatch/hatch.vert.png b/current/res/hatch/hatch.vert.png
new file mode 100644
index 0000000..8d53d4c
Binary files /dev/null and b/current/res/hatch/hatch.vert.png differ
diff --git a/current/res/help-browser.png b/current/res/help-browser.png
new file mode 100644
index 0000000..c67c7a6
Binary files /dev/null and b/current/res/help-browser.png differ
diff --git a/current/res/image-x-generic.png b/current/res/image-x-generic.png
new file mode 100644
index 0000000..10f4671
Binary files /dev/null and b/current/res/image-x-generic.png differ
diff --git a/current/res/join.png b/current/res/join.png
new file mode 100644
index 0000000..4e05605
Binary files /dev/null and b/current/res/join.png differ
diff --git a/current/res/joinedLines.png b/current/res/joinedLines.png
new file mode 100644
index 0000000..fcfc4e9
Binary files /dev/null and b/current/res/joinedLines.png differ
diff --git a/current/res/line.png b/current/res/line.png
new file mode 100644
index 0000000..f7e0463
Binary files /dev/null and b/current/res/line.png differ
diff --git a/current/res/lineStyles/lineStyle.dashed.png b/current/res/lineStyles/lineStyle.dashed.png
new file mode 100644
index 0000000..68da3c8
Binary files /dev/null and b/current/res/lineStyles/lineStyle.dashed.png differ
diff --git a/current/res/lineStyles/lineStyle.dotted.png b/current/res/lineStyles/lineStyle.dotted.png
new file mode 100644
index 0000000..ff12b55
Binary files /dev/null and b/current/res/lineStyles/lineStyle.dotted.png differ
diff --git a/current/res/lineStyles/lineStyle.none.png b/current/res/lineStyles/lineStyle.none.png
new file mode 100644
index 0000000..907402e
Binary files /dev/null and b/current/res/lineStyles/lineStyle.none.png differ
diff --git a/current/res/list-add.png b/current/res/list-add.png
new file mode 100644
index 0000000..306d3d8
Binary files /dev/null and b/current/res/list-add.png differ
diff --git a/current/res/list-remove.png b/current/res/list-remove.png
new file mode 100644
index 0000000..45e5c2a
Binary files /dev/null and b/current/res/list-remove.png differ
diff --git a/current/res/mirrorH.png b/current/res/mirrorH.png
new file mode 100644
index 0000000..6bd1d7d
Binary files /dev/null and b/current/res/mirrorH.png differ
diff --git a/current/res/mirrorV.png b/current/res/mirrorV.png
new file mode 100644
index 0000000..c108e58
Binary files /dev/null and b/current/res/mirrorV.png differ
diff --git a/current/res/ok.png b/current/res/ok.png
new file mode 100644
index 0000000..1740c85
Binary files /dev/null and b/current/res/ok.png differ
diff --git a/current/res/parabola.png b/current/res/parabola.png
new file mode 100644
index 0000000..718197c
Binary files /dev/null and b/current/res/parabola.png differ
diff --git a/current/res/pdf.png b/current/res/pdf.png
new file mode 100644
index 0000000..601fa8b
Binary files /dev/null and b/current/res/pdf.png differ
diff --git a/current/res/polygon.png b/current/res/polygon.png
new file mode 100644
index 0000000..374a6e0
Binary files /dev/null and b/current/res/polygon.png differ
diff --git a/current/res/preferences-desktop-theme.png b/current/res/preferences-desktop-theme.png
new file mode 100644
index 0000000..8dcce37
Binary files /dev/null and b/current/res/preferences-desktop-theme.png differ
diff --git a/current/res/preferences-system.png b/current/res/preferences-system.png
new file mode 100644
index 0000000..cc91d65
Binary files /dev/null and b/current/res/preferences-system.png differ
diff --git a/current/res/rectangle.png b/current/res/rectangle.png
new file mode 100644
index 0000000..ff71395
Binary files /dev/null and b/current/res/rectangle.png differ
diff --git a/current/res/rhombus.png b/current/res/rhombus.png
new file mode 100644
index 0000000..35d7a01
Binary files /dev/null and b/current/res/rhombus.png differ
diff --git a/current/res/rotation.png b/current/res/rotation.png
new file mode 100644
index 0000000..1882c97
Binary files /dev/null and b/current/res/rotation.png differ
diff --git a/current/res/rotation180.png b/current/res/rotation180.png
new file mode 100644
index 0000000..c499c14
Binary files /dev/null and b/current/res/rotation180.png differ
diff --git a/current/res/rotation270.png b/current/res/rotation270.png
new file mode 100644
index 0000000..7cd6d09
Binary files /dev/null and b/current/res/rotation270.png differ
diff --git a/current/res/rotation90.png b/current/res/rotation90.png
new file mode 100644
index 0000000..ba61145
Binary files /dev/null and b/current/res/rotation90.png differ
diff --git a/current/res/select.png b/current/res/select.png
new file mode 100644
index 0000000..dfc889a
Binary files /dev/null and b/current/res/select.png differ
diff --git a/current/res/separate.png b/current/res/separate.png
new file mode 100644
index 0000000..3065445
Binary files /dev/null and b/current/res/separate.png differ
diff --git a/current/res/square.png b/current/res/square.png
new file mode 100644
index 0000000..a15906f
Binary files /dev/null and b/current/res/square.png differ
diff --git a/current/res/stop.png b/current/res/stop.png
new file mode 100644
index 0000000..0459da0
Binary files /dev/null and b/current/res/stop.png differ
diff --git a/current/res/system-software-update.png b/current/res/system-software-update.png
new file mode 100644
index 0000000..5f7a362
Binary files /dev/null and b/current/res/system-software-update.png differ
diff --git a/current/res/texEditor.png b/current/res/texEditor.png
new file mode 100644
index 0000000..23deb61
Binary files /dev/null and b/current/res/texEditor.png differ
diff --git a/current/res/text-x-generic.png b/current/res/text-x-generic.png
new file mode 100644
index 0000000..d68a56c
Binary files /dev/null and b/current/res/text-x-generic.png differ
diff --git a/current/res/text.png b/current/res/text.png
new file mode 100644
index 0000000..009d073
Binary files /dev/null and b/current/res/text.png differ
diff --git a/current/res/thickness.png b/current/res/thickness.png
new file mode 100644
index 0000000..bacde3f
Binary files /dev/null and b/current/res/thickness.png differ
diff --git a/current/res/translators.txt b/current/res/translators.txt
new file mode 100644
index 0000000..0c849f2
--- /dev/null
+++ b/current/res/translators.txt
@@ -0,0 +1,9 @@
+Spanish     : Ruben Agapito, Juan Pablo García, Manel Velasco, Luis J. Claros, 
+German      : Lukas Woodtli, Data, maar7, mm
+French      : Arnaud Blouin, Thibault Liebert
+English-UK  : Arnaud Blouin, Malcolm Parsons
+Italian     : Andrea Burattin, Guybrush88, Franco Buratti, Omar Inverso, Luca Martini
+Polish	    : szemek
+
+We need you to correct or complete translations!
+See: https://translations.launchpad.net/latexdraw
diff --git a/current/res/triangle.png b/current/res/triangle.png
new file mode 100644
index 0000000..f580567
Binary files /dev/null and b/current/res/triangle.png differ
diff --git a/current/res/view-refresh.png b/current/res/view-refresh.png
new file mode 100644
index 0000000..cab4d02
Binary files /dev/null and b/current/res/view-refresh.png differ
diff --git a/current/res/wedge.png b/current/res/wedge.png
new file mode 100644
index 0000000..a21c848
Binary files /dev/null and b/current/res/wedge.png differ
diff --git a/current/shortcutWindows.vbs b/current/shortcutWindows.vbs
new file mode 100644
index 0000000..6082741
--- /dev/null
+++ b/current/shortcutWindows.vbs
@@ -0,0 +1,6 @@
+Dim Shell, DesktopPath, URL
+Set Shell = CreateObject("WScript.Shell")
+DesktopPath = Shell.SpecialFolders("Desktop")
+Set URL = Shell.CreateShortcut(DesktopPath & "\latexdraw.LNK")
+URL.TargetPath = WScript.Arguments(0)
+URL.Save
diff --git a/current/templates/Classic grid.svg b/current/templates/Classic grid.svg
new file mode 100644
index 0000000..13dceec
--- /dev/null
+++ b/current/templates/Classic grid.svg	
@@ -0,0 +1,5243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:latexdraw="http://latexdraw.sourceforge.net/namespaces/latexdraw">
+    <defs/>
+    <g>
+        <g latexdraw:type="grid" latexdraw:XLabelsSouth="true"
+            latexdraw:YLabelsWest="true" latexdraw:gridUnit="1.0"
+            latexdraw:gridEnd="5.0 5.0" latexdraw:gridStart="0.0 0.0"
+            latexdraw:origin="0.0 0.0" transform="translate(105.0 354.0)">
+            <g fill="#cc3300" latexdraw:type="subGrid"
+                latexdraw:gridDots="4" latexdraw:subDiv="4" latexdraw:Gridwidth="0.70555556">
+                <circle r="0.35277777910232544" cx="0.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="2.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="5.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="7.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="12.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="15.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="17.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="22.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="25.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="27.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="32.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="35.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="37.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="42.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="45.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="47.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="52.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="55.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="57.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="62.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="65.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="67.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="72.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="75.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="77.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="82.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="85.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="87.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="92.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="95.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="97.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="102.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="105.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="107.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="112.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="115.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="117.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="122.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="125.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="127.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="132.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="135.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="137.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="142.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="145.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="147.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="152.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="155.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="157.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="162.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="165.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="167.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="172.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="175.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="177.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="182.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="185.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="187.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="192.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="195.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="197.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="202.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="205.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="207.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="212.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="215.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="217.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="222.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="225.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="227.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="232.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="235.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="237.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="242.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="245.0" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="247.5" cy="0.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-250.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-247.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-245.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-242.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-240.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-237.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-235.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-232.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-230.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-227.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-225.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-222.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-220.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-217.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-215.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-212.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-210.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-207.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-205.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-202.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-200.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-197.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-195.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-192.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-190.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-187.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-185.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-182.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-180.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-177.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-175.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-172.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-170.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-167.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-165.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-162.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-160.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-157.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-155.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-152.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-150.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-147.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-145.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-142.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-140.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-137.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-135.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-132.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-130.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-127.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-125.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-122.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-120.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-117.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-115.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-112.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-110.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-107.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-105.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-102.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-100.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-97.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-95.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-92.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-90.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-87.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-85.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-82.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-80.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-77.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-75.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-72.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-70.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-67.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-65.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-62.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-60.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-57.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-55.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-52.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-50.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-47.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-45.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-42.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-40.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-37.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-35.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-32.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-30.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-27.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-25.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-22.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-20.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-17.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-15.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-12.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="0.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="10.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="20.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="30.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="40.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="50.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="60.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="70.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="80.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="90.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="100.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="110.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="120.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="130.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="140.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="150.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="160.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="170.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="180.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="190.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="200.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="210.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="220.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="230.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="240.0" cy="-2.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-10.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-7.5"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-5.0"/>
+                <circle r="0.35277777910232544" cx="250.0" cy="-2.5"/>
+            </g>
+            <g stroke-width="1.4111111" stroke="#990000"
+                stroke-linecap="square" latexdraw:type="grid">
+                <line x1="0.0" x2="0.0" y1="0.0" y2="-250.0"/>
+                <line x1="50.0" x2="50.0" y1="0.0" y2="-250.0"/>
+                <line x1="100.0" x2="100.0" y1="0.0" y2="-250.0"/>
+                <line x1="150.0" x2="150.0" y1="0.0" y2="-250.0"/>
+                <line x1="200.0" x2="200.0" y1="0.0" y2="-250.0"/>
+                <line x1="250.0" x2="250.0" y1="0.0" y2="-250.0"/>
+                <line x1="0.0" x2="250.0" y1="-0.0" y2="-0.0"/>
+                <line x1="0.0" x2="250.0" y1="-50.0" y2="-50.0"/>
+                <line x1="0.0" x2="250.0" y1="-100.0" y2="-100.0"/>
+                <line x1="0.0" x2="250.0" y1="-150.0" y2="-150.0"/>
+                <line x1="0.0" x2="250.0" y1="-200.0" y2="-200.0"/>
+                <line x1="0.0" x2="250.0" y1="-250.0" y2="-250.0"/>
+            </g>
+            <g font-size="10" stroke="#990000" latexdraw:type="text">
+                <text x="3" y="10">0</text>
+                <text x="53" y="10">1</text>
+                <text x="103" y="10">2</text>
+                <text x="153" y="10">3</text>
+                <text x="203" y="10">4</text>
+                <text x="253" y="10">5</text>
+                <text x="-9" y="-253">5</text>
+                <text x="-9" y="-203">4</text>
+                <text x="-9" y="-153">3</text>
+                <text x="-9" y="-103">2</text>
+                <text x="-9" y="-53">1</text>
+                <text x="-9" y="-3">0</text>
+            </g>
+        </g>
+    </g>
+</svg>
diff --git a/current/templates/Condenser.svg b/current/templates/Condenser.svg
new file mode 100644
index 0000000..60e16f1
--- /dev/null
+++ b/current/templates/Condenser.svg
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:latexdraw="http://latexdraw.sourceforge.net/namespaces/latexdraw">
+    <defs/>
+    <g>
+        <g latexdraw:type="line" id="54">
+            <line x1="69.0" x2="69.0" y1="24.0" y2="40.0"
+                stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+        </g>
+        <g latexdraw:type="line" id="55">
+            <line x1="55.0" x2="68.0" y1="32.0" y2="32.0"
+                stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+        </g>
+        <g latexdraw:type="line" id="909">
+            <line x1="77.0" x2="77.0" y1="24.0" y2="40.0"
+                stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+        </g>
+        <g latexdraw:type="line" id="925">
+            <line x1="77.0" x2="90.0" y1="32.0" y2="32.0"
+                stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+        </g>
+        <g latexdraw:type="text" id="938" font-family="Times New Roman"
+            fill="black" font-size="13" latexdraw:x="69.0">
+            <text x="69.0" y="22.0"><![CDATA[C]]></text>
+        </g>
+    </g>
+</svg>
diff --git a/current/templates/embrace.svg b/current/templates/embrace.svg
new file mode 100644
index 0000000..3b812be
--- /dev/null
+++ b/current/templates/embrace.svg
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:latexdraw="http://latexdraw.sourceforge.net/namespaces/latexdraw">
+    <defs/>
+    <g>
+        <g latexdraw:type="drawing" id="43">
+            <g latexdraw:type="bezierCurve" id="40">
+                <path
+                    d="M 153.0 79.921873 C 157.0 50.9218755 280.0 79.921873 269.0 52.921875 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="41">
+                <path
+                    d="M 154.0 79.921873 C 148.0 49.921876 21.0 79.921873 35.0 53.9218755 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+        </g>
+    </g>
+</svg>
diff --git a/current/templates/man.svg b/current/templates/man.svg
new file mode 100644
index 0000000..15d476f
--- /dev/null
+++ b/current/templates/man.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:latexdraw="http://latexdraw.sourceforge.net/namespaces/latexdraw">
+    <defs/>
+    <g>
+        <g latexdraw:type="drawing" id="29">
+            <g latexdraw:type="ellipse" id="17">
+                <ellipse rx="22.0" ry="28.5" cx="129.0" cy="204.5"
+                    latexdraw:borderPos="outer" stroke-width="2.0"
+                    stroke="black" fill="none"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="19">
+                <path
+                    d="M 132.0 234.0 C 144.0 259.0 156.0 299.0 140.0 324.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="20">
+                <path
+                    d="M 162.0 402.0 C 179.0 365.0 158.0 341.0 141.0 324.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="line" id="21">
+                <line x1="162.0" x2="181.0" y1="402.0" y2="396.0"
+                    stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="22">
+                <path
+                    d="M 140.0 323.0 C 118.0 348.0 108.0 380.0 119.0 400.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="line" id="23">
+                <line x1="118.0" x2="103.0" y1="399.0" y2="397.0"
+                    stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="24">
+                <path
+                    d="M 138.0 250.0 C 168.0 250.0 210.0 272.0 148.0 292.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="line" id="25">
+                <line x1="150.0" x2="170.0" y1="292.0" y2="298.0"
+                    stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="26">
+                <path
+                    d="M 140.0 291.0 C 110.05834319410604 286.0643120536383 73.96319560193382 260.8373793486737 138.3093072884114 250.66005598586014 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="3.2967689075150655"/>
+            </g>
+            <g latexdraw:type="line" id="27">
+                <line x1="142.0" x2="121.5154533133977" y1="291.0"
+                    y2="299.4911435385404" stroke-width="2.0"
+                    stroke="black" latexdraw:rotationAngle="3.2967689075150655"/>
+            </g>
+        </g>
+    </g>
+</svg>
diff --git a/current/templates/question.svg b/current/templates/question.svg
new file mode 100644
index 0000000..591d1b4
--- /dev/null
+++ b/current/templates/question.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:latexdraw="http://latexdraw.sourceforge.net/namespaces/latexdraw">
+    <defs/>
+    <g>
+        <g latexdraw:type="drawing" id="962">
+            <g latexdraw:type="ellipse" id="950">
+                <ellipse rx="22.0" ry="28.5" cx="122.0" cy="155.5"
+                    latexdraw:borderPos="outer" stroke-width="2.0"
+                    stroke="black" fill="none"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="952">
+                <path
+                    d="M 125.0 185.0 C 137.0 210.0 149.0 250.0 133.0 275.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="953">
+                <path
+                    d="M 155.00000000000003 353.0 C 172.0 316.0 151.0 292.0 134.0 275.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="line" id="954">
+                <line x1="155.00000000000003" x2="174.0" y1="353.0"
+                    y2="347.0" stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="955">
+                <path
+                    d="M 133.0 274.0 C 111.0 299.0 101.0 331.0 112.0 351.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="line" id="956">
+                <line x1="111.0" x2="96.0" y1="350.0" y2="348.0"
+                    stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="957">
+                <path
+                    d="M 131.0 201.0 C 161.00000000000003 201.0 203.0 223.0 141.0 243.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="line" id="958">
+                <line x1="143.0" x2="162.99999999999997" y1="243.0"
+                    y2="249.0" stroke-width="2.0" stroke="black" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="959">
+                <path
+                    d="M 131.0 201.0 C 103.0 220.0 14.0 127.0 100.0 122.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+            <g latexdraw:type="bezierCurve" id="960">
+                <path
+                    d="M 101.0 122.0 C 97.0 118.0 119.0 115.0 120.0678 126.0 "
+                    stroke-width="2.0" stroke="black" fill="none" latexdraw:rotationAngle="0.0"/>
+            </g>
+        </g>
+    </g>
+</svg>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/latexdraw.git



More information about the pkg-java-commits mailing list